-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
147 lines (129 loc) · 7.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APBD: Food List</title>
<meta name="description"
content="A list of foods sorted by glycemic indices, glycemic loads, sugar & carbs. Can help people with APBD by letting them know which foods are better for them, and which are worse.">
<link rel="stylesheet" href="style/main.css">
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VPXMF38X8C"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VPXMF38X8C');
</script>
<body>
<header>
<h1 ti="0" onclick="window.location.href = window.location.origin + window.location.search">{{APBD Foods List}}
</h1>
<nav class="header-menu">
<div>
<a ti="1" id="about" href="#">{{About}}</a>
<div id="about-menu" class="navbar-menu">
<a ti="145" target="_blank" href="https://github.com/ShaharMS/APBD-FoodList/blob/main/README.md">{{Website}} <span>↗</span></a>
<a target="_blank" href="https://rarediseases.org/rare-diseases/adult-polyglucosan-body-disease/">APBD <span>↗</span></a>
<a ti="146"
onclick="window.location.href = window.location.origin + `/about/database${'_' + (new URLSearchParams(window.location.search).get('lang') || 'en')}.html` + window.location.search"
href="#">{{Food Database}}</a>
</div>
</div>
<div>
<a ti="2" id="contribute" href="#">{{Contribute}}</a>
<div id="contribute-menu" class="navbar-menu">
<a ti="32"
onclick="window.location.href = window.location.origin + '/contribute/request.html' + window.location.search"
href="#">{{Request data}}</a>
<a ti="33"
onclick="window.location.href = window.location.origin + '/contribute/provide.html' + window.location.search"
href="#">{{Provide data}}</a>
<a ti="66"
onclick="window.location.href = window.location.origin + '/contribute/leaderboards.html' + window.location.search"
href="#">{{Leaderboards}}</a>
</div>
</div>
<div>
<a ti="3" id="contact" href="#">{{Contact}}</a>
<div id="contact-menu" class="navbar-menu">
<a ti="34" href="https://github.com/ShaharMS/APBD-FoodList">{{Website Code}} <span>↗</span></a>
<a id="discord" ti="35" href="#" onclick="navigator.clipboard.writeText('shaharms');">{{Discord}}:
shaharms</a>
</div>
</div>
</nav>
</header>
<div class="container">
<blockquote ti="4">
{{A list of foods sorted by multiple catorgories, such as glycemic indices, glycemic loads, sugars & carbs. Low glycemic loads & indices should be better for people with APBD. Some foods are missing? click the "contribute" option}}
</blockquote>
<div class="color-range-display">
<p style="--color: #00ff00" ti="235"> - {{Great}}</p>
<p style="--color: #9fe2bf" ti="236"> - {{Okay}}</p>
<p style="--color: #ffff00" ti="237"> - {{Not Good}}</p>
<p style="--color: #ff0000" ti="238"> - {{Very Bad}}</p>
</div>
<h3 id="change-count-text" style="display: none;">
</h3>
<div id="search-form">
<button type="button" class="search">⌕</button>
<input id="food-search" placeholder="Search..." autocomplete="on">
<select class="sort-switch" id="sort-switch">
<option ti="56 5" value="name-d">{{Sort By}}: {{Name}} ↓</option>
<option ti="56 5" value="name-u">{{Sort By}}: {{Name}} ↑</option>
<option ti="56 201" value="company-d">{{Sort By}}: {{Food Company}} ↓</option>
<option ti="56 201" value="company-u">{{Sort By}}: {{Food Company}} ↑</option>
<option ti="56 6" value="glycemic-index-d">{{Sort By}}: {{Glycemic Index}} ↓</option>
<option ti="56 6" value="glycemic-index-u">{{Sort By}}: {{Glycemic Index}} ↑</option>
<option ti="56 7" value="glycemic-load-d">{{Sort By}}: {{Glycemic Load}} ↓</option>
<option ti="56 7" value="glycemic-load-u">{{Sort By}}: {{Glycemic Load}} ↑</option>
<option ti="56 8 50" value="sugars-d">{{Sort By}}: {{Sugars}} ({{In Grams}})↓</option>
<option ti="56 8 50" value="sugars-u">{{Sort By}}: {{Sugars}} ({{In Grams}})↑</option>
<option ti="56 9 50" value="carbs-d">{{Sort By}}: {{Carbs}} ({{In Grams}})↓</option>
<option ti="56 9 50" value="carbs-u">{{Sort By}}: {{Carbs}} ({{In Grams}})↑</option>
</select>
<select class="language-switch" id="language-switch">
<option ti="10" value="en">{{English}}</option>
<option ti="11" value="he">{{Hebrew}}</option>
</select>
</div>
<table id="food-list">
</table>
<h1 id="loading-h1" style="display: inline; direction: ltr !important;">Loading Table<span id="loading-dots">.</span></h1>
<code id="loading-details" style="direction: ltr !important; padding-top: 0px; margin-top: -20px;">Activating table loading script...</code>
<p id="loading-p" ti="200" style="text-align: center; direction: ltr !important; opacity: 0.5;">ⓘ The double curly-brackets are used when the website is translated to different languages.</p>
<script>
let parameters = new URLSearchParams(window.location.search);
document.getElementById("food-search").value = parameters.get("search") || "";
var LANGUAGE = parameters.get("lang") || "en";
if (LANGUAGE === "he") {
let h1 = document.getElementById("loading-h1");
h1.style.direction = "rtl !important";
h1.innerHTML = "<span id=\"loading-dots\">.</span>טוען טבלה";
let details = document.getElementById("loading-details");
details.style.direction = "rtl !important";
details.innerHTML = "מפעיל קוד טעינת רשימה.‏.‏.‏";
let p = document.getElementById("loading-p");
p.style.direction = "rtl !important";
p.innerHTML = "הסוגריים מסולסלים הכפולים מסביב לחלקים באתר נמצאים על מנת לעזור בתרגום האתר לשפות שונות.‏"
}
let loadingDots = document.getElementById("loading-dots");
let dots = ".";
var INTERVAL = setInterval(() => {
loadingDots.innerText = dots;
dots += "."
if (dots.length > 3) dots = "."
}, 500)
</script>
</div>
<script src="code/translator.js"></script>
<script src="code/switches.js"></script>
<script src="code/searchbar.js"></script>
<script src="code/dropdowns.js"></script>
<script src="code/table-sorter.js"></script>
<script src="code/table-data.js"></script>
<script type="module" src="code/table-loader.js" async="true"></script>
</body>
</html>