jekyll-theme-buttery-biscuit 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 726b70cc1bbe9a95a74cf0f8822f035c99180626a0899f36a63177117f6bc3c0
4
+ data.tar.gz: d9c8391af84be4e347843f1cb5fc590dd14b10db885c996c5b918a61a20d4da3
5
+ SHA512:
6
+ metadata.gz: 5652525f132881528902e9b9a2ea20a4bbaac001cad6b3f4a05a5563a24805c6e255aaad0840fe8d142353171714e83586b5581f7ac168af05f582cd66647d04
7
+ data.tar.gz: 729a3a5ee52236825310edeb2012f4007913757abe8a2d4a05facc5b224fa74614954b994a226a38f5b4d1f1c9e439b1a3d38339d319932e6b8cda8d71734789
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022
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/_config.yml ADDED
@@ -0,0 +1,53 @@
1
+ # Site settings
2
+ # These are used to personalize your new site. If you look in the HTML files,
3
+ # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
4
+ # You can create any custom variable you would like, and they will be accessible
5
+ # in the templates via {{ site.myvariable }}.
6
+
7
+ title: Your awesome title
8
+ email: your-email@example.com
9
+ description: >- # this means to ignore newlines until "baseurl:"
10
+ Write an awesome description for your new site here. You can edit this
11
+ line in _config.yml. It will appear in your document head meta (for
12
+ Google search results) and in your feed.xml site description.
13
+ baseurl: "" # the subpath of your site, e.g. /blog
14
+ url: "" # the base hostname & protocol for your site, e.g. http://example.com
15
+ twitter_username: jekyllrb
16
+ github_username: jekyll
17
+
18
+ paginate: 10
19
+
20
+ # Build settings
21
+ plugins:
22
+ - jekyll-feed
23
+ - jekyll-spaceship
24
+ - jekyll-seo-tag
25
+ - jekyll-paginate
26
+
27
+ buttery-biscuit:
28
+ theme: default
29
+ darkmode: false
30
+ fixed-navbar: false
31
+
32
+ exclude:
33
+ - readme.md
34
+
35
+ # Exclude from processing.
36
+ # The following items will not be processed, by default.
37
+ # Any item listed under the `exclude:` key here will be automatically added to
38
+ # the internal "default list".
39
+ #
40
+ # Excluded items can be processed by explicitly listing the directories or
41
+ # their entries' file path in the `include:` list.
42
+ #
43
+ # exclude:
44
+ # - .sass-cache/
45
+ # - .jekyll-cache/
46
+ # - gemfiles/
47
+ # - Gemfile
48
+ # - Gemfile.lock
49
+ # - node_modules/
50
+ # - vendor/bundle/
51
+ # - vendor/cache/
52
+ # - vendor/gems/
53
+ # - vendor/ruby/
@@ -0,0 +1,3 @@
1
+ <footer class="is-center no-print">
2
+ {% include footertext.html %}
3
+ </footer>
@@ -0,0 +1 @@
1
+ <p>Theme made by Luke Ossevoort with ❤</p>
@@ -0,0 +1,7 @@
1
+ <head>
2
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/main.css">
5
+ <link rel="stylesheet" href="https://unpkg.com/gutenberg-css@latest" media="print">
6
+ {% seo %}
7
+ </head>
@@ -0,0 +1,33 @@
1
+ <nav class="nav is-vertical-align is-full-width no-print" id="navbar">
2
+ <div class="nav-left hide-xs">
3
+ <a class="brand" href="#">{{ site.title }}</a>
4
+ {% for item in site.data.navigation %}
5
+ <a href="{{ item.link }}" {% if page.url == item.link %}class="active"{% endif %}>
6
+ {{ item.name }}
7
+ </a>
8
+ {% endfor %}
9
+ {% if site.buttery-biscuit.darkmode %}
10
+ <a href="javascript:void(0)" id="theme-switch" onclick="switchMode(this)">☀️</a>
11
+ {% endif %}
12
+ </div>
13
+ <div class="nav-center hide-sm hide-md hide-lg">
14
+ <a class="brand" href="#">{{ site.title }}</a>
15
+ </div>
16
+ <div class="nav-right hide-sm hide-md hide-lg">
17
+ <details class="dropdown">
18
+ <summary class="button icon-only">
19
+ <img src="https://icongr.am/feather/menu.svg?size=64&color=currentColor">
20
+ </summary>
21
+ <div class="card" style="padding-left: 0; padding-right: 0; margin-left: -30%;">
22
+ {% for item in site.data.navigation %}
23
+ <p><a href="{{ item.link }}" {% if page.url == item.link %}class="active"{% endif %}>
24
+ {{ item.name }}
25
+ </a></p>
26
+ {% endfor %}
27
+ {% if site.buttery-biscuit.darkmode %}
28
+ <p><a href="javascript:void(0)" id="theme-switch" onclick="switchMode(this)">☀️</a></p>
29
+ {% endif %}
30
+ </div>
31
+ </details>
32
+ </div>
33
+ </nav>
@@ -0,0 +1,2 @@
1
+ {% include paginatefeed.html %}
2
+ {% include paginatebuttons.html %}
@@ -0,0 +1,31 @@
1
+ {% if paginator.total_pages > 1 %}
2
+ <div class="row is-center">
3
+ <div class="col is-center">
4
+ {% if paginator.previous_page %}
5
+ <a class="button primary" href="{{ paginator.previous_page_path | relative_url }}">&laquo; Prev</a>
6
+ {% else %}
7
+ <a class="button dark">&laquo; Prev</a>
8
+ {% endif %}
9
+ </div>
10
+
11
+ <div class="col is-center">
12
+ {% for page in (1..paginator.total_pages) %}
13
+ {% if page == paginator.page %}
14
+ <em class="paginateindex">{{ page }}</em>
15
+ {% elsif page == 1 %}
16
+ <a class="paginateindex" href="{{ '/' | relative_url }}">{{ page }}</a>
17
+ {% else %}
18
+ <a class="paginateindex" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a>
19
+ {% endif %}
20
+ {% endfor %}
21
+ </div>
22
+
23
+ <div class="col is-center">
24
+ {% if paginator.next_page %}
25
+ <a class="button primary" href="{{ paginator.next_page_path | relative_url }}">Next &raquo;</a>
26
+ {% else %}
27
+ <a class="button dark">Next &raquo;</a>
28
+ {% endif %}
29
+ </div>
30
+ </div>
31
+ {% endif %}
@@ -0,0 +1,29 @@
1
+ <!-- Feed generating loop -->
2
+ {% for post in paginator.posts %}
3
+
4
+ <!-- Post heading -->
5
+ <div class="row">
6
+ <div class="col">
7
+ <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
8
+ <p>
9
+ Published {{ post.date | date: "%Y-%m-%d" }}
10
+ {% for tag in post.tags %}
11
+ <span class="tag">{{ tag }}</span>
12
+ {% endfor %}
13
+ </p>
14
+ </div>
15
+ </div>
16
+
17
+ <!-- Post content -->
18
+ <div class="row">
19
+ {% if post.img %}
20
+ <div class="col-4">
21
+ <img src="{{ post.img }}">
22
+ </div>
23
+ {% endif %}
24
+
25
+ <div class="col">
26
+ {{ post.excerpt }}
27
+ </div>
28
+ </div>
29
+ {% endfor %}
@@ -0,0 +1,15 @@
1
+ ---
2
+ ---
3
+ <!doctype html>
4
+ <html>
5
+ {% include header.html %}
6
+ <body>
7
+ {% include navbar.html %}
8
+ {{ content }}
9
+ {% include footer.html %}
10
+ <script src="{{ site.baseurl }}/assets/js/darkmode.js"></script>
11
+ {% if site.buttery-biscuit.fixed-navbar %}
12
+ <script src="{{ site.baseurl }}/assets/js/fixednavbar.js"></script>
13
+ {% endif %}
14
+ </body>
15
+ </html>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+
6
+ {% if paginator.page == 1 %}
7
+ {{ content }}
8
+ {% endif %}
9
+ {% include paginate.html %}
@@ -0,0 +1,7 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="container">
6
+ {{ content }}
7
+ </div>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+
6
+ <div class="row">
7
+ <div class="col">
8
+ <h1>{{ page.title }}</h1>
9
+ {% if page.img %}
10
+ <img src="{{ img }}">
11
+ {% endif %}
12
+ {{ content }}
13
+ </div>
14
+ </div>
@@ -0,0 +1,4 @@
1
+ // Imports variables for dark theme
2
+ body.dark {
3
+ @include vars;
4
+ }
@@ -0,0 +1,3 @@
1
+ .paginateindex {
2
+ padding: 0 2px;
3
+ }
@@ -0,0 +1 @@
1
+ @import url(https://unpkg.com/chota@latest)
data/_sass/theme.scss ADDED
@@ -0,0 +1,4 @@
1
+ // Imports the theme variables
2
+ :root {
3
+ @include vars;
4
+ }
@@ -0,0 +1,20 @@
1
+ // Theme using the default dark values for chota
2
+ @mixin vars {
3
+ --bg-color: #000;
4
+ --bg-secondary-color: #131316;
5
+ --font-color: #f5f5f5;
6
+ --color-grey: #ccc;
7
+ --color-darkGrey: #777;
8
+ }
9
+
10
+ body>.container {
11
+ max-width: 720px;
12
+ }
13
+
14
+ .nav {
15
+ background-color: var(--bg-secondary-color);
16
+ }
17
+
18
+ .nav .brand {
19
+ color: var(--color-primary);
20
+ }
@@ -0,0 +1,25 @@
1
+ // default theme using Chota's defaults
2
+ @mixin vars {
3
+ --bg-color: #ffffff;
4
+ --bg-secondary-color: #f3f3f6;
5
+ --color-primary: #14854F;
6
+ --color-lightGrey: #d2d6dd;
7
+ --color-grey: #747681;
8
+ --color-darkGrey: #3f4144;
9
+ --color-error: #d43939;
10
+ --color-success: #28bd14;
11
+ --grid-maxWidth: 120rem;
12
+ --grid-gutter: 2rem;
13
+ --font-size: 1.6rem;
14
+ --font-color: #333333;
15
+ --font-family-sans: sans-serif;
16
+ --font-family-mono: monaco, "Consolas", "Lucida Console", monospace;
17
+ }
18
+
19
+ body>.container {
20
+ max-width: 720px;
21
+ }
22
+
23
+ .nav {
24
+ background-color: var(--bg-secondary-color);
25
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ ---
3
+
4
+ @import "includes";
5
+
6
+ {% if site.buttery-biscuit.darkmode %}
7
+ @import "themes/{{ site.buttery-biscuit.darkmode }}";
8
+ @import "darktheme";
9
+ {% endif %}
10
+
11
+ {% if site.buttery-biscuit.theme %}
12
+ @import "themes/{{ site.buttery-biscuit.theme }}";
13
+ @import "theme";
14
+ {% endif %}
15
+
16
+ @import "extraStyling";
@@ -0,0 +1,35 @@
1
+ // Get stored style mode
2
+ var mode = localStorage.getItem("mode");
3
+
4
+ // Check mode and set styling
5
+ if (mode === "dark") {
6
+ // Saved darkmode
7
+ document.body.classList.add("dark");
8
+ document.querySelector('#theme-switch').innerHTML = "🌙";
9
+ } else if (mode === "light") {
10
+ // Saved lightmode
11
+ document.body.classList.remove("dark");
12
+ document.querySelector('#theme-switch').innerHTML = "☀️";
13
+ } else if (
14
+ window.matchMedia &&
15
+ window.matchMedia("(prefers-color-scheme: dark)").matches
16
+ ) {
17
+ // No saved mode, prefers dark
18
+ document.body.classList.add("dark");
19
+ document.querySelector('#theme-switch').innerHTML = "🌙";
20
+ mode = "dark";
21
+ } else {
22
+ // No saved mode, prefers light
23
+ mode = "light";
24
+ }
25
+
26
+ // Store mode
27
+ localStorage.setItem("mode", mode);
28
+
29
+ // Button for switching theme
30
+ function switchMode(el) {
31
+ const bodyClass = document.body.classList;
32
+ bodyClass.contains("dark")
33
+ ? ((el.innerHTML = "☀️"), bodyClass.remove("dark"), localStorage.setItem("mode", "light"))
34
+ : ((el.innerHTML = "🌙"), bodyClass.add("dark"), localStorage.setItem("mode", "dark"));
35
+ }
@@ -0,0 +1,9 @@
1
+ function navbarPadding(el) {
2
+ var navbar = document.getElementById('navbar');
3
+ el.style.paddingTop = navbar.offsetHeight.toString() + "px";
4
+ navbar.classList.add("is-fixed");
5
+ }
6
+
7
+ var container = document.getElementsByClassName("container")[0];
8
+
9
+ container.onload = navbarPadding(container);
data/readme.md ADDED
@@ -0,0 +1,60 @@
1
+ # Buttery Biscuit: a Jekyll theme
2
+
3
+ ## About
4
+
5
+ This Jekyll theme is a base, a buttery biscuit base. The goal is to have a theme that is easy to customise whilst using as a Gem based theme, resulting is a basic frame work for any Jekyll project. Made using [chota][chota] as a css framework and [Gutenberg][Gutenberg] for print styling
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Jekyll site's `Gemfile`:
10
+
11
+ ```ruby
12
+ gem "jekyll-theme-buttery-biscuit"
13
+ ```
14
+
15
+ And add this line to your Jekyll site's `_config.yml`:
16
+
17
+ ```yaml
18
+ theme: jekyll-theme-buttery-biscuit
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install jekyll-theme-buttery-biscuit
28
+
29
+ ## Usage
30
+
31
+ Buttery Biscuit uses its own collection of settings in the `_config.yml` as follows:
32
+
33
+ ```yaml
34
+ buttery-biscuit:
35
+ theme: default
36
+ darkmode: false
37
+ fixed-navbar: false
38
+ ```
39
+
40
+ The `theme` and `darkmode` settings reference sass files from the `_sass/themes` folder and overwrite the default html variables of [chota][chota] as well as introduce additional css changes.
41
+
42
+ ## Contributing
43
+
44
+ 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.
45
+
46
+ ## Development
47
+
48
+ To set up your environment to develop this theme, run `bundle install`.
49
+
50
+ 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.
51
+
52
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
53
+ To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-buttery-biscuit.gemspec` accordingly.
54
+
55
+ ## License
56
+
57
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
58
+
59
+ [chota]: https://jenil.github.io/chota/ "chota css homepage"
60
+ [Gutenberg]: https://bafs.github.io/Gutenberg/ "Gutenberg css homepage"
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-buttery-biscuit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Luke Ossevoort
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-09-06 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: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-feed
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jekyll-spaceship
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jekyll-paginate
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jekyll-seo-tag
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description:
84
+ email:
85
+ - luke@ossevoort.xyz
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - LICENSE.txt
91
+ - _config.yml
92
+ - _includes/footer.html
93
+ - _includes/footertext.html
94
+ - _includes/header.html
95
+ - _includes/navbar.html
96
+ - _includes/paginate.html
97
+ - _includes/paginatebuttons.html
98
+ - _includes/paginatefeed.html
99
+ - _layouts/default.html
100
+ - _layouts/home.html
101
+ - _layouts/page.html
102
+ - _layouts/post.html
103
+ - _sass/darktheme.scss
104
+ - _sass/extraStyling.scss
105
+ - _sass/includes.scss
106
+ - _sass/theme.scss
107
+ - _sass/themes/_dark.scss
108
+ - _sass/themes/_default.scss
109
+ - assets/css/main.scss
110
+ - assets/js/darkmode.js
111
+ - assets/js/fixednavbar.js
112
+ - readme.md
113
+ homepage: https://github.com/LukeOssevoort/jekyll-theme-buttery-biscuit
114
+ licenses:
115
+ - MIT
116
+ metadata: {}
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubyforge_project:
133
+ rubygems_version: 2.7.6.2
134
+ signing_key:
135
+ specification_version: 4
136
+ summary: A Jekyll theme that acts as a base, a buttery biscuit base.
137
+ test_files: []