mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
added button to switch between dark and light colour schemes
This commit is contained in:
parent
bb61b67cc2
commit
038eb4501b
@ -11,11 +11,15 @@ github_username: RedHawk989
|
|||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
remote_theme: just-the-docs/just-the-docs
|
remote_theme: just-the-docs/just-the-docs
|
||||||
color_scheme: light
|
color_scheme: 'eyetrackvr'
|
||||||
search_enabled: true
|
search_enabled: true
|
||||||
heading_level: 6
|
heading_level: 6
|
||||||
previews: 3
|
previews: 3
|
||||||
|
|
||||||
|
|
||||||
|
sass:
|
||||||
|
style: compressed
|
||||||
|
|
||||||
baseurl: '/EyeTrackVR/'
|
baseurl: '/EyeTrackVR/'
|
||||||
|
|
||||||
favicon: "/assets/images/favicon.png" # the favicon for your site
|
favicon: "/assets/images/favicon.png" # the favicon for your site
|
||||||
@ -66,16 +70,12 @@ button: true
|
|||||||
|
|
||||||
# Links at the top of the page
|
# Links at the top of the page
|
||||||
aux_links:
|
aux_links:
|
||||||
'Documentation':
|
|
||||||
- '//github.com/RedHawk989/EyeTrackVR/tree/main/docs/Reference_Docs'
|
|
||||||
'Scripts':
|
'Scripts':
|
||||||
- '//github.com/RedHawk989/EyeTrackVR/tree/main/scripts'
|
- '//github.com/RedHawk989/EyeTrackVR/tree/main/scripts'
|
||||||
'InceptionNet':
|
'InceptionNet':
|
||||||
- '//github.com/RedHawk989/EyeTrackVR/tree/main/InceptionNet'
|
- '//github.com/RedHawk989/EyeTrackVR/tree/main/InceptionNet'
|
||||||
'RANSAC':
|
'RANSAC':
|
||||||
- '//github.com/RedHawk989/EyeTrackVR/tree/main/RANSAC'
|
- '//github.com/RedHawk989/EyeTrackVR/tree/main/RANSAC'
|
||||||
'Issues':
|
|
||||||
- '//github.com/RedHawk989/EyeTrackVR/issues'
|
|
||||||
'GitHub':
|
'GitHub':
|
||||||
- '//github.com/RedHawk989/EyeTrackVR'
|
- '//github.com/RedHawk989/EyeTrackVR'
|
||||||
'Wiki':
|
'Wiki':
|
||||||
|
|||||||
@ -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>
|
||||||
@ -2,4 +2,15 @@
|
|||||||
layout: default
|
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>
|
||||||
@ -105,6 +105,15 @@
|
|||||||
@include btn-color($white, $btn-primary-color);
|
@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 {
|
.btn-purple {
|
||||||
@include btn-color($white, $purple-100);
|
@include btn-color($white, $purple-100);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 */
|
|
||||||
3
docs/assets/css/just-the-docs-eyetrackvr.scss
Normal file
3
docs/assets/css/just-the-docs-eyetrackvr.scss
Normal 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 */
|
||||||
@ -1,3 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
jtd.setTheme("eyetrackervr");
|
|
||||||
Loading…
Reference in New Issue
Block a user