Populate "projects" section on the main page.

master
Hugo Thunnissen 2 years ago
parent 1bb57e222b
commit eeba86d168

@ -75,12 +75,14 @@ print-html-top() {
<div class="navitem"><a href="${backlink}blog.html">Blog</a></div>
<div class="navitem"><a href="${backlink}feed.xml">RSS Feed</a></div>
</nav>
<main
<article>
EOF
}
print-html-bottom() {
echo '</article>
echo '</main>
</article>
</body>
</html>'
}
@ -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!'

@ -14,39 +14,42 @@
</ul>
</p>
<div class="cardbox">
<div class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
</div>
<br>
<hr>
<section>
<header><h2>My Projects</h2></header>
<div class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
</div>
<div class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
</div>
<div class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
</div>
<div class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
<div class="cardbox">
<a href="projects/dns-yml/index.html" class="card">
<header>dns-yml</header>
<p>
Manage DNS records through version controlled yaml files.
</p>
</a>
<a href="projects/phpinspect.el/index.html" class="card">
<header>phpinspect.el</header>
<p>
Enrich emacs with completion and other <em>intellisense</em> features for
PHP. Backed by a PHP parser implemented in 100% pure emacs lisp!
</p>
</a>
<a href="projects/gitea-api-protector/index.html" class="card">
<header>gitea-api-protector</header>
<p>
Shield your gitea API from bad actors on public instances.
</p>
</a>
<a href="projects/docker-images/index.html" class="card">
<header>Docker Images</header>
<p>
A set of docker images that I maintain.
</p>
</a>
</div>
</div>
</section>
<!-- Local Variables: -->
<!-- sgml-basic-offset: 1 -->

@ -1 +1 @@
1891825100 1228
2028812665 1438

@ -1 +1 @@
1653324155
1653333435

@ -0,0 +1,9 @@
<h1>phpinspect.el</h1>
<p>
phpinspect is ..
</p>
<!-- Local Variables: -->
<!-- sgml-basic-offset: 1 -->
<!-- End: -->

@ -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;

Loading…
Cancel
Save