diff --git a/themes/nostyleplease b/themes/nostyleplease deleted file mode 160000 index 2252461..0000000 --- a/themes/nostyleplease +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 22524617427ae7aecda3eb226a254642f54ae13c diff --git a/themes/nostylepleaseL/LICENSE b/themes/nostylepleaseL/LICENSE new file mode 100644 index 0000000..147d594 --- /dev/null +++ b/themes/nostylepleaseL/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2022 YOUR_NAME_HERE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/themes/nostylepleaseL/README.md b/themes/nostylepleaseL/README.md new file mode 100644 index 0000000..8d4d22f --- /dev/null +++ b/themes/nostylepleaseL/README.md @@ -0,0 +1,79 @@ +# no style, please! + +A (nearly) no-CSS, fast, minimalist [Hugo](https://gohugo.io/) theme ported from [riggraz/no-style-please](https://github.com/riggraz/no-style-please/). + + + +## Features + +* Fast (**1kb of CSS!**) +* Light, dark and auto modes +* Responsive +* Content first (typography optimized for maximum readability) +* RSS feed (using Hugo's embedded RSS template) +* MathJax support + +## Installation + +The easiest way is to clone this repo (or add as a submodule) to themes/nostyleplease then append `theme = 'nostyleplease'` as a newline to config.toml. Pages shipped with theme as examples have `draft: true` in their frontmatters, use `--buildDrafts` to build them. + +## Usage + +You can edit `config.toml` 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.toml` contains some comments to help you understand what each field does. Note that the `config.toml` under root directory of your hugo site will completely override the one in the theme directory, so copy the attributes you want to keep or edit from the theme's `config.toml` to your site's `config.toml`. + +### Customize the menu + +In order to add/edit/delete entries from the main menu, you have to edit the `menu.toml` 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. + +The `menu.toml` file accepts the following fields: + +- `entries` define a new unordered list that will contain menu entries +- each entry is a member of the TOML array `entries` in question +- each entry can have the following attributes: + - `title`, which defines the text to render for this menu entry (**NB: you can also specify HTML!**) + - `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 `````` tag in the `title` field. + - `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 section), you can add one or more of the following attributes under `post_list`: + - `section`, which can be set to a string. It is used to render a list of posts of the specified section only. If you don't set it, then posts of all sections will be rendered. + - `limit`, which can be set to a number. It specifies the number of posts to show. If not set, all posts will be rendered. + - `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. + - `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 section page (see [section pages](#section-pages) section) + - `show_more_text`, which can be a string. It specifies the text for the show more link. Use only if `show_more` is true. + - `entries`, yes, you can have entries inside entries. In this way you can create nested sublists! + +### Section pages + +A so-called section page is a page that shows a list of posts in a specific section. It should be automatically created by hugo when a new section is created. + +### Customize the index page + +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. + +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.toml` and change `params.theme_config.show_description` to `true`. + +### Adding table of contents + +You can add a table of contents by supplying the `toc: true` param to your post front matter. If you want a border around it you can also set `tocBorder: true`. The toc style behavior is handled by Goldmark and the defaults can be found in the `config.toml` file. + +### Pro tips + +#### Dark mode for images + +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. + +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! + +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. + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/Masellum/hugo-theme-nostyleplease. + +## Thanks + +Some of the code comes from [wooseopkim/hugo-theme-nostyleplease](https://github.com/wooseopkim/hugo-theme-nostyleplease), a fork of this theme. + +Some of the test pages are from [this jekyll theme](https://github.com/huangyz0918/moving). + +## License + +The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). diff --git a/themes/nostylepleaseL/assets/css/main.scss b/themes/nostylepleaseL/assets/css/main.scss new file mode 100644 index 0000000..3974b1c --- /dev/null +++ b/themes/nostylepleaseL/assets/css/main.scss @@ -0,0 +1,130 @@ +// -------------- THEME SWITCHER -------------- // +@mixin theme($--bg-color, $--primary-text-color, $--secondary-text-color, $--link-color, $--visited-link-color) { + background-color: $--bg-color; + + color: $--primary-text-color; + + a { + color: $--link-color; + text-decoration: none; + + &:visited { color: $--visited-link-color; } + &:hover { text-decoration: underline; } + } + + code:not(pre > code) { + background-color: $--primary-text-color; + color: $--bg-color; + } + + figcaption { color: $--secondary-text-color; } +} + +@mixin dark-appearance { + @include theme(#212121, #fafafa, #eeeeee, #0071bc, #a359e9); +} + +@mixin light-appearance { + @include theme(#ffffff, #212121, #666666, #1e70bf, #921292); +} + +body[a="dark"] { @include dark-appearance; } +body[a="light"] { @include light-appearance; } + + +@media (prefers-color-scheme: dark) { + body[a="auto"] { @include dark-appearance; } +} + +@media (prefers-color-scheme: light) { + body[a="auto"] { @include light-appearance; } +} + +// -------------------------------------------- // + +html { height: 100%; } + +body { + font-family: monospace; + font-size: 16px; + line-height: 1.4; + margin: 0; + min-height: 100%; + overflow-wrap: break-word; +} + +.post-meta { text-align: right; } + +h2, h3, h4, h5, h6 { margin-top: 3rem; } + +hr { margin: 2rem 0; } + +p { margin: 1rem 0; } + +li { margin: 0.4rem 0; } + +*:target { background: yellow; } + +.w { + max-width: 640px; + margin: 0 auto; + padding: 4rem 2rem; +} + +.toc { + border: thin solid black; + padding: 1rem; +} + +hr { + text-align: center; + border: 0; + + &:before { content: '/////' } + &:after { content: attr(data-content) '/////' } +} + +pre { + background: black; + padding: 1em; + overflow-x: auto; /* Fix pre content overflowing parent without scroll bar */ +} + +table { width: 100%; } + +table, th, td { + border: thin solid black; + border-collapse: collapse; + padding: 0.4rem; +} + +code:not(pre > code) { + padding: 0.1em 0.2em; + font-size: 90%; +} + +code.has-jax { + -webkit-font-smoothing: antialiased; + background: inherit !important; + border: none !important; + font-size: 100%; +} + +blockquote { + font-style: italic; + border: thin solid black; + padding: 1rem; + + p { margin: 0; } +} + +img { + max-width: 100%; + display: block; + margin: 0 auto; +} + +figcaption { + text-align: center; + opacity: 0.5; +} diff --git a/themes/nostylepleaseL/assets/js/mouse_coords.js b/themes/nostylepleaseL/assets/js/mouse_coords.js new file mode 100644 index 0000000..afc7e7a --- /dev/null +++ b/themes/nostylepleaseL/assets/js/mouse_coords.js @@ -0,0 +1,9 @@ +const p = document.createElement("p"); +p.style.textAlign = "center"; +p.style.fontSize = "18pt"; +p.innerHTML = "C'mon, move your mouse!" +document.body.append(p); + +document.addEventListener("mousemove", e => { + p.innerHTML = `mouseX: ${e.clientX}, mouseY: ${e.clientY}`; +}); \ No newline at end of file diff --git a/themes/nostylepleaseL/config.toml b/themes/nostylepleaseL/config.toml new file mode 100644 index 0000000..95ad262 --- /dev/null +++ b/themes/nostylepleaseL/config.toml @@ -0,0 +1,35 @@ +[module] + [module.hugoVersion] + extended=true + min = "0.41.0" + +[markup] + [markup.goldmark] + [markup.goldmark.parser] + [markup.goldmark.parser.attribute] + block = true + title = true + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = '' + hl_inline = false + lineAnchors = '' + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = true + noHl = false + style = 'rrt' + tabWidth = 4 + [markup.tableOfContents] + startLevel = 2 + endLevel = 3 + ordered = false + +[params] + [params.theme_config] + appearance = "auto" + back_home_text = ".." + date_format = "2006-01-02" diff --git a/themes/nostylepleaseL/content/_index.md b/themes/nostylepleaseL/content/_index.md new file mode 100644 index 0000000..143ef15 --- /dev/null +++ b/themes/nostylepleaseL/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "" +date = 2022-08-25T21:30:04+08:00 +draft = false ++++ diff --git a/themes/nostylepleaseL/content/posts/2020-07-06-strange-post.md b/themes/nostylepleaseL/content/posts/2020-07-06-strange-post.md new file mode 100644 index 0000000..abcd397 --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-06-strange-post.md @@ -0,0 +1,8 @@ +--- +title: "strange post with custom js" +custom_js: [mouse_coords] +date: 2020-07-06T00:00:00+08:00 +draft: true +--- + +This post is strange. It also has some custom js. diff --git a/themes/nostylepleaseL/content/posts/2020-07-07-overview-post.md b/themes/nostylepleaseL/content/posts/2020-07-07-overview-post.md new file mode 100644 index 0000000..f26ab26 --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-07-overview-post.md @@ -0,0 +1,86 @@ +--- +draft: true +title: "overview" +date: 2020-07-07T00:00:00+08:00 +--- + +Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. + +# Sample heading 1 +## Sample heading 2 +### Sample heading 3 +#### Sample heading 4 +##### Sample heading 5 +###### Sample heading 6 + +Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Etiam id nisl ut lorem gravida euismod. + +## Lists + +Unordered: + +- Fusce non velit cursus ligula mattis convallis vel at metus[^2]. +- Sed pharetra tellus massa, non elementum eros vulputate non. +- Suspendisse potenti. + +Ordered: + +1. Quisque arcu felis, laoreet vel accumsan sit amet, fermentum at nunc. +2. Sed massa quam, auctor in eros quis, porttitor tincidunt orci. +3. Nulla convallis id sapien ornare viverra. +4. Nam a est eget ligula pellentesque posuere. + +## Blockquote + +The following is a blockquote: + +> Suspendisse tempus dolor nec risus sodales posuere. Proin dui dui, mollis a consectetur molestie, lobortis vitae tellus. + +## Thematic breaks (
) + +Mauris viverra dictum ultricies[^3]. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Etiam id nisl ut lorem gravida euismod. **You can put some text inside the horizontal rule like so.** + +--- +{data-content = "with text"} + +Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Etiam id nisl ut lorem gravida euismod. **Or you can just have an clean horizontal rule.** + +--- + +Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Etiam id nisl ut lorem gravida euismod. Or you can just have an clean horizontal rule. + +## Code + +Now some code: + +{{< highlight javascript >}} +const ultimateTruth = 'this theme is the best!'; +console.log(ultimateTruth); +{{< / highlight >}} + +And here is some `inline code`! + +## Tables + +Now a table: + +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + +## Images + +![theme logo](https://raw.githubusercontent.com/Masellum/hugo-theme-nostyleplease/main/logo.png) +{.ioda} + +Logo of *no style, please!* theme[^4] + +--- +{data-content = "footnotes"} + +[^1]: this is a footnote. It should highlight if you click on the corresponding superscript number. +[^2]: hey there, i'm using no style please! +[^3]: this is another footnote. +[^4]: this is a very very long footnote to test if a very very long footnote brings some problems or not. I strongly hope that there are no problems but you know sometimes problems arise from nowhere. diff --git a/themes/nostylepleaseL/content/posts/2020-07-08-language-tests.md b/themes/nostylepleaseL/content/posts/2020-07-08-language-tests.md new file mode 100644 index 0000000..75a617d --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-08-language-tests.md @@ -0,0 +1,53 @@ +--- +draft: true +title: "Language Tests" +category: example2 +date: 2020-07-08T00:00:00+08:00 +--- + +Note: I took this test post from [moving](https://github.com/huangyz0918/moving), which is another Jekyll theme which is better that this one so I should not have linked it because now you will decide to use it instead of mine. + +### 1. 日本語テスト + +This is a Japanese test post to show you how japanese is displayed. + +私は昨日ついにその助力家というのの上よりするたなけれ。 +最も今をお話団はちょうどこの前後なかろでくらいに困りがいるたをは帰着考えたなかって、そうにもするでうたらない。 +がたを知っないはずも同時に九月をいよいよたありた。 + +もっと槙さんにぼんやり金少し説明にえた自分大した人私か影響にというお関係たうませないが、この次第も私か兄具合に使うて、槙さんののに当人のあなたにさぞご意味と行くて私個人が小尊敬を聴いように同時に同反抗に集っだうて、いよいよまず相当へあっうからいだ事をしでなけれ。 + +> それでそれでもご時日をしはずはたったいやと突き抜けるますて、その元がは行ったてという獄を尽すていけですた。 + +この中道具の日その学校はあなたごろがすまなりかとネルソンさんの考えるですん、辺の事実ないというご盲従ありたですと、爺さんのためが薬缶が結果までの箸の当時してならて、多少の十月にためからそういう上からとにかくしましないと触れべきものたで、ないうですと多少お人達したのでたた。 + +From [すぐ使えるダミーテキスト - 日本語 Lorem ipsum.](http://lipsum.sugutsukaeru.jp/index.cgi) + + +### 2. 繁体中文测试 + +This is a chinese test post to show you how chinese is displayed. + +善我王上魚、產生資西員合兒臉趣論。畫衣生這著爸毛親可時,安程幾?合學作。觀經而作建。都非子作這!法如言子你關!手師也。 + +以也座論頭室業放。要車時地變此親不老高小是統習直麼調未,行年香一? + +就竟在,是我童示讓利分和異種百路關母信過明驗有個歷洋中前合著區亮風值新底車有正結,進快保的行戰從:弟除文辦條國備當來際年每小腳識世可的的外的廣下歌洲保輪市果底天影;全氣具些回童但倒影發狀在示,數上學大法很,如要我……月品大供這起服滿老?應學傳者國:山式排只不之然清同關;細車是!停屋常間又,資畫領生,相們制在?公別的人寫教資夠。資再我我!只臉夫藝量不路政吃息緊回力之;兒足灣電空時局我怎初安。意今一子區首者微陸現際安除發連由子由而走學體區園我車當會,經時取頭,嚴了新科同?很夫營動通打,出和導一樂,查旅他。坐是收外子發物北看蘭戰坐車身做可來。道就學務。 + +國新故。 + +> 工步他始能詩的,裝進分星海演意學值例道……於財型目古香亮自和這乎?化經溫詩。只賽嚴大一主價世哥受的沒有中年即病行金拉麼河。主小路了種就小為廣不? + +From [亂數假文產生器 - Chinese Lorem Ipsum.](http://www.richyli.com/tool/loremipsum/) + + + +### 3. 简体中文测试 + +效育声去本义然空,各值太法心想,场强实地。 题铁习点儿表管少间千,只何政亲织文意部,千影画派证男须。 手反取长风治增非等直难群,连取及天他己事头级,影数弦适把气快目人。 专议以省通引而千个,格则口段度样水热马,地教少务改磨。 包思外心半院应她算斯,市外会快记路又火学,劳如肃它准众丧边。 + + > 团算部住县单总边素格军所,合音府教看和广光采率位转,位用品根确针百。 证其标元角工方海接交他,论象切万世认一响义,治然身本风弦带题。 向我次路持加北,她不反心。 说总元军例市决,现始即算证养,规走还壳。 + +因林可相儿应满军,热影省条律因资再,整肃赤心将届。 局广写两量备验还,南教事争工民的,备进研上布。 素身电活非直,速这区交示从,百层达。 资量那毛什京身,白这快。 半打容三手开常价或,手严量般象式效,名可重芽门适。 来设什一我么,光界美么或,住身式准。 造酸改表委验众办地百养,商物战众本列听度名院,制压录丽快与千机内。 住需当四议决得命南然照按民置,当住命形金决否矿单外。 气象理离开新集增际,三划方工义很年关,拉许准孝口。 构片出干计由备美打养,持育总指承入无己。 + +From [假文生成器, lorem ipsum Chinese](http://www.cancms.com/content/dummytext) diff --git a/themes/nostylepleaseL/content/posts/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md b/themes/nostylepleaseL/content/posts/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md new file mode 100644 index 0000000..7b0adca --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md @@ -0,0 +1,7 @@ +--- +draft: true +title: "very very very long title and very very very short content" +date: 2020-07-08T00:00:00+08:00 +--- + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. Nullam vestibulum metus eu purus malesuada, volutpat mattis leo facilisis. diff --git a/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-headings-and-toc.md b/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-headings-and-toc.md new file mode 100644 index 0000000..c49333c --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-headings-and-toc.md @@ -0,0 +1,28 @@ +--- +draft: true +title: "headings and toc" +date: 2020-07-09T00:00:00+08:00 +--- + +Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Nunc a egestas tortor, sed feugiat leo. + +## Table of contents +- [Table of contents](#table-of-contents) +- [The start](#the-start) +- [The middle](#the-middle) +- [The end](#the-end) + +Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Nunc a egestas tortor, sed feugiat leo. Vestibulum porta tincidunt tellus, vitae ornare tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed nunc neque, tempor in iaculis non, faucibus et metus. Etiam id nisl ut lorem gravida euismod. + +## [The start](#the-start) + +Fusce non velit cursus ligula mattis convallis vel at metus. Sed pharetra tellus massa, non elementum eros vulputate non. Suspendisse potenti. Quisque arcu felis, laoreet vel accumsan sit amet, fermentum at nunc. Sed massa quam, auctor in eros quis, porttitor tincidunt orci. Nulla convallis id sapien ornare viverra. Cras nec est lacinia ligula porta tincidunt. Nam a est eget ligula pellentesque posuere. Maecenas quis enim ac risus accumsan scelerisque. Aliquam vitae libero sapien. Etiam convallis, metus nec suscipit condimentum, quam massa congue velit, sit amet sollicitudin nisi tortor a lectus. Cras a arcu enim. Suspendisse hendrerit euismod est ac gravida. Donec vitae elit tristique, suscipit eros at, aliquam augue. In ac faucibus dui. Sed tempor lacus tristique elit sagittis, vitae tempor massa convallis. + +## [The middle](#the-middle) + +Proin quis velit et eros auctor laoreet. Aenean eget nibh odio. Suspendisse mollis enim pretium, fermentum urna vitae, egestas purus. Donec convallis tincidunt purus, scelerisque fermentum eros sagittis vel. Aliquam ac aliquet risus, tempus iaculis est. Fusce molestie mauris non interdum hendrerit. Curabitur ullamcorper, eros vitae interdum volutpat, lacus magna lacinia turpis, at accumsan dui tortor vel lectus. Aenean risus massa, semper non lectus rutrum, facilisis imperdiet mi. Praesent sed quam quis purus auctor ornare et sed augue. Vestibulum non quam quis ligula luctus placerat sed sit amet erat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Fusce auctor, sem eu volutpat dignissim, turpis nibh malesuada arcu, in consequat elit mauris quis sem. Nam tristique sit amet enim vel accumsan. Sed id nibh commodo, dictum sem id, semper quam. + +## The end + +Donec ex lectus, tempus non lacinia quis, pretium non ipsum. Praesent est nunc, rutrum vel tellus eu, tristique laoreet purus. In rutrum orci sit amet ex ornare, sit amet finibus lacus laoreet. Etiam ac facilisis purus, eget porttitor odio. Suspendisse tempus dolor nec risus sodales posuere. Proin dui dui, mollis a consectetur molestie, lobortis vitae tellus. Vivamus at purus sed urna sollicitudin mattis. Mauris lacinia libero in lobortis pulvinar. Nullam sit amet condimentum justo. Donec orci justo, pharetra ut dolor non, interdum finibus orci. Proin vitae ante a dui sodales commodo ac id elit. Nunc vel accumsan nunc, sit amet congue nunc. Aliquam in lacinia velit. Integer lobortis luctus eros, in fermentum metus aliquet a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. + diff --git a/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-hr.md b/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-hr.md new file mode 100644 index 0000000..3a2e398 --- /dev/null +++ b/themes/nostylepleaseL/content/posts/2020-07-09-post-example-with-hr.md @@ -0,0 +1,29 @@ +--- +draft: true +title: "hr" +date: 2020-07-09T00:00:00+08:00 +--- + +Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. Nullam vestibulum metus eu purus malesuada, volutpat mattis leo facilisis. Sed consectetur, nisl et semper laoreet, velit augue congue nunc, eget eleifend odio erat eu sapien. Phasellus dictum efficitur dapibus. Morbi porta lacinia tincidunt. Nam aliquet est mi, nec lacinia ipsum elementum sed. Nam feugiat ipsum tortor, et pretium purus sollicitudin et. + +--- + +Mauris viverra dictum ultricies[^2]. Vestibulum[^3] quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Nunc a egestas tortor, sed feugiat leo. Vestibulum porta tincidunt tellus, vitae ornare tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed nunc neque, tempor in iaculis non, faucibus et metus. Etiam id nisl ut lorem gravida euismod. + +Fusce non velit cursus ligula mattis convallis vel at metus. Sed pharetra tellus massa, non elementum eros vulputate non. Suspendisse potenti. Quisque arcu felis, laoreet vel accumsan sit amet, fermentum at nunc. Sed massa quam, auctor in eros quis, porttitor tincidunt orci. Nulla convallis id sapien ornare viverra. Cras nec est lacinia ligula porta tincidunt. Nam a est eget ligula pellentesque posuere. Maecenas quis enim ac risus accumsan scelerisque. Aliquam vitae libero sapien. Etiam convallis, metus nec suscipit condimentum, quam massa congue velit, sit amet sollicitudin nisi tortor a lectus. Cras a arcu enim. Suspendisse hendrerit euismod est ac gravida. Donec vitae elit tristique, suscipit eros at, aliquam augue. In ac faucibus dui. Sed tempor lacus tristique elit sagittis, vitae tempor massa convallis. + +--- +{data-content="discussions"} + +This article has been discussed here: +- [lobste.rs](#) +- [/r/webdev](#) + +Feel free to reach out at my email to leave feedback and talk about the article. + +--- +{data-content="footnotes"} + +[^1]: Okay here I should put something about "ipsum". +[^2]: same goes for this. +[^3]: I studied latin in high school but im not able to translate *anything*! By the way this is a longer footnote and i think it is still pretty cool, even prettier than shortier ones even though it does not say anything useful but whatever. diff --git a/themes/nostylepleaseL/content/posts/test-cjk.md b/themes/nostylepleaseL/content/posts/test-cjk.md new file mode 100644 index 0000000..5829773 --- /dev/null +++ b/themes/nostylepleaseL/content/posts/test-cjk.md @@ -0,0 +1,49 @@ +--- +title: "Test CJK" +date: 2022-08-26T22:30:10+08:00 +draft: true +--- + +### 1. 简体中文测试 + +秋,夜,王趺坐收银台前,篝灯如吠。明灭之际有兽前来采购:鹿角虎爪,云雾缭绕,眼睛碧绿如同玻璃;店中不见生人已久。坐,齿轮捻动,肩胛慢慢松弛,衣袖如瓷。在货架之间,忘记面孔的人有迷失的风险。一份白色,我有天空中游动穿过云的骨。一份蓝色,有雨水溅落金属制品间的空气。绿色,有薄而冰凉至温润的指甲。黑色有窗外随风沙沙的水草。兽狡黠,想必没有红色。王赧然,有常住仓库,深居简出,肥而不腻的三文鱼。颜色,声音,温度,气味,这一切尽可落在你一人身上。但,让我与你的眼睛对饮一杯。所以熬煮越来越粘稠的空气,坛中有清冽,眼前有孤灯,然后让身体舒展沉浮。兽目睹这一切,嘴微张,牙齿柔软,荧光微微。第二天,王尚未醒来,脸上躺着一枚红叶,身体轻轻摇晃。 + +From [便利店之王](https://hanwen.one/pne/%E4%BE%BF%E5%88%A9%E5%BA%97%E4%B9%8B%E7%8E%8B/) + +### 2. 繁体中文测试 + +善我王上魚、產生資西員合兒臉趣論。畫衣生這著爸毛親可時,安程幾?合學作。觀經而作建。都非子作這!法如言子你關!手師也。 + +以也座論頭室業放。要車時地變此親不老高小是統習直麼調未,行年香一? + +就竟在,是我童示讓利分和異種百路關母信過明驗有個歷洋中前合著區亮風值新底車有正結,進快保的行戰從:弟除文辦條國備當來際年每小腳識世可的的外的廣下歌洲保輪市果底天影;全氣具些回童但倒影發狀在示,數上學大法很,如要我……月品大供這起服滿老?應學傳者國:山式排只不之然清同關;細車是!停屋常間又,資畫領生,相們制在?公別的人寫教資夠。資再我我!只臉夫藝量不路政吃息緊回力之;兒足灣電空時局我怎初安。意今一子區首者微陸現際安除發連由子由而走學體區園我車當會,經時取頭,嚴了新科同?很夫營動通打,出和導一樂,查旅他。坐是收外子發物北看蘭戰坐車身做可來。道就學務。 + +國新故。 + +> 工步他始能詩的,裝進分星海演意學值例道……於財型目古香亮自和這乎?化經溫詩。只賽嚴大一主價世哥受的沒有中年即病行金拉麼河。主小路了種就小為廣不? + +From [亂數假文產生器 - Chinese Lorem Ipsum.](http://www.richyli.com/tool/loremipsum/) + +### 3. 日本語テスト + +私は昨日ついにその助力家というのの上よりするたなけれ。 +最も今をお話団はちょうどこの前後なかろでくらいに困りがいるたをは帰着考えたなかって、そうにもするでうたらない。 +がたを知っないはずも同時に九月をいよいよたありた。 + +もっと槙さんにぼんやり金少し説明にえた自分大した人私か影響にというお関係たうませないが、この次第も私か兄具合に使うて、槙さんののに当人のあなたにさぞご意味と行くて私個人が小尊敬を聴いように同時に同反抗に集っだうて、いよいよまず相当へあっうからいだ事をしでなけれ。 + +> それでそれでもご時日をしはずはたったいやと突き抜けるますて、その元がは行ったてという獄を尽すていけですた。 + +この中道具の日その学校はあなたごろがすまなりかとネルソンさんの考えるですん、辺の事実ないというご盲従ありたですと、爺さんのためが薬缶が結果までの箸の当時してならて、多少の十月にためからそういう上からとにかくしましないと触れべきものたで、ないうですと多少お人達したのでたた。 + +From [すぐ使えるダミーテキスト - 日本語 Lorem ipsum.](http://lipsum.sugutsukaeru.jp/index.cgi) + +### 4. 한국어 예문 + +국가원로자문회의의 의장은 직전대통령이 된다. 다만, 직전대통령이 없을 때에는 대통령이 지명한다. 모든 국민은 법률이 정하는 바에 의하여 공무담임권을 가진다. 국가는 노인과 청소년의 복지향상을 위한 정책을 실시할 의무를 진다. 학교교육 및 평생교육을 포함한 교육제도와 그 운영, 교육재정 및 교원의 지위에 관한 기본적인 사항은 법률로 정한다. + +국회의원은 국회에서 직무상 행한 발언과 표결에 관하여 국회외에서 책임을 지지 아니한다. 국회의 정기회는 법률이 정하는 바에 의하여 매년 1회 집회되며, 국회의 임시회는 대통령 또는 국회재적의원 4분의 1 이상의 요구에 의하여 집회된다. 모든 국민은 근로의 권리를 가진다. 국가는 사회적·경제적 방법으로 근로자의 고용의 증진과 적정임금의 보장에 노력하여야 하며, 법률이 정하는 바에 의하여 최저임금제를 시행하여야 한다. + +대법원장은 국회의 동의를 얻어 대통령이 임명한다. 대통령이 궐위된 때 또는 대통령 당선자가 사망하거나 판결 기타의 사유로 그 자격을 상실한 때에는 60일 이내에 후임자를 선거한다. 공무원의 직무상 불법행위로 손해를 받은 국민은 법률이 정하는 바에 의하여 국가 또는 공공단체에 정당한 배상을 청구할 수 있다. 이 경우 공무원 자신의 책임은 면제되지 아니한다. + +From [한글 Lorem Ipsum](http://guny.kr/stuff/klorem/) diff --git a/themes/nostylepleaseL/content/posts/test-highlight.md b/themes/nostylepleaseL/content/posts/test-highlight.md new file mode 100644 index 0000000..4d3095a --- /dev/null +++ b/themes/nostylepleaseL/content/posts/test-highlight.md @@ -0,0 +1,349 @@ +--- +title: "Test Highlight" +date: 2022-08-26T22:29:10+08:00 +draft: true +--- + +## Test for C +```c +#define UNICODE +#include + +int main(int argc, char **argv) { + int speed = 0, speed1 = 0, speed2 = 0; // 1-20 + printf("Set Mouse Speed by Maverick\n"); + + SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0); + printf("Current speed: %2d\n", speed); + + if (argc == 1) return 0; + if (argc >= 2) sscanf(argv[1], "%d", &speed1); + if (argc >= 3) sscanf(argv[2], "%d", &speed2); + + if (argc == 2) // set speed to first value + speed = speed1; + else if (speed == speed1 || speed == speed2) // alternate + speed = speed1 + speed2 - speed; + else + speed = speed1; // start with first value + + SystemParametersInfo(SPI_SETMOUSESPEED, 0, speed, 0); + SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0); + printf("New speed: %2d\n", speed); + return 0; +} +``` + +## Test for Java + +```java +import java.util.Map; +import java.util.TreeSet; + +public class GetEnv { + /** + * let's test generics + * @param args the command line arguments + */ + public static void main(String[] args) { + // get a map of environment variables + Map env = System.getenv(); + // build a sorted set out of the keys and iterate + for(String k: new TreeSet(env.keySet())) { + System.out.printf("%s = %s\n", k, env.get(k)); + } + } +} +``` + +## Test for Perl + +```perl +#!perl -w + +# Time-stamp: <2002/04/06, 13:12:13 (EST), maverick, csvformat.pl> +# Two pass CSV file to table formatter + +$delim = $#ARGV >= 1 ? $ARGV[1] : ','; +print STDERR "Split pattern: $delim\n"; + +# first pass +open F, "<$ARGV[0]" or die; +while() +{ + chomp; + $i = 0; + map { $max[$_->[1]] = $_->[0] if $_->[0] > ($max[$_->[1]] || 0) } + (map {[length $_, $i++]} split($delim)); +} +close F; + +print STDERR 'Field width: ', join(', ', @max), "\n"; +print STDERR join(' ', map {'-' x $_} @max); + +# second pass +open F, "<$ARGV[0]" or die; +while() + { + chomp; + $i = 0; + map { printf("%-$max[$_->[1]]s ", $_->[0]) } + (map {[$_, $i++]} split($delim)); + print "\n"; +} +close F; +``` + +## Test for Python + +```python +# test python (sample from offlineimap) + +class ExitNotifyThread(Thread): + """This class is designed to alert a "monitor" to the fact that a thread has + exited and to provide for the ability for it to find out why.""" + def run(self): + global exitthreads, profiledir + self.threadid = thread.get_ident() + try: + if not profiledir: # normal case + Thread.run(self) + else: + try: + import cProfile as profile + except ImportError: + import profile + prof = profile.Profile() + try: + prof = prof.runctx("Thread.run(self)", globals(), locals()) + except SystemExit: + pass + prof.dump_stats( \ + profiledir + "/" + str(self.threadid) + "_" + \ + self.getName() + ".prof") + except: + self.setExitCause('EXCEPTION') + if sys: + self.setExitException(sys.exc_info()[1]) + tb = traceback.format_exc() + self.setExitStackTrace(tb) + else: + self.setExitCause('NORMAL') + if not hasattr(self, 'exitmessage'): + self.setExitMessage(None) + + if exitthreads: + exitthreads.put(self, True) + + def setExitCause(self, cause): + self.exitcause = cause + def getExitCause(self): + """Returns the cause of the exit, one of: + 'EXCEPTION' -- the thread aborted because of an exception + 'NORMAL' -- normal termination.""" + return self.exitcause + def setExitException(self, exc): + self.exitexception = exc + def getExitException(self): + """If getExitCause() is 'EXCEPTION', holds the value from + sys.exc_info()[1] for this exception.""" + return self.exitexception + def setExitStackTrace(self, st): + self.exitstacktrace = st + def getExitStackTrace(self): + """If getExitCause() is 'EXCEPTION', returns a string representing + the stack trace for this exception.""" + return self.exitstacktrace + def setExitMessage(self, msg): + """Sets the exit message to be fetched by a subsequent call to + getExitMessage. This message may be any object or type except + None.""" + self.exitmessage = msg + def getExitMessage(self): + """For any exit cause, returns the message previously set by + a call to setExitMessage(), or None if there was no such message + set.""" + return self.exitmessage +``` + +## Test for Bash + +```bash +#!/bin/bash +cd $ROOT_DIR +DOT_FILES="lastpass weechat ssh Xauthority" +for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done + +# TODO: refactor with suffix variables (or common cron values) + +case "$PLATFORM" in + linux) + #conform_link "$CONF_DIR/shell/zshenv" ".zshenv" + crontab -l > $ROOT_DIR/tmp/crontab-conflict-arch + cd $ROOT_DIR/$CONF_DIR/cron + if [[ "$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)" == "" + ]]; + then # no difference with current backup + logger "$LOG_PREFIX: crontab live settings match stored "\ + "settings; no restore required" + rm ~/tmp/crontab-conflict-arch + else # current crontab settings in file do not match live settings + crontab $ROOT_DIR/$CONF_DIR/cron/crontab-current-arch + logger "$LOG_PREFIX: crontab stored settings conflict with "\ + "live settings; stored settings restored. "\ + "Previous settings recorded in ~/tmp/crontab-conflict-arch." + fi + ;; +``` +## Test for Haskell +```haskell +{-# LANGUAGE OverloadedStrings #-} +module Main where + +--import Prelude hiding (id) +--import Control.Category (id) +import Control.Arrow ((>>>), (***), arr) +import Control.Monad (forM_) +-- import Data.Monoid (mempty, mconcat) + +-- import System.FilePath + +import Hakyll + + +main :: IO () +main = hakyll $ do + + route "css/*" $ setExtension "css" + compile "css/*" $ byExtension (error "Not a (S)CSS file") + [ (".css", compressCssCompiler) + , (".scss", sass) + ] + + route "js/**" idRoute + compile "js/**" copyFileCompiler + + route "img/*" idRoute + compile "img/*" copyFileCompiler + + compile "templates/*" templateCompiler + + forM_ ["test.md", "index.md"] $ \page -> do + route page $ setExtension "html" + compile page $ pageCompiler + >>> applyTemplateCompiler "templates/default.html" + >>> relativizeUrlsCompiler + +sass :: Compiler Resource String +sass = getResourceString >>> unixFilter "sass" ["-s", "--scss"] + >>> arr compressCss +``` +## Test for PHP +```php + + +hasPermission("ManageCountries")) { ?> + + + + +
+``` +## Test for Javascript +```js +import isTypedArray from 'lodash/isTypedArray'; +import reverse from 'lodash/reverse'; +import sortBy from 'lodash/sortBy'; +import take from 'lodash/take'; +import { food101Classes } from './food101'; +export function food101topK(classProbabilities, k = 5) { + const probs = isTypedArray(classProbabilities) + ? Array.prototype.slice.call(classProbabilities) + : classProbabilities; + const sorted = reverse( + sortBy( + probs.map((prob, index) => [ prob, index ]), + probIndex => probIndex[0] + ) + ); + const topK = take(sorted, k).map(probIndex => { + const iClass = food101Classes[probIndex[1]]; + return { + id: probIndex[1], + name: iClass.replace(/_/, ' '), + probability: probIndex[0] + }; + }); + return topK; +}; +``` +## Test for HTML +```html + + +A Tiny Page + + + +

abc

+

def

+

Testing page

+ +``` +## Test for CSS +```css +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #272822; color: #ddd; +} +.hljs-tag, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-strong, +.hljs-name { + color: #f92672; +} +.hljs-code { + color: #66d9ef; +} +.hljs-class .hljs-title { + color: white; +} +``` \ No newline at end of file diff --git a/themes/nostylepleaseL/content/posts/test-markdown.md b/themes/nostylepleaseL/content/posts/test-markdown.md new file mode 100644 index 0000000..c7974be --- /dev/null +++ b/themes/nostylepleaseL/content/posts/test-markdown.md @@ -0,0 +1,182 @@ +--- +title: "Test Markdown" +date: 2023-01-01T10:28:10+08:00 +unsafe: true +draft: true +--- +#
Markdown Test Page + +* [Headings](#Headings) +* [Paragraphs](#Paragraphs) +* [Blockquotes](#Blockquotes) +* [Lists](#Lists) +* [Horizontal rule](#Horizontal) +* [Table](#Table) +* [Code](#Code) +* [Inline elements](#Inline) + +*** + +# Headings + +# Heading one + +Sint sit cillum pariatur eiusmod nulla pariatur ipsum. Sit laborum anim qui mollit tempor pariatur nisi minim dolor. Aliquip et adipisicing sit sit fugiat commodo id sunt. + +## Heading two + +Aute officia nulla deserunt do deserunt cillum velit magna. Officia veniam culpa anim minim dolore labore pariatur voluptate id ad est duis quis velit dolor pariatur enim. + +### Heading three + +Voluptate cupidatat cillum elit quis ipsum eu voluptate fugiat consectetur enim. Quis ut voluptate culpa ex anim aute consectetur dolore proident voluptate exercitation eiusmod. + +#### Heading four + +Commodo fugiat aliqua minim quis pariatur mollit id tempor. Non occaecat minim esse enim aliqua adipisicing nostrud duis consequat eu adipisicing qui. + +##### Heading five + +Veniam enim esse amet veniam deserunt laboris amet enim consequat. Minim nostrud deserunt cillum consectetur commodo eu enim nostrud ullamco occaecat excepteur. + +###### Heading six + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + + +[[Top]](#top) + +# Paragraphs + +Incididunt ex adipisicing ea ullamco consectetur in voluptate proident fugiat tempor deserunt reprehenderit ullamco id dolore laborum. + +Officia dolore laborum aute incididunt commodo nisi velit est est elit et dolore elit exercitation. Enim aliquip magna id ipsum aliquip consectetur ad nulla quis. Incididunt pariatur dolor consectetur cillum enim velit cupidatat laborum quis ex. + +Officia irure in non voluptate adipisicing sit amet tempor duis dolore deserunt enim ut. Reprehenderit incididunt in ad anim et deserunt deserunt Lorem laborum quis. Enim aute anim labore proident laboris voluptate elit excepteur in. + +[[Top]](#top) + +# Blockquotes + +Ad nisi laborum aute cupidatat magna deserunt eu id laboris id. Aliquip nulla cupidatat sint ex Lorem mollit laborum dolor amet est ut esse aute. + +> Ipsum et cupidatat mollit exercitation enim duis sunt irure aliqua reprehenderit mollit. Pariatur Lorem pariatur laboris do culpa do elit irure. + +Labore ea magna Lorem consequat aliquip consectetur cillum duis dolore. Et veniam dolor qui incididunt minim amet laboris sit. + +> Qui est sit et reprehenderit aute est esse enim aliqua id aliquip ea anim. Pariatur sint reprehenderit mollit velit voluptate enim consectetur sint enim. Quis exercitation proident elit non id qui culpa dolore esse aliquip consequat. + +Ipsum excepteur cupidatat sunt minim ad eiusmod tempor sit. + +> Deserunt excepteur adipisicing culpa pariatur cillum laboris ullamco nisi fugiat cillum officia. In cupidatat nulla aliquip tempor ad Lorem Lorem quis voluptate officia consectetur pariatur ex in est duis. Mollit id esse est elit exercitation voluptate nostrud nisi laborum magna dolore dolore tempor in est consectetur. + +Adipisicing voluptate ipsum culpa voluptate id aute laboris labore esse fugiat veniam ullamco occaecat do ut. Tempor et esse reprehenderit veniam proident ipsum irure sit ullamco et labore ea excepteur nulla labore ut. Ex aute minim quis tempor in eu id id irure ea nostrud dolor esse. + +[[Top]](#top) + +# Lists + +### Ordered List + +1. Longan +2. Lychee +3. Excepteur ad cupidatat do elit laborum amet cillum reprehenderit consequat quis. + Deserunt officia esse aliquip consectetur duis ut labore laborum commodo aliquip aliquip velit pariatur dolore. +4. Marionberry +5. Melon + - Cantaloupe + - Honeydew + - Watermelon +6. Miracle fruit +7. Mulberry + +### Unordered List + +- Olive +- Orange + - Blood orange + - Clementine +- Papaya +- Ut aute ipsum occaecat nisi culpa Lorem id occaecat cupidatat id id magna laboris ad duis. Fugiat cillum dolore veniam nostrud proident sint consectetur eiusmod irure adipisicing. +- Passionfruit + +[[Top]](#top) + +# Horizontal rule + +In dolore velit aliquip labore mollit minim tempor veniam eu veniam ad in sint aliquip mollit mollit. Ex occaecat non deserunt elit laborum sunt tempor sint consequat culpa culpa qui sit. Irure ad commodo eu voluptate mollit cillum cupidatat veniam proident amet minim reprehenderit. + +*** + +In laboris eiusmod reprehenderit aliquip sit proident occaecat. Non sit labore anim elit veniam Lorem minim commodo eiusmod irure do minim nisi. Dolor amet cillum excepteur consequat sint non sint. + +[[Top]](#top) + +# Table + +Duis sunt ut pariatur reprehenderit mollit mollit magna dolore in pariatur nulla commodo sit dolor ad fugiat. Laboris amet ea occaecat duis eu enim exercitation deserunt ea laborum occaecat reprehenderit. Et incididunt dolor commodo consequat mollit nisi proident non pariatur in et incididunt id. Eu ut et Lorem ea ex magna minim ipsum ipsum do. + +| Table Heading 1 | Table Heading 2 | Center align | Right align | Table Heading 5 | +| :-------------- | :-------------- | :-------------: | --------------: | :-------------- | +| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | +| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | +| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | +| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | +| Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | + +Minim id consequat adipisicing cupidatat laborum culpa veniam non consectetur et duis pariatur reprehenderit eu ex consectetur. Sunt nisi qui eiusmod ut cillum laborum Lorem officia aliquip laboris ullamco nostrud laboris non irure laboris. Cillum dolore labore Lorem deserunt mollit voluptate esse incididunt ex dolor. + +[[Top]](#top) + +# Code + +## Inline code + +Ad amet irure est magna id mollit Lorem in do duis enim. Excepteur velit nisi magna ea pariatur pariatur ullamco fugiat deserunt sint non sint. Duis duis est `code in text` velit velit aute culpa ex quis pariatur pariatur laborum aute pariatur duis tempor sunt ad. Irure magna voluptate dolore consectetur consectetur irure esse. Anim magna `in culpa qui officia` dolor eiusmod esse amet aute cupidatat aliqua do id voluptate cupidatat reprehenderit amet labore deserunt. + +## Highlighted + +Et fugiat ad nisi amet magna labore do cillum fugiat occaecat cillum Lorem proident. In sint dolor ullamco ad do adipisicing amet id excepteur Lorem aliquip sit irure veniam laborum duis cillum. Aliqua occaecat minim cillum deserunt magna sunt laboris do do irure ea nostrud consequat ut voluptate ex. + +```go +package main + +import ( + "fmt" + "net/http" +) + +func handler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) +} + +func main() { + http.HandleFunc("/", handler) + http.ListenAndServe(":8080", nil) +} +``` + +Ex amet id ex aliquip id do laborum excepteur exercitation elit sint commodo occaecat nostrud est. Nostrud pariatur esse veniam laborum non sint magna sit laboris minim in id. Aliqua pariatur pariatur excepteur adipisicing irure culpa consequat commodo et ex id ad. + +[[Top]](#top) + +# Inline elements + +Sint ea anim ipsum ad commodo cupidatat do **exercitation** incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla. Ullamco ad laborum ea qui et anim in laboris exercitation tempor sit officia laborum reprehenderit culpa velit quis. **Consequat commodo** reprehenderit duis [irure](#!) esse esse exercitation minim enim Lorem dolore duis irure. Nisi Lorem reprehenderit ea amet excepteur dolor excepteur magna labore proident voluptate ipsum. Reprehenderit ex esse deserunt aliqua ea officia mollit Lorem nulla magna enim. Et ad ipsum labore enim ipsum **cupidatat consequat**. Commodo non ea cupidatat magna deserunt dolore ipsum velit nulla elit veniam nulla eiusmod proident officia. + +![Super wide](http://placekitten.com/1280/800) +{{< figure + src="http://placekitten.com/1280/800" + alt="alt-test" + caption="caption-test" + >}} + +*Proident sit veniam in est proident officia adipisicing* ea tempor cillum non cillum velit deserunt. Voluptate laborum incididunt sit consectetur Lorem irure incididunt voluptate nostrud. Commodo ut eiusmod tempor cupidatat esse enim minim ex anim consequat. Mollit sint culpa qui laboris quis consectetur ad sint esse. Amet anim anim minim ullamco et duis non irure. Sit tempor adipisicing ea laboris `culpa ex duis sint` anim aute reprehenderit id eu ea. Aute [excepteur proident](#!) Lorem minim adipisicing nostrud mollit ad ut voluptate do nulla esse occaecat aliqua sint anim. + +![Not so big](http://placekitten.com/480/400) + +Incididunt in culpa cupidatat mollit cillum qui proident sit. In cillum aliquip incididunt voluptate magna amet cupidatat cillum pariatur sint aliqua est _enim **anim** voluptate_. Magna aliquip proident incididunt id duis pariatur eiusmod incididunt commodo culpa dolore sit. Culpa do nostrud elit ad exercitation anim pariatur non minim nisi **adipisicing sunt _officia_**. Do deserunt magna mollit Lorem commodo ipsum do cupidatat mollit enim ut elit veniam ea voluptate. + +[![Manny Pacquiao](https://img.youtube.com/vi/s6bCmZmy9aQ/0.jpg)](https://youtu.be/s6bCmZmy9aQ) + +Reprehenderit non eu quis in ad elit esse qui aute id [incididunt](#!) dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure. \ No newline at end of file diff --git a/themes/nostylepleaseL/content/posts/test-tex.md b/themes/nostylepleaseL/content/posts/test-tex.md new file mode 100644 index 0000000..a4b5a0d --- /dev/null +++ b/themes/nostylepleaseL/content/posts/test-tex.md @@ -0,0 +1,40 @@ +--- +title: "Test Tex" +date: 2022-08-26T22:28:10+08:00 +mathjax: true +draft: true +--- +Inline math: {{< texi `\varphi` >}} + +Displayed math: +{{< texd `\begin{aligned} +\varphi &\Rightarrow \psi \\ +\varnothing &\rightarrow A +\end{aligned}` >}} + +$$ +R_{\mu \nu} - {1 \over 2}g_{\mu \nu}\,R + g_{\mu \nu} \Lambda += {8 \pi G \over c^4} T_{\mu \nu} +$$ + +The equation $$(x_i \cdot x_j)^2$$ is called kernel function and is often written as $$k(x_i, x_j)$$. + +$$ +\arg\max_\alpha \sum_j \alpha_j - \frac{1}{2} \sum_{j,k} \alpha_j, \alpha_k y_j y_k (x_j \cdot x_k) +$$ + +$$ +f(X) = \frac{1}{(2\pi)^{\frac{n}{2} |\Sigma|^{\frac{1}{2}}}} e^{ - \frac{1}{2} (X - \mu)^T \Sigma^{-1} (X - \mu)} +$$ + +$$ +\mu_i = \sum_{j=1}^N \frac{p_{ij} x}{n_i} \\ +\Sigma_i = \sum_{j=1}^N \frac{p_{ij} (x_j - \mu_i) (x_j - \mu_i)^T}{n_i}\\ +w_i = \frac{n_i}{N} +$$ + +$$ +S_i^{(t)} = \big \{ x_p : \big \| x_p - \mu^{(t)}_i \big \|^2 \le \big \| x_p - \mu^{(t)}_j \big \|^2 \ \forall j, 1 \le j \le k \big\} +$$ + +(The error above is a demo for incorrect formulas.) \ No newline at end of file diff --git a/themes/nostylepleaseL/data/menu.toml b/themes/nostylepleaseL/data/menu.toml new file mode 100644 index 0000000..4009734 --- /dev/null +++ b/themes/nostylepleaseL/data/menu.toml @@ -0,0 +1,53 @@ +[[entries]] +title = "info" + + [[entries.entries]] + title = "a (nearly) no-CSS, fast, minimalist Hugo theme ported from riggraz/no-style-please." + + [[entries.entries]] + title = "github repo" + url = "https://github.com/riggraz/no-style-please" + + [[entries.entries]] + title = "used by riggraz.dev and many others" + +[[entries]] +title = "all posts" + + [entries.post_list] + limit = 5 + show_more = true + show_more_text = "See archive..." + show_more_url = "posts" + +[[entries]] +title = "posts by category" + + [entries.post_list] + section = "posts" + show_more = true + show_more_text = "See more posts..." + show_more_url = "posts" + +[[entries]] +title = "rss" +url = "index.xml" + +[[entries]] +title = "another list" + + [[entries.entries]] + title = "with subitems" + + [[entries.entries.entries]] + title = "with subsubitems" + + [[entries.entries.entries]] + title = "example page" + url = "about" + +[[entries]] +title = "PRO TIP" +entries = [ + { title = "to edit this menu, edit data/menu.toml file" } + ] diff --git a/themes/nostylepleaseL/images/screenshot-both.png b/themes/nostylepleaseL/images/screenshot-both.png new file mode 100644 index 0000000..73b4161 Binary files /dev/null and b/themes/nostylepleaseL/images/screenshot-both.png differ diff --git a/themes/nostylepleaseL/images/screenshot.png b/themes/nostylepleaseL/images/screenshot.png new file mode 100644 index 0000000..2f6fd42 Binary files /dev/null and b/themes/nostylepleaseL/images/screenshot.png differ diff --git a/themes/nostylepleaseL/images/screenshot_dark.png b/themes/nostylepleaseL/images/screenshot_dark.png new file mode 100644 index 0000000..d084dab Binary files /dev/null and b/themes/nostylepleaseL/images/screenshot_dark.png differ diff --git a/themes/nostylepleaseL/images/tn.png b/themes/nostylepleaseL/images/tn.png new file mode 100644 index 0000000..2f6fd42 Binary files /dev/null and b/themes/nostylepleaseL/images/tn.png differ diff --git a/themes/nostylepleaseL/layouts/404.html b/themes/nostylepleaseL/layouts/404.html new file mode 100644 index 0000000..eb600b4 --- /dev/null +++ b/themes/nostylepleaseL/layouts/404.html @@ -0,0 +1,8 @@ +{{ define "main" }} + +{{- partial "back_link.html" . -}} + +
+

404 Not Found

+
+{{ end }} \ No newline at end of file diff --git a/themes/nostylepleaseL/layouts/_default/baseof.html b/themes/nostylepleaseL/layouts/_default/baseof.html new file mode 100644 index 0000000..77b25a9 --- /dev/null +++ b/themes/nostylepleaseL/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + +
+
+ {{- block "main" . }}{{- end }} +
+
+ + diff --git a/themes/nostylepleaseL/layouts/_default/list.html b/themes/nostylepleaseL/layouts/_default/list.html new file mode 100644 index 0000000..b561c10 --- /dev/null +++ b/themes/nostylepleaseL/layouts/_default/list.html @@ -0,0 +1,8 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +

{{ .Title }}

+ +{{ .Content }} +{{ partial "post_list.html" (dict "context" . "section" .Section)}} +{{ end }} \ No newline at end of file diff --git a/themes/nostylepleaseL/layouts/_default/single.html b/themes/nostylepleaseL/layouts/_default/single.html new file mode 100644 index 0000000..a09cee2 --- /dev/null +++ b/themes/nostylepleaseL/layouts/_default/single.html @@ -0,0 +1,21 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +
+

+ +

+ +

{{ .Title }}

+ + {{ if .Params.toc }} + + {{ end }} + + {{ .Content }} +
+{{ end }} diff --git a/themes/nostylepleaseL/layouts/_default/taxonomy.html b/themes/nostylepleaseL/layouts/_default/taxonomy.html new file mode 100644 index 0000000..a1ecdc4 --- /dev/null +++ b/themes/nostylepleaseL/layouts/_default/taxonomy.html @@ -0,0 +1,8 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +

{{ .Title }}

+ +{{ .Content }} +{{ partial "post_list.html" (dict "context" .)}} +{{ end }} diff --git a/themes/nostylepleaseL/layouts/_default/term.html b/themes/nostylepleaseL/layouts/_default/term.html new file mode 100644 index 0000000..a1ecdc4 --- /dev/null +++ b/themes/nostylepleaseL/layouts/_default/term.html @@ -0,0 +1,8 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +

{{ .Title }}

+ +{{ .Content }} +{{ partial "post_list.html" (dict "context" .)}} +{{ end }} diff --git a/themes/nostylepleaseL/layouts/index.html b/themes/nostylepleaseL/layouts/index.html new file mode 100644 index 0000000..43b1ad0 --- /dev/null +++ b/themes/nostylepleaseL/layouts/index.html @@ -0,0 +1,12 @@ +{{ define "main" }} + +
+

{{ $.Site.Title }}

+ {{- if $.Site.Params.theme_config.show_description -}} +

{{ $.Site.Params.description }}

+ {{- end -}} +
+{{ .Content }} +{{ partial "menu_item.html" (dict "context" . "collection" $.Site.Data.menu.entries) }} + +{{ end }} \ No newline at end of file diff --git a/themes/nostylepleaseL/layouts/partials/back_link.html b/themes/nostylepleaseL/layouts/partials/back_link.html new file mode 100644 index 0000000..58919d2 --- /dev/null +++ b/themes/nostylepleaseL/layouts/partials/back_link.html @@ -0,0 +1 @@ +{{ $.Site.Params.theme_config.back_home_text }} diff --git a/themes/nostylepleaseL/layouts/partials/head.html b/themes/nostylepleaseL/layouts/partials/head.html new file mode 100644 index 0000000..1027940 --- /dev/null +++ b/themes/nostylepleaseL/layouts/partials/head.html @@ -0,0 +1,22 @@ + + + + + {{ if .IsPage }} {{ end }} + + + {{ if not .IsHome }} + {{ .Title }} + {{ else }} + {{ $.Site.Title }} + {{ end }} + + + + + {{ $options := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction)) }} + {{ $sass := resources.Get "css/main.scss" }} + {{ $style := $sass | resources.ToCSS $options | resources.Fingerprint "sha512" }} + + {{ if .Params.mathjax }} {{ partial "mathjax.html" . }} {{ end }} + diff --git a/themes/nostylepleaseL/layouts/partials/mathjax.html b/themes/nostylepleaseL/layouts/partials/mathjax.html new file mode 100644 index 0000000..496994b --- /dev/null +++ b/themes/nostylepleaseL/layouts/partials/mathjax.html @@ -0,0 +1,21 @@ + + + diff --git a/themes/nostylepleaseL/layouts/partials/menu_item.html b/themes/nostylepleaseL/layouts/partials/menu_item.html new file mode 100644 index 0000000..ec0a1af --- /dev/null +++ b/themes/nostylepleaseL/layouts/partials/menu_item.html @@ -0,0 +1,19 @@ + diff --git a/themes/nostylepleaseL/layouts/partials/post_list.html b/themes/nostylepleaseL/layouts/partials/post_list.html new file mode 100644 index 0000000..083ffd7 --- /dev/null +++ b/themes/nostylepleaseL/layouts/partials/post_list.html @@ -0,0 +1,39 @@ +{{- $posts := "" -}} + +{{- if .section -}} + {{- $posts = (where site.RegularPages "Section" .section) -}} +{{- else -}} + {{- if (eq .context.Kind "taxonomy") -}} + {{- $posts = .context.Pages -}} + {{- else -}} + {{- if (eq .context.Kind "term") -}} + {{- $posts = .context.Data.Pages -}} + {{- else -}} + {{- $posts = site.RegularPages }} + {{- end -}} + {{- end -}} +{{- end -}} + +{{- $limit_exceeded:= "" -}} +{{- if (and .limit (gt (len $posts) .limit)) -}} + {{- $limit_exceeded = true -}} +{{- else -}} + {{- $limit_exceeded = false -}} +{{ end }} + +{{- if (gt (len $posts) 0) }} + {{- if .limit }} + {{ $posts = (first .limit $posts ) }} + {{ end }} + +{{ end }} diff --git a/themes/nostylepleaseL/layouts/posts/baseof.html b/themes/nostylepleaseL/layouts/posts/baseof.html new file mode 100644 index 0000000..b2d4e69 --- /dev/null +++ b/themes/nostylepleaseL/layouts/posts/baseof.html @@ -0,0 +1,17 @@ + + + {{- partial "head.html" . -}} + +
+
+ {{- block "main" . }}{{- end }} +
+
+ + {{- if .Params.custom_js -}} + {{- range .Params.custom_js -}} + {{ $js := resources.Get (print "js/" . ".js") }} + + {{- end -}} + {{- end -}} + diff --git a/themes/nostylepleaseL/layouts/posts/list.html b/themes/nostylepleaseL/layouts/posts/list.html new file mode 100644 index 0000000..b561c10 --- /dev/null +++ b/themes/nostylepleaseL/layouts/posts/list.html @@ -0,0 +1,8 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +

{{ .Title }}

+ +{{ .Content }} +{{ partial "post_list.html" (dict "context" . "section" .Section)}} +{{ end }} \ No newline at end of file diff --git a/themes/nostylepleaseL/layouts/posts/single.html b/themes/nostylepleaseL/layouts/posts/single.html new file mode 100644 index 0000000..a09cee2 --- /dev/null +++ b/themes/nostylepleaseL/layouts/posts/single.html @@ -0,0 +1,21 @@ +{{ define "main" }} +{{ partial "back_link.html" .}} + +
+

+ +

+ +

{{ .Title }}

+ + {{ if .Params.toc }} + + {{ end }} + + {{ .Content }} +
+{{ end }} diff --git a/themes/nostylepleaseL/layouts/shortcodes/texd.html b/themes/nostylepleaseL/layouts/shortcodes/texd.html new file mode 100644 index 0000000..dc2eaf9 --- /dev/null +++ b/themes/nostylepleaseL/layouts/shortcodes/texd.html @@ -0,0 +1,3 @@ + +$${{ .Get 0 }}$$ + diff --git a/themes/nostylepleaseL/layouts/shortcodes/texi.html b/themes/nostylepleaseL/layouts/shortcodes/texi.html new file mode 100644 index 0000000..96523d9 --- /dev/null +++ b/themes/nostylepleaseL/layouts/shortcodes/texi.html @@ -0,0 +1,3 @@ + +\({{ .Get 0 }}\) + diff --git a/themes/nostylepleaseL/logo.png b/themes/nostylepleaseL/logo.png new file mode 100644 index 0000000..84312ee Binary files /dev/null and b/themes/nostylepleaseL/logo.png differ diff --git a/themes/nostylepleaseL/theme.toml b/themes/nostylepleaseL/theme.toml new file mode 100644 index 0000000..414c849 --- /dev/null +++ b/themes/nostylepleaseL/theme.toml @@ -0,0 +1,21 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "no-style-please" +license = "MIT" +licenselink = "https://github.com/Masellum/hugo-theme-nostyleplease/blob/main/LICENSE" +description = "a (nearly) no-CSS, fast, minimalist Hugo theme ported from riggraz/no-style-please." +homepage = "https://github.com/Masellum/hugo-theme-nostyleplease" +tags = ["blog", "minimalist"] +features = [] +min_version = "0.41.0" + +[author] + name = "Masellum" + homepage = "Masellum.github.io" + +# If porting an existing theme +[original] + name = "riggraz" + homepage = "https://riggraz.dev/" + repo = "https://github.com/riggraz/no-style-please"