jekyll-bulma-theme 1.0.1
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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_includes/share-button.html +15 -0
- data/_layouts/default.html +116 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +65 -0
- data/_sass/_app.scss +157 -0
- data/_sass/syntax.scss +214 -0
- data/assets/css/app.scss +4 -0
- data/assets/favicon/16x16.png +0 -0
- data/assets/favicon/32x32.png +0 -0
- data/assets/js/app.js +241 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4ea2316b4df0c825c5d8cf2cedd6f59688d117c04a67a2f4c3078b1bac2798ba
|
4
|
+
data.tar.gz: 0aa9c64c6f9ff4cf2e4c692d71437fcd5ce85140b81987356b32b81bae05c1c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d69991552ad1e5355e777665fd1b3706c7735f158249413eb93468c1d4b444c52e2b25de5aaca495f8821a0717b98517c0dc80ec835fd6871b4b85b2dcb6ce4e
|
7
|
+
data.tar.gz: 38899cb9eae12baec99da1223e17245f97a3e51f6c064e17d78b6a782d146b46cdea8bf87a0676c052f73fd089ab66f3d287c91c3bee2b6255a93a69c528f589
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Nakorn Sinpadung
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# jekyll-bulma-theme
|
2
|
+
|
3
|
+
Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
|
4
|
+
|
5
|
+
To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your Jekyll site's `Gemfile`:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem "jekyll-bulma-theme"
|
16
|
+
```
|
17
|
+
|
18
|
+
And add this line to your Jekyll site's `_config.yml`:
|
19
|
+
|
20
|
+
```yaml
|
21
|
+
theme: jekyll-bulma-theme
|
22
|
+
```
|
23
|
+
|
24
|
+
And then execute:
|
25
|
+
|
26
|
+
$ bundle
|
27
|
+
|
28
|
+
Or install it yourself as:
|
29
|
+
|
30
|
+
$ gem install jekyll-bulma-theme
|
31
|
+
|
32
|
+
## Usage
|
33
|
+
|
34
|
+
TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
39
|
+
|
40
|
+
## Development
|
41
|
+
|
42
|
+
To set up your environment to develop this theme, run `bundle install`.
|
43
|
+
|
44
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
45
|
+
|
46
|
+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
47
|
+
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-bulma-theme.gemspec` accordingly.
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
52
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<span class="tag is-white is-medium" disabled>Share:</span>
|
2
|
+
<div class="buttons has-addons">
|
3
|
+
<span class="button is-facebook on-share" data-url="{{ post.url | absolute_url }}" data-provider="facebook">
|
4
|
+
<span class="icon"><i class="fab fa-lg fa-facebook-f"></i></span>
|
5
|
+
</span>
|
6
|
+
<span class="button is-twitter on-share" data-url="{{ post.url | absolute_url }}" data-provider="twitter">
|
7
|
+
<span class="icon"><i class="fab fa-lg fa-twitter"></i></span>
|
8
|
+
</span>
|
9
|
+
<span class="button is-google on-share" data-url="{{ post.url | absolute_url }}" data-provider="google">
|
10
|
+
<span class="icon"><i class="fab fa-lg fa-google-plus-g"></i></span>
|
11
|
+
</span>
|
12
|
+
<span class="button is-pinterest on-share" data-url="{{ post.url | absolute_url }}" data-provider="pinterest">
|
13
|
+
<span class="icon"><i class="fab fa-lg fa-pinterest-p"></i></span>
|
14
|
+
</span>
|
15
|
+
</div>
|
@@ -0,0 +1,116 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ site.lang }}">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
7
|
+
{% if page.is_post %}
|
8
|
+
<meta name="description" content="{{ page.excerpt | strip_html }}">
|
9
|
+
{% else %}
|
10
|
+
<meta name="description" content="{{ site.description }}">
|
11
|
+
{% endif %}
|
12
|
+
<title>
|
13
|
+
{% if page.title %}
|
14
|
+
{{ page.title }} | {{ site.title }}
|
15
|
+
{% else %}
|
16
|
+
{{ site.title }}
|
17
|
+
{% endif %}
|
18
|
+
</title>
|
19
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/{{ site.version.bulma }}/css/bulma.min.css">
|
20
|
+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/app.css">
|
21
|
+
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/favicon/16x16.png" sizes="16x16"/>
|
22
|
+
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/favicon/32x32.png" sizes="32x32"/>
|
23
|
+
<script defer src="https://use.fontawesome.com/releases/v{{ site.version.font-awesome }}/js/all.js"></script>
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
<div id="shadowed" style="display: none;"></div>
|
27
|
+
<div id="app">
|
28
|
+
<nav id="navbar" class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
|
29
|
+
<div id="specialShadow" class="bd-special-shadow"></div>
|
30
|
+
<div class="container">
|
31
|
+
<nav class="navbar-brand">
|
32
|
+
<a class="navbar-item" href="{{ site.baseurl }}/">{{ site.name }}</a>
|
33
|
+
{% if site.navigation.github %}
|
34
|
+
<a class="navbar-item is-hidden-desktop text-github" target="_blank" href="https://github.com/{{ site.navigation.github }}">
|
35
|
+
<i class="fab fa-lg fa-github"></i>
|
36
|
+
</a>
|
37
|
+
{% endif %}
|
38
|
+
{% if site.navigation.twitter %}
|
39
|
+
<a class="navbar-item is-hidden-desktop text-twitter" target="_blank" href="https://twitter.com/{{ site.navigation.twitter }}">
|
40
|
+
<i class="fab fa-lg fa-twitter"></i>
|
41
|
+
</a>
|
42
|
+
{% endif %}
|
43
|
+
{% if site.navigation.facebook %}
|
44
|
+
<a class="navbar-item is-hidden-desktop text-facebook" target="_blank" href="https://www.facebook.com/{{ site.navigation.facebook }}">
|
45
|
+
<i class="fab fa-lg fa-facebook"></i>
|
46
|
+
</a>
|
47
|
+
{% endif %}
|
48
|
+
<div id="navbarBurger" class="navbar-burger" data-target="navMenu">
|
49
|
+
<span></span>
|
50
|
+
<span></span>
|
51
|
+
<span></span>
|
52
|
+
</div>
|
53
|
+
</nav>
|
54
|
+
<div class="navbar-menu" id="navMenu">
|
55
|
+
<div class="navbar-start">
|
56
|
+
<a class="navbar-item {% if page.url == "/" %}is-active{% endif %}" href="{{ site.baseurl }}/">Posts</a>
|
57
|
+
</div>
|
58
|
+
<div class="navbar-end">
|
59
|
+
{% if site.navigation.github %}
|
60
|
+
<a class="navbar-item is-hidden-touch text-github" target="_blank" href="https://github.com/{{ site.navigation.github }}">
|
61
|
+
<i class="fab fa-lg fa-github"></i>
|
62
|
+
</a>
|
63
|
+
{% endif %}
|
64
|
+
{% if site.navigation.twitter %}
|
65
|
+
<a class="navbar-item is-hidden-touch text-twitter" target="_blank" href="https://twitter.com/{{ site.navigation.twitter }}">
|
66
|
+
<i class="fab fa-lg fa-twitter"></i>
|
67
|
+
</a>
|
68
|
+
{% endif %}
|
69
|
+
{% if site.navigation.facebook %}
|
70
|
+
<a class="navbar-item is-hidden-touch text-facebook" target="_blank" href="https://www.facebook.com/{{ site.navigation.facebook }}">
|
71
|
+
<i class="fab fa-lg fa-facebook"></i>
|
72
|
+
</a>
|
73
|
+
{% endif %}
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</nav>
|
78
|
+
{% if page.title %}
|
79
|
+
<header class="hero is-link">
|
80
|
+
<div class="hero-body">
|
81
|
+
<div class="container">
|
82
|
+
<h1 class="title">
|
83
|
+
{{ page.title }}
|
84
|
+
</h1>
|
85
|
+
<h2 class="subtitle">
|
86
|
+
{% if page.subtitle %}
|
87
|
+
{{ page.subtitle }}
|
88
|
+
{% else if page.date %}
|
89
|
+
{{ page.date | date: site.date_format }}
|
90
|
+
{% endif %}
|
91
|
+
</h2>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
</header>
|
95
|
+
{% endif %}
|
96
|
+
<main>
|
97
|
+
{{ content }}
|
98
|
+
</main>
|
99
|
+
</div>
|
100
|
+
<footer class="footer">
|
101
|
+
<div class="container">
|
102
|
+
<div class="content has-text-centered">
|
103
|
+
<p>
|
104
|
+
<strong>Bulma</strong> by <a href="https://jgthms.com">Jeremy Thomas</a>. The source code is licensed
|
105
|
+
<a href="http://opensource.org/licenses/mit-license.php">MIT</a>. The website content
|
106
|
+
is licensed <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY NC SA 4.0</a>.
|
107
|
+
</p>
|
108
|
+
<p>
|
109
|
+
<strong>jekyll-bulma-theme</strong> by <a href="https://github.com/nakorndev">nakorndev</a>. Powered by <a href="https://jekyllrb.com">Jekyll</a> and <a href="https://pages.github.com/">GitHub Pages</a>.
|
110
|
+
</p>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</footer>
|
114
|
+
<script src="{{ site.baseurl }}/assets/js/app.js"></script>
|
115
|
+
</body>
|
116
|
+
</html>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<section class="section">
|
6
|
+
<div class="container">
|
7
|
+
<div class="field">
|
8
|
+
<div class="content">
|
9
|
+
{{ content }}
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="field">
|
13
|
+
<div class="level">
|
14
|
+
<div class="level-left"></div>
|
15
|
+
<div class="level-right">
|
16
|
+
{% include share-button.html %}
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
{% if page.author %}
|
21
|
+
<div class="field">
|
22
|
+
<article class="message is-info">
|
23
|
+
<div class="message-header">
|
24
|
+
About author
|
25
|
+
</div>
|
26
|
+
<div class="message-body">
|
27
|
+
<div class="media">
|
28
|
+
<figure class="media-left">
|
29
|
+
<img class="image avatar" src="{{ page.author.image }}" alt="">
|
30
|
+
</figure>
|
31
|
+
<div class="media-content">
|
32
|
+
<div class="content">
|
33
|
+
<h1>
|
34
|
+
{{ page.author.realname }}
|
35
|
+
<span class="is-pulled-right">
|
36
|
+
{% if page.author.github %}
|
37
|
+
<a target="_blank" href="https://github.com/{{ page.author.github }}">
|
38
|
+
<span class="icon"><i class="fab fa-xs fa-github text-github"></i></span>
|
39
|
+
</a>
|
40
|
+
{% endif %}
|
41
|
+
{% if page.author.twitter %}
|
42
|
+
<a target="_blank" href="https://twitter.com/{{ page.author.twitter }}">
|
43
|
+
<span class="icon"><i class="fab fa-xs fa-twitter text-twitter"></i></span>
|
44
|
+
</a>
|
45
|
+
{% endif %}
|
46
|
+
{% if page.author.facebook %}
|
47
|
+
<a target="_blank" href="https://www.facebook.com/{{ page.author.facebook }}">
|
48
|
+
<span class="icon"><i class="fab fa-xs fa-facebook text-facebook"></i></span>
|
49
|
+
</a>
|
50
|
+
{% endif %}
|
51
|
+
</span>
|
52
|
+
</h1>
|
53
|
+
<blockquote>
|
54
|
+
{{ page.author.quote }}
|
55
|
+
</blockquote>
|
56
|
+
{{ page.author.extra-quote }}
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</article>
|
62
|
+
</div>
|
63
|
+
{% endif %}
|
64
|
+
</div>
|
65
|
+
</section>
|
data/_sass/_app.scss
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
@import "syntax";
|
2
|
+
|
3
|
+
$github: #333333;
|
4
|
+
$twitter: #1da1f2;
|
5
|
+
$facebook: #3b5998;
|
6
|
+
$google: #dd4b39;
|
7
|
+
$pinterest: #bd081c;
|
8
|
+
|
9
|
+
body {
|
10
|
+
display: flex;
|
11
|
+
min-height: 100vh;
|
12
|
+
flex-direction: column;
|
13
|
+
margin-top: 52px;
|
14
|
+
}
|
15
|
+
|
16
|
+
#app {
|
17
|
+
flex: 1 0 auto;
|
18
|
+
}
|
19
|
+
|
20
|
+
.media-content {
|
21
|
+
overflow: hidden;
|
22
|
+
}
|
23
|
+
|
24
|
+
.text-github, a.navbar-item.text-github:hover {
|
25
|
+
color: $github;
|
26
|
+
}
|
27
|
+
|
28
|
+
.text-twitter, a.navbar-item.text-twitter:hover {
|
29
|
+
color: $twitter;
|
30
|
+
}
|
31
|
+
|
32
|
+
.text-facebook, a.navbar-item.text-facebook:hover {
|
33
|
+
color: $facebook;
|
34
|
+
}
|
35
|
+
|
36
|
+
.is-github {
|
37
|
+
background-color: $github;
|
38
|
+
}
|
39
|
+
|
40
|
+
.is-twitter {
|
41
|
+
background-color: $twitter;
|
42
|
+
}
|
43
|
+
|
44
|
+
.is-facebook {
|
45
|
+
background-color: $facebook;
|
46
|
+
}
|
47
|
+
|
48
|
+
.is-google {
|
49
|
+
background-color: $google;
|
50
|
+
}
|
51
|
+
|
52
|
+
.is-pinterest {
|
53
|
+
background-color: $pinterest;
|
54
|
+
}
|
55
|
+
|
56
|
+
.button {
|
57
|
+
&.is-github,
|
58
|
+
&.is-twitter,
|
59
|
+
&.is-facebook,
|
60
|
+
&.is-google,
|
61
|
+
&.is-pinterest {
|
62
|
+
border-color: transparent;
|
63
|
+
color: white;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
.task-list-item-checkbox {
|
68
|
+
margin-right: 5px;
|
69
|
+
}
|
70
|
+
|
71
|
+
.task-list-item {
|
72
|
+
list-style: none;
|
73
|
+
}
|
74
|
+
|
75
|
+
%header-hashtag {
|
76
|
+
color: #3273dc;
|
77
|
+
margin-right: 10px;
|
78
|
+
}
|
79
|
+
|
80
|
+
.content {
|
81
|
+
h1::before {
|
82
|
+
content: "#";
|
83
|
+
@extend %header-hashtag;
|
84
|
+
}
|
85
|
+
h2::before {
|
86
|
+
content: "##";
|
87
|
+
@extend %header-hashtag;
|
88
|
+
}
|
89
|
+
h3::before {
|
90
|
+
content: "###";
|
91
|
+
@extend %header-hashtag;
|
92
|
+
}
|
93
|
+
h4::before {
|
94
|
+
content: "####";
|
95
|
+
@extend %header-hashtag;
|
96
|
+
}
|
97
|
+
h5::before {
|
98
|
+
content: "#####";
|
99
|
+
@extend %header-hashtag;
|
100
|
+
}
|
101
|
+
h6::before {
|
102
|
+
content: "######";
|
103
|
+
@extend %header-hashtag;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
.message-body .media {
|
108
|
+
img.avatar {
|
109
|
+
height: 80px;
|
110
|
+
width: 80px;
|
111
|
+
border-radius: 50%;
|
112
|
+
}
|
113
|
+
blockquote {
|
114
|
+
background-color: transparent;
|
115
|
+
border-left: none;
|
116
|
+
padding: 0 1.5em 0.5em;
|
117
|
+
color: grey;
|
118
|
+
font-size: 1.2rem;
|
119
|
+
&::before {
|
120
|
+
content: "\2014\2014\2014";
|
121
|
+
}
|
122
|
+
}
|
123
|
+
a:not(.button):not(.tag) {
|
124
|
+
text-decoration: none;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
.bd-special-shadow {
|
129
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.1)), to(transparent));
|
130
|
+
background-image: linear-gradient(rgba(0, 0, 0, 0.1), transparent);
|
131
|
+
height: 8px;
|
132
|
+
left: 0;
|
133
|
+
opacity: 0;
|
134
|
+
position: absolute;
|
135
|
+
right: 0;
|
136
|
+
top: 100%;
|
137
|
+
-webkit-transform: scaleY(0);
|
138
|
+
transform: scaleY(0);
|
139
|
+
-webkit-transform-origin: center top;
|
140
|
+
transform-origin: center top;
|
141
|
+
}
|
142
|
+
|
143
|
+
@media screen and (max-width: 1023px) {
|
144
|
+
.bd-is-clipped-touch {
|
145
|
+
overflow: hidden !important;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
#shadowed {
|
150
|
+
position: fixed;
|
151
|
+
top: 0;
|
152
|
+
right: 0;
|
153
|
+
bottom: 0;
|
154
|
+
left: 0;
|
155
|
+
z-index: 10;
|
156
|
+
background-color: rgba(0, 0, 0, .5);
|
157
|
+
}
|
data/_sass/syntax.scss
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
.highlighter-rouge {
|
2
|
+
margin-bottom: 10px;
|
3
|
+
}
|
4
|
+
|
5
|
+
.highlight table td { padding: 5px; }
|
6
|
+
.highlight table pre { margin: 0; }
|
7
|
+
.highlight .c, .highlight .cd {
|
8
|
+
color: #75715e;
|
9
|
+
font-style: italic;
|
10
|
+
}
|
11
|
+
.highlight .cm {
|
12
|
+
color: #75715e;
|
13
|
+
font-style: italic;
|
14
|
+
}
|
15
|
+
.highlight .c1 {
|
16
|
+
color: #75715e;
|
17
|
+
font-style: italic;
|
18
|
+
}
|
19
|
+
.highlight .cp {
|
20
|
+
color: #75715e;
|
21
|
+
font-weight: bold;
|
22
|
+
}
|
23
|
+
.highlight .cs {
|
24
|
+
color: #75715e;
|
25
|
+
font-weight: bold;
|
26
|
+
font-style: italic;
|
27
|
+
}
|
28
|
+
.highlight .err {
|
29
|
+
color: #960050;
|
30
|
+
background-color: #1e0010;
|
31
|
+
}
|
32
|
+
.highlight .gi {
|
33
|
+
color: #ffffff;
|
34
|
+
background-color: #324932;
|
35
|
+
}
|
36
|
+
.highlight .gd {
|
37
|
+
color: #ffffff;
|
38
|
+
background-color: #493131;
|
39
|
+
}
|
40
|
+
.highlight .ge {
|
41
|
+
color: #000000;
|
42
|
+
font-style: italic;
|
43
|
+
}
|
44
|
+
.highlight .gr {
|
45
|
+
color: #aa0000;
|
46
|
+
}
|
47
|
+
.highlight .gt {
|
48
|
+
color: #aa0000;
|
49
|
+
}
|
50
|
+
.highlight .gh {
|
51
|
+
color: #999999;
|
52
|
+
}
|
53
|
+
.highlight .go {
|
54
|
+
color: #888888;
|
55
|
+
}
|
56
|
+
.highlight .gp {
|
57
|
+
color: #555555;
|
58
|
+
}
|
59
|
+
.highlight .gs {
|
60
|
+
font-weight: bold;
|
61
|
+
}
|
62
|
+
.highlight .gu {
|
63
|
+
color: #aaaaaa;
|
64
|
+
}
|
65
|
+
.highlight .k, .highlight .kv {
|
66
|
+
color: #66d9ef;
|
67
|
+
font-weight: bold;
|
68
|
+
}
|
69
|
+
.highlight .kc {
|
70
|
+
color: #66d9ef;
|
71
|
+
font-weight: bold;
|
72
|
+
}
|
73
|
+
.highlight .kd {
|
74
|
+
color: #66d9ef;
|
75
|
+
font-weight: bold;
|
76
|
+
}
|
77
|
+
.highlight .kp {
|
78
|
+
color: #66d9ef;
|
79
|
+
font-weight: bold;
|
80
|
+
}
|
81
|
+
.highlight .kr {
|
82
|
+
color: #66d9ef;
|
83
|
+
font-weight: bold;
|
84
|
+
}
|
85
|
+
.highlight .kt {
|
86
|
+
color: #66d9ef;
|
87
|
+
font-weight: bold;
|
88
|
+
}
|
89
|
+
.highlight .kn {
|
90
|
+
color: #f92672;
|
91
|
+
font-weight: bold;
|
92
|
+
}
|
93
|
+
.highlight .ow {
|
94
|
+
color: #f92672;
|
95
|
+
font-weight: bold;
|
96
|
+
}
|
97
|
+
.highlight .o {
|
98
|
+
color: #f92672;
|
99
|
+
font-weight: bold;
|
100
|
+
}
|
101
|
+
.highlight .mf {
|
102
|
+
color: #ae81ff;
|
103
|
+
}
|
104
|
+
.highlight .mh {
|
105
|
+
color: #ae81ff;
|
106
|
+
}
|
107
|
+
.highlight .il {
|
108
|
+
color: #ae81ff;
|
109
|
+
}
|
110
|
+
.highlight .mi {
|
111
|
+
color: #ae81ff;
|
112
|
+
}
|
113
|
+
.highlight .mo {
|
114
|
+
color: #ae81ff;
|
115
|
+
}
|
116
|
+
.highlight .m, .highlight .mb, .highlight .mx {
|
117
|
+
color: #ae81ff;
|
118
|
+
}
|
119
|
+
.highlight .se {
|
120
|
+
color: #ae81ff;
|
121
|
+
}
|
122
|
+
.highlight .sb {
|
123
|
+
color: #e6db74;
|
124
|
+
}
|
125
|
+
.highlight .sc {
|
126
|
+
color: #e6db74;
|
127
|
+
}
|
128
|
+
.highlight .sd {
|
129
|
+
color: #e6db74;
|
130
|
+
}
|
131
|
+
.highlight .s2 {
|
132
|
+
color: #e6db74;
|
133
|
+
}
|
134
|
+
.highlight .sh {
|
135
|
+
color: #e6db74;
|
136
|
+
}
|
137
|
+
.highlight .si {
|
138
|
+
color: #e6db74;
|
139
|
+
}
|
140
|
+
.highlight .sx {
|
141
|
+
color: #e6db74;
|
142
|
+
}
|
143
|
+
.highlight .sr {
|
144
|
+
color: #e6db74;
|
145
|
+
}
|
146
|
+
.highlight .s1 {
|
147
|
+
color: #e6db74;
|
148
|
+
}
|
149
|
+
.highlight .ss {
|
150
|
+
color: #e6db74;
|
151
|
+
}
|
152
|
+
.highlight .s {
|
153
|
+
color: #e6db74;
|
154
|
+
}
|
155
|
+
.highlight .na {
|
156
|
+
color: #a6e22e;
|
157
|
+
}
|
158
|
+
.highlight .nc {
|
159
|
+
color: #a6e22e;
|
160
|
+
font-weight: bold;
|
161
|
+
}
|
162
|
+
.highlight .nd {
|
163
|
+
color: #a6e22e;
|
164
|
+
font-weight: bold;
|
165
|
+
}
|
166
|
+
.highlight .ne {
|
167
|
+
color: #a6e22e;
|
168
|
+
font-weight: bold;
|
169
|
+
}
|
170
|
+
.highlight .nf {
|
171
|
+
color: #a6e22e;
|
172
|
+
font-weight: bold;
|
173
|
+
}
|
174
|
+
.highlight .no {
|
175
|
+
color: #66d9ef;
|
176
|
+
}
|
177
|
+
.highlight .bp {
|
178
|
+
color: #f8f8f2;
|
179
|
+
}
|
180
|
+
.highlight .nb {
|
181
|
+
color: #f8f8f2;
|
182
|
+
}
|
183
|
+
.highlight .ni {
|
184
|
+
color: #f8f8f2;
|
185
|
+
}
|
186
|
+
.highlight .nn {
|
187
|
+
color: #f8f8f2;
|
188
|
+
}
|
189
|
+
.highlight .vc {
|
190
|
+
color: #f8f8f2;
|
191
|
+
}
|
192
|
+
.highlight .vg {
|
193
|
+
color: #f8f8f2;
|
194
|
+
}
|
195
|
+
.highlight .vi {
|
196
|
+
color: #f8f8f2;
|
197
|
+
}
|
198
|
+
.highlight .nv {
|
199
|
+
color: #f8f8f2;
|
200
|
+
}
|
201
|
+
.highlight .w {
|
202
|
+
color: #f8f8f2;
|
203
|
+
}
|
204
|
+
.highlight .nl {
|
205
|
+
color: #f8f8f2;
|
206
|
+
font-weight: bold;
|
207
|
+
}
|
208
|
+
.highlight .nt {
|
209
|
+
color: #f92672;
|
210
|
+
}
|
211
|
+
.highlight {
|
212
|
+
color: #f8f8f2;
|
213
|
+
background-color: #49483e;
|
214
|
+
}
|
data/assets/css/app.scss
ADDED
Binary file
|
Binary file
|
data/assets/js/app.js
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
document.addEventListener('DOMContentLoaded', function () {
|
4
|
+
|
5
|
+
// Dropdowns
|
6
|
+
|
7
|
+
var $metalinks = getAll('#meta a');
|
8
|
+
|
9
|
+
if ($metalinks.length > 0) {
|
10
|
+
$metalinks.forEach(function ($el) {
|
11
|
+
$el.addEventListener('click', function (event) {
|
12
|
+
event.preventDefault();
|
13
|
+
var target = $el.getAttribute('href');
|
14
|
+
var $target = document.getElementById(target.substring(1));
|
15
|
+
$target.scrollIntoView(true);
|
16
|
+
// window.history.replaceState(null, document.title, `${window.location.origin}${window.location.pathname}${target}`);
|
17
|
+
return false;
|
18
|
+
});
|
19
|
+
});
|
20
|
+
}
|
21
|
+
|
22
|
+
// Dropdowns
|
23
|
+
|
24
|
+
var $dropdowns = getAll('.dropdown:not(.is-hoverable)');
|
25
|
+
|
26
|
+
if ($dropdowns.length > 0) {
|
27
|
+
$dropdowns.forEach(function ($el) {
|
28
|
+
$el.addEventListener('click', function (event) {
|
29
|
+
event.stopPropagation();
|
30
|
+
$el.classList.toggle('is-active');
|
31
|
+
});
|
32
|
+
});
|
33
|
+
|
34
|
+
document.addEventListener('click', function (event) {
|
35
|
+
closeDropdowns();
|
36
|
+
});
|
37
|
+
}
|
38
|
+
|
39
|
+
function closeDropdowns() {
|
40
|
+
$dropdowns.forEach(function ($el) {
|
41
|
+
$el.classList.remove('is-active');
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
// Toggles
|
46
|
+
|
47
|
+
var $burgers = getAll('.navbar-burger');
|
48
|
+
|
49
|
+
if ($burgers.length > 0) {
|
50
|
+
$burgers.forEach(function ($el) {
|
51
|
+
$el.addEventListener('click', function () {
|
52
|
+
var target = $el.dataset.target;
|
53
|
+
var $target = document.getElementById(target);
|
54
|
+
$el.classList.toggle('is-active');
|
55
|
+
$target.classList.toggle('is-active');
|
56
|
+
});
|
57
|
+
});
|
58
|
+
}
|
59
|
+
|
60
|
+
// Modals
|
61
|
+
|
62
|
+
var rootEl = document.documentElement;
|
63
|
+
var $modals = getAll('.modal');
|
64
|
+
var $modalButtons = getAll('.modal-button');
|
65
|
+
var $modalCloses = getAll('.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button');
|
66
|
+
|
67
|
+
if ($modalButtons.length > 0) {
|
68
|
+
$modalButtons.forEach(function ($el) {
|
69
|
+
$el.addEventListener('click', function () {
|
70
|
+
var target = $el.dataset.target;
|
71
|
+
var $target = document.getElementById(target);
|
72
|
+
rootEl.classList.add('is-clipped');
|
73
|
+
$target.classList.add('is-active');
|
74
|
+
});
|
75
|
+
});
|
76
|
+
}
|
77
|
+
|
78
|
+
if ($modalCloses.length > 0) {
|
79
|
+
$modalCloses.forEach(function ($el) {
|
80
|
+
$el.addEventListener('click', function () {
|
81
|
+
closeModals();
|
82
|
+
});
|
83
|
+
});
|
84
|
+
}
|
85
|
+
|
86
|
+
document.addEventListener('keydown', function (event) {
|
87
|
+
var e = event || window.event;
|
88
|
+
if (e.keyCode === 27) {
|
89
|
+
closeModals();
|
90
|
+
closeDropdowns();
|
91
|
+
}
|
92
|
+
});
|
93
|
+
|
94
|
+
function closeModals() {
|
95
|
+
rootEl.classList.remove('is-clipped');
|
96
|
+
$modals.forEach(function ($el) {
|
97
|
+
$el.classList.remove('is-active');
|
98
|
+
});
|
99
|
+
}
|
100
|
+
|
101
|
+
// Functions
|
102
|
+
|
103
|
+
function getAll(selector) {
|
104
|
+
return Array.prototype.slice.call(document.querySelectorAll(selector), 0);
|
105
|
+
}
|
106
|
+
|
107
|
+
// Scrolling
|
108
|
+
|
109
|
+
var shadowedEl = document.getElementById('shadowed');
|
110
|
+
var navbarEl = document.getElementById('navbar');
|
111
|
+
var navbarBurger = document.getElementById('navbarBurger');
|
112
|
+
var specialShadow = document.getElementById('specialShadow');
|
113
|
+
var NAVBAR_HEIGHT = 52;
|
114
|
+
var THRESHOLD = 160;
|
115
|
+
var navbarOpen = false;
|
116
|
+
var horizon = NAVBAR_HEIGHT;
|
117
|
+
var whereYouStoppedScrolling = 0;
|
118
|
+
var scrollFactor = 0;
|
119
|
+
var currentTranslate = 0;
|
120
|
+
|
121
|
+
navbarBurger.addEventListener('click', function (el) {
|
122
|
+
navbarOpen = !navbarOpen;
|
123
|
+
|
124
|
+
if (navbarOpen) {
|
125
|
+
rootEl.classList.add('bd-is-clipped-touch');
|
126
|
+
shadowedEl.style.display = shadowedEl.style.display == 'none' ? 'block' : 'none';
|
127
|
+
} else {
|
128
|
+
rootEl.classList.remove('bd-is-clipped-touch');
|
129
|
+
shadowedEl.style.display = shadowedEl.style.display == 'none' ? 'block' : 'none';
|
130
|
+
}
|
131
|
+
});
|
132
|
+
|
133
|
+
function upOrDown(lastY, currentY) {
|
134
|
+
if (currentY >= lastY) {
|
135
|
+
return goingDown(currentY);
|
136
|
+
}
|
137
|
+
return goingUp(currentY);
|
138
|
+
}
|
139
|
+
|
140
|
+
function goingDown(currentY) {
|
141
|
+
var trigger = NAVBAR_HEIGHT;
|
142
|
+
whereYouStoppedScrolling = currentY;
|
143
|
+
|
144
|
+
if (currentY > horizon) {
|
145
|
+
horizon = currentY;
|
146
|
+
}
|
147
|
+
|
148
|
+
translateHeader(currentY, false);
|
149
|
+
}
|
150
|
+
|
151
|
+
function goingUp(currentY) {
|
152
|
+
var trigger = 0;
|
153
|
+
|
154
|
+
if (currentY < whereYouStoppedScrolling - NAVBAR_HEIGHT) {
|
155
|
+
horizon = currentY + NAVBAR_HEIGHT;
|
156
|
+
}
|
157
|
+
|
158
|
+
translateHeader(currentY, true);
|
159
|
+
}
|
160
|
+
|
161
|
+
function constrainDelta(delta) {
|
162
|
+
return Math.max(0, Math.min(delta, NAVBAR_HEIGHT));
|
163
|
+
}
|
164
|
+
|
165
|
+
function translateHeader(currentY, upwards) {
|
166
|
+
// let topTranslateValue;
|
167
|
+
var translateValue = void 0;
|
168
|
+
|
169
|
+
if (upwards && currentTranslate == 0) {
|
170
|
+
translateValue = 0;
|
171
|
+
} else if (currentY <= NAVBAR_HEIGHT) {
|
172
|
+
translateValue = currentY * -1;
|
173
|
+
} else {
|
174
|
+
var delta = constrainDelta(Math.abs(currentY - horizon));
|
175
|
+
translateValue = delta - NAVBAR_HEIGHT;
|
176
|
+
}
|
177
|
+
|
178
|
+
if (translateValue != currentTranslate) {
|
179
|
+
var navbarStyle = '\n transform: translateY(' + translateValue + 'px);\n ';
|
180
|
+
currentTranslate = translateValue;
|
181
|
+
navbarEl.setAttribute('style', navbarStyle);
|
182
|
+
}
|
183
|
+
|
184
|
+
if (currentY > THRESHOLD * 2) {
|
185
|
+
scrollFactor = 1;
|
186
|
+
} else if (currentY > THRESHOLD) {
|
187
|
+
scrollFactor = (currentY - THRESHOLD) / THRESHOLD;
|
188
|
+
} else {
|
189
|
+
scrollFactor = 0;
|
190
|
+
}
|
191
|
+
|
192
|
+
var translateFactor = 1 + translateValue / NAVBAR_HEIGHT;
|
193
|
+
specialShadow.style.opacity = scrollFactor;
|
194
|
+
specialShadow.style.transform = 'scaleY(' + translateFactor + ')';
|
195
|
+
}
|
196
|
+
|
197
|
+
translateHeader(window.scrollY, false);
|
198
|
+
|
199
|
+
var ticking = false;
|
200
|
+
var lastY = 0;
|
201
|
+
|
202
|
+
window.addEventListener('scroll', function () {
|
203
|
+
var currentY = window.scrollY;
|
204
|
+
|
205
|
+
if (!ticking) {
|
206
|
+
window.requestAnimationFrame(function () {
|
207
|
+
upOrDown(lastY, currentY);
|
208
|
+
ticking = false;
|
209
|
+
lastY = currentY;
|
210
|
+
});
|
211
|
+
}
|
212
|
+
|
213
|
+
ticking = true;
|
214
|
+
});
|
215
|
+
|
216
|
+
// Popup Sharing
|
217
|
+
|
218
|
+
function popupSharing(url, provider) {
|
219
|
+
return window.open(url, 'Share to ' + provider, 'menubar=1,resizable=1,width=600,height=350')
|
220
|
+
}
|
221
|
+
|
222
|
+
var $onShare = Array.prototype.slice.call(document.querySelectorAll('.on-share'), 0);
|
223
|
+
if ($onShare.length > 0) {
|
224
|
+
$onShare.forEach(function ($el) {
|
225
|
+
$el.addEventListener('click', function () {
|
226
|
+
var url = $el.dataset.url;
|
227
|
+
var provider = $el.dataset.provider;
|
228
|
+
switch (provider) {
|
229
|
+
case 'facebook':
|
230
|
+
return popupSharing('https://www.facebook.com/sharer/sharer.php?u=' + url, provider);
|
231
|
+
case 'twitter':
|
232
|
+
return popupSharing('https://twitter.com/intent/tweet?url=' + url, provider);
|
233
|
+
case 'google':
|
234
|
+
return popupSharing('https://plus.google.com/share?url=' + url, provider);
|
235
|
+
case 'pinterest':
|
236
|
+
return popupSharing('http://pinterest.com/pin/create/button/?url=' + url, provider);
|
237
|
+
}
|
238
|
+
});
|
239
|
+
});
|
240
|
+
}
|
241
|
+
});
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-bulma-theme
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nakorn Sinpadung
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.16'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.0'
|
55
|
+
description: 'A pure Bulma theme for jekyll that used on GitHub: nakorndev/nong-program'
|
56
|
+
email:
|
57
|
+
- nakorndev@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- LICENSE.txt
|
63
|
+
- README.md
|
64
|
+
- _includes/share-button.html
|
65
|
+
- _layouts/default.html
|
66
|
+
- _layouts/page.html
|
67
|
+
- _layouts/post.html
|
68
|
+
- _sass/_app.scss
|
69
|
+
- _sass/syntax.scss
|
70
|
+
- assets/css/app.scss
|
71
|
+
- assets/favicon/16x16.png
|
72
|
+
- assets/favicon/32x32.png
|
73
|
+
- assets/js/app.js
|
74
|
+
homepage: https://github.com/nakorndev/jekyll-bulma-theme
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.7.3
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Bulma theme for Jekyll
|
98
|
+
test_files: []
|