bulma-clean-theme 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +73 -5
- data/_includes/header.html +4 -4
- data/_includes/menubar.html +21 -0
- data/_layouts/default.html +5 -0
- data/_layouts/post.html +7 -1
- data/_posts/2018-10-13-test.md +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34bf48b80518547cd1833ef4ef864c4e63bd0aa2
|
4
|
+
data.tar.gz: 6aa767ab4ef44613be3481e49e639bddbedf358e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c970aad7097997192ed4a3a64e6d91cf6f09cc80d8e13fd856c434d03f614f8b4285d8beb535d910a3b88f237f54a85909549ffb7900be62bf7aca0ac61de17e
|
7
|
+
data.tar.gz: 3a901e82a83cbcb2070db3539ef6fdbe01de0bec03ae54d5fc8f77c595930878dd569af9baa7f1f9e24b76cd80c8f2156fca5b6359fced38b86a7ef241e749b2
|
data/README.md
CHANGED
@@ -11,6 +11,7 @@ This is a clean and simple Jekyll Theme built with the [Bulma](https://bulma.io/
|
|
11
11
|
* [Navigation](#navigation)
|
12
12
|
* [Colours and Styles](#colours-and-styles)
|
13
13
|
* [Sidebar Visibility](#sidebar-visibility)
|
14
|
+
* [Menubar](#menubar)
|
14
15
|
* [Google Analytics](#google-analytics)
|
15
16
|
* [Contributing](#contributing)
|
16
17
|
* [Development](#development)
|
@@ -65,14 +66,16 @@ For the top navigation, create a navigation.yml file in `_data` directory with t
|
|
65
66
|
|
66
67
|
```yaml
|
67
68
|
- name: Page 1
|
68
|
-
link: page-1
|
69
|
+
link: /page-1/
|
69
70
|
- name: Blog
|
70
|
-
link: blog
|
71
|
+
link: /blog/
|
71
72
|
dropdown:
|
72
73
|
- name: Page 2
|
73
|
-
link: page-2
|
74
|
+
link: /page-2/
|
74
75
|
```
|
75
76
|
|
77
|
+
For the current page to have an active class, ensure the `link:` format matches your [permalink](https://jekyllrb.com/docs/permalinks/#extensionless-permalinks) format. The above example will work with `permalink: pretty` setting in your `_config.yml`
|
78
|
+
|
76
79
|
### Colours and Styles
|
77
80
|
|
78
81
|
To overwrite the primary theme colour, set a sass variable in `assets/css/app.scss` before importing `main`
|
@@ -87,11 +90,76 @@ $primary: #333333;
|
|
87
90
|
|
88
91
|
You can overwrite any of the [Bulma initial variables](http://versions.bulma.io/0.7.0/documentation/overview/variables/) in this way as long as they are declared before the `@import "main"'`
|
89
92
|
|
90
|
-
### Sidebar Visibility
|
93
|
+
### Sidebar Visibility
|
94
|
+
|
95
|
+
**New in 0.2**
|
91
96
|
|
92
97
|
If you want to show the sidebar with latest posts then set `show_sidebar: true` in the pages frontmatter, or in the [defaults](https://jekyllrb.com/docs/configuration/front-matter-defaults/) in your sites `_config.yml`
|
93
98
|
|
94
|
-
###
|
99
|
+
### Menubar
|
100
|
+
|
101
|
+
**New in 0.3**
|
102
|
+
|
103
|
+
The menubar gets its content from a data file in your site's `_data` directory. Simply set the name of your data file in the page's menubar setting in the frontmatter.
|
104
|
+
|
105
|
+
```yml
|
106
|
+
show_sidebar: false
|
107
|
+
menubar: example_menu
|
108
|
+
```
|
109
|
+
|
110
|
+
You will probably want to disable the show_sidebar otherwise there will be little room for the page content.
|
111
|
+
|
112
|
+
#### Creating a menubar data file
|
113
|
+
|
114
|
+
Create a data file in the _data directory and use the following format (if using yml)
|
115
|
+
|
116
|
+
```yml
|
117
|
+
- label: Example Menu
|
118
|
+
items:
|
119
|
+
- name: Home
|
120
|
+
link: /
|
121
|
+
- name: Pages
|
122
|
+
link: #
|
123
|
+
items:
|
124
|
+
- name: Page With Sidebar
|
125
|
+
link: /page-1/
|
126
|
+
- name: Page Without Sidebar
|
127
|
+
link: /page-2/
|
128
|
+
- name: Page With Menubar
|
129
|
+
link: /page-3/
|
130
|
+
- name: Blog
|
131
|
+
link: /blog/
|
132
|
+
```
|
133
|
+
|
134
|
+
For the current page to have an active class, ensure the `link:` format matches your [permalink](https://jekyllrb.com/docs/permalinks/#extensionless-permalinks) format. The above example will work with `permalink: pretty` setting in your `_config.yml`
|
135
|
+
|
136
|
+
### Multiple menus
|
137
|
+
|
138
|
+
You may make multiple menus in the same file, separated by the label
|
139
|
+
|
140
|
+
```yml
|
141
|
+
- label: Menu Label
|
142
|
+
items:
|
143
|
+
- name: Example item
|
144
|
+
link: /example-item/
|
145
|
+
- label: Second Menu Label
|
146
|
+
items:
|
147
|
+
- name: Parent Item
|
148
|
+
link: /parent-item/
|
149
|
+
items:
|
150
|
+
- name: Sublink
|
151
|
+
link: /sublink/
|
152
|
+
- name: Sublink 2
|
153
|
+
link: /sublink2/
|
154
|
+
- label: Third Menu Label
|
155
|
+
items:
|
156
|
+
- name: Another example item
|
157
|
+
link: /another-example-item/
|
158
|
+
```
|
159
|
+
|
160
|
+
### Google Anaytics
|
161
|
+
|
162
|
+
**New in 0.2**
|
95
163
|
|
96
164
|
To enable Google Analytics add `google_analytics: UA-xxxxxxxx` to your `_config.yml` replacing the UA-xxxxxxxx with your Google Analytics property
|
97
165
|
|
data/_includes/header.html
CHANGED
@@ -13,20 +13,20 @@
|
|
13
13
|
</div>
|
14
14
|
<div class="navbar-menu" id="navMenu">
|
15
15
|
<div class="navbar-start">
|
16
|
-
<a href="{{ site.baseurl }}/" class="navbar-item">Home</a>
|
16
|
+
<a href="{{ site.baseurl }}/" class="navbar-item {% if page.url == "/" %}is-active{% endif %}">Home</a>
|
17
17
|
{% if site.data.navigation %}
|
18
18
|
{% for item in site.data.navigation %}
|
19
19
|
{% if item.dropdown %}
|
20
20
|
<div class="navbar-item has-dropdown is-hoverable">
|
21
|
-
<a href="{{
|
21
|
+
<a href="{{ item.link | prepend: site.baseurl }}" class="navbar-link {% if item.link == page.url %}is-active{% endif %}">{{ item.name }}</a>
|
22
22
|
<div class="navbar-dropdown">
|
23
23
|
{% for subitem in item.dropdown %}
|
24
|
-
<a href="{{
|
24
|
+
<a href="{{ subitem.link | prepend: site.baseurl }}" class="navbar-item {% if subitem.link == page.url %}is-active{% endif %}">{{ subitem.name }}</a>
|
25
25
|
{% endfor %}
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
{% else %}
|
29
|
-
<a href="{{
|
29
|
+
<a href="{{ item.link | prepend: site.baseurl }}" class="navbar-item {% if item.link == page.url %}is-active{% endif %}">{{ item.name }}</a>
|
30
30
|
{% endif %}
|
31
31
|
{% endfor %}
|
32
32
|
{% endif %}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{% assign menus = site.data.[page.menubar] %}
|
2
|
+
|
3
|
+
<aside class="menu">
|
4
|
+
{% for menu in menus %}
|
5
|
+
<p class="menu-label">{{ menu.label }}</p>
|
6
|
+
<ul class="menu-list">
|
7
|
+
{% for item in menu.items %}
|
8
|
+
<li>
|
9
|
+
<a href="{{ item.link | prepend: site.baseurl }}" class="{% if item.link == page.url %}is-active{% endif %}">{{ item.name }}</a>
|
10
|
+
{% if item.items %}
|
11
|
+
<ul>
|
12
|
+
{% for subitem in item.items %}
|
13
|
+
<li><a href="{{ subitem.link | prepend: site.baseurl }}" class="{% if subitem.link == page.url %}is-active{% endif %}">{{ subitem.name }}</a></li>
|
14
|
+
{% endfor %}
|
15
|
+
</ul>
|
16
|
+
{% endif %}
|
17
|
+
</li>
|
18
|
+
{% endfor %}
|
19
|
+
</ul>
|
20
|
+
{% endfor %}
|
21
|
+
</aside>
|
data/_layouts/default.html
CHANGED
@@ -7,6 +7,11 @@
|
|
7
7
|
<section class="section">
|
8
8
|
<div class="container">
|
9
9
|
<div class="columns is-multiline">
|
10
|
+
{% if page.menubar %}
|
11
|
+
<div class="column is-4-desktop is-4-tablet">
|
12
|
+
{% include menubar.html %}
|
13
|
+
</div>
|
14
|
+
{% endif %}
|
10
15
|
<div class="column">
|
11
16
|
<div class="content">
|
12
17
|
{{ content }}
|
data/_layouts/post.html
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
|
5
|
-
<p
|
5
|
+
<p>Published: {{ page.date | date: "%b %-d, %Y" }} by {{ page.author }}</p>
|
6
6
|
|
7
7
|
{{ content }}
|
8
|
+
|
9
|
+
<div class="tags">
|
10
|
+
{% for tag in page.tags %}
|
11
|
+
<span class="tag is-primary">{{ tag }}</span>
|
12
|
+
{% endfor %}
|
13
|
+
</div>
|
data/_posts/2018-10-13-test.md
CHANGED
@@ -3,6 +3,7 @@ title: Test Post 3
|
|
3
3
|
subtitle: Test post subtitle
|
4
4
|
layout: post
|
5
5
|
author: C.S. Rhymes
|
6
|
+
tags: html JavaScript CSS Jekyll
|
6
7
|
---
|
7
8
|
|
8
9
|
This is a test post! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin ultrices eros id accumsan. Vestibulum dictum volutpat sapien in molestie. Nunc auctor felis quis nibh tincidunt, vel sodales dolor viverra. Donec elementum dolor nisl, nec imperdiet sapien semper in.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulma-clean-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chrisrhymes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- _includes/header.html
|
124
124
|
- _includes/hero.html
|
125
125
|
- _includes/latest-posts.html
|
126
|
+
- _includes/menubar.html
|
126
127
|
- _includes/pagination.html
|
127
128
|
- _includes/post-card.html
|
128
129
|
- _layouts/blog.html
|