From 9e216d36647dd5ec82eb913745385e44705eb653 Mon Sep 17 00:00:00 2001 From: Miguel Alejandro Salgado Zapien Date: Fri, 1 Jul 2022 13:27:36 -0700 Subject: [PATCH] stash --- .entries.csv | 4 + Makefile | 131 +++++++++++++++++++++++++------- filters/blog_feed.py | 9 ++- filters/diary.py | 40 ++++++++++ metadata.yaml | 6 +- scripts/diary.py | 90 ++++++++++++++++++++++ src/css/inter.css | 162 ++++++++++++++++++++++++++++++++++++++++ src/css/new.css | 8 ++ src/css/styles.css | 18 +++++ src/diary/2021-01-02.md | 0 src/diary/2022-01-01.md | 0 src/diary/2022-02-01.md | 0 src/diary/2022-02-03.md | 0 src/diary/2022-02-28.md | 0 src/diary/2022-03-01.md | 0 src/diary/2022-03-08.md | 0 src/diary/2022-03-10.md | 0 src/diary/2022-04-04.md | 0 src/diary/2022-04-14.md | 0 src/diary/2022-04-29.md | 0 src/diary/2022-05-04.md | 0 src/diary/2022-05-09.md | 0 src/diary/2022-05-21.md | 0 src/diary/2022-06-01.md | 0 src/diary/2022-06-11.md | 0 src/diary/2022-06-20.md | 0 src/diary/2022-11-02.md | 0 templates/default.html | 2 +- 28 files changed, 439 insertions(+), 31 deletions(-) create mode 100644 .entries.csv create mode 100755 filters/diary.py create mode 100755 scripts/diary.py create mode 100644 src/css/inter.css create mode 100644 src/css/new.css create mode 100644 src/css/styles.css create mode 100644 src/diary/2021-01-02.md create mode 100644 src/diary/2022-01-01.md create mode 100644 src/diary/2022-02-01.md create mode 100644 src/diary/2022-02-03.md create mode 100644 src/diary/2022-02-28.md create mode 100644 src/diary/2022-03-01.md create mode 100644 src/diary/2022-03-08.md create mode 100644 src/diary/2022-03-10.md create mode 100644 src/diary/2022-04-04.md create mode 100644 src/diary/2022-04-14.md create mode 100644 src/diary/2022-04-29.md create mode 100644 src/diary/2022-05-04.md create mode 100644 src/diary/2022-05-09.md create mode 100644 src/diary/2022-05-21.md create mode 100644 src/diary/2022-06-01.md create mode 100644 src/diary/2022-06-11.md create mode 100644 src/diary/2022-06-20.md create mode 100644 src/diary/2022-11-02.md diff --git a/.entries.csv b/.entries.csv new file mode 100644 index 0000000..6ddd5d6 --- /dev/null +++ b/.entries.csv @@ -0,0 +1,4 @@ +2022-06-22T16:06:56-07:00,2022-06-22T16:06:56-07:00,Example Entry,,http://localhost:8000/blog/example-entry/index.html +2022-06-22T16:05:33-07:00,2022-06-22T16:05:33-07:00,Entry,,http://localhost:8000/blog/entry-01/index.html +2022-06-22T16:06:56-07:00,2022-06-22T16:06:56-07:00,Example Entry,,http://localhost:8000/blog/example-entry/index.html +2022-06-22T16:05:33-07:00,2022-06-22T16:05:33-07:00,Entry,,http://localhost:8000/blog/entry-01/index.html diff --git a/Makefile b/Makefile index 259537e..2310301 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,43 @@ -.PHONY: serve clean info +# Static site builder +# +# It allows for the creation a diary and a blog. +# It follows pretty "unixy" way to articulate the build. +# It uses Pandoc, Python3 and POSIX Commands +# SRC_DIR := src +DIARY_DIR := src/diary +BLOG_DIR := src/blog BUILD_DIR := build -ENTRIES_LIST := .entries.csv + +# Commands Configuration +BLOG_ENTRIES_LIST := .entries.csv SORT := sort -r +# Utility Function +ESCAPE_PATH = $(shell echo $(1) | sed 's/\//\\\//g') + # Pandoc basic configuration PANDOC := pandoc -s PANDOC_FILTERS := PANDOC_METADATA = \ - --template=templates/default.html \ - --metadata-file metadata.yaml \ - --metadata=path="$(shell echo $@ | sed -e 's/build//g' )" \ - --metadata=git_initial_date="$(shell git log --reverse -n 1 --pretty=format:%aI -- $< || echo 'draft')" \ - --metadata=git_date="$(shell git log -n 1 --pretty=format:%aI -- $< || echo 'draft')" \ + --section-divs \ + --template=templates/default.html \ + --metadata-file metadata.yaml \ + --metadata=blog_entries_list:"$(BLOG_ENTRIES_LIST)" \ + --metadata=path="$(shell echo $@ | sed -e 's/build//g' )" \ + --metadata=git_initial_date="$(shell git log --reverse -n 1 --pretty=format:%aI -- $< || echo 'draft')" \ + --metadata=git_date="$(shell git log -n 1 --pretty=format:%aI -- $< || echo 'draft')" PANDOC_COMMAND = $(PANDOC) $(PANDOC_FILTERS) $(PANDOC_METADATA) # Blog Configuration COMMENT_SECTION := templates/comment-section.html PANDOC_BLOG_FILTER := filters/blog_feed.py +PANDOC_DIARY_FILTER := filters/diary.py + + # Public Pages configuration # @@ -28,21 +45,63 @@ PANDOC_BLOG_FILTER := filters/blog_feed.py PAGES = \ build/index.html \ build/contact.html -FEEDS = build/blog/index.html build/blog/rss.xml -ENTRIES = $(shell find src/blog -mindepth 2 -type f -name '*.md' | sed -e 's/\.md/.html/;s/src/build/g') -# PAGES = # Define here which pages to publish. -# PAGES = build/index.html + +# Blog Configuration +BLOG_FEEDS = build/blog/index.html build/blog/rss.xml +BLOG_ENTRIES = $(shell \ + find $(BLOG_DIR) -mindepth 2 -type f -name '*.md' \ + | sed -e 's/\.md/.html/' \ + | sed -e 's/$(call ESCAPE_PATH,$(BLOG_DIR))/$(call ESCAPE_PATH,$(BUILD_DIR))\/blog/g' \ + | $(SORT) \ +) +BLOG_BUILD := $(BUILD_DIR)/blog +ENTRIES_TO_RSS := ./scripts/entries2rss.py + +# Diary Configuration +DIARY_ENTRIES = $(shell \ + find $(DIARY_DIR) -type f -name '*.md' \ + | sed -e 's/\.md/.html/' \ + | sed -e 's/$(call ESCAPE_PATH,$(DIARY_DIR))/$(call ESCAPE_PATH,$(BUILD_DIR))\/diary/g' \ + | $(SORT) \ +) +DIARY_BUILD := $(BUILD_DIR)/diary +DIARY_COMMAND := ./scripts/diary.py $(DIARY_DIR) $(DIARY_BUILD) +DIARY_INDEX := $(DIARY_BUILD)/index.html $(shell $(DIARY_COMMAND) index-files) + +# Build Rules + +# PHONY Rules +.PHONY: serve clean info css info: - @echo $(ENTRIES) + @echo "Blog Entries" + @echo $(BLOG_ENTRIES) | sed -e 's/^/\t/g;s/\ /\n\t/g' + @echo "Diary Entries" + @echo $(DIARY_ENTRIES) | sed -e 's/^/\t/g;s/\ /\n\t/g' -all: $(PAGES) $(FEEDS) +all: $(PAGES) $(BLOG_FEEDS) $(DIARY_INDEX) css -$(ENTRIES_LIST): $(ENTRIES) +css: + mkdir -p $(BUILD_DIR)/css + cp -f $(SRC_DIR)/css/* $(BUILD_DIR)/css/ +serve: + python3 -m http.server --directory $(BUILD_DIR) -$(BUILD_DIR)/blog/%.html: $(SRC_DIR)/blog/%.md $(COMMENT_SECTION) +clean: + rm -rf $(BUILD_DIR) $(BLOG_ENTRIES_LIST) + +_diary_command: + @echo "$(DIARY_COMMAND)" + +# File Rules + +# Blog related rules + +$(BLOG_ENTRIES_LIST): $(BLOG_ENTRIES) + +$(BUILD_DIR)/blog/%.html: $(BLOG_DIR)/%.md $(COMMENT_SECTION) mkdir -p $(shell dirname $@) [[ -d "$(shell dirname $<)/assets" ]] \ && cp -r $(shell dirname $<)/assets/. $(shell dirname $@)/assets \ @@ -52,19 +111,41 @@ $(BUILD_DIR)/blog/%.html: $(SRC_DIR)/blog/%.md $(COMMENT_SECTION) --include-after-body=$(COMMENT_SECTION) \ -i $< -o $@ -$(BUILD_DIR)/blog/index.html: $(SRC_DIR)/blog/index.md $(ENTRIES_LIST) - cat $(ENTRIES_LIST) | $(SORT) | ./scripts/entries2rss.py html | \ - $(PANDOC_COMMAND) -i $< -i - -o $@ +$(BLOG_BUILD)/index.html: $(BLOG_DIR)/index.md $(BLOG_ENTRIES_LIST) + cat $(BLOG_ENTRIES_LIST) \ + | $(SORT) \ + | $(ENTRIES_TO_RSS) html \ + | $(PANDOC_COMMAND) -i $< -i - -o $@ -$(BUILD_DIR)/blog/rss.xml: $(ENTRIES_LIST) - cat $(ENTRIES_LIST) | $(SORT) | ./scripts/entries2rss.py > $@ +$(BLOG_BUILD)/rss.xml: $(BLOG_ENTRIES_LIST) + cat $(BLOG_ENTRIES_LIST) \ + | $(SORT) \ + | ./scripts/entries2rss.py \ + > $@ + +# Diary Related rules. + +$(DIARY_BUILD)/%.html: $(DIARY_DIR)/%.md + mkdir -p $(shell dirname $@) + $(PANDOC_COMMAND) \ + --filter $(PANDOC_DIARY_FILTER) \ + --metadata=diary_dir:$(DIARY_DIR) \ + -i $< -o $@ + +$(DIARY_BUILD)/%.html: $(DIARY_DIR)/%-*.md + mkdir -p $(shell dirname $@) + $(PANDOC_COMMAND) \ + --metadata=diary_dir:$(DIARY_DIR) \ + -i $< -o $@ + +$(DIARY_BUILD)/index.html: $(DIARY_ENTRIES) + mkdir -p $(shell dirname $@) + $(DIARY_COMMAND) index-full \ + | $(PANDOC_COMMAND) -i - -o $@ + +# Regular page related rules. $(BUILD_DIR)/%.html: $(SRC_DIR)/%.md mkdir -p $(shell dirname $@) $(PANDOC_COMMAND) -i $< -o $@ -serve: - python3 -m http.server --directory $(BUILD_DIR) - -clean: - rm -rf $(BUILD_DIR) $(ENTRIES_LIST) diff --git a/filters/blog_feed.py b/filters/blog_feed.py index cde3a1a..46ef435 100755 --- a/filters/blog_feed.py +++ b/filters/blog_feed.py @@ -5,6 +5,7 @@ import panflute as pf def action(elem, doc): pass + def finalize(doc): keys = [ "git_date", @@ -13,17 +14,17 @@ def finalize(doc): "subject", "path", "base_url", - "feed_list_path", + "blog_entries_list", ] rss_data = {} for k in keys: rss_data[k] = doc.get_metadata(k, "") - feed_list_path = rss_data["feed_list_path"] + blog_entries_list = rss_data["blog_entries_list"] path = rss_data["base_url"] + rss_data["path"] rss_data["path"] = path - del rss_data["feed_list_path"] + del rss_data["blog_entries_list"] del rss_data["base_url"] - with open(feed_list_path, "a") as file: + with open(blog_entries_list, "a") as file: writer = csv.DictWriter(file, fieldnames=keys[:-2]) writer.writerow(rss_data) diff --git a/filters/diary.py b/filters/diary.py new file mode 100755 index 0000000..34b6614 --- /dev/null +++ b/filters/diary.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +import csv +import datetime as dt +import pathlib as p +import panflute as pf + +def prepare(doc): + date_str = p.Path(doc.get_metadata("path", "")).stem + name_date = dt.date(*[ + int(i) + for i in date_str.split("-") + ]) + diary_dir = p.Path(doc.get_metadata("diary_dir", "")) + diary_entries = [ + dt.date.fromisoformat(_p.stem) + for _p in sorted(diary_dir.iterdir(), key=lambda i: i.stem) + ] + index = diary_entries.index(name_date) + + try: + prev = diary_entries[index-1] + except: + prev = None + try: + _next = diary_entries[index+1] + except: + _next = None + +def action(elem, doc): + pass + +def finalize(doc): + pass + +def main(doc=None): + return pf.run_filter(action, prepare=prepare, finalize=finalize, doc=doc) + +if __name__ == "__main__": + main() + diff --git a/metadata.yaml b/metadata.yaml index d3f5400..db8974e 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -7,5 +7,9 @@ global_links: uri: /contact.html - name: Blog uri: /blog -feed_list_path: .entries.csv +css: + - /css/inter.css + - /css/new.css + - /css/styles.css + base_url: http://localhost:8000 diff --git a/scripts/diary.py b/scripts/diary.py new file mode 100755 index 0000000..f6b35a4 --- /dev/null +++ b/scripts/diary.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +from pathlib import Path +from datetime import date +from collections import defaultdict +from sys import argv, exit, stderr +from calendar import Calendar, month_name, day_abbr + +def HTMLCalendarMonthWithEntries(year, month, entries=[], weekday_start=6): + cal = Calendar(weekday_start) + returnable = [ + '', + "", + '\n", + "", + *[ + f"" + for i in range(7) + ], + "\n" + "\n", + "\n", + ] + for week in cal.monthdays2calendar(year, month): + returnable.append("") + for day, weekday in week: + returnable.append( + "" + if day == 0 + else f"" + if (d := date(year, month, day)) not in entries + else f'' + ) + returnable.append("\n") + returnable.extend([ + "\n", + "
', month_name[month], " - ", str(year), "
{day_abbr[(i+weekday_start)%7]}
{day}{day}
", + ]) + return "".join(returnable) + + +def generate_index_full(diary_entries): + entries_by_month = defaultdict(list) + for entry in diary_entries: + entries_by_month[(entry.year, entry.month)].append(entry) + months = sorted(entries_by_month.keys(), key=lambda x: "%02d-%02d" % x, reverse=False) + prev_year = None + for month in months: + year, _month = month + if prev_year != year: + print("\n## ", year, "{.calendar-container}\n") + # print("
") + prev_year = year + print(HTMLCalendarMonthWithEntries(*month, entries_by_month[month])) + + +if __name__ == '__main__': + try: + diary_dir = Path(argv[1]) + if not diary_dir.is_dir(): + raise Exception() + except: + print("Please provide a valid path for diary source.") + exit(1) + try: + build_dir = Path(argv[2]) + if not build_dir.is_dir(): + build_dir.mkdir(parents=True) + except: + print("Please provide a valid path for diary build.") + exit(1) + diary_entries = [ + date.fromisoformat(p.stem) for p in diary_dir.iterdir() + ] + if 'list-months' in argv: + pass + if 'list-weeks' in argv: + pass + if 'index-files' in argv: + targets = set([ + "index.html", + *[f"{d.year}.html" for d in diary_entries], + *["%d-%02d.html" % (d.year, d.month) for d in diary_entries], + ]) + for t in targets: + print(str(build_dir / t)) + if 'index-full' in argv: + generate_index_full(diary_entries) + if 'index-years' in argv: + generate_index_years(diary_entries) + diff --git a/src/css/inter.css b/src/css/inter.css new file mode 100644 index 0000000..b363b06 --- /dev/null +++ b/src/css/inter.css @@ -0,0 +1,162 @@ +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-MediumItalic.woff2') format('woff2'), + url('src/inter/Inter-MediumItalic.woff') format('woff'); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-ExtraBold.woff2') format('woff2'), + url('src/inter/Inter-ExtraBold.woff') format('woff'); + font-weight: 800; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-BlackItalic.woff2') format('woff2'), + url('src/inter/Inter-BlackItalic.woff') format('woff'); + font-weight: 900; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Regular.woff2') format('woff2'), + url('src/inter/Inter-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-LightItalic.woff2') format('woff2'), + url('src/inter/Inter-LightItalic.woff') format('woff'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-SemiBoldItalic.woff2') format('woff2'), + url('src/inter/Inter-SemiBoldItalic.woff') format('woff'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-BoldItalic.woff2') format('woff2'), + url('src/inter/Inter-BoldItalic.woff') format('woff'); + font-weight: bold; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-SemiBold.woff2') format('woff2'), + url('src/inter/Inter-SemiBold.woff') format('woff'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Black.woff2') format('woff2'), + url('src/inter/Inter-Black.woff') format('woff'); + font-weight: 900; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-ExtraLightItalic.woff2') format('woff2'), + url('src/inter/Inter-ExtraLightItalic.woff') format('woff'); + font-weight: 200; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Light.woff2') format('woff2'), + url('src/inter/Inter-Light.woff') format('woff'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Bold.woff2') format('woff2'), + url('src/inter/Inter-Bold.woff') format('woff'); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-ExtraLight.woff2') format('woff2'), + url('src/inter/Inter-ExtraLight.woff') format('woff'); + font-weight: 200; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Medium.woff2') format('woff2'), + url('src/inter/Inter-Medium.woff') format('woff'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-ExtraBoldItalic.woff2') format('woff2'), + url('src/inter/Inter-ExtraBoldItalic.woff') format('woff'); + font-weight: 800; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Thin.woff2') format('woff2'), + url('src/inter/Inter-Thin.woff') format('woff'); + font-weight: 100; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-ThinItalic.woff2') format('woff2'), + url('src/inter/Inter-ThinItalic.woff') format('woff'); + font-weight: 100; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Inter'; + src: url('src/inter/Inter-Italic.woff2') format('woff2'), + url('src/inter/Inter-Italic.woff') format('woff'); + font-weight: normal; + font-style: italic; + font-display: swap; +} + diff --git a/src/css/new.css b/src/css/new.css new file mode 100644 index 0000000..175ae21 --- /dev/null +++ b/src/css/new.css @@ -0,0 +1,8 @@ +/** + * Minified by jsDelivr using clean-css v4.2.1. + * Original file: /npm/@exampledev/new.css@1.1.2/new.css + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +:root{--nc-font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--nc-font-mono:Consolas,monaco,'Ubuntu Mono','Liberation Mono','Courier New',Courier,monospace;--nc-tx-1:#000000;--nc-tx-2:#1A1A1A;--nc-bg-1:#FFFFFF;--nc-bg-2:#F6F8FA;--nc-bg-3:#E5E7EB;--nc-lk-1:#0070F3;--nc-lk-2:#0366D6;--nc-lk-tx:#FFFFFF;--nc-ac-1:#79FFE1;--nc-ac-tx:#0C4047}@media (prefers-color-scheme:dark){:root{--nc-tx-1:#ffffff;--nc-tx-2:#eeeeee;--nc-bg-1:#000000;--nc-bg-2:#111111;--nc-bg-3:#222222;--nc-lk-1:#3291FF;--nc-lk-2:#0070F3;--nc-lk-tx:#FFFFFF;--nc-ac-1:#7928CA;--nc-ac-tx:#FFFFFF}}*{margin:0;padding:0}address,area,article,aside,audio,blockquote,datalist,details,dl,fieldset,figure,form,iframe,img,input,meter,nav,ol,optgroup,option,output,p,pre,progress,ruby,section,table,textarea,ul,video{margin-bottom:1rem}button,html,input,select{font-family:var(--nc-font-sans)}body{margin:0 auto;max-width:750px;padding:2rem;border-radius:6px;overflow-x:hidden;word-break:break-word;overflow-wrap:break-word;background:var(--nc-bg-1);color:var(--nc-tx-2);font-size:1.03rem;line-height:1.5}::selection{background:var(--nc-ac-1);color:var(--nc-ac-tx)}h1,h2,h3,h4,h5,h6{line-height:1;color:var(--nc-tx-1);padding-top:.875rem}h1,h2,h3{color:var(--nc-tx-1);padding-bottom:2px;margin-bottom:8px;border-bottom:1px solid var(--nc-bg-2)}h4,h5,h6{margin-bottom:.3rem}h1{font-size:2.25rem}h2{font-size:1.85rem}h3{font-size:1.55rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:.875rem}a{color:var(--nc-lk-1)}a:hover{color:var(--nc-lk-2)}abbr:hover{cursor:help}blockquote{padding:1.5rem;background:var(--nc-bg-2);border-left:5px solid var(--nc-bg-3)}abbr{cursor:help}blockquote :last-child{padding-bottom:0;margin-bottom:0}header{background:var(--nc-bg-2);border-bottom:1px solid var(--nc-bg-3);padding:2rem 1.5rem;margin:-2rem calc(0px - (50vw - 50%)) 2rem;padding-left:calc(50vw - 50%);padding-right:calc(50vw - 50%)}header h1,header h2,header h3{padding-bottom:0;border-bottom:0}header>:first-child{margin-top:0;padding-top:0}header>:last-child{margin-bottom:0}a button,button,input[type=button],input[type=reset],input[type=submit]{font-size:1rem;display:inline-block;padding:6px 12px;text-align:center;text-decoration:none;white-space:nowrap;background:var(--nc-lk-1);color:var(--nc-lk-tx);border:0;border-radius:4px;box-sizing:border-box;cursor:pointer;color:var(--nc-lk-tx)}a button[disabled],button[disabled],input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default;opacity:.5;cursor:not-allowed}.button:focus,.button:hover,button:focus,button:hover,input[type=button]:focus,input[type=button]:hover,input[type=reset]:focus,input[type=reset]:hover,input[type=submit]:focus,input[type=submit]:hover{background:var(--nc-lk-2)}code,kbd,pre,samp{font-family:var(--nc-font-mono)}code,kbd,pre,samp{background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px;padding:3px 6px;font-size:.9rem}kbd{border-bottom:3px solid var(--nc-bg-3)}pre{padding:1rem 1.4rem;max-width:100%;overflow:auto}pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}code pre{display:inline;background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}details{padding:.6rem 1rem;background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px}summary{cursor:pointer;font-weight:700}details[open]{padding-bottom:.75rem}details[open] summary{margin-bottom:6px}details[open]>:last-child{margin-bottom:0}dt{font-weight:700}dd::before{content:'→ '}hr{border:0;border-bottom:1px solid var(--nc-bg-3);margin:1rem auto}fieldset{margin-top:1rem;padding:2rem;border:1px solid var(--nc-bg-3);border-radius:4px}legend{padding:auto .5rem}table{border-collapse:collapse;width:100%}td,th{border:1px solid var(--nc-bg-3);text-align:left;padding:.5rem}th{background:var(--nc-bg-2)}tr:nth-child(even){background:var(--nc-bg-2)}table caption{font-weight:700;margin-bottom:.5rem}textarea{max-width:100%}ol,ul{padding-left:2rem}li{margin-top:.4rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}mark{padding:3px 6px;background:var(--nc-ac-1);color:var(--nc-ac-tx)}input,select,textarea{padding:6px 12px;margin-bottom:.5rem;background:var(--nc-bg-2);color:var(--nc-tx-2);border:1px solid var(--nc-bg-3);border-radius:4px;box-shadow:none;box-sizing:border-box}img{max-width:100%} +/*# sourceMappingURL=/sm/4a51164882967d28a74fabce02685c18fa45a529b77514edc75d708f04dd08b9.map */ \ No newline at end of file diff --git a/src/css/styles.css b/src/css/styles.css new file mode 100644 index 0000000..d985d39 --- /dev/null +++ b/src/css/styles.css @@ -0,0 +1,18 @@ +body { + max-width: 900px; +} + +section.calendar-container { + display: flex; + flex-wrap: wrap; +} +section.calendar-container > h2 { + min-width: 93%; +} +.calendar-month { + margin: 1em; + width: minmax(300px, 45%); +} +.calendar-month * { + text-align: center; +} diff --git a/src/diary/2021-01-02.md b/src/diary/2021-01-02.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-01-01.md b/src/diary/2022-01-01.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-02-01.md b/src/diary/2022-02-01.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-02-03.md b/src/diary/2022-02-03.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-02-28.md b/src/diary/2022-02-28.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-03-01.md b/src/diary/2022-03-01.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-03-08.md b/src/diary/2022-03-08.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-03-10.md b/src/diary/2022-03-10.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-04-04.md b/src/diary/2022-04-04.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-04-14.md b/src/diary/2022-04-14.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-04-29.md b/src/diary/2022-04-29.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-05-04.md b/src/diary/2022-05-04.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-05-09.md b/src/diary/2022-05-09.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-05-21.md b/src/diary/2022-05-21.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-06-01.md b/src/diary/2022-06-01.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-06-11.md b/src/diary/2022-06-11.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-06-20.md b/src/diary/2022-06-20.md new file mode 100644 index 0000000..e69de29 diff --git a/src/diary/2022-11-02.md b/src/diary/2022-11-02.md new file mode 100644 index 0000000..e69de29 diff --git a/templates/default.html b/templates/default.html index 2929cfe..5fb562f 100644 --- a/templates/default.html +++ b/templates/default.html @@ -21,7 +21,7 @@ $endif$ $styles.html()$ $for(css)$ - + $endfor$ $for(header-includes)$ $header-includes$