summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authormaike <maike@synzr.tw>2026-09-01 22:40:10 +0500
committermaike <maike@synzr.tw>2026-09-01 23:41:22 +0500
commitd5f4539e7ab6cb00513cd428b6ab08c67ddd6bc9 (patch)
tree8767ca37a3f8ccaccde30872fdf6cde413dfb17c /js
parent04147f350f07f7cadd4fe5aa9cd74096109b275d (diff)
downloadhamster-d5f4539e7ab6cb00513cd428b6ab08c67ddd6bc9.tar.gz
hamster-d5f4539e7ab6cb00513cd428b6ab08c67ddd6bc9.tar.bz2
hamster-d5f4539e7ab6cb00513cd428b6ab08c67ddd6bc9.zip
Header with a interactive brand text
Diffstat (limited to 'js')
-rw-r--r--js/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
new file mode 100644
index 0000000..b96513b
--- /dev/null
+++ b/js/main.js
@@ -0,0 +1,10 @@
+// brand letters' rotation
+function rotate(letter) {
+ return String.fromCharCode(
+ letter.charCodeAt(0) + (letter.toLowerCase() <= 'm' ? 13 : -13)
+ );
+}
+
+$(".header .brand .letter").hover(function () {
+ $(this).text(rotate($(this).text()));
+});