|
12 | 12 | .article-nav a{padding:10px 14px;border:1px solid #2a2a2a;border-radius:10px;text-decoration:none} |
13 | 13 | .article-nav a:hover{background:#0b0b0b}</style><style>.article-body{margin-top:56px}</style><style>.article-kicker{font-size:.9rem;color:#9aa3af;margin-top:8px} |
14 | 14 | .article-author{font-size:.95rem;color:#c7cdd6;margin-top:6px} |
15 | | -.article-body{margin-top:56px}</style></head> |
16 | | -<body class="lux"> |
| 15 | +.article-body{margin-top:56px}</style><style>/* AURUM-DELTA: spacing under fixed header */ |
| 16 | +.article-offset{padding-top:140px} |
| 17 | +/* Bilingual visibility */ |
| 18 | +.lang-block{display:none} |
| 19 | +.lang-block.active{display:block} |
| 20 | +.lang-switch{margin:10px 0 0;display:flex;gap:8px;align-items:center} |
| 21 | +.lang-switch button{padding:6px 10px;border:1px solid #2a2a2a;border-radius:8px;background:transparent;cursor:pointer} |
| 22 | +.lang-switch button.active{background:#0b0b0b}</style></head> |
| 23 | +<body class="article-offset lux"> |
17 | 24 | <header class="nav"> |
18 | 25 | <div class="container nav-inner nav-container-wide"> |
19 | 26 | <div class="brand"><img alt="Metridex" class="brand-logo" src="/logo/metridex_logo_header.png"/></div> |
@@ -91,5 +98,38 @@ <h2>5) Что дальше</h2> |
91 | 98 | </div> |
92 | 99 | </section> |
93 | 100 | <footer class="footer"><div class="container"><p>© <span id="year"></span> Metridex.</p></div></footer> |
94 | | -<div class="article-nav"><a href="/articles.html">← Back to Articles</a><a href="/article-whois-wayback_bilingual_v2.html">← Prev: WHOIS & Wayback checks</a></div></body> |
| 101 | +<div class="article-nav"><a href="/articles.html">← Back to Articles</a><a href="/article-whois-wayback_bilingual_v2.html">← Prev: WHOIS & Wayback checks</a></div><script>(function(){ |
| 102 | + function switchTo(lang){ |
| 103 | + document.documentElement.setAttribute('lang', lang); |
| 104 | + var blocks = document.querySelectorAll('.lang-block'); |
| 105 | + blocks.forEach(function(el){ |
| 106 | + if (el.classList.contains('lang-' + lang)){ |
| 107 | + el.classList.add('active'); |
| 108 | + el.style.display = 'block'; |
| 109 | + } else { |
| 110 | + el.classList.remove('active'); |
| 111 | + el.style.display = 'none'; |
| 112 | + } |
| 113 | + }); |
| 114 | + document.querySelectorAll('.lang-switch [data-lang]').forEach(function(btn){ |
| 115 | + btn.classList.toggle('active', btn.getAttribute('data-lang')===lang); |
| 116 | + }); |
| 117 | + try{ localStorage.setItem('lang', lang); }catch(e){} |
| 118 | + } |
| 119 | + var pref = 'en'; |
| 120 | + try{ |
| 121 | + var s = localStorage.getItem('lang'); |
| 122 | + if (s === 'ru' || s === 'en') pref = s; |
| 123 | + }catch(e){} |
| 124 | + // initial |
| 125 | + switchTo(pref); |
| 126 | + // hook buttons |
| 127 | + document.addEventListener('click', function(e){ |
| 128 | + var t = e.target; |
| 129 | + if (t && t.matches('.lang-switch [data-lang]')){ |
| 130 | + e.preventDefault(); |
| 131 | + switchTo(t.getAttribute('data-lang')); |
| 132 | + } |
| 133 | + }); |
| 134 | +})();</script></body> |
95 | 135 | </html> |
0 commit comments