knowledge.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="description" content="浠艾福成长百科 — 围绕身·智·富·行·心五大维度,用科学知识为每个家庭的健康成长保驾护航。">
  7. <meta name="keywords" content="浠艾福,成长百科,育儿知识,五维能量,亲子教育">
  8. <meta property="og:title" content="成长百科 — 浠艾福主动健康学院">
  9. <meta property="og:description" content="围绕身·智·富·行·心五大维度,用科学知识为每个家庭的健康成长保驾护航。">
  10. <meta property="og:type" content="website">
  11. <meta property="og:url" content="https://www.etotem.com.cn/knowledge.html">
  12. <meta name="theme-color" content="#4A9BD7">
  13. <title>成长百科 — 浠艾福主动健康学院</title>
  14. <link rel="stylesheet" href="css/style.css">
  15. <!-- Microsoft Clarity -->
  16. <script>
  17. (function(c,l,a,r,i,t,y){
  18. c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
  19. t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
  20. y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
  21. })(window, document, "clarity", "script", "xj4p74ra9m");
  22. </script>
  23. <style>
  24. /* ========== Knowledge Base - 100vh Single Page ========== */
  25. :root {
  26. --kb-body: #FF8C42;
  27. --kb-wisdom: #6366F1;
  28. --kb-wealth: #F59E0B;
  29. --kb-action: #10B981;
  30. --kb-heart: #FF6B9D;
  31. }
  32. html.knowledge-page, .knowledge-page body {
  33. height: 100vh;
  34. overflow: hidden;
  35. }
  36. .knowledge-page body {
  37. display: flex;
  38. flex-direction: column;
  39. background: #FAFBFC;
  40. }
  41. /* ---- Background silhouettes ---- */
  42. .kb-bg {
  43. position: fixed;
  44. inset: 0;
  45. z-index: 0;
  46. pointer-events: none;
  47. overflow: hidden;
  48. }
  49. .kb-bg svg {
  50. position: absolute;
  51. height: 70vh;
  52. width: auto;
  53. opacity: 0.06;
  54. color: #4A5568;
  55. }
  56. .kb-bg-solo {
  57. left: -4%;
  58. bottom: 5%;
  59. }
  60. .kb-bg-group {
  61. right: -4%;
  62. top: 10%;
  63. height: 55vh;
  64. }
  65. @media (max-width: 768px) {
  66. .kb-bg svg { opacity: 0.04; }
  67. .kb-bg-solo { left: -20%; bottom: 0; height: 50vh; }
  68. .kb-bg-group { right: -20%; top: 5%; height: 40vh; }
  69. }
  70. @media (max-width: 480px) {
  71. .kb-bg-solo { left: -40%; }
  72. .kb-bg-group { right: -30%; }
  73. }
  74. /* ---- Main layout ---- */
  75. .kb-main {
  76. position: relative;
  77. z-index: 1;
  78. flex: 1;
  79. display: flex;
  80. flex-direction: column;
  81. padding: 0 var(--space-lg);
  82. max-width: 1200px;
  83. width: 100%;
  84. margin: 0 auto;
  85. overflow: hidden;
  86. }
  87. /* ---- Header ---- */
  88. .kb-header {
  89. text-align: center;
  90. padding: var(--space-xl) 0 var(--space-lg);
  91. flex-shrink: 0;
  92. }
  93. .kb-header h1 {
  94. font-size: 2.2rem;
  95. font-weight: 800;
  96. color: var(--color-text-primary);
  97. margin-bottom: var(--space-xs);
  98. letter-spacing: 0.02em;
  99. }
  100. .kb-header p {
  101. font-size: var(--font-size-small);
  102. color: var(--color-text-secondary);
  103. line-height: 1.6;
  104. }
  105. /* ---- Desktop cards (flex row, all visible) ---- */
  106. .kb-desktop {
  107. display: flex;
  108. gap: var(--space-md);
  109. flex: 1;
  110. padding-bottom: var(--space-lg);
  111. min-height: 0;
  112. }
  113. .kb-card {
  114. flex: 1;
  115. display: flex;
  116. flex-direction: column;
  117. background: #fff;
  118. border-radius: var(--radius-lg);
  119. border: 1px solid var(--color-border-light);
  120. box-shadow: var(--shadow-sm);
  121. overflow: hidden;
  122. transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  123. }
  124. .kb-card:hover {
  125. box-shadow: var(--shadow-md);
  126. transform: translateY(-3px);
  127. }
  128. .kb-card-head {
  129. padding: var(--space-md) var(--space-md) var(--space-sm);
  130. border-bottom: 2px solid var(--color-border-light);
  131. flex-shrink: 0;
  132. display: flex;
  133. align-items: center;
  134. gap: var(--space-sm);
  135. }
  136. .kb-card-dot {
  137. width: 10px;
  138. height: 10px;
  139. border-radius: 50%;
  140. flex-shrink: 0;
  141. }
  142. .kb-card-name {
  143. font-size: 1.05rem;
  144. font-weight: 800;
  145. line-height: 1.2;
  146. }
  147. .kb-card-body {
  148. padding: var(--space-sm) var(--space-md) var(--space-md);
  149. overflow-y: auto;
  150. flex: 1;
  151. }
  152. .kb-card-body a {
  153. display: flex;
  154. align-items: center;
  155. gap: var(--space-sm);
  156. padding: var(--space-sm) 0;
  157. text-decoration: none;
  158. color: var(--color-text-secondary);
  159. border-bottom: 1px solid var(--color-border-light);
  160. transition: color var(--transition-fast);
  161. font-size: var(--font-size-small);
  162. line-height: 1.4;
  163. }
  164. .kb-card-body a:last-child {
  165. border-bottom: none;
  166. }
  167. .kb-card-body a:hover {
  168. color: var(--color-primary);
  169. }
  170. .kb-card-body a .kb-a-icon {
  171. font-size: 1.1rem;
  172. flex-shrink: 0;
  173. }
  174. .kb-card-body a .kb-a-title {
  175. flex: 1;
  176. min-width: 0;
  177. }
  178. .kb-card-body a .kb-a-arrow {
  179. flex-shrink: 0;
  180. font-size: 0.85rem;
  181. opacity: 0.4;
  182. transition: transform var(--transition-fast), opacity var(--transition-fast);
  183. }
  184. .kb-card-body a:hover .kb-a-arrow {
  185. transform: translateX(3px);
  186. opacity: 0.8;
  187. }
  188. .kb-card-body .kb-coming {
  189. opacity: 0.55;
  190. cursor: default;
  191. border-bottom-color: var(--color-border-light);
  192. position: relative;
  193. }
  194. .kb-card-body .kb-coming:hover {
  195. color: var(--color-text-secondary);
  196. }
  197. .kb-card-body .kb-coming:hover .kb-a-arrow {
  198. transform: none;
  199. opacity: 0.4;
  200. }
  201. .kb-coming-badge {
  202. font-size: 0.68rem;
  203. color: var(--color-text-muted);
  204. background: var(--color-bg-secondary);
  205. padding: 0.15em 0.5em;
  206. border-radius: var(--radius-full);
  207. white-space: nowrap;
  208. }
  209. /* ---- Mobile tabs + article list ---- */
  210. .kb-mobile {
  211. display: none;
  212. flex-direction: column;
  213. flex: 1;
  214. min-height: 0;
  215. padding-bottom: var(--space-md);
  216. }
  217. .kb-tabs {
  218. display: flex;
  219. gap: var(--space-xs);
  220. padding: 0 0 var(--space-sm);
  221. flex-shrink: 0;
  222. overflow-x: auto;
  223. -webkit-overflow-scrolling: touch;
  224. scrollbar-width: none;
  225. }
  226. .kb-tabs::-webkit-scrollbar { display: none; }
  227. .kb-tab {
  228. flex-shrink: 0;
  229. padding: 0.5em 1.1em;
  230. font-size: 0.9375rem;
  231. font-weight: 700;
  232. border: 2px solid var(--color-border-light);
  233. border-radius: var(--radius-full);
  234. background: #fff;
  235. color: var(--color-text-secondary);
  236. cursor: pointer;
  237. transition: all var(--transition-fast);
  238. line-height: 1.3;
  239. font-family: inherit;
  240. }
  241. .kb-tab:hover {
  242. border-color: var(--color-primary);
  243. color: var(--color-primary);
  244. }
  245. .kb-tab.active {
  246. border-color: var(--tab-color, var(--color-primary));
  247. background: color-mix(in srgb, var(--tab-color, var(--color-primary)) 10%, white);
  248. color: var(--tab-color, var(--color-primary));
  249. }
  250. .kb-articles {
  251. flex: 1;
  252. overflow-y: auto;
  253. -webkit-overflow-scrolling: touch;
  254. padding: 0 var(--space-xs);
  255. }
  256. .kb-article-item {
  257. display: flex;
  258. align-items: center;
  259. gap: var(--space-sm);
  260. padding: var(--space-sm) var(--space-md);
  261. background: #fff;
  262. border-radius: var(--radius-md);
  263. border: 1px solid var(--color-border-light);
  264. text-decoration: none;
  265. color: var(--color-text-primary);
  266. margin-bottom: var(--space-sm);
  267. transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  268. }
  269. .kb-article-item:last-child { margin-bottom: 0; }
  270. .kb-article-item:active {
  271. box-shadow: var(--shadow-sm);
  272. border-color: var(--color-primary);
  273. }
  274. .kb-article-item .kb-a-icon { font-size: 1.3rem; flex-shrink: 0; }
  275. .kb-article-item .kb-a-info { flex: 1; min-width: 0; }
  276. .kb-article-item .kb-a-info h4 {
  277. font-size: 0.9375rem;
  278. font-weight: 700;
  279. margin-bottom: 0.15em;
  280. line-height: 1.3;
  281. }
  282. .kb-article-item .kb-a-info p {
  283. font-size: 0.8125rem;
  284. color: var(--color-text-muted);
  285. line-height: 1.4;
  286. display: -webkit-box;
  287. -webkit-line-clamp: 2;
  288. -webkit-box-orient: vertical;
  289. overflow: hidden;
  290. }
  291. .kb-mobile-coming {
  292. opacity: 0.6;
  293. pointer-events: none;
  294. }
  295. .kb-mobile-coming .kb-a-info h4::after {
  296. content: "即将上线";
  297. font-size: 0.68rem;
  298. color: var(--color-text-muted);
  299. background: var(--color-bg-secondary);
  300. padding: 0.15em 0.5em;
  301. border-radius: var(--radius-full);
  302. margin-left: 0.5em;
  303. font-weight: 400;
  304. }
  305. /* ---- Footer ---- */
  306. .kb-footer {
  307. flex-shrink: 0;
  308. text-align: center;
  309. padding: var(--space-sm) 0;
  310. font-size: var(--font-size-tiny);
  311. color: var(--color-text-muted);
  312. border-top: 1px solid var(--color-border-light);
  313. }
  314. .kb-footer a {
  315. color: var(--color-text-muted);
  316. text-decoration: none;
  317. }
  318. .kb-footer a:hover { color: var(--color-primary); }
  319. /* ---- Responsive ---- */
  320. @media (max-width: 900px) {
  321. .kb-card-name { font-size: 0.95rem; }
  322. .kb-card-body a { font-size: 0.8125rem; }
  323. }
  324. @media (max-width: 768px) {
  325. .kb-desktop { display: none; }
  326. .kb-mobile { display: flex; }
  327. .kb-header { padding: var(--space-md) 0; }
  328. .kb-header h1 { font-size: 1.6rem; }
  329. .kb-main { padding: 0 var(--space-md); }
  330. }
  331. @media (max-width: 480px) {
  332. .kb-header h1 { font-size: 1.4rem; }
  333. .kb-tabs { gap: 4px; }
  334. .kb-tab { padding: 0.4em 0.85em; font-size: 0.875rem; }
  335. }
  336. /* Hide scroll indicator from old pages if present */
  337. .scroll-indicator { display: none; }
  338. </style>
  339. </head>
  340. <body class="knowledge-page">
  341. <!-- ==================== Navigation ==================== -->
  342. <header class="site-header" id="header">
  343. <div class="container header-inner">
  344. <a href="index.html" class="logo">
  345. <img src="logo.png" alt="浠艾福" class="logo-img" width="36" height="36">
  346. <span class="logo-text">浠艾福</span>
  347. <span class="logo-tag">主动健康</span>
  348. </a>
  349. <button class="nav-toggle" id="navToggle" aria-label="切换导航">
  350. <span></span><span></span><span></span>
  351. </button>
  352. <nav class="nav" id="nav">
  353. <ul class="nav-list">
  354. <li><a href="index.html" class="nav-link">首页</a></li>
  355. <li><a href="knowledge.html" class="nav-link active">成长百科</a></li>
  356. </ul>
  357. </nav>
  358. </div>
  359. </header>
  360. <!-- ==================== Background Silhouettes ==================== -->
  361. <div class="kb-bg" aria-hidden="true">
  362. <!-- Solo figure: inner cultivation (身·智·心) -->
  363. <svg class="kb-bg-solo" viewBox="0 0 120 280" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
  364. <ellipse cx="60" cy="24" rx="16" ry="18"/>
  365. <path d="M44,42 L76,42 C76,42 84,90 80,122 L40,122 C36,90 44,42 44,42 Z"/>
  366. <path d="M44,58 L16,96 L26,104 L48,72"/>
  367. <path d="M76,58 L104,96 L94,104 L72,72"/>
  368. <path d="M46,122 L34,270 L50,270 L54,122 Z"/>
  369. <path d="M66,122 L70,270 L86,270 L74,122 Z"/>
  370. </svg>
  371. <!-- Group figures: external relationships (行·富) -->
  372. <svg class="kb-bg-group" viewBox="0 0 280 260" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
  373. <g transform="translate(8,58) scale(0.55)">
  374. <ellipse cx="60" cy="24" rx="16" ry="18"/>
  375. <path d="M44,42 L76,42 C76,42 84,90 80,122 L40,122 C36,90 44,42 44,42 Z"/>
  376. <path d="M44,58 L16,96 L26,104 L48,72"/>
  377. <path d="M76,58 L104,96 L94,104 L72,72"/>
  378. <path d="M46,122 L34,270 L50,270 L54,122 Z"/>
  379. <path d="M66,122 L70,270 L86,270 L74,122 Z"/>
  380. </g>
  381. <g transform="translate(95,20) scale(0.78)">
  382. <ellipse cx="60" cy="24" rx="16" ry="18"/>
  383. <path d="M44,42 L76,42 C76,42 84,90 80,122 L40,122 C36,90 44,42 44,42 Z"/>
  384. <path d="M44,58 L16,96 L26,104 L48,72"/>
  385. <path d="M76,58 L104,96 L94,104 L72,72"/>
  386. <path d="M46,122 L34,270 L50,270 L54,122 Z"/>
  387. <path d="M66,122 L70,270 L86,270 L74,122 Z"/>
  388. </g>
  389. <g transform="translate(185,50) scale(0.64)">
  390. <ellipse cx="60" cy="24" rx="16" ry="18"/>
  391. <path d="M44,42 L76,42 C76,42 84,90 80,122 L40,122 C36,90 44,42 44,42 Z"/>
  392. <path d="M44,58 L16,96 L26,104 L48,72"/>
  393. <path d="M76,58 L104,96 L94,104 L72,72"/>
  394. <path d="M46,122 L34,270 L50,270 L54,122 Z"/>
  395. <path d="M66,122 L70,270 L86,270 L74,122 Z"/>
  396. </g>
  397. </svg>
  398. </div>
  399. <!-- ==================== Main Content ==================== -->
  400. <div class="kb-main">
  401. <!-- Header -->
  402. <div class="kb-header">
  403. <h1>成长百科</h1>
  404. <p>科学育儿 · 从了解开始 — 围绕 <strong>身 · 智 · 富 · 行 · 心</strong> 五大维度</p>
  405. </div>
  406. <!-- ===== Desktop Layout ===== -->
  407. <div class="kb-desktop" id="kbDesktop">
  408. <!-- Cards injected by JS -->
  409. </div>
  410. <!-- ===== Mobile Layout ===== -->
  411. <div class="kb-mobile" id="kbMobile">
  412. <div class="kb-tabs" id="kbTabs"></div>
  413. <div class="kb-articles" id="kbArticles"></div>
  414. </div>
  415. <!-- Footer -->
  416. <div class="kb-footer">
  417. <a href="index.html">返回首页</a> &nbsp;·&nbsp; &copy; 2026 亿图腾(北京)科技有限公司
  418. </div>
  419. </div>
  420. <script>
  421. /* ===== Data ===== */
  422. var DIMS = [
  423. { key:'body', label:'身', color:'#FF8C42', subtitle:'根基永固 · 主动健康' },
  424. { key:'wisdom', label:'智', color:'#6366F1', subtitle:'赋能未来 · 智慧启迪' },
  425. { key:'wealth', label:'富', color:'#F59E0B', subtitle:'利他创富 · 价值创造' },
  426. { key:'action', label:'行', color:'#10B981', subtitle:'人际和谐 · 知行合一' },
  427. { key:'heart', label:'心', color:'#FF6B9D', subtitle:'大爱相随 · 情感滋养' }
  428. ];
  429. var ARTICLES = {
  430. body: [
  431. { icon:'🌿', title:'孩子过敏反复不好,根源可能在肠道', desc:'从肠道菌群-免疫-过敏三角关系出发,解析儿童过敏的深层原因。', url:'geo-faq-1-allergy.html' },
  432. { icon:'🛡️', title:'儿童免疫力提升3大关键步骤', desc:'从肠道微生态、营养支持与睡眠节律三个维度系统提升自护力。', url:'geo-faq-3-immunity.html' },
  433. { icon:'🌊', title:'微塑料对家庭健康的隐形危害', desc:'揭秘微塑料如何影响肠道菌群与激素系统及家庭防护策略。', url:'plastic-health.html' },
  434. { icon:'🍎', title:'精准营养:每个家庭的健康基石', desc:'基于个体代谢特征定制真正适合家人的膳食方案。', coming:true }
  435. ],
  436. wisdom: [
  437. { icon:'🧠', title:'注意力不集中,先查肠道再谈训练', desc:'肠道菌群通过肠-脑轴影响注意力与认知功能,科学认知从根源入手。', url:'geo-faq-2-attention.html' },
  438. { icon:'📖', title:'成长型思维:帮助孩子拥抱挑战', desc:'从心理学研究出发,培养孩子面对困难时不放弃的核心信念。', coming:true }
  439. ],
  440. wealth: [
  441. { icon:'💡', title:'从小培养孩子的财商思维', desc:'零花钱管理、目标储蓄与价值交换,让财商教育融入日常生活。', coming:true },
  442. { icon:'🌱', title:'家庭创客生态:利他中的财富', desc:'在利他分享中创造价值,探索适合家庭的第二收入曲线。', coming:true }
  443. ],
  444. action: [
  445. { icon:'🤝', title:'如何培养孩子的社交能力', desc:'从家庭互动到同伴交往,帮助孩子建立积极健康的人际关系。', coming:true },
  446. { icon:'🏕️', title:'亲子户外活动:在自然中成长', desc:'走出室内,用大自然的力量滋养孩子的身体与心灵。', coming:true }
  447. ],
  448. heart: [
  449. { icon:'💛', title:'亲子沟通:如何听懂孩子的心', desc:'从共情力到非暴力沟通,帮助家长走进孩子的内心世界。', coming:true },
  450. { icon:'🕊️', title:'儿童情绪管理:从认知到调节', desc:'理解各年龄段情绪发展规律,掌握实用的情绪疏导方法。', coming:true }
  451. ]
  452. };
  453. /* ===== Build Desktop Cards ===== */
  454. (function buildDesktop() {
  455. var container = document.getElementById('kbDesktop');
  456. var html = '';
  457. for (var i = 0; i < DIMS.length; i++) {
  458. var d = DIMS[i];
  459. var arts = ARTICLES[d.key] || [];
  460. html += '<div class="kb-card">';
  461. html += '<div class="kb-card-head">';
  462. html += '<span class="kb-card-dot" style="background:' + d.color + '"></span>';
  463. html += '<span class="kb-card-name" style="color:' + d.color + '">' + d.label + ' · ' + d.subtitle + '</span>';
  464. html += '</div>';
  465. html += '<div class="kb-card-body">';
  466. for (var j = 0; j < arts.length; j++) {
  467. var a = arts[j];
  468. if (a.coming) {
  469. html += '<div class="kb-coming">';
  470. html += '<span class="kb-a-icon">' + a.icon + '</span>';
  471. html += '<span class="kb-a-title">' + a.title + '</span>';
  472. html += '<span class="kb-coming-badge">即将上线</span>';
  473. html += '</div>';
  474. } else {
  475. html += '<a href="' + a.url + '">';
  476. html += '<span class="kb-a-icon">' + a.icon + '</span>';
  477. html += '<span class="kb-a-title">' + a.title + '</span>';
  478. html += '<span class="kb-a-arrow">→</span>';
  479. html += '</a>';
  480. }
  481. }
  482. html += '</div></div>';
  483. }
  484. container.innerHTML = html;
  485. })();
  486. /* ===== Build Mobile Tabs ===== */
  487. var activeDim = 'body';
  488. function buildTabs() {
  489. var container = document.getElementById('kbTabs');
  490. var html = '';
  491. for (var i = 0; i < DIMS.length; i++) {
  492. var d = DIMS[i];
  493. var active = d.key === activeDim ? ' active' : '';
  494. html += '<button class="kb-tab' + active + '" style="--tab-color:' + d.color + '" data-dim="' + d.key + '" onclick="switchTab(\'' + d.key + '\')">' + d.label + '</button>';
  495. }
  496. container.innerHTML = html;
  497. }
  498. function renderArticles(dimKey) {
  499. var container = document.getElementById('kbArticles');
  500. var arts = ARTICLES[dimKey] || [];
  501. var html = '';
  502. for (var i = 0; i < arts.length; i++) {
  503. var a = arts[i];
  504. if (a.coming) {
  505. html += '<div class="kb-article-item kb-mobile-coming">';
  506. html += '<span class="kb-a-icon">' + a.icon + '</span>';
  507. html += '<div class="kb-a-info"><h4>' + a.title + '</h4><p>' + a.desc + '</p></div>';
  508. html += '</div>';
  509. } else {
  510. html += '<a href="' + a.url + '" class="kb-article-item">';
  511. html += '<span class="kb-a-icon">' + a.icon + '</span>';
  512. html += '<div class="kb-a-info"><h4>' + a.title + '</h4><p>' + a.desc + '</p></div>';
  513. html += '<span style="color:var(--color-text-muted);font-size:0.9rem">→</span>';
  514. html += '</a>';
  515. }
  516. }
  517. container.innerHTML = html;
  518. }
  519. function switchTab(dimKey) {
  520. activeDim = dimKey;
  521. // Update active tab
  522. var tabs = document.querySelectorAll('#kbTabs .kb-tab');
  523. for (var i = 0; i < tabs.length; i++) {
  524. tabs[i].classList.remove('active');
  525. if (tabs[i].getAttribute('data-dim') === dimKey) {
  526. tabs[i].classList.add('active');
  527. }
  528. }
  529. renderArticles(dimKey);
  530. }
  531. buildTabs();
  532. renderArticles(activeDim);
  533. </script>
  534. <script>
  535. // Mobile nav toggle
  536. document.getElementById('navToggle').addEventListener('click', function() {
  537. document.getElementById('nav').classList.toggle('nav-open');
  538. this.classList.toggle('active');
  539. });
  540. </script>
  541. </body>
  542. </html>