From 3523b9214570fcf92bea8dfbad5188274ff82446 Mon Sep 17 00:00:00 2001 From: alexandre-vl Date: Wed, 19 Apr 2023 12:28:07 +0200 Subject: [PATCH 1/2] [FIX] New color with new font for H1 --- assets/css/main.css | 21 ++++++++++++++++++--- components/Creator.vue | 2 +- nuxt.config.ts | 1 + pages/auth/login.vue | 4 ++-- tailwind.config.js | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 67194b8..11054fb 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -12,6 +12,10 @@ body { -webkit-touch-callout: none; } +h1 { + font-family: 'Clash Display', sans-serif; +} + html, body { overscroll-behavior-y: contain; overscroll-behavior-x: none; @@ -26,12 +30,12 @@ html, body { } .router-link-exact-active { - background-color: #12d4a781; + background-color: #4AFF9381; } @media (prefers-color-scheme: dark) { .router-link-exact-active { - background-color: #12d4a721; + background-color: #4AFF9321; } } @@ -71,4 +75,15 @@ html, body { .layout-leave-to { transform: translateY(-20px); opacity: 0; -} */ \ No newline at end of file +} */ + +.opacity-enter-active { + transition: all 0.1s ease-out; +} +.opacity-leave-active { + /* transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1); */ +} +.opacity-enter-from, +.opacity-leave-to { + opacity: 0; +} \ No newline at end of file diff --git a/components/Creator.vue b/components/Creator.vue index a8c8298..70bb87e 100644 --- a/components/Creator.vue +++ b/components/Creator.vue @@ -2,7 +2,7 @@
Pas de compte ? Contactez-nous
diff --git a/tailwind.config.js b/tailwind.config.js index 28924a3..4dc7fed 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -12,8 +12,8 @@ module.exports = { theme: { extend: { colors: { - 'primary': '#12d4a6', - 'primaryhover': '#5BE7C7', + 'primary': '#4AFF93', + 'primaryhover': '#D3FFB7', 'secondary': '#1A232E', 'dark': '#1f2937', 'light': '#f3f4f6', From d572e4fda397584728e7406f346eaee8a8939c45 Mon Sep 17 00:00:00 2001 From: alexandre-vl Date: Wed, 19 Apr 2023 12:28:29 +0200 Subject: [PATCH 2/2] [FIX] New title system for navbar --- components/NavBar.vue | 22 +++++++++++++++++----- components/SideBar.vue | 2 +- pages/index.vue | 2 +- pages/params.vue | 21 +++++++++++++++++++-- pages/user/profile.vue | 18 +++++++++++++++++- 5 files changed, 55 insertions(+), 10 deletions(-) diff --git a/components/NavBar.vue b/components/NavBar.vue index 8233c1b..f55ee1e 100644 --- a/components/NavBar.vue +++ b/components/NavBar.vue @@ -6,6 +6,9 @@ + +

{{ pages[this?.$route?.name] }}

+
@@ -29,7 +32,16 @@ export default { config: {api: this.$config.API_URL, pronote: this.$config.PRONOTE_API_URL}, errors: [], isSidebarOpen: false, - isShadowed: false + isShadowed: false, + pages: { + 'index': "Asbences", + 'cantine': "Cantine", + 'shop': "Boutique", + 'params': "Paramètres", + 'user-profile': 'Profile', + 'admin-users': "Users" + }, + isHiddenTitle: true } }, methods: { @@ -37,17 +49,17 @@ export default { this.$emit('toggle-sidebar'); }, onScroll() { - // Get the current scroll position const scrollPosition = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; - // Set isShadowed to true if scroll position is greater than 0, otherwise set it to false this.isShadowed = scrollPosition > 0; + if (scrollPosition > 28) this.isHiddenTitle = false + else this.isHiddenTitle = true } }, beforeUnmount() { - window.removeEventListener('scroll', this.onScroll); // Remove scroll event listener before component unmount + window.removeEventListener('scroll', this.onScroll) }, async mounted() { - window.addEventListener('scroll', this.onScroll); // Add scroll event listener on component mount + window.addEventListener('scroll', this.onScroll) this.userInfos = JSON.parse(window.localStorage.getItem("user")) let user = await getUser(this.config.api, this.userInfos.id) if (!user) return this.errors.push({message: "Impossible de charger l'utilisateur", color: "danger"}) diff --git a/components/SideBar.vue b/components/SideBar.vue index bdffbd3..0ec5269 100644 --- a/components/SideBar.vue +++ b/components/SideBar.vue @@ -1,5 +1,5 @@