From 06bd3d7999501ee178826190fbd3b4a9e28cb6fa Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Wed, 21 Jun 2023 22:56:23 -0400 Subject: Create simple template script for deployment --- .gitignore | 1 + README.txt | 21 ++++++++ entries/error.html | 23 +++++++++ entries/index.html | 38 ++++++++++++++ make.sh | 5 ++ render.sh | 19 +++++++ static/favicon.ico | Bin 0 -> 4286 bytes static/index.css | 68 +++++++++++++++++++++++++ templates/footer.html | 16 ++++++ templates/head-common.html | 8 +++ templates/nav.html | 13 +++++ www/error.html | 113 ----------------------------------------- www/favicon.ico | Bin 4286 -> 0 bytes www/index.html | 124 --------------------------------------------- 14 files changed, 212 insertions(+), 237 deletions(-) create mode 100644 .gitignore create mode 100644 entries/error.html create mode 100644 entries/index.html create mode 100755 make.sh create mode 100755 render.sh create mode 100644 static/favicon.ico create mode 100644 static/index.css create mode 100644 templates/footer.html create mode 100644 templates/head-common.html create mode 100644 templates/nav.html delete mode 100644 www/error.html delete mode 100644 www/favicon.ico delete mode 100644 www/index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccbb9df --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +www/ diff --git a/README.txt b/README.txt index 5b35135..0218361 100644 --- a/README.txt +++ b/README.txt @@ -3,3 +3,24 @@ The Woman In My Eye is a trans blog recounting my journey as a transgender woman. You can find me on Fedi @senders@tech.lgbt if you have any questions. + +== Structure + +The files are structured into the following folders: + +templates/ + These are template files that can be injected by {name} into any HTML document. +entries/ + These are all files that will be rendered into the www/ folder +www/ + These are the production ready files + +static/ + These are static files that will be copied to the www folder based on their existing folder structure + +== Scripts + +./render.sh www/ + Renders a given entry into the path destination +./make.sh + Will build the entire website! diff --git a/entries/error.html b/entries/error.html new file mode 100644 index 0000000..fbab7e9 --- /dev/null +++ b/entries/error.html @@ -0,0 +1,23 @@ + + + + {head-common} + The Woman in my Eye + + + +
+

The page requested is not found!

+
+ {nav} +
+
+

Oops, someone screwed up?

+

The page you've requested does not exist. Sorry about that! Please + return to the homepage.

+
+
+ {footer} + + diff --git a/entries/index.html b/entries/index.html new file mode 100644 index 0000000..16f9de7 --- /dev/null +++ b/entries/index.html @@ -0,0 +1,38 @@ + + + + The Woman in my Eye + {head-common} + + + + +
+

Hello, the Woman in my Eye

+
+ {nav} +
+
+

Introduction

+

Welcome to my blog. My name is Steph and I am a 30 something + transgender woman. This blog focuses on my journey transitioning and + discovering my gender. I am not a medical professional or an expert on + the subject. I am simply a girl trying to share her story in the hopes it + might actually help someone else find themselves...or entertain; either + works!

+
+
+

Notice: I am barely setup!

+

Hey, thanks for visiting my website. I decided to take on this + initiative basically right before I had to leave my house for a few days. + So hopefully I can get this up and running soon after. For posterity I + wrote this on , so when you're seeing this in 2030 we can all laugh.

+
+
+ {footer} + + diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..6ad78ee --- /dev/null +++ b/make.sh @@ -0,0 +1,5 @@ +./render.sh entries/index.html www/index.html +./render.sh entries/error.html www/error.html + + +cp -r static/* www diff --git a/render.sh b/render.sh new file mode 100755 index 0000000..47cd89d --- /dev/null +++ b/render.sh @@ -0,0 +1,19 @@ +set -ex; +if [ $# -ne 2 ]; then + echo "Usage: ./render.sh www///.html" + exit 1; +fi + +FILE=$1 +DEST=$2 + +mkdir -p $(dirname $DEST) +cp $FILE $DEST + +for tmpl in templates/*.html; do + key=$(basename ${tmpl} .html) + sed -i "/[{]${key}[}]/r ${tmpl}" $DEST + sed -i "s/[{]${key}[}]//g" $DEST +done +./tidy.sh $DEST + diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..e3b5bab Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/index.css b/static/index.css new file mode 100644 index 0000000..961d7df --- /dev/null +++ b/static/index.css @@ -0,0 +1,68 @@ +:root { + --twhite: #fff; + --tblue: #4ac2fe; + --tpink: #ef95ae; + --flagheight: 60px; + --flagwidth: 90px; + --bgcolor: #e4e4ff; + --page-width: 50em; +} +html, body { + margin: 16px; + line-height: 1.5em; + background-color: var(--bgcolor); +} +p { margin: 0; } +header { + text-align: center; +} +nav { + text-align: center; + margin: 32px 0; +} +nav ul { + list-style-type: none; + padding-left: 0; +} +nav ul li { + display: inline-block; + padding: 4px; +} +footer { + display: flex; + justify-content: center; + font-size: 0.9em; +} +article { + background-color: white; + padding: 16px; +} +main article { + margin: auto auto; + max-width: var(--page-width); + border-radius: 8px; + margin-bottom: 32px; +} +main article:last-child { + margin-bottom: none; +} +.transflag { + width: var(--flagwidth); + height: var(--flagheight); + margin: 16px auto; +} +.transflag .blue { + width: 100%; + min-height: calc(var(--flagheight) / 5); + background-color: var(--tblue); +} +.transflag .pink { + width: 100%; + min-height: calc(var(--flagheight) / 5); + background-color: var(--tpink); +} +.transflag .white { + width: 100%; + min-height: calc(var(--flagheight) / 5); + background-color: var(--twhite); +} diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..79074d5 --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,16 @@ +
+
+
+
+
+
+
+
+

© 2023 TheWomanInMyEye dot org - + CC BY-SA 4.0 + unless otherwise noted.

+
+ diff --git a/templates/head-common.html b/templates/head-common.html new file mode 100644 index 0000000..c06fc18 --- /dev/null +++ b/templates/head-common.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/templates/nav.html b/templates/nav.html new file mode 100644 index 0000000..c21e9cb --- /dev/null +++ b/templates/nav.html @@ -0,0 +1,13 @@ + diff --git a/www/error.html b/www/error.html deleted file mode 100644 index f52a51e..0000000 --- a/www/error.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - The Woman in my Eye - - - - - - - -
-

The page requested is not found!

-
- -
-
-

Oops, someone screwed up?

-

The page you've requested does not exist. Sorry about that! Please - return to the homepage.

-
-
-
-
-
-
-
-
-
-
-

© 2023 TheWomanInMyEye dot org - CC BY-SA 4.0 - unless otherwise noted.

-
- - diff --git a/www/favicon.ico b/www/favicon.ico deleted file mode 100644 index e3b5bab..0000000 Binary files a/www/favicon.ico and /dev/null differ diff --git a/www/index.html b/www/index.html deleted file mode 100644 index a2b2c84..0000000 --- a/www/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - The Woman in my Eye - - - - - - - - - -
-

Hello, the Woman in my Eye

-
- -
-
-

Welcome to my blog. My name is Steph and I am a 30 something - transgender woman. This blog focuses on my journey transitioning and - discovering my gender. I am not a medical professional or an expert on - the subject. I am simply a girl trying to share her story in the hopes it - might actually help someone else find themselves...or entertain; either - works!

-
-
-

This would be where my first article would be... if I didn't just - start this site! Please look forward to it.

-
-
-
-
-
-
-
-
-
- - - -- cgit v1.2.3-54-g00ecf