From 26765a8c4eb7ed9c86c6f6a9fc690f57920efcd4 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 23 May 2021 10:55:09 +0530 Subject: update art page --- art.esh | 49 +++++++ art/b4.png | Bin 0 -> 26240 bytes art/isopod.png | Bin 0 -> 30768 bytes docs/art/b4.png | Bin 0 -> 26240 bytes docs/art/index.html | 379 +++++++++++++++++++++++----------------------------- docs/art/isopod.png | Bin 0 -> 30768 bytes docs/index.html | 10 +- docs/style.css | 73 ++++++++++ generate.sh | 48 +++---- scripts.sh | 16 +++ 10 files changed, 328 insertions(+), 247 deletions(-) create mode 100644 art.esh create mode 100644 art/b4.png create mode 100644 art/isopod.png create mode 100644 docs/art/b4.png create mode 100644 docs/art/isopod.png create mode 100644 scripts.sh diff --git a/art.esh b/art.esh new file mode 100644 index 0000000..9a72b75 --- /dev/null +++ b/art.esh @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + Art · peppe.rs + +
+ Home + / + Art +

Art

+
+
+ <% + source ./scripts.sh + for f in `ls -t ./art`; do +cat << XXX + +
+ +
+
+
$(title_wrapper $f)
+
$(date -r "./art/$f" "+%d/%m — %Y")
+
+
+
+
+XXX + done + %> +
+
+ Home + / + Art +
+ + diff --git a/art/b4.png b/art/b4.png new file mode 100644 index 0000000..6216193 Binary files /dev/null and b/art/b4.png differ diff --git a/art/isopod.png b/art/isopod.png new file mode 100644 index 0000000..510483a Binary files /dev/null and b/art/isopod.png differ diff --git a/docs/art/b4.png b/docs/art/b4.png new file mode 100644 index 0000000..6216193 Binary files /dev/null and b/docs/art/b4.png differ diff --git a/docs/art/index.html b/docs/art/index.html index bf489c4..1a24c62 100644 --- a/docs/art/index.html +++ b/docs/art/index.html @@ -1,216 +1,175 @@ - - - - - - - - - - - - -peppe.rs + + + + + + + + + + + + + Art · peppe.rs -
-
- Home - / - Art - -

Art

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- 14/05 — 2021 -
- - Wraith - -
- - - -
-
- 08/05 — 2021 -
- - Antique - -
- - - -
-
- 06/05 — 2021 -
- - Grimoire - -
- - - -
-
- 01/05 — 2021 -
- - Beret Beaver - -
- - - -
-
- 01/05 — 2021 -
- - Aviator Owl - -
- - - -
-
- 01/05 — 2021 -
- - Monocle Rabbit - -
- - - -
-
- 26/03 — 2021 -
- - Ramen Noodles - -
- - - -
-
- 22/02 — 2021 -
- - Please Do Not Feed The Animals - -
- - - -
-
- 25/04 — 2020 -
- - Moonshine - -
- - - -
-
- 09/04 — 2020 -
- - Onigiri - -
- - - -
-
- 17/01 — 2020 -
- - The Observer - -
- - - -
-
- + diff --git a/docs/art/isopod.png b/docs/art/isopod.png new file mode 100644 index 0000000..510483a Binary files /dev/null and b/docs/art/isopod.png differ diff --git a/docs/index.html b/docs/index.html index f5edd3a..b692299 100644 --- a/docs/index.html +++ b/docs/index.html @@ -78,15 +78,15 @@
- 14/05 — 2021 + 22/05 — 2021
- - Wraith + + B4 - - + + diff --git a/docs/style.css b/docs/style.css index cdcb2d0..70ce31e 100644 --- a/docs/style.css +++ b/docs/style.css @@ -168,16 +168,89 @@ pre > code { color: var(--black); } +/* art stuff */ +#photos { + -webkit-column-count: 3; + -webkit-column-gap: 12px; + -moz-column-count: 3; + -moz-column-gap: 12px; + column-count: 3; + column-gap: 12px; +} + +#photos img { + /* Just in case there are inline attributes */ + width: 100% !important; + height: auto !important; + border: 0px; + border-radius: 0.4rem; + box-shadow: none; +} + +.photo-container { + position: relative; + width: 100%; + margin-bottom: 12px; +} + +.photo-overlay { + line-height: 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100% !important; + height: auto !important; + opacity: 0; + transition: .3s ease; + background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.0)); + border-radius: 0.4rem; +} + +.photo-text { + line-height: 1; + padding: 12px; + color: white; +} + +.photo-title { + font-size: 1rem; + color: white; +} + +.photo-date { + margin-top: 0.2rem; + font-size: 0.6rem; + color: white; +} + +.photo-container:hover .photo-overlay { + opacity: 1; +} + +/* end of art stuff */ + @media only screen and (min-width: 1080px) { .posts { max-width: 650px; } + #photos { + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + } } @media only screen and (min-width: 1400px) { .posts { max-width: 650px; } + #photos { + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + } } .posts { diff --git a/generate.sh b/generate.sh index 91c5e3b..83f5c88 100755 --- a/generate.sh +++ b/generate.sh @@ -6,21 +6,7 @@ INDEX_BLOG_COUNT=0 INDEX_ART_LIMIT=1 INDEX_ART_COUNT=0 -title_wrapper() { - # remove extension - # snake to title case - echo "$1" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g" -} - -read_time() { - minu="$(eva -f 1 $1/150 | xargs)" - echo "$minu" -} - -height() { - cm="$(eva -f 2 $1*18*0.0222 | xargs)" - echo "$cm" -} +source ./scripts.sh link_wrapper() { # 1 - id @@ -133,7 +119,7 @@ mkdir -p docs/art cp -r ./art/* docs/art/ -cat << EOF | tee ./docs/posts/index.html ./docs/art/index.html ./docs/index.html > /dev/null +cat << EOF | tee ./docs/posts/index.html ./docs/index.html > /dev/null @@ -210,7 +196,7 @@ for f in $posts; do mkdir -p "docs/posts/$id" esh \ -o "docs/posts/$id/index.html" \ - "./post.esh" \ + post.esh \ file="$file" \ date="$post_date" \ title="$post_title" \ @@ -223,25 +209,22 @@ echo "$(more_links posts)" >> ./docs/index.html echo "$(recent_link Art)" >> ./docs/index.html # art -echo -ne " -

Art

-
- - " >> ./docs/art/index.html echo echo "[+] ART" -for f in $art; do - file="./art/"$f - id="${file##*/}" - art_title=$(title_wrapper "$id") - art_date=$(date -r "$file" "+%d/%m — %Y") - art_post=$(art_block "$f" "$art_title" "$art_date") - echo "[~] $art_title" - echo -ne "$art_post" >> docs/art/index.html +esh \ + -o "docs/art/index.html" \ + art.esh +for f in $art; do if [[ $INDEX_ART_COUNT -lt $INDEX_ART_LIMIT ]]; then + file="./art/"$f + id="${file##*/}" + art_title=$(title_wrapper "$id") + art_date=$(date -r "$file" "+%d/%m — %Y") + art_post=$(art_block "$f" "$art_title" "$art_date") + echo "[~] $art_title" echo -ne "$art_post" >> ./docs/index.html ((INDEX_ART_COUNT+=1)) fi @@ -250,12 +233,13 @@ done echo "$(more_links art)" >> ./docs/index.html # generate rss feeds -echo "generating RSS feeds ..." +echo +echo "[+] Generating RSS feeds ..." esh \ -o "./docs/index.xml" \ "rss.esh" -cat << EOF | tee -a ./docs/posts/index.html ./docs/art/index.html ./docs/index.html > /dev/null +cat << EOF | tee -a ./docs/posts/index.html ./docs/index.html > /dev/null