no-style-please 0.2.0 → 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: 360b8b480989db056edf39d88abb2351d9a7dceeadb69c0fb7d7009eb05a142c
4
- data.tar.gz: ae3ce04c8c17b35f8aa038ee65db879e0f7d1783da12640870f4f6f0f526a7f4
3
+ metadata.gz: 1400532adf56860c17470b48995337de44d71760120df748d1e2f496c4e0a522
4
+ data.tar.gz: 79d7a895706ebc44aba4e43a956fe3b9e938bd0169a408218aa725539e2b4e66
5
5
  SHA512:
6
- metadata.gz: 63770655480e98cea80eefa481e6e29c509a57cbd819d1e20a19d17b7104823dcf1d0468a822e8f9d4036d1f42f76381cc654dd56fa6154385e2e9ccb9e026bb
7
- data.tar.gz: 8817fa1e7dc0f2dfa465decfaae650a4e35f0f31f64ec27c50a90d8d6b8f68f18ca6f8ca24a47bb4242148df4f7bac35b95a6cd53c6a5869a082192416a71aab
6
+ metadata.gz: fbbfaa09b602c9a8e6df2f777f7bfa701be7327a0c16e4d1ef26a74a23bb87ba18ed9df8d3bed7075c2dc8d0714bbc67f565a842955b796fc7014cdbeba77da5
7
+ data.tar.gz: 76a05f75b254776fb7900577164fdcea38141bab9393ffd4ba99c478747794810309e4bdc77b4fdae02046885ccc829b0505b2379bb2c2bff2fef350553fbf06
data/README.md CHANGED
@@ -1,15 +1,16 @@
1
1
  # no style, please!
2
2
 
3
- <img src="./logo.png" width="64" align="left" />A (nearly) no-CSS, fast, minimalist [Jekyll](https://jekyllrb.com/) theme.
3
+ <img src="https://raw.githubusercontent.com/riggraz/no-style-please/master/logo.png" width="64" align="left" />A (nearly) no-CSS, fast, minimalist [Jekyll](https://jekyllrb.com/) theme.
4
4
  Inspired by [elly's site](http://tilde.town/~elly/), expressly created for [my personal blog](https://riggraz.dev/).
5
5
 
6
6
  <h3 align="center"><a href="https://riggraz.dev/no-style-please/">Try the demo out!</a></h3>
7
7
 
8
- <img src="./_screenshots/featured-image.png" />
8
+ <img src="https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/featured-image.png" />
9
9
 
10
10
  ## Features
11
11
 
12
- * Fast (**< 1kb of CSS**, see [Page Speed Insights report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/page-speed-insights-report.png) and [Lighthouse report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/lighthouse-report.png))
12
+ * Fast (**< 1kb of CSS**, currently 955 bytes. For more information on performance and more, see [Page Speed Insights report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/page-speed-insights-report.png) and [Lighthouse report](https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/lighthouse-report.png))
13
+ * Light, dark and auto modes
13
14
  * Responsive
14
15
  * Content first (typography optimized for maximum readability)
15
16
  * SEO optimized (uses [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag))
@@ -48,7 +49,7 @@ If you want to use this theme for your Jekyll's site deployed on [GitHub Pages](
48
49
 
49
50
  ## Usage
50
51
 
51
- You can edit `_config.yml` file to customize your blog. You can change things such as the name of the blog, the author, how dates are formatted, etc. Customizable fields should be straightforward to understand, however `_config.yml` contains some comments to help you understand what each fields does.
52
+ You can edit `_config.yml` file to customize your blog. You can change things such as the name of the blog, the author, the appearance of the theme (light, dark or auto), how dates are formatted, etc. Customizable fields should be straightforward to understand. Still, `_config.yml` contains some comments to help you understand what each field does.
52
53
 
53
54
  For further customization (e.g. layout, CSS) see the [official Jekyll's documentation](https://jekyllrb.com/docs/themes/#overriding-theme-defaults) on customizing gem-based themes.
54
55
 
@@ -66,9 +67,19 @@ The `menu.yml` file accepts the following fields:
66
67
  - `post_list`, which can be `true` or `false`. If it is true, the entry will have all posts in the site as subentries. This is used to render your post list.
67
68
  - `entries`, yes, you can have entries inside entries. In this way you can create nested sublists!
68
69
 
70
+ ### Pro tips
71
+
72
+ #### Dark mode for images
73
+
74
+ This theme provides dark mode by inverting all colors of light mode throught the CSS `invert()` function. This approach would also invert the color of all images, but, since this is not the behaviour one would expect, images are not inverted by default.
75
+
76
+ However, if you would like to force the color inversion on a specific image you can do so by applying `class="ioda"` to that image ("ioda" stands for "invert on dark appearance"). See the image in the [overview post](https://github.com/riggraz/no-style-please/blob/master/_posts/2020-07-07-overview-post.md) for an example of this approach. Note that color inversion will take place only when the theme has dark appearance!
77
+
78
+ For example, if you have a black and white image it could make sense to invert it in dark mode. On the other hand, a colorful image will probably look bad if inverted.
79
+
69
80
  ## Contributing
70
81
 
71
- 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.
82
+ Bug reports and pull requests are welcome on GitHub at https://github.com/riggraz/no-style-please. 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.
72
83
 
73
84
  ## Development
74
85
 
@@ -13,6 +13,7 @@ favicon: "./logo.png" # relative path to site's favicon
13
13
  theme: no-style-please # if you are using GitHub Pages, change it to remote_theme: riggraz/no-style-please
14
14
 
15
15
  theme_config:
16
+ appearance: "auto" # can be "light", "dark" or "auto"
16
17
  back_home_text: ".." # customize text for homepage link in post layout
17
18
  date_format: "%Y-%m-%d" # customize how date is formatted
18
19
  show_description: false # show blog description in home page
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="{{ page.lang | default: "en" }}">
2
+ <html lang="{{ page.lang | default: "en" }}" a="{{ site.theme_config.appearance | default: "auto" }}">
3
3
  {%- include head.html -%}
4
4
  <body>
5
5
  <main class="page-content" aria-label="Content">
@@ -1,10 +1,24 @@
1
+ @mixin dark-appearance {
2
+ filter: invert(1);
3
+ img {
4
+ filter: invert(1);
5
+
6
+ &.ioda { filter: invert(0); }
7
+ }
8
+ }
9
+
10
+ html[a="dark"] { @include dark-appearance; }
11
+
12
+ @media (prefers-color-scheme: dark) {
13
+ html[a="auto"] { @include dark-appearance; }
14
+ }
15
+
1
16
  html {
2
17
  color: black;
3
18
  background-color: white;
4
19
  font-family: monospace;
5
20
  font-size: 1.3rem;
6
21
  line-height: 1.3;
7
- -webkit-font-smoothing: antialiased;
8
22
  }
9
23
 
10
24
  h2, h3, h4, h5, h6 { margin-top: 3rem; }
@@ -55,4 +69,10 @@ blockquote {
55
69
  padding: 1rem;
56
70
 
57
71
  p { margin: 0; }
72
+ }
73
+
74
+ img {
75
+ max-width: 100%;
76
+ display: block;
77
+ margin: 0 auto;
58
78
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no-style-please
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riccardo Graziosi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.0.3
93
+ rubygems_version: 3.1.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: A (nearly) no-CSS, fast, minimalist Jekyll theme.