aboutsummaryrefslogtreecommitdiff
path: root/make_face.sh
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-11-21 10:49:09 +0100
committerWojtek Kosior <koszko@koszko.org>2021-11-21 10:49:09 +0100
commit29a86d3d4ec8ee2241edb7384fe8613ff6382ac9 (patch)
tree1804623a73c21b4796439bef52b45025fca2eb01 /make_face.sh
downloadbirthday-flower-css-animation-29a86d3d4ec8ee2241edb7384fe8613ff6382ac9.tar.gz
birthday-flower-css-animation-29a86d3d4ec8ee2241edb7384fe8613ff6382ac9.zip
initial commit
Diffstat (limited to 'make_face.sh')
-rwxr-xr-xmake_face.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/make_face.sh b/make_face.sh
new file mode 100755
index 0000000..26202f8
--- /dev/null
+++ b/make_face.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+ANIMATION_DELAY=$(bc <<EOF
+$(cat _flower_delay) - 0.15
+EOF
+ )
+
+cat <<EOF
+ <div class="smile">
+ <img style="animation-delay: ${ANIMATION_DELAY}s;" src="./smile.svg" alt="flower smile" draggable="false">
+ </div>
+ <div class="eyes">
+ <img style="animation-delay: ${ANIMATION_DELAY}s;" src="./eyes.svg" alt="flower eyes" draggable="false">
+ </div>
+EOF
+
+FACE_APPEAR_DURATION=0.3 # must match animation-duration in kwiatuszek.html.template
+
+bc >_face_delay <<EOF
+$ANIMATION_DELAY + $FACE_APPEAR_DURATION
+EOF