added button to switch between dark and light colour schemes

This commit is contained in:
ZanzyTHEbar 2022-05-10 19:33:51 +02:00
parent bb61b67cc2
commit 038eb4501b
8 changed files with 54 additions and 12 deletions

View File

@ -11,11 +11,15 @@ github_username: RedHawk989
# Build settings
remote_theme: just-the-docs/just-the-docs
color_scheme: light
color_scheme: 'eyetrackvr'
search_enabled: true
heading_level: 6
previews: 3
sass:
style: compressed
baseurl: '/EyeTrackVR/'
favicon: "/assets/images/favicon.png" # the favicon for your site
@ -66,16 +70,12 @@ button: true
# Links at the top of the page
aux_links:
'Documentation':
- '//github.com/RedHawk989/EyeTrackVR/tree/main/docs/Reference_Docs'
'Scripts':
- '//github.com/RedHawk989/EyeTrackVR/tree/main/scripts'
'InceptionNet':
- '//github.com/RedHawk989/EyeTrackVR/tree/main/InceptionNet'
'RANSAC':
- '//github.com/RedHawk989/EyeTrackVR/tree/main/RANSAC'
'Issues':
- '//github.com/RedHawk989/EyeTrackVR/issues'
'GitHub':
- '//github.com/RedHawk989/EyeTrackVR'
'Wiki':

View File

@ -0,0 +1,25 @@
<ul>
<a href="javascript:toggleDetect()" title="Switching Schemes" class="btn btn-mode fs-2 mb-1 mb-md-0 mr-0"
id="switch-mode">Color</a>
</ul>
<script type="text/javascript">
var isClicked = false;
async function toggleDetect() {
if (isClicked == false) {
isClicked = true;
}
else {
isClicked = false;
}
await switchScheme(isClicked);
};
async function switchScheme(isClicked) {
if (isClicked == true) {
jtd.setTheme("light");
}
else {
jtd.setTheme("eyetrackvr");
}
}
</script>

View File

@ -2,4 +2,15 @@
layout: default
---
{{ content }}
<article id="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<div class="post-date">{{ page.date | date: "%b %-d, %Y" }}</div>
<ul class="post-categories">
{% for category in page.categories %}
<li class="post-category">{{ category }}</li>
{% endfor %}
</ul>
</header>
{{ content }}
</article>

View File

@ -105,6 +105,15 @@
@include btn-color($white, $btn-primary-color);
}
.btn-mode {
@include btn-color($white, $btn-primary-color);
text-transform: uppercase;
border-radius: 8px;
margin-bottom: 11px;
margin-top: 17px;
box-shadow: 2px 2px 12px 1px rgba(8, 8, 8, 0.5);
}
.btn-purple {
@include btn-color($white, $purple-100);
}

View File

@ -1,3 +0,0 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="light" %} /* Switch this to the Color Scheme of choice - the file must be in _sass/color_schemes */

View File

@ -0,0 +1,3 @@
---
---
{% include css/just-the-docs.scss.liquid color_scheme="eyetrackvr" %} /* Switch this to the Color Scheme of choice - the file must be in _sass/color_schemes */

View File

@ -1,3 +0,0 @@
"use strict";
jtd.setTheme("eyetrackervr");