This is supposed to be the location of a Gitea, the webserver + is likely misconfigured…
+Until next time…
+diff --git a/Makefile b/Makefile index 3c4672d..c6af19f 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ STATICDIR = static CSSDIR = $(DISTDIR)/css SCSSDIR = $(SRCDIR)/scss SCSSINCDIR = $(SCSSDIR)/includes +JSDIR = js SCSSFILES = $(wildcard $(SCSSDIR)/*.scss) CSSFILES = $(patsubst $(SCSSDIR)/%.scss, $(CSSDIR)/%.css, $(SCSSFILES)) @@ -11,12 +12,17 @@ CSSFILES = $(patsubst $(SCSSDIR)/%.scss, $(CSSDIR)/%.css, $(SCSSFILES)) MDFILES = $(shell find $(SRCDIR) -type f -name '*.md') HTMLFILES = $(patsubst $(SRCDIR)/%.md, $(DISTDIR)/%.html, $(MDFILES)) TMPL = $(SRCDIR)/tmpl.html + STATICFILES = $(shell find $(STATICDIR) -type f -name '*') +STATICOUT = $(patsubst $(STATICDIR)/%, $(DISTDIR)/%, $(STATICFILES)) + +JSFILES = $(shell find $(JSDIR) -type f -name '*.js') +MINIFIEDFILES := $(patsubst $(JSDIR)/%.js, $(DISTDIR)/%.min.js, $(JSFILES)) URI = "https://bear.oops.wtf" .PHONY: all -all: html css $(DISTDIR)/robots.txt $(DISTDIR)/sitemap.xml $(DISTDIR)/blogindex.txt static +all: html css $(DISTDIR)/robots.txt $(DISTDIR)/sitemap.xml $(DISTDIR)/blogindex.txt static js # Build @@ -27,12 +33,19 @@ html: $(HTMLFILES) # pandoc --from markdown --to html --standalone $< -o $@ $(DISTDIR)/%.html: $(SRCDIR)/%.md $(TMPL) + @mkdir -pv $(dir $@) pandoc \ --from markdown_github+smart+yaml_metadata_block+auto_identifiers \ --to html \ --template $(TMPL) \ -o $@ $< +.PHONY: js +js: $(MINIFIEDFILES) + +$(DISTDIR)/%.min.js: $(JSDIR)/%.js + uglifyjs $< -m -c --mangle-props -o $@ + .PHONY: css css: $(CSSFILES) @@ -64,8 +77,7 @@ $(DISTDIR)/blogindex.txt: $(HTMLFILES) done .PHONY: clean clean: - rm -v $(HTMLFILES) - rm -rfv $(CSSDIR) + rm -rfv $(DISTDIR)/* .PHONY: help help: @@ -73,5 +85,8 @@ help: awk 'BEGIN {FS = ":.*?## "}; {printf "\033[34m%-15s\033[0m %s\n", $$1, $$2}' .PHONY: static -static: $(STATICFILES) - @cp -r $(STATICFILES) $(DISTDIR) \ No newline at end of file +static: $(STATICOUT) + +$(STATICOUT): $(STATICFILES) + @mkdir -p $(dir $@) + @cp -v $< $@ \ No newline at end of file diff --git a/README.txt b/README.txt index 7e77eca..6931ae8 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,9 @@ bear.oops.wtf -Redesign of https://bear.oops.wtf \ No newline at end of file +Redesign of https://bear.oops.wtf + +Requirements: + pandoc + make + uglify-js + \ No newline at end of file diff --git a/dist/android-chrome-192x192.png b/dist/android-chrome-192x192.png old mode 100755 new mode 100644 index 48b32ba..3bacb72 Binary files a/dist/android-chrome-192x192.png and b/dist/android-chrome-192x192.png differ diff --git a/dist/android-chrome-512x512.png b/dist/android-chrome-512x512.png old mode 100755 new mode 100644 index a36af9f..3bacb72 Binary files a/dist/android-chrome-512x512.png and b/dist/android-chrome-512x512.png differ diff --git a/dist/apple-touch-icon.png b/dist/apple-touch-icon.png old mode 100755 new mode 100644 index 08cc23a..3bacb72 Binary files a/dist/apple-touch-icon.png and b/dist/apple-touch-icon.png differ diff --git a/dist/blog/index.html b/dist/blog/index.html index e86b77e..adb262e 100644 --- a/dist/blog/index.html +++ b/dist/blog/index.html @@ -27,7 +27,7 @@
This is supposed to be the location of a Gitea, the webserver + is likely misconfigured…
+Until next time…
+diff --git a/dist/blogIndex.min.js b/dist/blogIndex.min.js new file mode 100644 index 0000000..4cd0105 --- /dev/null +++ b/dist/blogIndex.min.js @@ -0,0 +1 @@ +function blogIndex(){document.getElementById("blogIndex").innerHTML=null,fetch("/blogindex.txt").then(n=>n.text()).then(n=>{n=n.split("\n");const t=document.createElement("ul");n.forEach(n=>{var o,e,l=n.split("/").pop().replace(".html","");"index"!==l.toLowerCase()&&(o=document.createElement("li"),(e=document.createElement("a")).href=n.substring(n.indexOf("/blog/")),e.textContent=l,o.appendChild(e),t.appendChild(o))}),document.getElementById("blogIndex").appendChild(t)}).catch(n=>{console.error("Error fetching blog index:",n)})} \ No newline at end of file diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png old mode 100755 new mode 100644 index 4f17ef9..3bacb72 Binary files a/dist/favicon-16x16.png and b/dist/favicon-16x16.png differ diff --git a/dist/favicon-32x32.png b/dist/favicon-32x32.png old mode 100755 new mode 100644 index 786433c..3bacb72 Binary files a/dist/favicon-32x32.png and b/dist/favicon-32x32.png differ diff --git a/dist/favicon.ico b/dist/favicon.ico old mode 100755 new mode 100644 index 93c107b..3bacb72 Binary files a/dist/favicon.ico and b/dist/favicon.ico differ diff --git a/dist/git/index.html b/dist/git/index.html new file mode 100644 index 0000000..4337b6a --- /dev/null +++ b/dist/git/index.html @@ -0,0 +1,31 @@ + + +
+ + + +
+ + + + + +
+