Compare commits

..

No commits in common. "9e58be3a01467d58e83ba9cf78b3726adb2ee73b" and "485022a1a64ca8a29d26641107b0a41b4dee0644" have entirely different histories.

5 changed files with 45 additions and 27 deletions

View File

@ -343,9 +343,9 @@ def main(args):
for entry in indexentries: for entry in indexentries:
html += ( html += (
'<li class="article">' '<li class="article">'
f'<a href="{entry["path"]}"><p>' f'<a href="{entry["path"]}">'
f'{entry["title"]}{"/" if entry["isdirectory"] else ""}' f'{entry["title"]}{"/" if entry["isdirectory"] else ""}'
'</p></a>' '</a>'
'</li>' '</li>'
) )
html += INDEX_TEMPLATE_FOOT html += INDEX_TEMPLATE_FOOT

View File

@ -37,7 +37,6 @@ doing it for me:
- `tags` --- A YAML list of tags which the article relates to - this is used for browsing and also - `tags` --- A YAML list of tags which the article relates to - this is used for browsing and also
searching searching
- `title` --- The title of the article - `title` --- The title of the article
- `uuid` --- A unique identifier used for permalinks. More below.
- notes2web indexes [ATX-style headings](https://pandoc.org/MANUAL.html#atx-style-headings) for - notes2web indexes [ATX-style headings](https://pandoc.org/MANUAL.html#atx-style-headings) for
searching searching
@ -47,18 +46,6 @@ doing it for me:
This is optional but if you would like to add a license you can find one This is optional but if you would like to add a license you can find one
[here](https://choosealicense.com). [here](https://choosealicense.com).
### Permalinks
Permalinks are currently rather basic and requires JavaScript to be enabled on the local computer.
In order to identify documents between file changes, a unique identifier is used to identify a file.
This unique identifier can be generated using the `uuidgen` command in the `uuid-runtime` package or
`str(uuid.uuid())` in the `uuid` python package.
The included `n2w_add_uuid.py` will add a UUID to a markdown file which does not have a UUID in it
already.
Combine it with `find` to UUIDify all your markdown files (but make a backup first).
## CLI Usage ## CLI Usage
``` ```

View File

@ -1,6 +1,4 @@
@import url("https://styles.alv.cx/base.css"); @import url("https://alv.cx/styles.css");
@import url("https://styles.alv.cx/modules/search.css");
@import url("https://styles.alv.cx/modules/buttonlist.css");
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
@ -20,6 +18,29 @@ body {
margin: 1em; margin: 1em;
} }
#searchWrapper > input {
padding: 1em;
margin: 1em 0.5em 1em 0.5em;
font-size: 1em;
min-width: 0;
}
#searchWrapper {
display: flex
}
#search { flex-grow: 9; }
#sidebar #search {
flex-grow: 0;
padding: 1em;
margin: 0 1em 1em 1em;
}
#results {
overflow-x: scroll;
}
.smallText { .smallText {
font-size: 0.7em; font-size: 0.7em;
} }
@ -55,6 +76,16 @@ body {
padding-right: 1em; padding-right: 1em;
} }
#toc {
overflow-y: scroll;
overflow-x: visible;
max-width: 100%;
}
li {
margin: 0;
}
#content { #content {
margin: 0 auto; margin: 0 auto;
width: 60em; width: 60em;
@ -63,12 +94,6 @@ body {
#commitlog, #license { padding: 0; } #commitlog, #license { padding: 0; }
#toc {
overflow-y: scroll;
overflow-x: visible;
max-width: 100%;
}
#sidebar, #sidebar,
#toc li > a { #toc li > a {
color: #656565; color: #656565;
@ -78,7 +103,6 @@ body {
#toc ul, ul#articlelist { margin-left: 0.75em ; padding-left: 0.75em; } #toc ul, ul#articlelist { margin-left: 0.75em ; padding-left: 0.75em; }
#toc ul, ul#articlelist { border-left: 1px solid #b3b3b3;} #toc ul, ul#articlelist { border-left: 1px solid #b3b3b3;}
#toc > ul { padding; none; padding: 0; margin: 0; border: none;max-width: 100%;} #toc > ul { padding; none; padding: 0; margin: 0; border: none;max-width: 100%;}
li { padding: 0 !important; }
#toc li > a, #toc li > a,
ul#articlelist > a{ ul#articlelist > a{

View File

@ -10,5 +10,5 @@
<div id="content"> <div id="content">
<h1>$title$</h1> <h1>$title$</h1>
$extra_content$ $extra_content$
<ul class="buttonlist"> <ul id="articlelist">
<li class="article"><a href=".."><p>../</p></a></li> <li class="article"><a href="..">../</a></li>

7
templates/listitem.html Normal file
View File

@ -0,0 +1,7 @@
<li>
<a href="$filepath$"> $if(title)$
$title$
$else$
no title ($filepath$)
$endif$</a>
</li>