From 9b30e2ced220dd8e2d5448f3e39c97d90f616d32 Mon Sep 17 00:00:00 2001 From: sebastianjnuwu Date: Fri, 27 Dec 2024 09:22:26 -0300 Subject: [PATCH] feat(styles): refactor splash screen and update UI components --- www/index.html | 15 +++++++++------ www/main.ts | 5 ++--- www/src/js/main.js | 13 ++++++++----- www/src/plugins/admob.ts | 1 + www/src/styles/css/ui.css | 1 + www/src/styles/scss/ui.scss | 1 - 6 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 www/src/styles/scss/ui.scss diff --git a/www/index.html b/www/index.html index ff0d487..8e213d6 100644 --- a/www/index.html +++ b/www/index.html @@ -12,15 +12,18 @@ - + - -
- splash-screen + + splash-screen

Click...

-
+ + + + diff --git a/www/main.ts b/www/main.ts index 9bcd540..c95a110 100644 --- a/www/main.ts +++ b/www/main.ts @@ -1,3 +1,2 @@ -import "./res/styles/scss/ui.scss"; -import "./res/plugins/admob.ts"; -import "./res/plugins/push-notifications.ts"; \ No newline at end of file +import "./src/plugins/admob.ts"; +import "./src/plugins/push-notifications.ts"; \ No newline at end of file diff --git a/www/src/js/main.js b/www/src/js/main.js index 97fdced..90992c6 100644 --- a/www/src/js/main.js +++ b/www/src/js/main.js @@ -1,9 +1,12 @@ $(() => { - $("splash-screen img").on("click", () => { - $('#splash')[0].play(); - $("splash-screen h1").slideUp() - $("splash-screen").slideUp(5000) + // Splash screen animation + $("splash-screen").on("click", () => { + $("#splash")[0].play(); + + setTimeout(() => { + $("splash-screen").remove(); + }, 1000); }); -}); \ No newline at end of file +}); diff --git a/www/src/plugins/admob.ts b/www/src/plugins/admob.ts index 5c9cc63..b960638 100644 --- a/www/src/plugins/admob.ts +++ b/www/src/plugins/admob.ts @@ -6,6 +6,7 @@ import { import $ from "jquery"; $(() => { + if (window.Capacitor.getPlatform() !== "android") { console.log( `AdMob: Unsupported platform (${window.Capacitor.getPlatform()})`, diff --git a/www/src/styles/css/ui.css b/www/src/styles/css/ui.css index 4a64724..b603f17 100644 --- a/www/src/styles/css/ui.css +++ b/www/src/styles/css/ui.css @@ -27,6 +27,7 @@ .ui-cookie splash-screen h1 { font-family: "Press Start 2P", cursive; + text-align: center; font-size: 1.5rem; color: #fdd388; font-weight: bold; diff --git a/www/src/styles/scss/ui.scss b/www/src/styles/scss/ui.scss deleted file mode 100644 index 34090dd..0000000 --- a/www/src/styles/scss/ui.scss +++ /dev/null @@ -1 +0,0 @@ -// ui.scss