commit c0daf51e066638fe799f5569573b57f507a82acd
parent 49a8a0713487a2aa9ca70c79486f11abb2689ecc
Author: Neny <me@nindwen.blue>
Date: Thu, 1 Aug 2019 16:25:25 +0300
Add anchors to posts
Diffstat:
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
@@ -8,25 +8,25 @@ klaanon.html: header.html foot.html content.html content1.html content2.html con
cat header.html content6.html foot.html > klaanon6.html
content.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content.html
content1.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id < 250) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content1.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id < 250) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content1.html
content2.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 250 and .id < 500) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content2.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 250 and .id < 500) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content2.html
content3.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 500 and .id < 750) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content3.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 500 and .id < 750) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content3.html
content4.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 750 and .id < 1000) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content4.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 750 and .id < 1000) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content4.html
content5.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 1000 and .id < 1250) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content5.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 1000 and .id < 1250) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content5.html
content6.html: klaanon.json
- jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 1250 and .id < 1500) | "<h1>\(.creator)</h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content6.html
+ jq -r 'def time: . | strptime("%Y-%m-%dT%H:%M")|mktime|strflocaltime("%d.%m.%Y"); .posts | .[] | select(.id >= 1250 and .id < 1500) | "<h1><a href=#\(.id) id=\(.id)>\(.creator)</a></h1><div class=\"timestamp\">\(.timestamp|time)</div><p>\(.content)</p>"' klaanon_cleaned.json > content6.html
.PHONY: clean
clean:
diff --git a/style.css b/style.css
@@ -8,12 +8,14 @@
}
body {
- overflow: hidden;
+ overflow-x: hidden;
}
.timestamp {
color: grey;
text-align: center;
+ margin-top: -20px;
+ margin-bottom: 20px;
}
p, .content {
@@ -28,4 +30,10 @@ h1, h2 {
font-family: "Trajan Pro", "Optimus Princeps"; text-align: center;
padding-right: 0 !important;
text-shadow: 5px 5px 20px #000000;
+ margin-top: 60px;
+}
+
+h1 a, h2 a {
+ text-decoration: none;
+ color: black;
}