commit 0560eee6db9ee06a51b07fb90638f7c4da8b4277 Author: bearfm <77757734+bearfm@users.noreply.github.com> Date: Sat Jan 6 01:10:35 2024 -0800 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4be6e16 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/* \ No newline at end of file diff --git a/.sass-cache/da6f644acaa962e0b77d4041c86336a41673a642/style.scssc b/.sass-cache/da6f644acaa962e0b77d4041c86336a41673a642/style.scssc new file mode 100644 index 0000000..1ec5ea1 Binary files /dev/null and b/.sass-cache/da6f644acaa962e0b77d4041c86336a41673a642/style.scssc differ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..beb41af --- /dev/null +++ b/Makefile @@ -0,0 +1,65 @@ +SRCDIR = src +DISTDIR = dist +CSSDIR = $(DISTDIR)/css +SCSSDIR = $(SRCDIR)/scss +SCSSINCDIR = $(SCSSDIR)/includes + +SCSSFILES = $(wildcard $(SCSSDIR)/*.scss) +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 + +URI = "https://bear.oops.wtf" + +.PHONY: all +all: html css $(DISTDIR)/robots.txt $(DISTDIR)/sitemap.xml + +# Build + +.PHONY: html +html: $(HTMLFILES) + +#$(DISTDIR)/%.html: $(SRCDIR)/%.md +# pandoc --from markdown --to html --standalone $< -o $@ + +$(DISTDIR)/%.html: $(SRCDIR)/%.md $(TMPL) + pandoc \ + --from markdown_github+smart+yaml_metadata_block+auto_identifiers \ + --to html \ + --template $(TMPL) \ + -o $@ $< + +.PHONY: css +css: $(CSSFILES) + +$(CSSDIR)/%.css: $(SCSSDIR)/%.scss | $(CSSDIR) + sass --load-path=$(SCSSINCDIR) --style=compressed --scss $< $@ + +$(CSSDIR): + mkdir -p $@ + +$(DISTDIR)/robots.txt: + @echo "User-Agent: *" > $@ + @echo "Allow: *" >> $@ + @echo "Sitemap: $(URI)/sitemap.xml" >> $@ + +$(DISTDIR)/sitemap.xml: $(HTMLFILES) + @echo '' > $@ + @for f in $^; do \ + echo "$(URI)$${f#$(DISTDIR)}" >> $@; \ + done + @echo '' >> $@ + + +.PHONY: clean +clean: + rm -v $(HTMLFILES) + rm -rfv $(CSSDIR) + +.PHONY: help + +help: + @egrep -h '\s##\s' $(MAKEFILE_LIST) | \ + awk 'BEGIN {FS = ":.*?## "}; {printf "\033[34m%-15s\033[0m %s\n", $$1, $$2}' \ No newline at end of file diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..c27bf06 --- /dev/null +++ b/src/index.md @@ -0,0 +1,7 @@ +--- +title: bear.oops.wtf +author: BearFM +date: January 6, 2024 +--- + +sup \ No newline at end of file diff --git a/src/scss/style.scss b/src/scss/style.scss new file mode 100644 index 0000000..a23515f --- /dev/null +++ b/src/scss/style.scss @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2024 BearFM + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +@import "https://fonts.googleapis.com/icon?family=Material+Icons"; + +$gruvbox-bg: #282828; +$gruvbox-fg: #ebdbb2; +$gruvbox-dark1: #3c3836; +$gruvbox-dark2: #504945; +$gruvbox-light0: #fbf1c7; +$gruvbox-light1: #ebdbb2; +$gruvbox-light2: #d5c4a1; +$gruvbox-light3: #bdae93; +$gruvbox-red: #cc241d; +$gruvbox-green: #98971a; +$gruvbox-yellow: #d79921; +$gruvbox-blue: #458588; +$gruvbox-purple: #b16286; +$gruvbox-aqua: #689d6a; +$gruvbox-orange: #d65d0e; + +body { + font-family: Arial, sans-serif; + margin: 2em; + line-height: 1.6; + + height: 100vh; + width: auto; + margin: 0; + padding: 0; + + text-align: center; + + background-color: $gruvbox-bg; + color: $gruvbox-fg; +} + +header { + background-color: $gruvbox-dark1; + color: $gruvbox-fg; + a { + color: $gruvbox-fg; + text-decoration: dotted; + font-size: 1.5rem; + i { + vertical-align: middle; + display: inline-block; + } + } +} + +nav { + background-color: $gruvbox-dark2; + color: $gruvbox-light1; +} + +.title { + font-weight: bolder; +} + +.article { + width: auto; +} + +ul, li, ol { + margin: 0; + padding: 0; + list-style: none; +} + +h1, h2, h3, h4, h5, h6 { + color: $gruvbox-light0; +} + +a { + color: $gruvbox-blue; + &:hover { + color: $gruvbox-aqua; + } +} + +button { + background-color: $gruvbox-purple; + color: $gruvbox-light0; + &:hover { + background-color: $gruvbox-blue; + } + } + + +p { + margin-bottom: 1em; +} + +pre { + background-color: $gruvbox-dark2; + padding: 0.5em; + overflow: auto; +} + +code { + font-family: 'Courier New', Courier, monospace; + background-color: $gruvbox-dark2; + color: $gruvbox-orange; + padding: 0.2em; + border-radius: 3px; +} + +table { + border-collapse: collapse; + width: 100%; + margin-bottom: 1em; + border-collapse: collapse; + th, td { + border: 1px solid $gruvbox-dark1; + padding: 8px; + text-align: left; + } +} + +th, td { + border: 1px solid $gruvbox-light0; + padding: 8px; + text-align: left; +} + +th { + background-color: $gruvbox-light1; +} + +blockquote { + border-left: 2px solid $gruvbox-dark2; + margin: 1em 0; + padding-left: 1em; +} + +footer { + background-color: $gruvbox-dark1; + color: $gruvbox-light2; +} \ No newline at end of file diff --git a/src/tmpl.html b/src/tmpl.html new file mode 100644 index 0000000..4fb2e44 --- /dev/null +++ b/src/tmpl.html @@ -0,0 +1,21 @@ + + + + + + + $title$ + + +
+ +
+

BEAR.OOPS.WTF

+
+ $body$ +
+ +