Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.3
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "https://rubygems.org"
gem 'github-pages'
6 changes: 6 additions & 0 deletions _data/themes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: "Default"
url: "/css/default_theme.css"
- name: "Dark"
url: "/css/dark_theme.css"
- name: "Light"
url: "/css/light_theme.css"
19 changes: 18 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
templated.co @templatedco
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
-->

<head>

<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
Expand All @@ -14,10 +15,26 @@
<script src="{{ site.baseurl }}/js/skel.min.js"></script>
<script src="{{ site.baseurl }}/js/skel-layers.min.js"></script>
<script src="{{ site.baseurl }}/js/init.js"></script>

<script>
function setTheme(themeUrl) {
var themeLink = document.getElementById('theme-link');
themeLink.href = themeUrl;
localStorage.setItem('theme', themeUrl);
}

var storedTheme = localStorage.getItem('theme');
if (storedTheme) {
var themeLink = document.getElementById('theme-link');
themeLink.href = storedTheme;
}
</script>

</script>
<noscript>
<link rel="stylesheet" href="{{ site.baseurl }}/css/skel.css" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/style-xlarge.css" />
</noscript>
{% include analytics.html %}
</head>
</head>
2 changes: 2 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<li><a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a></li>
{% endif %}
{% endfor %}
{% include theme-switcher.html %}

<!-- <li><a href="#" class="button special">Sign Up</a></li> -->
</ul>
</nav>
Expand Down
9 changes: 9 additions & 0 deletions _includes/theme-switcher.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% assign themes = site.data.themes %}
{% if themes %}
<div id="theme-switcher">
{% for theme in themes %}
<a href="javascript:setTheme('{{ theme.url }}')" class="button small {{ theme.name }}">{{ theme.name }}</a>

{% endfor %}
</div>
{% endif %}
21 changes: 21 additions & 0 deletions css/dark_theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
body {
background-color: #333;
color: #fff;
}

a {
color: #0cf;
}

h1, h2, h3, h4, h5, h6 {
color: #fff;
}

.container {
max-width: 960px;
margin: 0 auto;
padding: 0 15px;
}

/* Other styles go here... */

21 changes: 21 additions & 0 deletions css/default_theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
body {
background-color: #f5f5f5;
color: #333;
}

a {
color: #007bff;
}

h1, h2, h3, h4, h5, h6 {
color: #333;
}

.container {
max-width: 960px;
margin: 0 auto;
padding: 0 15px;
}

/* Other styles go here... */

21 changes: 21 additions & 0 deletions css/light_theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
body {
background-color: #fff;
color: #333;
}

a {
color: #007bff;
}

h1, h2, h3, h4, h5, h6 {
color: #333;
}

.container {
max-width: 960px;
margin: 0 auto;
padding: 0 15px;
}

/* Other styles go here... */