From e1d0c6a0ed5feffd91902abd4a77eada42152d97 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 17 Aug 2023 16:13:44 -0400 Subject: [PATCH] Add new article; Experiment with server --- www/Caddyfile | 4 - www/basic.css | 103 ++++++++++++++++++ www/build.fish | 5 +- www/src/index.md | 4 +- ...time_to_rethink_the_command_line_shell.md} | 0 www/templates/page.html | 2 +- 6 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 www/basic.css rename www/src/{article.md => its_time_to_rethink_the_command_line_shell.md} (100%) diff --git a/www/Caddyfile b/www/Caddyfile index 23cb8dd..073d109 100644 --- a/www/Caddyfile +++ b/www/Caddyfile @@ -9,9 +9,5 @@ www.jeffa.io { file_server { index index.html } - rewrite @not_html {path}.html - @not_html { - not path *.html - } } diff --git a/www/basic.css b/www/basic.css new file mode 100644 index 0000000..335583b --- /dev/null +++ b/www/basic.css @@ -0,0 +1,103 @@ +/* Basic.css */ + +* {box-sizing: border-box} + +:root{ +--sans: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif; +--mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, 'Courier New', monospace; +--c1:#0074d9; +--c2:#eee; +--c3:#f00; +--c4:#000; +--c5:#fff; +--m1: 8px; +--rc: 8px; +} + +@media (prefers-color-scheme: dark) { + :root { + --c2:#333; + --c3:#1e1f20; + --c4:#fff; + } +} + +html { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + +} + +/* General settings */ + +body { + margin: 0; + font: var(--sans); + font-weight: 400; + font-style: normal; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + background-color: var(--c3); + color: var(--c4); +} +img, iframe {border: none; max-width: 100%} + +a {color: var(--c1); text-decoration:none} + +a:hover {color: var(--c1); text-decoration: underline} + +pre {font: 1em/1.6 var(--mono); background: var(--c2); padding: 1em; overflow: auto} + +code {font: 1em/1.6 var(--mono);} + +blockquote {border-left: 5px solid var(--c2); padding: 1em 1.5em; margin: 0} + +hr {border:0; border-bottom: 1px solid var(--c4)} + + /* Headlines */ + +h1,h2,h3,h4,h5,h6 {margin: 0.6em 0; font-weight: normal} + +h1 {font-size: 2.625em; line-height: 1.2} + +h2 {font-size: 1.625em; line-height: 1.2} + +h3 {font-size: 1.3125em; line-height: 1.24} + +h4 {font-size: 1.1875em; line-height: 1.23} + +h5,h6 {font-size: 1em; font-weight:bold} + +/* Table */ + +table {border-collapse: collapse; border-spacing: 0; margin:1em 0} + +th, td {text-align: left; vertical-align: top; border: 1px solid; padding: 0.4em} + +thead,tfoot {background: var(--c2)} + +/* Rounded Corners*/ + +pre,code,input,select,textarea,button,img {border-radius: var(--rc)} + + +/* Forms */ + +input, select, textarea {font-size: 1em; color:var(--c4); background: var(--c2); border: 0; padding: 0.6em} + +button, input[type=submit], input[type=reset], input[type="button"] { -webkit-appearance: none; font-size: 1em; display: inline-block; color: var(--c5); background: var(--c1); border: 0; margin: 4px; padding: 0.6em; cursor: pointer; text-align: center} + +button:hover, button:focus, input:hover, textarea:hover, select:hover {opacity: 0.8} + +/* Infinite Grid */ + +section {display: flex; flex-flow: row wrap} + +[style*="--c:"], section>section, aside, article {flex:var(--c,1); margin:var(--m1)} + +/* Cards */ + +article {background: var(--c2); border-radius: var(--rc); padding: 1em; box-shadow: 0px 1px 0px rgba(0,0,0,0.3)} + +[style*="--c:"]:first-child, section>section:first-child, article:first-child {margin-left:0} +[style*="--c:"]:last-child, section>section:last-child, article:last-child {margin-right:0} diff --git a/www/build.fish b/www/build.fish index 5ba6466..376145e 100644 --- a/www/build.fish +++ b/www/build.fish @@ -3,8 +3,9 @@ for file in src/**/*.md set -l output (string replace src/ out/ $output) pandoc \ --to html \ - --css basic.css \ - --self-contained \ + --template templates/page.html \ $file \ > $output end + +cp basic.css out/ diff --git a/www/src/index.md b/www/src/index.md index e50c07e..3bab340 100644 --- a/www/src/index.md +++ b/www/src/index.md @@ -3,6 +3,6 @@ jeff@jeffa.io -- [/](/index) -- [/cookbook](/cookbook) +- [/](/index.html) +- [It's Time to Rethink the Command Line Shell](/its_time_to_rethink_the_command_line_shell.html) diff --git a/www/src/article.md b/www/src/its_time_to_rethink_the_command_line_shell.md similarity index 100% rename from www/src/article.md rename to www/src/its_time_to_rethink_the_command_line_shell.md diff --git a/www/templates/page.html b/www/templates/page.html index d02b622..3c53839 100644 --- a/www/templates/page.html +++ b/www/templates/page.html @@ -13,7 +13,7 @@ $if(date)$ $endif$ - $styles()$ + $body$