diff options
| author | uint <abhinav.prsai@gmail.com> | 2025-12-19 19:42:26 +0000 |
|---|---|---|
| committer | uint <abhinav.prsai@gmail.com> | 2025-12-19 19:42:26 +0000 |
| commit | c96f13ace416d477da11179cac3bbb39dd57751d (patch) | |
| tree | eeaefe34329838803e1da907885489e112909fa0 | |
| parent | e6f9c4b1ed1990ccc8f632b569eb81dd933f8d8e (diff) | |
add style, make template paths absolute
| -rw-r--r-- | example/style.css | 96 | ||||
| -rw-r--r-- | example/template.html | 8 |
2 files changed, 100 insertions, 4 deletions
diff --git a/example/style.css b/example/style.css new file mode 100644 index 0000000..82e54e3 --- /dev/null +++ b/example/style.css @@ -0,0 +1,96 @@ +:root { + --bg: #646c7f; + --fg: #fffde0; + --fg-link: #fff18f; +} + +/* global */ +body { + margin: 0; + padding: 0; + background: var(--bg); + color: var(--fg); + font-family: serif; + font-size: 16px; + line-height: 1.2; +} + +/* header */ +header { + padding: 20px; +} + +header h1 { + margin: 0; + font-size: 35px; + font-weight: normal; + font-style: italic; +} + +header a { + color: var(--fg); + text-decoration: none; +} + +/* sidebar */ +#side-bar { + position: absolute; + top: 80px; + left: 0; + width: 200px; + padding-left: 20px; +} + +.side-title { + font-size: 25px; + margin: 20px 0 8px 0; + color: var(--fg); +} + +#side-bar ul { + margin: 0 0 0 20px; + padding: 0px; + list-style: none; +} + +#side-bar li { + margin: 6px 0; +} + +/* links */ +a { + color: var(--fg-link); + text-decoration: none; + padding: 1px 2px; +} + +a:hover { + background: var(--fg); + color: var(--bg); +} + +/* article */ +article { + margin: 80px 0 0 0; + max-width: 800px; +} + +h3 { + margin-top: 30px; + font-size: 25px; + color: var(--fg); + font-weight: normal; +} + +/* footer */ +footer { + padding-top: 80px; + font-style: italic; + font-size: 17px; +} + +/* article + footer alignment */ +article, footer { + margin-left: 240px; + margin-top: 0px; +}
\ No newline at end of file diff --git a/example/template.html b/example/template.html index 81f978b..d28721e 100644 --- a/example/template.html +++ b/example/template.html @@ -4,13 +4,13 @@ <meta charset="UTF-8"> <title>{{TITLE}}</title> - <link rel="stylesheet" href="style.css" type="text/css"> + <link rel="stylesheet" href="/style.css" type="text/css"> </head> <body> <header> - <h1><a href="index.html" class="h_mallocd">: mallocd :</a></h1> + <h1><a href="/index.html">~example-site</a></h1> </header> <nav id="side-bar"> @@ -22,8 +22,8 @@ </article> <footer> - <p>(c) 2025 uint</p> + <p>{{FOOTER}}</p> </footer> </body> -</html> +</html>
\ No newline at end of file |
