From eeba86d168b94243a931f554a904953a783b5c11 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Mon, 23 May 2022 21:18:42 +0200 Subject: [PATCH] Populate "projects" section on the main page. --- generate-blog.bash | 23 +++++++-- index/index.html | 65 +++++++++++++----------- index/last_checksum.txt | 2 +- index/last_edit_date.txt | 2 +- projects/phpinspect.el/index.html | 9 ++++ projects/phpinspect.el/last_checksum.txt | 1 + projects/phpinspect.el/publish_date.txt | 1 + style.css | 9 ++++ 8 files changed, 76 insertions(+), 36 deletions(-) create mode 100644 projects/phpinspect.el/index.html create mode 100644 projects/phpinspect.el/last_checksum.txt create mode 100644 projects/phpinspect.el/publish_date.txt diff --git a/generate-blog.bash b/generate-blog.bash index b42a4c6..4360ee0 100755 --- a/generate-blog.bash +++ b/generate-blog.bash @@ -75,12 +75,14 @@ print-html-top() { +
EOF } print-html-bottom() { - echo ' + echo '
+ ' } @@ -271,11 +273,26 @@ print-blog-rss-bottom >> "$new_rss" mv -v "$new_html" "$blog_html" || exit $? mv -v "$new_rss" "$blog_rss" || exit $? -cp -v "$here/style.css" "$publish_dir/style.css" +cp -v "$here/style.css" "$publish_dir/style.css" || exit $? read -rd '' index_html < "$here/index/index.html" || true publish-html "$publish_dir" "$here/index" "$publish_dir" "$index_html" "Hugo's Homepage" -cp -rv "$here/assets" "$publish_dir/assets" +for project_dir in "$here/projects"/*; do + project_name="$(basename "$project_dir")" || exit $? + + text="$(html-to-text "$project_dir/index.html" | escape-html)" || exit $? + title="$(head -n 1 <<<"$text" | tr -d '*')" || exit $? + + read -rd '' project_html < "$project_dir/index.html" || true + + publish-html "$publish_dir" \ + "$project_dir" \ + "$publish_dir/projects/$project_name" \ + "$project_html" \ + "$title" +done + +cp -rv "$here/assets" "$publish_dir/assets" || exit $? echo 'SUCCESS!' diff --git a/index/index.html b/index/index.html index 0547db4..802e368 100644 --- a/index/index.html +++ b/index/index.html @@ -14,39 +14,42 @@

-
-
-
dns-yml
-

- Manage DNS records through version controlled yaml files. -

-
+
+
+
+

My Projects

-
-
dns-yml
-

- Manage DNS records through version controlled yaml files. -

-
-
-
dns-yml
-

- Manage DNS records through version controlled yaml files. -

-
-
-
dns-yml
-

- Manage DNS records through version controlled yaml files. -

-
- +
diff --git a/index/last_checksum.txt b/index/last_checksum.txt index 4654d4d..21bac09 100644 --- a/index/last_checksum.txt +++ b/index/last_checksum.txt @@ -1 +1 @@ -1891825100 1228 +2028812665 1438 diff --git a/index/last_edit_date.txt b/index/last_edit_date.txt index d792f34..909e398 100644 --- a/index/last_edit_date.txt +++ b/index/last_edit_date.txt @@ -1 +1 @@ -1653324155 +1653333435 diff --git a/projects/phpinspect.el/index.html b/projects/phpinspect.el/index.html new file mode 100644 index 0000000..d305026 --- /dev/null +++ b/projects/phpinspect.el/index.html @@ -0,0 +1,9 @@ +

phpinspect.el

+ +

+ phpinspect is .. +

+ + + + diff --git a/projects/phpinspect.el/last_checksum.txt b/projects/phpinspect.el/last_checksum.txt new file mode 100644 index 0000000..7547f5e --- /dev/null +++ b/projects/phpinspect.el/last_checksum.txt @@ -0,0 +1 @@ +3338895994 122 diff --git a/projects/phpinspect.el/publish_date.txt b/projects/phpinspect.el/publish_date.txt new file mode 100644 index 0000000..2a8984c --- /dev/null +++ b/projects/phpinspect.el/publish_date.txt @@ -0,0 +1 @@ +1653331688 diff --git a/style.css b/style.css index 81b3990..6dd83c8 100644 --- a/style.css +++ b/style.css @@ -66,6 +66,10 @@ code { border-radius: 0.5rem; padding: 1em; margin: 0.5em; + display: block; + text-decoration: none; + color: var(--theme-text); + flex-grow: 1; } .cardbox .card header { @@ -73,6 +77,11 @@ code { font-weight: bold; } +.cardbox .card p { + margin: 0; +} + + @media only all and (min-width: 82ch) { body { line-height: 1.4;