aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorJefferson Julio <[email protected]>2021-05-31 19:16:12 -0300
committerJefferson Julio <[email protected]>2021-05-31 19:16:12 -0300
commit9f5162371323562623bae42b0476bd8b9a4a5e92 (patch)
tree9375011fbff065938b1878cbf5198247a8a0dbbf /pages
parent381bff129b70471e86e99a2d6b6a7e090f13287e (diff)
downloadblog.sh-9f5162371323562623bae42b0476bd8b9a4a5e92.tar.bz2
blog.sh-9f5162371323562623bae42b0476bd8b9a4a5e92.zip
Add more HTML metadata, re-format some text
Diffstat (limited to 'pages')
-rwxr-xr-xpages/article.sh2
-rwxr-xr-xpages/home.sh16
2 files changed, 11 insertions, 7 deletions
diff --git a/pages/article.sh b/pages/article.sh
index 59a33b6..3cb5ab7 100755
--- a/pages/article.sh
+++ b/pages/article.sh
@@ -14,7 +14,7 @@ cat <<ARTICLE
<article class="container">
<section>
<div class="post-header">
- <h4 class="post-title">$ stat -c "%s %w %z" \\ <br/> &gt;&ensp;$ARTICLE_FILE_SANITIZED</h4>
+ <h4 class="post-title">$ARTICLE_FILE</h4>
<small>$ARTICLE_BYTES</small> <br/>
<time>$ARTICLE_TIME</time> <br/>
diff --git a/pages/home.sh b/pages/home.sh
index 02adf53..49094fc 100755
--- a/pages/home.sh
+++ b/pages/home.sh
@@ -3,20 +3,24 @@
welcome () {
cat <<WELCOME
<section class="conainer" id="welcome">
- <header>
+ <hgroup>
<h1>Bem-vindo ao meu blog :3</h1>
- <h4>Aqui mostro o meu trabalho e escrevo sobre programação.</h4>
- </header>
+ <h4>Aqui escrevo sobre programação e mostro o meu trabalho.</h4>
+ </hgroup>
+ <hr/>
</section>
WELCOME
}
-print-all-articles () {
+all-articles-sort-by-last-modification () {
# Find all articles and sort by date of creation
+ cat <<HEADER
+ <h4>Últimas atividades</h4>
+HEADER
IFS=';' read -ra ARTICLE_LIST <<< "$(
find $ARTICLES_PATH \
-type f \
- -name '*.txt' \
+ -regex ".*\.$(scape-regex "($ARTICLES_EXTS)")" \
-printf "%T@ %p\n" |
sort -rn |
cut -b 23- |
@@ -32,6 +36,6 @@ print-all-articles () {
cat <<PAGE
<article class="home-feed container">
$(welcome)
- $(print-all-articles)
+ $(all-articles-sort-by-last-modification)
</article>
PAGE