mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-25 18:32:17 +00:00
deploy: 76bfb8b112
This commit is contained in:
@@ -231,6 +231,12 @@
|
||||
target="_blank">SimpleXMQ
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg>
|
||||
</a></li>
|
||||
<hr>
|
||||
<li>
|
||||
<a href="/old" class="site-switch-btn">
|
||||
<p>Old site</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -323,7 +329,7 @@
|
||||
|
||||
|
||||
<li>
|
||||
<a href="/docs/code_of_conduct.html" class="flag-anchor">
|
||||
<a href="/docs/code_of_conduct.html">
|
||||
<p>English</p>
|
||||
</a>
|
||||
</li>
|
||||
@@ -401,41 +407,40 @@ const userTheme = localStorage.getItem('theme');
|
||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const prismThemeLink = document.getElementById('prism-theme')
|
||||
|
||||
const iconToggle = () => {
|
||||
function iconToggle () {
|
||||
sunIcon.classList.toggle('hidden');
|
||||
moonIcon.classList.toggle('hidden');
|
||||
}
|
||||
|
||||
const themeCheck = () => {
|
||||
if(userTheme === 'dark' || (!userTheme && systemTheme)){
|
||||
function themeCheck() {
|
||||
if (userTheme === 'dark' || (!userTheme && systemTheme)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
moonIcon.classList.add('hidden');
|
||||
if(prismThemeLink){
|
||||
if (prismThemeLink) {
|
||||
prismThemeLink.setAttribute('href','/css/prism-dark.min.css')
|
||||
}
|
||||
}
|
||||
else{
|
||||
sunIcon.classList.add('hidden');
|
||||
if(prismThemeLink){
|
||||
if (prismThemeLink) {
|
||||
prismThemeLink.setAttribute('href','/css/prism-light.min.css')
|
||||
}
|
||||
}
|
||||
}
|
||||
themeCheck();
|
||||
|
||||
const themeSwitch = () => {
|
||||
if(document.documentElement.classList.contains('dark')){
|
||||
function themeSwitch () {
|
||||
if (document.documentElement.classList.contains('dark')) {
|
||||
document.documentElement.classList.remove('dark');
|
||||
localStorage.setItem('theme','light');
|
||||
localStorage.setItem('theme', 'light');
|
||||
if(prismThemeLink){
|
||||
prismThemeLink.setAttribute('href','/css/prism-light.min.css')
|
||||
}
|
||||
iconToggle();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
document.documentElement.classList.add('dark');
|
||||
localStorage.setItem('theme','dark');
|
||||
if(prismThemeLink){
|
||||
localStorage.setItem('theme', 'dark');
|
||||
if (prismThemeLink) {
|
||||
prismThemeLink.setAttribute('href','/css/prism-dark.min.css')
|
||||
}
|
||||
iconToggle();
|
||||
|
||||
Reference in New Issue
Block a user