summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-03 07:59:00 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-03 07:59:00 +0800
commit9a4c2220d310a9bc7b7a01943bf925ed38265665 (patch)
tree91f1d6023768325a2f121f5635893026a04b3836 /src
parent1fa9398c10636b884800422c04b34b1362760aa1 (diff)
added more features & fixed border(radius)bug from vanilla tilt
Diffstat (limited to 'src')
-rw-r--r--src/css/index.css2
-rw-r--r--src/css/style.css4
-rw-r--r--src/js/tilt.conf.js5
3 files changed, 11 insertions, 0 deletions
diff --git a/src/css/index.css b/src/css/index.css
index 4666c95b..5ba0659a 100644
--- a/src/css/index.css
+++ b/src/css/index.css
@@ -25,6 +25,8 @@
display: flex;
justify-content: center;
align-items: center;
+ /* transform-style: preserve-3d; */
+ /* perspective: 1000px; */
}
.window .placeholder {
diff --git a/src/css/style.css b/src/css/style.css
index 71e9adaa..a4e608fb 100644
--- a/src/css/style.css
+++ b/src/css/style.css
@@ -101,6 +101,10 @@ body {
transition: all 0.3s
}
+.js-tilt-glare {
+ border-radius: 18px;
+}
+
/* topbar styles ========================================== */
header {
diff --git a/src/js/tilt.conf.js b/src/js/tilt.conf.js
new file mode 100644
index 00000000..d0ef14ad
--- /dev/null
+++ b/src/js/tilt.conf.js
@@ -0,0 +1,5 @@
+VanillaTilt.init(document.querySelectorAll(".tilt"),{
+ glare: true,
+ reverse: true,
+ "max-glare": 0.5,
+})