garth-jekyll-theme 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6c0258f1b17705a4347c0b5716b697cec667e40
4
- data.tar.gz: 3634c6b85a31e342f902fd04d3a8a8e6b8c66eba
3
+ metadata.gz: ef5e9f8ca40863e315aec4f67570a257293e815f
4
+ data.tar.gz: 5ae09930da05c4381596fa79bca73cc9d500aee9
5
5
  SHA512:
6
- metadata.gz: be8d3200df5bdb8ad0b1c70814d0bf0d07c940aca1e92970b65dae91485be946ee8a8393ddbc7a6490a02e89e333dee95469ab11f0e1a239e52020466e9cd951
7
- data.tar.gz: 947fcf04f53622b0deb46eb4262fd61bbed70509b39465930ea54c6f453fca1b492aa9851e376d394a58f077745366553f201c654555b7917a522b4995f3a9b5
6
+ metadata.gz: 089a70b24fbce26d5b0a631aa7a63ce2519083da02b21d6b2bdbea9a851ee75e4d312f05ec6f8cacbc3beb46c26711cd8d4e325059d4f5a67ae4f8901767625d
7
+ data.tar.gz: 26953156b713e39985708500c2ad9fa0e1e3ac6b55fec996687d987da8b01674da424ec81b6b48cf1dc19b40886394ffb43be742c737b91eb99ed6b44285bbba
@@ -2,10 +2,12 @@
2
2
 
3
3
  <a href="{{ page.url }}" title="{{ page.title }}">
4
4
 
5
- <img class="avatar" src="{{ site.logo | replace: "300", "72" }}" alt="{{ site.title }}" srcset="{{ site.logo | replace: "300", "72" }} 72w, {{ site.logo | replace: "300", "144" }} 144w">
5
+ <img class="avatar" src="{{ site.logo | replace: "300", "72" }}" alt="{{ site.title }}" srcset="{{ site.logo | replace: "300", "72" }} 72w, {{ site.logo | replace: "300", "144" }} 144w" width="72" height="72">
6
6
 
7
7
  </a>
8
8
 
9
+ {% include nav.html %}
10
+
9
11
  <div class="container">
10
12
 
11
13
  <h1>{{ page.title }}</h1>
@@ -0,0 +1,14 @@
1
+ <nav class="nav">
2
+ <button class="button button--nav">Menu</button>
3
+ {% if data.nav %}
4
+ {% for item in data.nav %}
5
+ <a href="{{ item.url }}" title="{{ item.name }}">{{ item.name }}</a>
6
+ {% endfor %}
7
+ {% else %}
8
+ {% for page in site.pages %}
9
+ {% if page.title %}
10
+ <a href="{{ page.url }}" title="{{ page.title }}">{{ page.title }}</a>
11
+ {% endif %}
12
+ {% endfor %}
13
+ {% endif %}
14
+ </nav>
@@ -0,0 +1,14 @@
1
+ // Data attribute switch
2
+ var toggleState = function (elem, one, two) {
3
+ var elem = document.querySelector(elem);
4
+ elem.setAttribute('data-state', elem.getAttribute('data-state') === one ? two : one);
5
+ };
6
+
7
+ // Mobile navigation toggle selector
8
+ var buttonMenu = document.querySelector('.button--nav');
9
+ if (typeof(buttonMenu) != 'undefined' && buttonMenu != null) {
10
+ buttonMenu.onclick = function (e) {
11
+ toggleState('.nav', 'open', 'closed');
12
+ e.preventDefault();
13
+ };
14
+ };
@@ -17,5 +17,6 @@
17
17
 
18
18
  {{ content }}
19
19
 
20
+ <script src="/js/scripts.js" type="text/javascript"></script>
20
21
  </body>
21
22
  </html>
data/_sass/theme.scss CHANGED
@@ -1,13 +1,8 @@
1
- html {
2
- font-family: sans-serif;
3
- -ms-text-size-adjust: 100%;
4
- -webkit-text-size-adjust: 100%;
5
- }
1
+ // Imports
2
+ @import "variables";
3
+ @import "type";
6
4
 
5
+ // Layout
7
6
  body {
8
7
  margin: 0;
9
8
  }
10
-
11
- h1 {
12
- margin-top: 0;
13
- }
data/_sass/type.scss ADDED
@@ -0,0 +1,14 @@
1
+ html {
2
+ font-family: sans-serif;
3
+ -ms-text-size-adjust: 100%;
4
+ -webkit-text-size-adjust: 100%;
5
+ }
6
+
7
+ body {
8
+ color: $color--foreground;
9
+ background: $color--background;
10
+ }
11
+
12
+ a {
13
+ color: $color--accent;
14
+ }
@@ -0,0 +1,4 @@
1
+ // Color variables
2
+ $color--background: #ffefc8;
3
+ $color--foreground: #150301;
4
+ $color--accent: #5277c3;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garth-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Darnes
@@ -19,13 +19,17 @@ files:
19
19
  - _includes/favicons.html
20
20
  - _includes/footer.html
21
21
  - _includes/header.html
22
+ - _includes/nav.html
22
23
  - _includes/pagination.html
23
24
  - _includes/posts.html
25
+ - _includes/scripts.js
24
26
  - _layouts/default.html
25
27
  - _layouts/front.html
26
28
  - _layouts/page.html
27
29
  - _layouts/post.html
28
30
  - _sass/theme.scss
31
+ - _sass/type.scss
32
+ - _sass/variables.scss
29
33
  homepage: https://github.com/daviddarnes/garth-jekyll-theme
30
34
  licenses:
31
35
  - MIT