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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c2d41f38a8b4ad2aa4502646aa6359a0d77768e5f7d95b7ea5885d7bd60ba9a
4
- data.tar.gz: 6af6915d509d31b6c1cf944620d6f11a21ff4af712df215c1d7554510d68f54a
3
+ metadata.gz: 7c574dec7eb61d1205bccd0b91e37ec534fd8928e0baa7770c037ade764bf0cc
4
+ data.tar.gz: d0138df09ec3af24901e8c79be3d50f767008646fcbbf4dc82849e68b9a45c79
5
5
  SHA512:
6
- metadata.gz: dc34dcbbcf9cd32a32ef275b6992abd4e00838d5040e7f3dbe6396eb990df67ac4ced4320261ee00e4fb67e609bee1009d34ce0acd560e39d5fd0716c03a6d43
7
- data.tar.gz: e0d862d95e1b9a202ac917eb4ff370e49606b25a2c46fcc1585907228a25f1ae450441a0187919ffd8ba608aa7e917025d3a51c5f1dbf8345210a8c96273a251
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
- 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
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
- ```ruby
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
- ```yaml
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
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
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
@@ -6,6 +6,7 @@ exclude:
6
6
  - Gemfile.lock
7
7
  - jekyll-theme-dusk.gemspec
8
8
  - .jekyll-metadata
9
+ - .readme
9
10
 
10
11
  # Installed Gems - no SEO because privacy :)
11
12
  plugins:
@@ -0,0 +1,5 @@
1
+ - image: tux.jpg
2
+ - image: tux-flag.jpg
3
+ - image: tux-old.jpg
4
+ - image: tux-trollface.jpg
5
+ - image: tux-unfaithful.jpg
data/_data/navigation.yml CHANGED
@@ -7,4 +7,4 @@
7
7
  - name: Blog
8
8
  icon: /assets/images/blog-icon.png
9
9
  link: /blog.html
10
-
10
+
@@ -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;
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.2.4
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-04-25 00:00:00.000000000 Z
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/