initial build of the site

This commit is contained in:
2026-06-22 13:59:23 -06:00
parent d69fb541f9
commit 85e88dcc62
43 changed files with 1517 additions and 0 deletions

11
.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
# Hugo build output
/public/
/resources/_gen/
# Hugo module cache
/hugo_cache/
.hugo_build.lock
# OS files
.DS_Store
Thumbs.db

20
LICENSE Normal file
View File

@@ -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.

View File

@@ -0,0 +1,85 @@
# no style, please!
<img src="https://raw.githubusercontent.com/hanwenguo/hugo-theme-nostyleplease/main/logo.png" width="64" align="left" />A (nearly) no-CSS, fast, minimalist [Hugo](https://gohugo.io/) theme ported from [riggraz/no-style-please](https://github.com/riggraz/no-style-please/).
<img src="https://raw.githubusercontent.com/hanwenguo/hugo-theme-nostyleplease/main/images/screenshot-both.png" />
## Features
* Fast (**under 3kb 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
* Supporting details HTML tag
## 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 ```<a>``` 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`.
You can also add footer. Just edit ..nostyleplease/layouts/footer.md.
### 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.
### Posts list group by date in descending order.
just edit `config.toml` and change `params.theme_config.isListGroupByDate` to `true`.
### 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/hanwenguo/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).

181
assets/css/main.scss Normal file
View File

@@ -0,0 +1,181 @@
// -------------- THEME SWITCHER -------------- //
@mixin theme($--bg-color, $--primary-text-color, $--secondary-text-color, $--link-color, $--visited-link-color, $--highlight) {
background-color: $--bg-color;
color: $--primary-text-color;
a {
color: $--link-color;
&:visited { color: $--visited-link-color; }
}
details {
border: thin solid $--primary-text-color;
}
details summary {
color: $--primary-text-color;
}
details[open] summary {
border-bottom: 1px solid $--primary-text-color;
}
pre {
background: $--bg-color;
}
code:not(pre > code) {
background-color: $--primary-text-color;
color: $--bg-color;
}
*:target {
background: $--highlight;
color: $--primary-text-color;
}
table, th, td {
border: thin solid $--primary-text-color;
}
.toc {
border: thin solid $--primary-text-color;
padding: 1rem;
}
figcaption { color: $--secondary-text-color; }
blockquote {
border: thin solid $--primary-text-color;
}
}
@mixin dark-appearance {
@include theme(#000000, #ffffff, #000000, #79a8ff, #f78fe7, #2f3849); // modus-vivendi
}
@mixin light-appearance {
@include theme(#ffffff, #000000, #595959, #3548cf, #8f0075, #dae5ec); // modus-operandi
}
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;
}
h2, h3, h4, h5, h6 { margin-top: 1.5rem; }
p { margin: 1rem 0; }
li { margin: 0.4rem 0; }
a {
text-decoration: none;
&:hover { text-decoration: underline; }
}
hr {
text-align: center;
border: 0;
margin: 2rem 0;
&:before { content: '/////' }
&:after { content: attr(data-content) '/////' }
}
pre {
padding: 1em;
overflow-x: auto; /* Fix pre content overflowing parent without scroll bar */
}
table { width: 100%; }
table, th, td {
border-collapse: collapse;
padding: 0.4rem;
}
code {
text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
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 {
padding: 1rem;
p { margin: 0; }
}
img {
max-width: 100%;
display: block;
margin: 0 auto;
}
figcaption {
text-align: center;
opacity: 0.5;
}
details {
padding: 1rem;
}
details summary {
text-decoration: none;
}
details[open] summary {
margin-bottom: 0.5em;
padding-bottom: 0.5em;
}
.post-meta {
display: flex;
justify-content: space-between;
align-items: center;
}
.w {
max-width: 640px;
margin: 0 auto;
padding: 4rem 2rem;
}
.toc {
padding: 1rem;
}

View File

@@ -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}`;
});

41
config.toml Normal file
View File

@@ -0,0 +1,41 @@
[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"
isListGroupByDate = false
isShowFooter = true
theme = 'nostyleplease'

6
content/_index.md Normal file
View File

@@ -0,0 +1,6 @@
+++
title = ""
date = 2022-08-25T21:30:04+08:00
draft = false
+++
### Welcome.

View File

@@ -0,0 +1,69 @@
---
draft: false
title: "Nextcloud"
date: 2026-06-22T00:00:00+08:00
---
## Take Back Your Documents: Why Nextcloud Office Is the Online Suite You've Been Waiting For
There's a hidden tax buried in every Google Doc you open and every Word file you upload to Microsoft 365. You pay it not with money, but with control — handing your documents, your data, and your privacy to someone else's server the moment you hit "share." Nextcloud Office exists to end that bargain for good.
### A Full Suite, On Your Terms
Nextcloud Office is a complete, self-hosted online office suite built in partnership with Collabora Productivity. It covers every base: Nextcloud Write for documents, Nextcloud Spreadsheet for data, Nextcloud Present for slides, and Nextcloud Draw for diagrams and quick sketches. All four run in any modern browser, support real-time collaborative editing, and handle the full range of formats you already work with — DOCX, XLSX, PPTX, and a wide array of open document formats.
No format conversion surprises. No "this file looks different on your end." Just clean, high-fidelity WYSIWYG rendering done on the server, so what you see is exactly what prints.
### Your Data Never Leaves Your Server
This is the architectural detail that changes everything. When you edit a document in Nextcloud Office, only the rendered content travels to your browser — not the raw file. Your documents stay on your server at all times. That's not marketing language; it's a fundamental design decision that minimizes the surface area for leaks and keeps you firmly in control.
For organizations in regulated industries, public sector bodies, universities, and anyone who simply values their privacy, this matters enormously. Tens of millions of users at thousands of organizations worldwide have already made the switch.
### Collaboration Without Compromise
Real-time collaboration isn't bolted on as an afterthought — it's woven through every part of the suite:
1. Real-time cursor tracking shows you exactly who is editing what, live
1. Comments and replies keep conversations anchored to the relevant part of the document
1. Present to All lets you lead a presentation while every collaborator's view follows you automatically
1. Sheet Views in Spreadsheet let individuals filter data independently, so large shared datasets don't become a collision course
1. Document comparison offers both a side-by-side view and a Manage Changes mode for reviewing, accepting, or rejecting edits one by one
1. Anonymous editing via public link means external collaborators don't need a Nextcloud account to contribute
And because Nextcloud Office is deeply integrated into the broader Nextcloud ecosystem, you can collaborate on a document during a video call, attach it to a task, open it from a mail attachment, or edit it directly from your desktop — all without leaving your workflow.
### Nextcloud-Office: Sovereign, Open, and Built for Privacy
The Spring 2026 release introduces Nextcloud-Office, a complete office suite engineered with a distinct architectural approach that delivers excellent browser performance while reducing server load. It offers seamless collaboration, maximum compatibility with Microsoft Office files, and is built entirely in Europe as a sovereign open-source solution — a meaningful distinction for organizations with data residency requirements or concerns about foreign cloud dependencies.
### AI That Stays in Your Control
Nextcloud's approach to AI reflects the same philosophy as its approach to data: powerful features, fully on your terms. The new AI chat sidebar lets users converse with Nextcloud Assistant alongside any open document. The Assistant can write, translate, and refine text directly from the editor's Insert tab, and AI-powered diagram generation is available in Nextcloud Whiteboard.
Every AI feature is optional and fully configurable. No silent data sharing with third-party model providers, no hidden training on your files.
A Richer Ecosystem Beyond the Editor
Nextcloud Office doesn't stand alone. It's the centerpiece of a broader productivity platform that includes:
1. Nextcloud Text — a lightweight, collaborative note-taking app with template support, Mermaid diagram integration, self-hosted translation, and offline editing
1. Nextcloud Collectives — a collaborative wiki for meeting notes, project documentation, and team knowledge bases, complete with landing pages, membership management, and a page trashbin
1. Nextcloud Tables — a powerful alternative to Microsoft SharePoint Lists and Airtable for managing structured data, with conditional formatting, custom views, link columns, and ownership transfer
1. Nextcloud Whiteboard — a real-time collaborative whiteboard with presentation mode, grid view, and AI-generated diagrams, ideal for brainstorming during calls
### Key Capabilities Worth Calling Out
The feature list is long and keeps growing. Standout additions include QR code generation in Write, conditional formatting in spreadsheets, LaTeX support in Nextcloud Text, document generation with AI, PDF template and form-filling APIs, customizable status bars, spreadsheet shuffle sorting, and a navigation sidebar for large documents.
### Open Source, Enterprise-Ready
Nextcloud Office is open source and free for personal use. Organizations that need guaranteed uptime, long-term support, security updates, and dedicated response times can step up to Federated Computer — the same platform, backed by the team that knows the cloud.
The choice between convenience and control has always been a false one. Nextcloud Office proves you can have real-time collaboration, broad format support, deep integrations, and genuine AI assistance — all without surrendering your data to someone else's cloud.
The documents are yours. Keep them that way.
---
Learn more at [federated.computer](https://federated.computer). Want to offer Nextcloud to your customers or partners? Check out [Federated Enterprise](https://enterprise.federated.computer).

View File

@@ -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 (<hr>)
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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -0,0 +1,349 @@
---
title: "Test Highlight"
date: 2022-08-26T22:29:10+08:00
draft: true
---
## Test for C
```c
#define UNICODE
#include <windows.h>
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<String, String> env = System.getenv();
// build a sorted set out of the keys and iterate
for(String k: new TreeSet<String>(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(<F>)
{
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(<F>)
{
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
<?php
require_once($GLOBALS['g_campsiteDir']. "/$ADMIN_DIR/country/common.php");
require_once($GLOBALS['g_campsiteDir']. "/classes/SimplePager.php");
camp_load_translation_strings("api");
$f_country_language_selected = camp_session_get('f_language_selected', '');
$f_country_offset = camp_session_get('f_country_offset', 0);
if (empty($f_country_language_selected)) {
$f_country_language_selected = null;
}
$ItemsPerPage = 20;
$languages = Language::GetLanguages(null, null, null, array(), array(), true);
$numCountries = Country::GetNumCountries($f_country_language_selected);
$pager = new SimplePager($numCountries, $ItemsPerPage, "index.php?");
$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Countries"), "");
echo camp_html_breadcrumbs($crumbs);
?>
<?php if ($g_user->hasPermission("ManageCountries")) { ?>
<table BORDER="0" CELLSPACING="0" CELLPADDING="1">
<tr>
<td><a href="add.php"><?php putGS("Add new"); ?></a></td>
</tr>
</table>
```
## 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>A Tiny Page</title>
<style type="text/css">
<!--
p { font-size:15pt; color:#000 }
-->
</style></head><!-- real comment -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000CC">
<script language="javascript" type="text/javascript">
function changeHeight(h) {
var tds = document.getElementsByTagName("td");
for(var i = 0; i < tds.length; i++) {
tds[i].setAttribute("height", h + "px");
}}
</script>
<h1>abc</h1>
<h2>def</h2>
<p>Testing page</p>
</body></html>
```
## 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;
}
```

View File

@@ -0,0 +1,182 @@
---
title: "Test Markdown"
date: 2023-01-01T10:28:10+08:00
unsafe: true
draft: true
---
# <a name="top"></a>Markdown Test Page
* [Headings](#Headings)
* [Paragraphs](#Paragraphs)
* [Blockquotes](#Blockquotes)
* [Lists](#Lists)
* [Horizontal rule](#Horizontal)
* [Table](#Table)
* [Code](#Code)
* [Inline elements](#Inline)
***
# <a name="Headings"></a>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)
# <a name="Paragraphs"></a>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)
# <a name="Blockquotes"></a>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)
# <a name="Lists"></a>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)
# <a name="Horizontal"></a>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)
# <a name="Table"></a>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)
# <a name="Code"></a>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 `<strong>in culpa qui officia</strong>` 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)
# <a name="Inline"></a>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.

View File

@@ -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.)

View File

@@ -0,0 +1,37 @@
+++
title = 'Nextcloud'
date = 2026-06-22T13:34:54+02:00
draft = true
toc = true
tocBorder = true
+++
## Table of Content
### What it is?
TOC is the box you see at the very top of this post. It may be framed (or not).
### How to enable TOC?
To enable it, all you need to do when creating a new post at the very top is to insert the code:
```toml
toc = true
tocBorder = true
```
You can of course find this post (../themes/nostyleplease/content/posts/test-toc-and-details.md) and open in editor to see how it's working.
## Details
### What it is?
It's HTML standard sadly not supported native by markdown. But this theme support it anyway. So... sometimes you want to hide something.
{{< details summary="Click me" >}}
A lot of text or something else.
{{< /details >}}
### How to use "Details"?
Well you need to inspect this post and see by yourself. It's very easy. Take look at ../themes/nostyleplease/content/posts/test-toc-and-details.md.
## Styles
Okey. So if you want to change color-theme you can:
- go to ../themes/nostyleplease/config.toml and find:
```toml
appearance = "auto"
```
you can change it to 2 predefined styles: **light** and **dark**. It can be also set to **auto** and the color scheme will match the user's system style.
- you can add new style or modify **auto** option, just edit CSS in ../themes/nostyleplease/assets/main.scss :-). It's easy, if you are able to operate Hugo - you can do it.

52
data/menu.toml Normal file
View File

@@ -0,0 +1,52 @@
[[entries]]
title = "Open Source Makeover"
[[entries.entries]]
title = "A collection of great open source SaaS applications. Most happen to be available from Federated Computer."
[[entries.entries]]
title = "Federated Computer Cloud"
url = "https://federated.computer"
[[entries.entries]]
title = "Federated Computer Enterprise"
url = "https://enterprise.federated.computer"
[[entries]]
title = "Here's what we like..."
[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 = "Get your RSS"
url = "index.xml"
[[entries]]
title = "Here's a listing of all the SaaS we've talked about so far..."
[[entries.entries]]
title = "Office Productivity"
[[entries.entries.entries]]
title = "Nextcloud"
url = "https://nextcloud.com"
[[entries]]
title = "PRO TIP"
entries = [
{ title = "Open source changes your life! There's an open source option for everything!" }
]

BIN
images/screenshot-both.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

BIN
images/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 KiB

BIN
images/screenshot_dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

BIN
images/tn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 KiB

8
layouts/404.html Normal file
View File

@@ -0,0 +1,8 @@
{{ define "main" }}
{{- partial "back_link.html" . -}}
<header>
<h1>404 Not Found</h1>
</header>
{{ end }}

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body a="{{ $.Site.Params.theme_config.appearance | default "auto" }}">
<main class="page-content" aria-label="Content">
<div class="w">
{{- block "main" . }}{{- end }}
{{ partial "footer.html" }}
</div>
</main>
</body>
</html>

View File

@@ -0,0 +1,8 @@
{{ define "main" }}
{{ partial "back_link.html" .}}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "post_list.html" (dict "context" . "section" .Section)}}
{{ end }}

View File

@@ -0,0 +1,21 @@
{{ define "main" }}
{{ partial "back_link.html" .}}
<article>
<p class="post-meta">
<time datetime="{{ .Date }}">
{{ .Date | time.Format site.Params.theme_config.date_format }}
</time>
</p>
<h1>{{ .Title }}</h1>
{{ if .Params.toc }}
<aside {{ if .Params.tocBorder }} class="toc" {{ end }}>
{{ .TableOfContents }}
</aside>
{{ end }}
{{ .Content }}
</article>
{{ end }}

View File

@@ -0,0 +1,8 @@
{{ define "main" }}
{{ partial "back_link.html" .}}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "post_list.html" (dict "context" .)}}
{{ end }}

View File

@@ -0,0 +1,8 @@
{{ define "main" }}
{{ partial "back_link.html" .}}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "post_list.html" (dict "context" .)}}
{{ end }}

1
layouts/footer.md Normal file
View File

@@ -0,0 +1 @@
Open Source Makeover is a work of Federated Computer.

12
layouts/index.html Normal file
View File

@@ -0,0 +1,12 @@
{{ define "main" }}
<header>
<h1>{{ $.Site.Title }}</h1>
{{- if $.Site.Params.theme_config.show_description -}}
<p>{{ $.Site.Params.description }}</p>
{{- end -}}
</header>
{{ .Content }}
{{ partial "menu_item.html" (dict "context" . "collection" $.Site.Data.menu.entries) }}
{{ end }}

View File

@@ -0,0 +1 @@
<a href="{{ "" | relURL }}">{{ $.Site.Params.theme_config.back_home_text }}</a>

View File

@@ -0,0 +1,11 @@
{{ if site.Params.theme_config.isShowFooter }}
{{ $footerContent := readFile "layouts/footer.md" }}
{{ if and $footerContent (ne $footerContent "") }}
{{ $footerContent | markdownify }}
{{ else }}
{{ warnf "layouts/footer.md file is not found or empty. Falling back to default footer." }}
<footer class="site-footer">
<p>&copy; {{ now.Format "2006" }} {{ site.Title }}</p>
</footer>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,22 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ if .IsPage }} <meta name="description" content="{{ .Summary }}"> {{ end }}
<title>
{{ if not .IsHome }}
{{ .Title }}
{{ else }}
{{ $.Site.Title }}
{{ end }}
</title>
<link rel="shortcut icon" type="image/x-icon" href="{{ $.Site.Params.favicon | relURL }}" />
{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction)) }}
{{ $sass := resources.Get "css/main.scss" }}
{{ $style := $sass | css.Sass $options | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.Permalink | relURL }}" integrity="{{ $style.Data.Integrity }}" />
{{ if .Params.mathjax }} {{ partial "mathjax.html" . }} {{ end }}
</head>

View File

@@ -0,0 +1,21 @@
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [['$$','$$'], ['\\[', '\\]']],
processEscapes: true,
processEnvironments: true
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
};
window.addEventListener('load', (event) => {
document.querySelectorAll("mjx-container").forEach(function(x){
x.parentElement.classList += 'has-jax'})
});
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

View File

@@ -0,0 +1,19 @@
<ul>
{{- range $item := .collection -}}
<li>
{{- with $item.url -}}
<a href="{{ $item.url | relURL }}">{{ safeHTML $item.title }}</a>
{{- else -}}
{{ safeHTML $item.title }}
{{- end -}}
</li>
{{- if $item.entries }}
{{ partial "menu_item.html" (dict "context" . "collection" $item.entries) }}
{{- end -}}
{{- if $item.post_list -}}
{{ partial "post_list.html" (dict "context" . "section" $item.post_list.section "limit" $item.post_list.limit "show_more" $item.post_list.show_more "show_more_text" $item.post_list.show_more_text "show_more_url" $item.post_list.show_more_url) -}}
{{- end -}}
{{- end -}}
</ul>

View File

@@ -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 }}
<ul>
{{- range $post := $posts -}}
<li>
<span>{{- ($post.Date | time.Format site.Params.theme_config.date_format) }}</span>
<a href="{{ $post.Permalink | relURL }}">{{ $post.Title }}</a>
</li>
{{ end }}
{{- if and .show_more $limit_exceeded }}
<li><a href="{{ .show_more_url | relURL }}">{{ .show_more_text | default "Show more..." }}</a></li>
{{ end }}
</ul>
{{ end }}

25
layouts/posts/baseof.html Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body a="{{ $.Site.Params.theme_config.appearance | default "auto" }}">
<main class="page-content" aria-label="Content">
<div class="w">
<div class="post-meta">
{{ partial "back_link.html" .}}
<p>
<time datetime="{{ .Date }}">
{{ .Date | time.Format site.Params.theme_config.date_format }}
</time>
</p>
</div>
{{- block "main" . }}{{- end }}
</div>
</main>
</body>
{{- if .Params.custom_js -}}
{{- range .Params.custom_js -}}
{{ $js := resources.Get (print "js/" . ".js") }}
<script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
{{- end -}}
{{- end -}}
</html>

21
layouts/posts/list.html Normal file
View File

@@ -0,0 +1,21 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
<!-- divide post list by year -->
{{ if .Site.Params.theme_config.isListGroupByDate }}
{{ range .Pages.GroupByDate "2006 Year" }}
<p>{{ .Key }}</p>
<ul>
{{ range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ else }}
{{ partial "post_list.html" (dict "context" . "section" .Section)}}
{{ end }}
{{ end }}

14
layouts/posts/single.html Normal file
View File

@@ -0,0 +1,14 @@
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
{{ if .Params.toc }}
<aside {{ if .Params.tocBorder }} class="toc" {{ end }}>
{{ .TableOfContents }}
</aside>
{{ end }}
{{ .Content }}
</article>
{{ end }}

View File

@@ -0,0 +1,6 @@
<details {{ if eq (.Get "open" | default "false") "true" }}open{{ end }}>
<summary>
{{ .Get "summary" | default "Details:" }}
</summary>
{{ .Inner | markdownify }}
</details>

View File

@@ -0,0 +1,3 @@
<span>
$${{ .Get 0 }}$$
</span>

View File

@@ -0,0 +1,3 @@
<span>
\({{ .Get 0 }}\)
</span>

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

21
theme.toml Normal file
View File

@@ -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"