no-style-please2 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # no style, please!
2
+
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
+ Inspired by [elly's site](http://tilde.town/~elly/), expressly created for [my personal blog](https://riggraz.dev/).
5
+
6
+ <h3 align="center"><a href="https://riggraz.dev/no-style-please/">Try the demo out!</a></h3>
7
+
8
+ <img src="https://raw.githubusercontent.com/riggraz/no-style-please/master/_screenshots/featured-image.png" />
9
+
10
+ ## Features
11
+
12
+ + ### new
13
+ + tags support
14
+ + mathjax , inluce_code post_link support, include
15
+ + support, link to other post
16
+ + encrytion support. Only those who know the password can view the article
17
+
18
+ #### how to encrypt your post
19
+ 1. generate your own public & private key to protect your password
20
+ ```
21
+ ltectool g
22
+ ```
23
+ you will get
24
+ ```
25
+ publickey: AAA
26
+ privatekey: BBBBB
27
+ ```
28
+ 2. encrypt your password
29
+ ``` bash
30
+ # ltectool e [your publickey] [your password]
31
+ # like below
32
+ ltectool e Arkuf0hG0sjifj+G57o4gwPgnXXD72kIhjhSGjyyGCdS 123
33
+
34
+ # output
35
+ AQAQACAAIQCVKE9YHFT4pzyMa84kqGK+4Olo3EeDlymDa0oZcsQ48j8S4D4fMFb37gUT4LgrxZQDCFLa402i9VhhMIYWXZP+WSsv2Ia+uQpEH5vYKgDR5vL4xXC/76wXl3K7abU7u9du
36
+
37
+ ```
38
+ you get your encrypted password ,
39
+ then put it in `_config.yml`
40
+
41
+ ```yaml
42
+ enc_tags:
43
+ - tag: encrypt1
44
+ password: "123" # plain text ,NOT recommended
45
+
46
+ - tag: encrypt2
47
+ # 123
48
+ password: AQAQACAAIQCVKE9YHFT4pzyMa84kqGK+4Olo3EeDlymDa0oZcsQ48j8S4D4fMFb37gUT4LgrxZQDCFLa402i9VhhMIYWXZP+WSsv2Ia+uQpEH5vYKgDR5vL4xXC/76wXl3K7abU7u9du
49
+ ```
50
+ add JEKYLL_EC_PRIVATEKEY to ENV before you run jekyll build
51
+ or set JEKYLL_EC_PRIVATEKEY to your CI environment
52
+ ``` bash
53
+ #export set JEKYLL_EC_PRIVATEKEY=[Private key]
54
+ export set JEKYLL_EC_PRIVATEKEY="NWWtiQbDnSDvTdogCzAjqNqHGTZrRXdmXQrEKiv3vNs="
55
+ ```
56
+
57
+ **for security, I recommend you to use different repos to store your source files and the `_site` files**
58
+
59
+ + ### origin:
60
+ * Fast (**1kb of CSS!** 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))
61
+ * Light, dark and auto modes
62
+ * Responsive
63
+ * Content first (typography optimized for maximum readability)
64
+ * SEO optimized (uses [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag))
65
+ * RSS feed (uses [Jekyll Feed](https://github.com/jekyll/jekyll-feed))
66
+ * Fully compatible with [GitHub Pages](https://pages.github.com/) (see [GitHub Pages installation](#github-pages-installation))
67
+
68
+
69
+
70
+ ## Installation
71
+
72
+ If you haven't already created your blog using Jekyll, follow the [instructions](https://jekyllrb.com/docs/) to do so from Jekyll's documentation.
73
+
74
+ NOTE: if you are using Jekyll with GitHub Pages, see the [GitHub Pages installation section](#github-pages-installation).
75
+
76
+ Then, to style your blog with this theme, add this line to your Jekyll site's `Gemfile`:
77
+
78
+ ```ruby
79
+ gem "no-style-please2"
80
+ ```
81
+
82
+ And add this line to your Jekyll site's `_config.yml`:
83
+
84
+ ```yaml
85
+ theme: no-style-please2
86
+ ```
87
+
88
+ And then execute:
89
+
90
+ $ bundle
91
+
92
+ Or install it yourself as:
93
+
94
+ $ gem install no-style-please
95
+
96
+ ### Customize the menu
97
+
98
+ In order to add/edit/delete entries from the main menu, you have to edit the `menu.yml` file inside `_data` folder. Through that file you can define the structure of the menu. Take a look at the default configuration to get an idea of how it works and read on for a more comprehensive explanation.
99
+
100
+ The `menu.yml` file accepts the following fields:
101
+
102
+ - `entries` define a new unordered list that will contain menu entries
103
+ - each entry is marked by a `-` at the beginning of the line
104
+ - each entry can have the following attributes:
105
+ - `title`, which defines the text to render for this menu entry (**NB: you can also specify HTML!**)
106
+ - `url`, which can be used to specify an URL for this entry. If not specified, `title` will be rendered as-is; otherwise `title` will be sorrounded by a link tag pointing to the specified URL. Note that the URL can either be relative or absolute. Also note that you can get the same result by placing an ```<a>``` tag in the `title` field.
107
+ - `post_list`, which can be set either to `true` or to an object. If it is true, the entry will have a list of all posts as subentries. This is used to render your post list. If you want to customize which posts to render (e.g. by category), you can add one or more of the following attributes under `post_list`:
108
+ - `category`, which can be set to a string. It is used to render a list of posts of the specified category only. If you don't set it, then posts of all categories will be rendered.
109
+ - `limit`, which can be set to a number. It specifies the number of posts to show. If not set, all posts will be rendered.
110
+ - `show_more`, which can be true. If it is true and if the number of posts to show is greater than the specified `limit`, render a link to another page. To specify the URL and the text of the link, you can set `show_more_url` and `show_more_text` attributes, which are documented below.
111
+ - `show_more_url`, which can be a string. It specifies the URL for the show more link. Use only if `show_more` is true. This will usually redirect to a page containing all posts, which you can easily create using an archive page (see [create archive pages](#create-archive-pages) section)
112
+ - `show_more_text`, which can be a string. It specifies the text for the show more link. Use only if `show_more` is true.
113
+ - `entries`, yes, you can have entries inside entries. In this way you can create nested sublists!
114
+
115
+ ### Create archive pages
116
+
117
+ A so-called archive page is a page that shows a list of posts (see [this](https://riggraz.dev/no-style-please/all-posts) for an example). You can create an archive page by creating a page and putting the following frontmatter:
118
+
119
+ ```
120
+ ---
121
+ layout: archive
122
+ title: The title of the page here
123
+ which_category: name-of-category
124
+ ---
125
+ ```
126
+
127
+ `which_category` is optional: if you don't put it, then all posts of the blog will be listed; on the other hand, if you specify a category, only posts of that category will be shown.
128
+
129
+ This feature is particularly useful if used together with the `show_more` attribute in the menu. For example, if you want to limit the number of posts shown in the home page to 5 but add a link to view them all, then you can create an archive page using the method showed above and link to it using the `show_more_url` attribute in `menu.yml`. See [this example](https://github.com/riggraz/no-style-please/blob/master/_data/menu.yml) if you're in doubt.
130
+
131
+ ### Customize the index page
132
+
133
+ The `index.md` page should use layout `home`, which is the layout that displays the menu. If you want to have some content after the menu, you can just add that content in the `index.md` file, and it will automatically show under the menu.
134
+
135
+ Another thing you can do to customize the index page is show the description of your blog between the title and the menu. To do this, just edit `_config.yml` and change `theme_config.show_description` to `true`.
136
+
137
+ ### Pro tips
138
+
139
+ #### Dark mode for images
140
+
141
+ 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.
142
+
143
+ 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!
144
+
145
+ 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.
146
+
147
+ ## Contributing
148
+
149
+ 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.
150
+
151
+ ## Development
152
+
153
+ To set up your environment to develop this theme, run `bundle install`.
154
+
155
+ 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.
156
+
157
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
158
+ To add a custom directory to your theme-gem, please edit the regexp in `no-style-please.gemspec` accordingly.
159
+
160
+ ## License
161
+
162
+ The theme is available as open source under the terms of the [GPL License](./LICENSE.txt).
163
+
data/_config.yml ADDED
@@ -0,0 +1,42 @@
1
+ title: no style, please! # name of the site
2
+ author: vitock # name of site's author
3
+ email: "" # email of site's author
4
+ url: "" # root address of the site
5
+ baseurl: "" # subpath of the site, e.g. "/blog" (leave it blank "" if you're site shouldn't use a subpath)
6
+ description: > # description of the site (multiple lines allowed)
7
+ A (nearly) no-CSS, fast, minimalist Jekyll theme.
8
+
9
+
10
+ favicon: "logo.png" # name+extension of favicon (which must be put on the root folder)
11
+ # goat_counter: "yoursitename" # put your GoatCounter name if you want to use GoatCounter analytics
12
+
13
+ # theme: no-style-please2 # if you are using GitHub Pages, change it to remote_theme: riggraz/no-style-please
14
+
15
+ theme_config:
16
+ appearance: "auto" # can be "light", "dark" or "auto"
17
+ back_home_text: ".." # customize text for homepage link in post layout
18
+ date_format: "%Y-%m-%d" # customize how date is formatted
19
+ show_description: false # show blog description in home page
20
+
21
+ sass:
22
+ style: :compressed
23
+
24
+ plugins:
25
+ - no-style-please2-plugins
26
+ # - jekyll-seo-tag
27
+
28
+
29
+ enc_tags:
30
+ - tag: ZZ
31
+ password: '1'
32
+ - tag: encrypt1
33
+ password: "123" # plain text ,not recommed
34
+
35
+ # do Not write you public or privatekey in your repo,
36
+ # use ltectool g to generate a new one for your own blog
37
+ # publickey: Aos74Reqw/veNVVdCJJ8v8uTUx178mJIw1kjHjDtZ561
38
+ # privatekey: L28e3HZofHGGIr3ZZTIPhtfBfTbvxedNYF1xpJdx5PA=
39
+ - tag: encrypt2
40
+ # 123
41
+ password: AQAQACAAIQCvWkhJdhn0b21Pz381AdTeMLb5bRO4d2F3usQtpIL0fDD0G8cg4klENXxJNX+rAHwD8VW2iJo4hZKDQrjdOjbJFugo60XnMmbdLEfzXpkqGpjjbe875/owWyNnGGPk3Vf4
42
+
@@ -0,0 +1 @@
1
+ <a href="{{ "/" | relative_url }}">{{ site.theme_config.back_home_text }}</a>
@@ -0,0 +1,17 @@
1
+ {% assign rawtags = "" %}
2
+ {% for post in site.posts %}
3
+ {% assign ttags = post.tags | join:'|' | append:'|' %}
4
+ {% assign rawtags = rawtags | append:ttags %}
5
+ {% endfor %}
6
+ {% assign rawtags = rawtags | split:'|' | sort %}
7
+ {% assign site.tags = "" %}
8
+ {% for tag in rawtags %}
9
+ {% if tag != "" %}
10
+ {% if tags == "" %}
11
+ {% assign tags = tag | split:'|' %}
12
+ {% endif %}
13
+ {% unless tags contains tag %}
14
+ {% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %}
15
+ {% endunless %}
16
+ {% endif %}
17
+ {% endfor %}
@@ -0,0 +1,61 @@
1
+
2
+ <div id="encrypted">
3
+ <h3> 内容已经加密</h3>
4
+ <input style="width:100%; " type="password" id="passwordinput" placeholder="输入密码"></input>
5
+ <p>
6
+ <input type="button" value="解密" id="DecryptBtn"/>
7
+ </div>
8
+ <div id="decrypted">
9
+ </div>
10
+ <script src="//cdn.jsdelivr.net/gh/vitock/jsdelivr@0.1.1/js/salsa20.min.js"></script>
11
+ <script src="//cdn.jsdelivr.net/gh/vitock/jsdelivr@0.1.1/js/base64.js"></script>
12
+ <script src="//cdn.jsdelivr.net/gh/vitock/jsdelivr@0.1.1/js/md5.js"></script>
13
+ <script>
14
+ var encryptedContent = '{{ content | contentEncrypt:page}}'
15
+
16
+ function hexToUint8Arr(hexString){
17
+ return new Uint8Array(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
18
+ }
19
+ function decrypt (key0){
20
+ // const key = Uint8Array([...]); // 32 bytes key
21
+ var key = new TextEncoder("utf-8").encode(md5(key0));
22
+
23
+ /// hex
24
+ var nonceStr = encryptedContent.substring(0,16)
25
+ var nonce = hexToUint8Arr(nonceStr)
26
+
27
+ const msg = encryptedContent.substring(17)
28
+ const message = Base64.toUint8Array(msg)
29
+ // Encrypt //
30
+ const decrypt = new JSSalsa20(key, nonce).decrypt(message);
31
+ var plain = new TextDecoder("utf-8").decode(decrypt)
32
+ var check = md5(plain)
33
+ if(check.indexOf(nonceStr) == 0){
34
+ /// hide input
35
+ document.getElementById("encrypted").style.display = 'none'
36
+ // / show decrypted
37
+ document.getElementById("decrypted").innerHTML = plain
38
+
39
+ setTimeout(function(){
40
+ var loadevent = document.createEvent("Event")
41
+ loadevent.initEvent("load", true, true)
42
+
43
+ var DOMContentLoaded_event = document.createEvent("Event")
44
+ DOMContentLoaded_event.initEvent("DOMContentLoaded", true, true)
45
+
46
+ window.dispatchEvent(loadevent)
47
+ window.dispatchEvent(DOMContentLoaded_event)
48
+ console.log('333a334a')
49
+
50
+ }, 500);
51
+
52
+ }else{
53
+ alert("wrong password.")
54
+ }
55
+ }
56
+
57
+ document.getElementById("DecryptBtn").onclick = function(){
58
+ var key = document.getElementById("passwordinput").value
59
+ decrypt(key);
60
+ }
61
+ </script>
@@ -0,0 +1,6 @@
1
+ <script data-goatcounter="https://{{ site.goat_counter }}.goatcounter.com/count"
2
+ async src="//gc.zgo.at/count.js"></script>
3
+
4
+ <noscript>
5
+ <img src="https://{{ site.goat_counter }}.goatcounter.com/count?p=/test-img">
6
+ </noscript>
@@ -0,0 +1,37 @@
1
+ <head>
2
+ <meta charset="utf-8" />
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
4
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
5
+
6
+ {% if page.mathjax %}
7
+ <script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
8
+ <script type="text/javascript" async src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
9
+
10
+
11
+ <!-- <script type="text/javascript" async src="/static/js/MathJax.js"></script> -->
12
+
13
+ {% endif %}
14
+
15
+
16
+
17
+
18
+
19
+ <title>
20
+ {%- if page.title -%}
21
+ {{ page.title }}
22
+ {%- else -%}
23
+ {{ site.title }}
24
+ {%- endif -%}
25
+ </title>
26
+ {%- capture enc %}{{ content | encrypt_if_need:page}}{% endcapture -%}
27
+ {%- if enc == '' -%}
28
+ {% endif %}
29
+
30
+ {% if site.tags != "" %}
31
+ {% include collecttags.html %}
32
+ {% endif %}
33
+
34
+
35
+ <link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon | relative_url }}" />
36
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
37
+ </head>
@@ -0,0 +1,26 @@
1
+ <ul>
2
+ {%-for item in include.collection-%}
3
+ <li>
4
+ {%- if item.url -%}
5
+ <a href="{{ item.url }}">{{ item.title }}</a>
6
+ {%- else -%}
7
+ {{ item.title }}
8
+ {%- endif -%}
9
+ </li>
10
+
11
+ {%-if item.post_list-%}
12
+ {%
13
+ include post_list.html
14
+ category=item.post_list.category
15
+ limit=item.post_list.limit
16
+ show_more=item.post_list.show_more
17
+ show_more_text=item.post_list.show_more_text
18
+ show_more_url=item.post_list.show_more_url
19
+ -%}
20
+ {%-endif-%}
21
+
22
+ {%-if item.entries-%}
23
+ {%-include menu_item.html collection=item.entries-%}
24
+ {%-endif-%}
25
+ {%-endfor-%}
26
+ </ul>
@@ -0,0 +1,25 @@
1
+ {%-if include.category-%}
2
+ {%-assign posts = site.categories[include.category]-%}
3
+ {%-else-%}
4
+ {%-assign posts = site.posts-%}
5
+ {%-endif-%}
6
+
7
+ {%-if include.limit and posts.size > include.limit-%}
8
+ {%-assign limit_exceeded = true-%}
9
+ {%-else-%}
10
+ {%-assign limit_exceeded = false-%}
11
+ {%-endif-%}
12
+
13
+ {%- if posts.size > 0 -%}
14
+ <ul>
15
+ {%- for post in posts limit: include.limit -%}
16
+ <li>
17
+ <span>{{- post.date | date: site.theme_config.date_format -}}</span>
18
+ <a href="{{ post.url | relative_url }}">{{ post.title | downcase }}</a>
19
+ </li>
20
+ {%- endfor -%}
21
+ {%- if include.show_more and limit_exceeded -%}
22
+ <li><a href="{{ include.show_more_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
23
+ {%- endif -%}
24
+ </ul>
25
+ {%- endif -%}
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%-include back_link.html-%}
6
+
7
+ <h1>{{ page.title }}</h1>
8
+
9
+ {%-include post_list.html category=page.which_category-%}
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: "en" }}">
3
+ {%- include head.html -%}
4
+ <body a="{{ site.theme_config.appearance | default: "auto" }}">
5
+ <main class="page-content" aria-label="Content">
6
+ <div class="w">
7
+ {{ content }}
8
+ </div>
9
+ </main>
10
+
11
+ {%-if site.goat_counter and jekyll.environment == "production"-%}
12
+ {%-include goat_counter.html-%}
13
+ {%-endif-%}
14
+
15
+ {% if page.custom_js %}
16
+ {% for js_file in page.custom_js %}
17
+ <script type="text/javascript" src="{{ site.baseurl }}/assets/js/{{ js_file }}.js"></script>
18
+ {% endfor %}
19
+ {% endif %}
20
+ </body>
21
+ </html>
@@ -0,0 +1,13 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <header>
5
+ <h1>{{ site.title }}</h1>
6
+ {%-if site.theme_config.show_description-%}
7
+ <p>{{ site.description }}</p>
8
+ {%-endif-%}
9
+ </header>
10
+
11
+ {%-include menu_item.html collection=site.data.menu.entries-%}
12
+
13
+ {{ content }}
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%-include back_link.html-%}
6
+
7
+ <h1>{{ page.title }}</h1>
8
+
9
+ {{ content }}
@@ -0,0 +1,26 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%-include back_link.html-%}
6
+
7
+ <article>
8
+ <p class="post-meta">
9
+ <time datetime="{{ page.date }}">{{ page.date | date: site.theme_config.date_format }}</time>
10
+ </p>
11
+
12
+ <h1>{{ page.title }}</h1>
13
+ {% for tag in page.tags %}
14
+ {% capture tag_name %}{{ tag }}{% endcapture %}
15
+ <a href="{{ site.baseurl }}/tags/{{ tag_name }}.html"><text><nobr>#{{ tag_name }}</nobr></text>&nbsp;</a>
16
+ {% endfor %}</span>
17
+
18
+ {%- capture enc %}{{ content | encrypt_if_need:page}}{% endcapture -%}
19
+ {%- if enc == '' -%}
20
+ {{ content }}
21
+ {% else %}
22
+ {%-include encrypted.html-%}
23
+ {% endif %}
24
+
25
+
26
+ </article>
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%-include back_link.html -%}
5
+ <div class="post">
6
+ <h1>Tag: {{ page.tag }}</h1>
7
+ <ul>
8
+ {% for post in site.tags[page.tag] %}
9
+ <li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }})<br>
10
+ {{ post.description }}
11
+ </li>
12
+ {% endfor %}
13
+ </ul>
14
+ </div>
15
+ <hr>
@@ -0,0 +1,18 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {%-include back_link.html -%}
5
+ <div class="post">
6
+ <h1>{{page.title}}</h1>
7
+ <article>
8
+
9
+ {% for item in site.tags %}
10
+ <lu>
11
+ <a href ="{{ site['baseurl']}}/tags/{{ item[0]}}.html" ><text>{{ item[0]}}</text></a> &nbsp;
12
+ </lu>
13
+ {% endfor %}
14
+
15
+ </article>
16
+ </div>
17
+
18
+
@@ -0,0 +1,94 @@
1
+ // -------------- THEME SWITCHER -------------- //
2
+ @mixin dark-appearance {
3
+ filter: invert(1);
4
+ img {
5
+ filter: invert(1);
6
+
7
+ &.ioda { filter: invert(0); }
8
+ }
9
+ }
10
+
11
+ body[a="dark"] { @include dark-appearance; }
12
+
13
+
14
+ @media (prefers-color-scheme: dark) {
15
+ body[a="auto"] { @include dark-appearance; }
16
+ }
17
+ // -------------------------------------------- //
18
+
19
+ // bg color is also needed in html in order to
20
+ // block body's background propagation
21
+ // see: https://stackoverflow.com/a/61265706
22
+ html, body { background: white; }
23
+
24
+ html { height: 100%; }
25
+
26
+ body {
27
+ color: black;
28
+ font-family: monospace;
29
+ font-size: 16px;
30
+ line-height: 1.4;
31
+ margin: 0;
32
+ min-height: 100%;
33
+ overflow-wrap: break-word;
34
+ }
35
+
36
+ .post-meta { text-align: right; }
37
+
38
+ h2, h3, h4, h5, h6 { margin-top: 3rem; }
39
+
40
+ hr { margin: 2rem 0; }
41
+
42
+ p { margin: 1rem 0; }
43
+
44
+ li { margin: 0.4rem 0; }
45
+
46
+ *:target { background: yellow; }
47
+
48
+ .w {
49
+ max-width: 640px;
50
+ margin: 0 auto;
51
+ padding: 4rem 2rem;
52
+ }
53
+
54
+ hr {
55
+ text-align: center;
56
+ border: 0;
57
+
58
+ &:before { content: '/////' }
59
+ &:after { content: attr(data-content) '/////' }
60
+ }
61
+
62
+ table { width: 100%; }
63
+
64
+ table, th, td {
65
+ border: thin solid black;
66
+ border-collapse: collapse;
67
+ padding: 0.4rem;
68
+ }
69
+
70
+ code {
71
+ color: white;
72
+ background: black;
73
+ }
74
+
75
+ div.highlighter-rouge code {
76
+ display: block;
77
+ overflow-x: auto;
78
+ white-space: pre-wrap;
79
+ padding: 1rem;
80
+ }
81
+
82
+ blockquote {
83
+ font-style: italic;
84
+ border: thin solid black;
85
+ padding: 1rem;
86
+
87
+ p { margin: 0; }
88
+ }
89
+
90
+ img {
91
+ max-width: 100%;
92
+ display: block;
93
+ margin: 0 auto;
94
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ @import "no-style-please";
@@ -0,0 +1,9 @@
1
+ const p = document.createElement("p");
2
+ p.style.textAlign = "center";
3
+ p.style.fontSize = "18pt";
4
+ p.innerHTML = "C'mon, move your mouse!"
5
+ document.body.append(p);
6
+
7
+ document.addEventListener("mousemove", e => {
8
+ p.innerHTML = `mouseX: ${e.clientX}, mouseY: ${e.clientY}`;
9
+ });