forked from kageru/mdb
generate a pure html table instead because it gives more fine-tuning options
This commit is contained in:
parent
a172ac644f
commit
afe2299557
|
@ -15,7 +15,18 @@ output_rss() {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_header() {
|
add_header() {
|
||||||
output '<h1>posts</h1><table id="linklist">'
|
output '<table>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 70%" />
|
||||||
|
<col style="width: 30%" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr class="header">
|
||||||
|
<th style="text-align: left">title</th>
|
||||||
|
<th style="text-align: right">date</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>'
|
||||||
output_entrylist "title| date
|
output_entrylist "title| date
|
||||||
----|----:"
|
----|----:"
|
||||||
output_rss '<?xml version="1.0" encoding="UTF-8" ?>
|
output_rss '<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
@ -29,7 +40,8 @@ add_header() {
|
||||||
|
|
||||||
add_footer() {
|
add_footer() {
|
||||||
html_entry "https://asagi.moe" "before July 2020" "Old site"
|
html_entry "https://asagi.moe" "before July 2020" "Old site"
|
||||||
output '</table>'
|
output '</tbody>
|
||||||
|
</table>'
|
||||||
output_rss '</feed>'
|
output_rss '</feed>'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +50,8 @@ html_entry() {
|
||||||
webpath="$1"
|
webpath="$1"
|
||||||
time="$2"
|
time="$2"
|
||||||
title="$3"
|
title="$3"
|
||||||
output "<td class=\"first\"><a href=\"$path\">$title</a></td>"
|
output "<td><a href=\"$webpath\">$title</a></td>"
|
||||||
output "<td class=\"second\">$time</td></tr>"
|
output "<td style=\"text-align: right\">$time</td></tr>"
|
||||||
output_entrylist "[$title]($webpath)|$time"
|
output_entrylist "[$title]($webpath)|$time"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,4 +112,4 @@ add_header
|
||||||
ls -lr src/posts/*.md | tail -n+1 | while read f; do create_entry $f; done
|
ls -lr src/posts/*.md | tail -n+1 | while read f; do create_entry $f; done
|
||||||
ls -l src/*.md | tail -n+1 | while read f; do convert_static $f; done
|
ls -l src/*.md | tail -n+1 | while read f; do convert_static $f; done
|
||||||
add_footer
|
add_footer
|
||||||
pandoc -s --css=/css/sakura-vader.css src/index/index_header.md dist/entry_list.md src/index/after-entry-list.md src/footer/footer.md -o dist/index.html
|
pandoc -s --css=/css/sakura-vader.css src/index/index_header.md dist/index-alt.html src/index/after-entry-list.md src/footer/footer.md -o dist/index.html
|
||||||
|
|
Loading…
Reference in New Issue
Block a user