- Rust 87.3%
- HTML 10.1%
- CSS 2.6%
| example-site | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENCE.txt | ||
| README.md | ||
| USAGE.txt | ||
Static SPA
This is a small program that creates simple reactive HTML pages, implemented with HTML and CSS only. "Reactive" in this context refers to the pages having links that lead to new content without needing to load new pages, but also no JavaScript to modify the DOM. It's all CSS!
Important note
This program is a statement about how you can make pages interactive with CSS, not an actual program I'd recommend anyone to use. Actually, I'd recommend against it, since this makes pages look very weird when viewed without the CSS (for example, with lynx). Near unusable, even. Not as unusable as something made with React, but still quite unusable.
Usage
Check out USAGE for the command-line interface. Here's some things to keep in mind when using this software and writing content to be processed with it:
- You can author files with the file extensions .html and .md. Two files with the same name but different extensions (eg.
index.htmlandindex.md) will cause one or the other to be overwritten, so you don't do that. - Don't include spaces or dots in filenames (except for the dot before the extension).
- In both Markdown and HTML, links pointing to other files should be formatted thusly:
[link text](link-url)where the link would point to eitherlink-url.htmlorlink-url.md. Do not include the file extension. - The intra-site links (so, ones formatted like in the point above) are not a-elements, but labels with the "link" class. So take that into account when writing your CSS.
- Insert custom css by including a
style.cssin your site directory!
Test the program out by running the following command:
cargo run -- "Website Title" example-site example.html -e
License
This software is distributed under the terms of the WTFPL, as per the seriousness of the project itself.