Browse Source

Capitalize with CSS

master
Andreas Linz 3 years ago
parent
commit
7cf2d6b48e
Signed by: alinz GPG Key ID: 9BF39809C9DA580C
2 changed files with 6 additions and 2 deletions
  1. +4
    -0
      build/klingt.net/assets/tiny.css
  2. +2
    -2
      build/klingt.net/template.py

+ 4
- 0
build/klingt.net/assets/tiny.css View File

@ -35,6 +35,10 @@ nav ul li {
margin: 0 0 .333em 0;
}
.nav-item {
text-transform: capitalize;
}
.logo {
width: 3em;
margin: 1.5em auto;

+ 2
- 2
build/klingt.net/template.py View File

@ -8,11 +8,11 @@ def read_template():
def title_from_filename(fname: str) -> str:
return os.path.splitext(fname)[0].replace('-', ' ').capitalize()
return os.path.splitext(fname)[0].replace('-', ' ')
def template_pages(pages: dict, template: str, dest_path: str):
nav_item = '<li><a href="{item_href}">{item_text}</a></li>'
nav_item = '<li><a href="{item_href}" class="nav-item">{item_text}</a></li>'
for page, text in pages.items():
title = title_from_filename(page)

Loading…
Cancel
Save