Azivandor commited on
Commit
4278b32
·
verified ·
1 Parent(s): 93604ef

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +14 -4
index.html CHANGED
@@ -52,8 +52,17 @@
52
  <!-- JavaScript Engine will build entries here -->
53
  </div>
54
  </div>
55
- <script>
56
- // Automatically fetch data from your spreadsheet
 
 
 
 
 
 
 
 
 
57
  fetch('atlas.json')
58
  .then(response => response.json())
59
  .then(data => {
@@ -70,8 +79,9 @@
70
  </div>
71
 
72
  <div class="atlas-layout">
73
- <div class="flag-box">
74
- <img src="${country.flag_url}" alt="Flag of ${country.name}">
 
75
  </div>
76
  <div class="atlas-desc">
77
  <p style="color: #cbd5e1; font-size: 1.05rem; margin: 0; line-height: 1.6;">
 
52
  <!-- JavaScript Engine will build entries here -->
53
  </div>
54
  </div>
55
+ <script>
56
+ // SMART LOGIC: Automatically converts any two-letter country code into a colorful flag emoji!
57
+ function getFlagEmoji(countryCode) {
58
+ const codePoints = countryCode
59
+ .toUpperCase()
60
+ .split('')
61
+ .map(char => 127397 + char.charCodeAt(0));
62
+ return String.fromCodePoint(...codePoints);
63
+ }
64
+
65
+ // Fetch your spreadsheet data
66
  fetch('atlas.json')
67
  .then(response => response.json())
68
  .then(data => {
 
79
  </div>
80
 
81
  <div class="atlas-layout">
82
+ <!-- AUTOMATED IMAGE BOX: Renders a large, scalable native flag with no internet dependencies! -->
83
+ <div style="font-size: 5rem; line-height: 1; padding-right: 25px; user-select: none;">
84
+ ${getFlagEmoji(country.id)}
85
  </div>
86
  <div class="atlas-desc">
87
  <p style="color: #cbd5e1; font-size: 1.05rem; margin: 0; line-height: 1.6;">