jekyll-theme-dusk 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +93 -25
- data/_config.yml +1 -0
- data/_data/galleries/example.yml +5 -0
- data/_data/navigation.yml +1 -1
- data/_includes/image-gallery.html +11 -0
- data/_sass/base.scss +27 -0
- data/_sass/include.scss +2 -2
- data/assets/images/gallery/example/tux-flag.jpg +0 -0
- data/assets/images/gallery/example/tux-old.jpg +0 -0
- data/assets/images/gallery/example/tux-trollface.jpg +0 -0
- data/assets/images/gallery/example/tux-unfaithful.jpg +0 -0
- data/assets/images/gallery/example/tux.jpg +0 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c574dec7eb61d1205bccd0b91e37ec534fd8928e0baa7770c037ade764bf0cc
|
4
|
+
data.tar.gz: d0138df09ec3af24901e8c79be3d50f767008646fcbbf4dc82849e68b9a45c79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 683b8edcecde6b6dfebcdd7d4527471a0224fd7690ebaf676c1305af7caa04892977fa2475c35d07b054314d957c960fbfc8d6b9e35a1631204a4c221ca88bbe
|
7
|
+
data.tar.gz: 4769f51453d6ffb069db3cf4343c1779f0aff56f2ceaf04f68c7e8fa337c6dacf5d1bcfb030d7c49359ff103fede7bcdd92c41a70e5369876ea5e9120960376a
|
data/README.md
CHANGED
@@ -1,50 +1,118 @@
|
|
1
1
|
# jekyll-theme-dusk
|
2
|
+
This theme was built for GitHub Pages.
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
### WARNING
|
5
|
+
This theme assumes that your images are stored at
|
6
|
+
````
|
7
|
+
/assets/images
|
8
|
+
````
|
9
|
+
It's good practice to put your assets in an assets folder, in my opinion at least.
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
Add this line to your Jekyll site's `Gemfile`:
|
12
|
-
|
13
|
-
|
14
|
+
```
|
15
|
+
ruby
|
14
16
|
gem "jekyll-theme-dusk"
|
15
17
|
```
|
16
|
-
|
17
18
|
And add this line to your Jekyll site's `_config.yml`:
|
18
|
-
|
19
|
-
|
19
|
+
```
|
20
|
+
yaml
|
20
21
|
theme: jekyll-theme-dusk
|
21
22
|
```
|
22
|
-
|
23
23
|
And then execute:
|
24
|
-
|
24
|
+
```
|
25
25
|
$ bundle
|
26
|
-
|
26
|
+
```
|
27
27
|
Or install it yourself as:
|
28
|
-
|
28
|
+
```
|
29
29
|
$ gem install jekyll-theme-dusk
|
30
|
-
|
30
|
+
```
|
31
31
|
## Usage
|
32
32
|
|
33
|
-
|
33
|
+
This theme has many features in it. They are written here so that it is easier to use them.
|
34
|
+
|
35
|
+
- ### Navigation Menu
|
36
|
+
To edit entries in the navigation menu, edit;
|
37
|
+
```
|
38
|
+
_data/navigation.yml
|
39
|
+
```
|
40
|
+
and add your pages, and icons if you want them.
|
41
|
+
Here is an example:
|
42
|
+
```
|
43
|
+
yaml
|
44
|
+
- name: Home
|
45
|
+
icon:
|
46
|
+
link: /
|
47
|
+
- name: About
|
48
|
+
icon: /assets/images/about-icon.png
|
49
|
+
link: /about.html
|
50
|
+
- name: Blog
|
51
|
+
icon: /assets/images/blog-icon.png
|
52
|
+
link: /blog.html
|
53
|
+
```
|
54
|
+
![Editing the navigation menu, as a GIF](.readme/edit-nav.gif "Edit the navigation menu")
|
55
|
+
Crunchy gif :)
|
56
|
+
|
57
|
+
- ### Image Galleries
|
58
|
+
|
59
|
+
*This one is a bit complicated, but is pretty cool in my opinion.*
|
60
|
+
If you want to create a gallery, you will need to do a few things.
|
61
|
+
|
62
|
+
**In this section, replace [GALLERY_NAME] with the name of a gallery. This must be the same for all parts if you want to use the gallery without issues.**
|
63
|
+
|
64
|
+
1. Create the folders at the paths:
|
65
|
+
```
|
66
|
+
/assets/images/gallery/
|
67
|
+
|
68
|
+
/assets/images/gallery/[GALLERY_NAME]/
|
69
|
+
|
70
|
+
/data/galleries/
|
71
|
+
```
|
72
|
+
2. Place your images at ```/assets/images/gallery/[GALLERY_NAME]/(your images)```
|
73
|
+
Replace ```(your images)``` with *your images*. What did you expect?
|
74
|
+
|
75
|
+
3. Place a file at ```_data/galleries``` called ```[GALLERY_NAME].yml``` and add the names of your images according to the example below:
|
76
|
+
```
|
77
|
+
yaml
|
78
|
+
- image: tux.jpg
|
79
|
+
- image: tux-flag.jpg
|
80
|
+
- image: tux-old.jpg
|
81
|
+
- image: tux-trollface.jpg
|
82
|
+
- image: tux-unfaithful.jpg
|
83
|
+
```
|
84
|
+
|
85
|
+
4. Place the following code into anywhere you want to add an image gallery:
|
86
|
+
```
|
87
|
+
liquid
|
88
|
+
{%- include image-gallery.html gallery_id="[GALLERY_NAME]" -%}
|
89
|
+
```
|
90
|
+
|
91
|
+
5. Enjoy your images!
|
92
|
+
|
93
|
+
![Example of image gallery feature](.readme/image-gallery.png "Example of image gallery feature")
|
94
|
+
Located at ```_posts/2023-04-21-hello-world.md```
|
95
|
+
|
96
|
+
- ### Home Page
|
97
|
+
|
98
|
+
To edit the home page, you need to include a title for the page, and a small summary.
|
99
|
+
This can be found in the front matter. Here is an example.
|
100
|
+
```
|
101
|
+
yaml
|
102
|
+
layout: home
|
103
|
+
permalink: /
|
104
|
+
title: "Dusk"
|
105
|
+
summary: "Dusk is a theme built for GitHub Pages."
|
106
|
+
```
|
107
|
+
|
108
|
+
- ### Blog Page
|
109
|
+
|
110
|
+
This page contains all your posts that you have made on your website. All you need to do is just to make some posts, and then they will all appear there.
|
34
111
|
|
35
112
|
## Contributing
|
36
113
|
|
37
114
|
Bug reports and pull requests are welcome on GitHub at https://github.com/Parmjot-Singh/jekyll-theme-dusk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
|
38
115
|
|
39
|
-
## Development
|
40
|
-
|
41
|
-
To set up your environment to develop this theme, run `bundle install`.
|
42
|
-
|
43
|
-
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.
|
44
|
-
|
45
|
-
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
46
|
-
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-dusk.gemspec` accordingly.
|
47
|
-
|
48
116
|
## License
|
49
117
|
|
50
118
|
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/_config.yml
CHANGED
data/_data/navigation.yml
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- credit to Tim Van Damme at css-tricks.com -->
|
2
|
+
<!-- https://css-tricks.com/adaptive-photo-layout-with-flexbox -->
|
3
|
+
<div class="image-gallery">
|
4
|
+
<ul>
|
5
|
+
{%- for item in site.data.galleries[include.gallery_id] -%}
|
6
|
+
<li>
|
7
|
+
<img src="/assets/images/gallery/{{ include.gallery_id }}/{{ item.image }}">
|
8
|
+
</li>
|
9
|
+
{%- endfor -%}
|
10
|
+
</ul>
|
11
|
+
</div>
|
data/_sass/base.scss
CHANGED
@@ -81,3 +81,30 @@ hr {
|
|
81
81
|
article {
|
82
82
|
margin: 20px 0;
|
83
83
|
}
|
84
|
+
|
85
|
+
.image-gallery {
|
86
|
+
ul {
|
87
|
+
display: flex;
|
88
|
+
flex-wrap: wrap;
|
89
|
+
list-style: none;
|
90
|
+
padding-left: 0;
|
91
|
+
|
92
|
+
&:after {
|
93
|
+
content:'';
|
94
|
+
display:block;
|
95
|
+
flex-grow: 10;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
li {
|
100
|
+
height: 40vh;
|
101
|
+
flex-grow: 1;
|
102
|
+
}
|
103
|
+
|
104
|
+
img {
|
105
|
+
max-height: 100%;
|
106
|
+
min-width: 100%;
|
107
|
+
object-fit: cover;
|
108
|
+
vertical-align: bottom;
|
109
|
+
}
|
110
|
+
}
|
data/_sass/include.scss
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
transform: translate(-50%, -50%);
|
30
30
|
}
|
31
31
|
}
|
32
|
-
#why {
|
32
|
+
#why {/* container around .b2b-container div. Button doesn't look correct without this for some reason, hence the name #why */
|
33
33
|
display: flex;
|
34
34
|
flex-direction: row;
|
35
35
|
justify-content: flex-start;
|
@@ -101,7 +101,6 @@ header {
|
|
101
101
|
transition: 0.5s;
|
102
102
|
|
103
103
|
text-align: center;
|
104
|
-
/* debug */
|
105
104
|
background-color: rgba(0, 0, 0, 0.6);
|
106
105
|
|
107
106
|
a {
|
@@ -127,6 +126,7 @@ header {
|
|
127
126
|
}
|
128
127
|
|
129
128
|
#open-nav {
|
129
|
+
background-color: rgba(0, 0, 0, 0.6);
|
130
130
|
position: fixed;
|
131
131
|
top: 7px;
|
132
132
|
right: 7px;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-dusk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parmjot Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-pages
|
@@ -48,12 +48,14 @@ files:
|
|
48
48
|
- LICENSE.txt
|
49
49
|
- README.md
|
50
50
|
- _config.yml
|
51
|
+
- _data/galleries/example.yml
|
51
52
|
- _data/navigation.yml
|
52
53
|
- _includes/footer.html
|
53
54
|
- _includes/head.html
|
54
55
|
- _includes/header-default.html
|
55
56
|
- _includes/header-home.html
|
56
57
|
- _includes/header-post.html
|
58
|
+
- _includes/image-gallery.html
|
57
59
|
- _includes/navigation.html
|
58
60
|
- _layouts/blog.html
|
59
61
|
- _layouts/default.html
|
@@ -69,6 +71,11 @@ files:
|
|
69
71
|
- assets/images/cross.png
|
70
72
|
- assets/images/dusk-gray.jpg
|
71
73
|
- assets/images/dusk.jpg
|
74
|
+
- assets/images/gallery/example/tux-flag.jpg
|
75
|
+
- assets/images/gallery/example/tux-old.jpg
|
76
|
+
- assets/images/gallery/example/tux-trollface.jpg
|
77
|
+
- assets/images/gallery/example/tux-unfaithful.jpg
|
78
|
+
- assets/images/gallery/example/tux.jpg
|
72
79
|
- assets/images/github-logo.png
|
73
80
|
- assets/images/noise.png
|
74
81
|
homepage: https://github.com/Parmjot-Singh/jekyll-theme-dusk/
|