From 0141d1190b00306dd92a436e84edc475859e2148 Mon Sep 17 00:00:00 2001 From: haskal Date: Mon, 15 Jun 2020 02:26:42 -0400 Subject: [PATCH] finish basic css, tweak html output --- Makefile | 26 +++++++++++++++++++++----- blahaj.css | 26 ++++++++++++++++++++++++++ payload/spacedb/README.md | 2 +- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0f0e87c..cf65a41 100644 --- a/Makefile +++ b/Makefile @@ -36,29 +36,45 @@ $(WRITEUP_PDF): $(DOCS_ALL) fonts.tex misc.tex top.md -i writeup.md --pdf-engine=lualatex -o writeup.pdf @cp $(PDF_DIR)/writeup.pdf $@ -$(HTML_INDEX): $(HTML_DIR)/index.md $(HTML_DIR)/jork.png $(HTML_DIR)/blahaj.css +$(HTML_INDEX): $(HTML_DIR)/index.md $(HTML_DIR)/jork.png $(HTML_DIR)/blahaj.css \ + $(HTML_DIR)/favicon.ico $(HTML_DIR)/writeup.pdf @echo "HTML $@" @cp -r mathjax/ $(HTML_DIR)/mathjax/ @pandoc -i $< -o $@ -t html5 -s --template $(HTML_TEMPLATE) --metadata lang=en \ --metadata title="BLAHAJ Hack-a-Sat 2020 Writeups" \ --metadata css="blahaj.css" +$(HTML_DIR)/favicon.ico: jork.png + @echo "ICO $@" + @convert $< -resize 128x128 $@ + +$(HTML_DIR)/writeup.pdf: $(WRITEUP_PDF) + @cp $< $@ + $(HTML_DIR)/index.md: $(HTML_CONTENT_ALL) $(HTML_DOCS) @echo "GEN $@" @(printf "![A picture of a jork (jean shork)](jork.png)\n\n"; \ printf "# BLAHAJ Hack-a-Sat 2020 Writeups\n\n"; \ + printf "[Writeup in PDF format](writeup.pdf)\n\n"; \ for file in $(DOCS_ALL); do \ - printf -- "- [%s](%s/index.html)\n" "$$(grep '^# ' $$file|head -n1)" "$$(dirname $$file)"; \ + printf -- "- [%s](%s/)\n" "$$(grep '^# ' $$file|head -n1 | sed 's/^# //')" "$$(dirname $$file)"; \ done) > $@ $(HTML_CONTENT_ALL): $(HTML_DIR)/%: % @mkdir -p $(dir $@) || true @cp $< $@ -$(HTML_DOCS): %index.html: %README.md +$(HTML_DOCS): %index.html: %README.md $(HTML_CONTENT_ALL) @echo "HTML $@" + @cd $(dir $@) && $(RM) tmp.md index.html + @cd $(dir $@) && (cat README.md; \ + printf "\n\n\n### Files\n"; \ + for file in *; do \ + [ "$$file" != "tmp.md" ] && printf -- "- [%s](%s)\n" "$$file" "$$file" || true; \ + done) >> tmp.md @cd $(dir $@) && \ pandoc --filter pandoc-include-code --toc -f markdown \ - -i README.md -t html5 -o index.html --mathjax="../../mathjax/tex-mml-chtml.js" \ - -s --metadata title="$$(grep '^# ' README.md|head -n1)" --template $(HTML_TEMPLATE) \ + -i tmp.md -t html5 -o index.html --mathjax="../../mathjax/tex-mml-chtml.js" \ + -s --metadata title="$$(grep '^# ' README.md|head -n1|sed 's/^# //')" --template $(HTML_TEMPLATE) \ --metadata lang=en --metadata css="../../blahaj.css" + @cd $(dir $@) && $(RM) tmp.md diff --git a/blahaj.css b/blahaj.css index 88e1010..e6c60f5 100644 --- a/blahaj.css +++ b/blahaj.css @@ -3,12 +3,38 @@ html, body { padding: 0; } +body { + background: #223; + color: #dcc; + display: flex; + flex-direction: row; +} + +@media only screen and (max-width: 1024px) { + body { flex-direction: column; } +} + main { max-width: 1000px; margin-left: auto; margin-right: auto; + background: #334; + padding: 1rem; } img { max-width: 100%; } + +a { + color: #fff; + text-decoration: underline; +} + +pre { + color: #000; + background: #fff; + padding: 0.5rem; + border-radius: 0.5rem; + filter: invert(); /** lazy hack **/ +} diff --git a/payload/spacedb/README.md b/payload/spacedb/README.md index 0a35f61..7043be3 100644 --- a/payload/spacedb/README.md +++ b/payload/spacedb/README.md @@ -9,7 +9,7 @@ > Note: When you're done planning, go to low power mode to wait for the next transmission window ## Write-up -by Cameron and haskal +by Cameron and [haskal](https://awoo.systems/) Upon connecting to the provided TCP service via netcat, we see that it spawns a telemetry service accessible via HTTP based off the following console output: ```