Skip to content

Commit 5eace0f

Browse files
authored
chore(docs): force halloween theme (#4411)
* chore(docs): force halloween theme * fix(docs): background on small screen * chore(docs): landing theme * chore(docs): add new banner * chore: update epicmax banner
1 parent cfdeafe commit 5eace0f

File tree

10 files changed

+215
-37
lines changed

10 files changed

+215
-37
lines changed

packages/docs/assets/variables.scss

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
:root {
2-
--bg-header: #2450BE;
3-
--bg-preview-1: #2450BE;
4-
--bg-preview-2: #557DE2;
5-
--bg-partners: #335DC9;
6-
--bg-customize-1: #4D2CC1;
7-
--bg-customize-2: #847EE2;
8-
--bg-seamless: #F4F9FC;
9-
--bg-admin: #F4F9FC;
2+
// --bg-header: #2450BE;
3+
// --bg-preview-1: #2450BE;
4+
// --bg-preview-2: #557DE2;
5+
// --bg-partners: #335DC9;
6+
// --bg-customize-1: #4D2CC1;
7+
// --bg-customize-2: #847EE2;
8+
// --bg-seamless: #F4F9FC;
9+
// --bg-admin: #F4F9FC;
10+
11+
--bg-header: #b44f10;
12+
--bg-preview-1: #a74a11;
13+
--bg-preview-2: #a72e16;
14+
--bg-partners: #621708;
15+
--bg-customize-1: #210505;
16+
--bg-customize-2: #000;
17+
--bg-seamless: #38120a;
18+
--bg-admin: #481308;
1019

1120
--header-height: 4rem;
1221
--header-z-index: 2000;

packages/docs/components/HeaderBanner.vue

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
'header-banner--wrapped': wrapped,
88
}"
99
>
10-
<div class="header__wrapper">
10+
<div class="header__wrapper flex sm:flex-row flex-col">
1111
<div class="header-banner__left">
1212
<!-- Replace back to vuestic later -->
1313
<!-- <a :href="`https://github.com/epicmaxco/vuestic-ui/releases/tag/v${uiVersion}`">We just released&nbsp;<strong>Vuestic {{ uiVersion }} 🤗</strong></a> -->
14-
<a href="https://admin.vuestic.dev/">We just released <strong>Vuestic Admin 3.0</strong> 🤗</a>
14+
<!-- <a href="https://admin.vuestic.dev/">We just released <strong>Vuestic Admin 3.0</strong> 🤗</a> -->
15+
<span>Epicmax - We are the core team behind Vuestic UI and Vuestic Admin and frontend development company specializing in Vue.js since our founding in 2017.</span>
1516

1617
<!-- <div class="header-banner__left-links">-->
1718
<!-- <a
@@ -80,7 +81,7 @@
8081
href="https://epicmax.co/?ref=vuestic-header"
8182
target="blank"
8283
>
83-
🔥🔥🔥 Hire us
84+
<span class="text-nowrap">🔥🔥🔥 Hire us</span>
8485
</VaButton>
8586
<VaButton
8687
v-if="closeable"
@@ -152,7 +153,7 @@ const hide = () => {
152153
153154
min-height: 40px;
154155
padding: 0.5rem 0;
155-
background-color: #012875;
156+
background-color: color-mix(in srgb, var(--va-primary) 80%, black 50%);
156157
font-size: 0.9rem;
157158
color: $text-color;
158159
flex-shrink: 0;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<div class="event-banner">
3+
<h2 class="va-h3">
4+
Do You Need to <span class="va-text-primary">Migrate</span> Your Project to Vue 3?
5+
</h2>
6+
<p class="va-text max-w-[1000px] text-center">
7+
Schedule a free call with our CTO to discuss your specific project needs. We'll assess your current setup and help you make the best decision for your business. Let's get your app ready for the future!
8+
</p>
9+
<VaButton to="https://calendly.com/epicmax/30min" target="blank">
10+
Schedule a Call
11+
</VaButton>
12+
</div>
13+
</template>
14+
15+
<script setup lang="ts">
16+
17+
</script>
18+
19+
<style lang="scss" scoped>
20+
.event-banner {
21+
position: relative;
22+
display: flex;
23+
justify-content: center;
24+
background-color: color-mix(in srgb, var(--bg-partners) 80%, black 20%);
25+
flex-direction: column;
26+
align-items: center;
27+
gap: 1rem;
28+
padding: 2rem;
29+
}
30+
</style>

packages/docs/components/layout/Header.vue

+4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ onMounted(() => {
194194
}
195195
196196
.header {
197+
// Halloween background
197198
box-shadow: 0 2px 8px var(--va-shadow);
199+
background-image: url("https://i.imgur.com/BNkuj2J.png");
200+
background-position: center;
201+
background-blend-mode: multiply;
198202
199203
&.va-navbar {
200204
padding: var(--navbar-padding);

packages/docs/components/layout/Sidebar.vue

+5
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ export default defineComponent({
178178
@import "@/assets/smart-grid.scss";
179179
180180
.sidebar {
181+
// Halloween background
182+
background-image: url("https://i.imgur.com/fLEstk9.png");
183+
background-repeat: no-repeat;
184+
background-blend-mode: multiply;
185+
181186
&__collapse-custom-header {
182187
position: relative;
183188
padding: 1rem 1.2rem;

packages/docs/components/layout/header/ThemeSwitch.vue

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
<template>
22
<div>
33
<VaSwitch
4+
:model-value="false"
5+
color="#5123a1"
6+
off-color="#ffd300"
7+
style="--va-switch-checker-background-color: #252723;"
8+
class="theme-switch-button"
9+
name="Switch theme"
10+
:aria-label="`Switch theme to ${isDark ? 'light' : 'dark'}`"
11+
>
12+
<template #innerLabel>
13+
<div class="va-text-center">
14+
<VaIcon
15+
size="24px"
16+
:name="'fas-ghost'"
17+
/>
18+
</div>
19+
</template>
20+
</VaSwitch>
21+
<!-- <VaSwitch
422
v-model="isDark"
523
color="#5123a1"
624
off-color="#ffd300"
@@ -17,7 +35,7 @@
1735
/>
1836
</div>
1937
</template>
20-
</VaSwitch>
38+
</VaSwitch> -->
2139
</div>
2240
</template>
2341

packages/docs/components/layout/header/VersionDropdown.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const uiVersion = packageUi.version
1212

1313
<style lang="scss">
1414
.version-dropdown {
15-
color: var(--va-text-primary);
1615
font-weight: 600;
16+
opacity: 0.8;
1717
}
1818
</style>

packages/docs/config/vuestic-config.ts

+51-20
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ const VaButtonLandingHeader = {
1313
'hover-opacity': '1',
1414
}
1515

16+
const halloweenColors = {
17+
primary: '#e36414',
18+
secondary: '#EDE8E8',
19+
success: '#3D9209',
20+
info: '#158DE3',
21+
danger: '#E42222',
22+
warning: '#FFD43A',
23+
24+
// Background Colors
25+
backgroundPrimary: '#000',
26+
backgroundSecondary: '#210505',
27+
backgroundElement: '#941b0c',
28+
backgroundBorder: '#621708',
29+
// secondary: '#666E75',
30+
// backgroundPrimary: '#FFFFFF',
31+
backgroundSidebar: '#130C0C',
32+
backgroundLanding: '#f4f9fc',
33+
backgroundLandingBorder: 'rgba(155, 179, 206, 0.8)',
34+
}
35+
1636
export const VuesticConfig = defineVuesticConfig({
1737
icons,
1838
components: {
@@ -26,6 +46,9 @@ export const VuesticConfig = defineVuesticConfig({
2646
VaBacktop: {
2747
target: scrollWrapperSelector,
2848
},
49+
VaSidebar: {
50+
color: 'backgroundSidebar',
51+
},
2952
presets: {
3053
VaButton: {
3154
addToCart: { round: true, color: 'success', icon: 'shopping_cart', 'slot:default': 'Add to card' },
@@ -47,32 +70,38 @@ export const VuesticConfig = defineVuesticConfig({
4770
},
4871
colors: {
4972
presets: {
73+
// Halloween colors
5074
light: {
51-
secondary: '#666E75',
52-
backgroundPrimary: '#FFFFFF',
53-
backgroundLanding: '#f4f9fc',
54-
backgroundLandingBorder: 'rgba(155, 179, 206, 0.8)',
75+
...halloweenColors
5576
},
5677
dark: {
57-
// TODO: Check color contrast: current primary is bad
58-
// primary: '#5389F3',
59-
secondary: '#818992',
60-
backgroundLanding: '#070d14',
61-
backgroundLandingBorder: 'rgba(43, 49, 56, 0.8)',
78+
...halloweenColors
6279
},
80+
81+
// light: {
82+
// secondary: '#666E75',
83+
// backgroundPrimary: '#FFFFFF',
84+
// backgroundLanding: '#f4f9fc',
85+
// backgroundLandingBorder: 'rgba(155, 179, 206, 0.8)',
86+
// },
87+
// dark: {
88+
// secondary: '#818992',
89+
// backgroundLanding: '#070d14',
90+
// backgroundLandingBorder: 'rgba(43, 49, 56, 0.8)',
91+
// },
6392
landing: {
64-
primary: '#1827A7',
65-
secondary: '#767C88',
66-
success: '#3D9209',
67-
info: '#158DE3',
68-
danger: '#E42222',
69-
warning: '#FFD43A',
93+
// primary: '#1827A7',
94+
// secondary: '#767C88',
95+
// success: '#3D9209',
96+
// info: '#158DE3',
97+
// danger: '#E42222',
98+
// warning: '#FFD43A',
7099

71-
// Background Colors
72-
backgroundPrimary: '#f6f6f6',
73-
backgroundSecondary: '#FFFFFF',
74-
backgroundElement: '#ECF0F1',
75-
backgroundBorder: '#DEE5F2',
100+
// // Background Colors
101+
// backgroundPrimary: '#f6f6f6',
102+
// backgroundSecondary: '#FFFFFF',
103+
// backgroundElement: '#ECF0F1',
104+
// backgroundBorder: '#DEE5F2',
76105

77106
// Text Colors
78107
textPrimary: '#262824',
@@ -81,6 +110,8 @@ export const VuesticConfig = defineVuesticConfig({
81110
// Misc
82111
shadow: 'rgba(0, 0, 0, 0.12)',
83112
focus: '#49A8FF',
113+
114+
...halloweenColors,
84115
},
85116
},
86117
},

packages/docs/layouts/default.vue

+82-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="docs-layout"
44
>
55
<div
6-
v-if="false"
6+
v-show="doShowLoader"
77
class="docs-layout__loader"
88
/>
99
<VaLayout
@@ -43,6 +43,7 @@ const breakpoints = useBreakpoint()
4343
4444
const isSidebarVisible = ref(!breakpoints.smDown)
4545
const isOptionsVisible = ref(false)
46+
const doShowLoader = ref(true)
4647
4748
watch(() => breakpoints.smDown, (newValue: boolean) => {
4849
isSidebarVisible.value = !newValue
@@ -57,9 +58,41 @@ afterEach(() => {
5758
isOptionsVisible.value = false
5859
})
5960
61+
62+
// Halloween background animation
63+
const mouse = ref({ x: 0, y: 0 })
64+
const mouseInertia = ref({ x: 0, y: 0 })
65+
66+
const onMouseMove = (e: MouseEvent) => {
67+
mouse.value = { x: e.clientX, y: e.clientY }
68+
mouseInertia.value = {
69+
x: mouseInertia.value.x * 0.9 + (mouse.value.x - mouseInertia.value.x) * 0.1,
70+
y: mouseInertia.value.y * 0.9 + (mouse.value.y - mouseInertia.value.y) * 0.1,
71+
}
72+
}
73+
6074
onMounted(() => {
6175
scrollToElement()
6276
isSidebarVisible.value = !breakpoints.smDown
77+
setTimeout(() => {
78+
doShowLoader.value = false
79+
}, 300);
80+
81+
window.addEventListener('mousemove', onMouseMove)
82+
83+
const resetInertia = () => {
84+
mouseInertia.value = {
85+
x: mouseInertia.value.x * 0.9 + -1 * 0.1,
86+
y: mouseInertia.value.y * 0.9 + -1 * 0.1,
87+
}
88+
requestAnimationFrame(resetInertia)
89+
}
90+
91+
requestAnimationFrame(resetInertia)
92+
})
93+
94+
onUnmounted(() => {
95+
window.removeEventListener('mousemove', onMouseMove)
6396
})
6497
6598
useHead({
@@ -90,6 +123,49 @@ html {
90123
91124
.docs-layout {
92125
font-family: var(--va-font-family);
126+
// Halloween background
127+
position: relative;
128+
129+
&::before {
130+
content: '';
131+
position: absolute;
132+
height: 100%;
133+
min-height: 100vh;
134+
width: 100%;
135+
background-image: url("https://i.imgur.com/rpnciUN.png");
136+
background-size: 30%;
137+
background-color: #000;
138+
z-index: 0;
139+
opacity: 0.5;
140+
}
141+
142+
&::after {
143+
content: '';
144+
position: fixed;
145+
top: 0;
146+
height: 100%;
147+
width: 100%;
148+
background: radial-gradient(circle at v-bind("mouse.x + 'px'") v-bind("mouse.y + 'px'"), transparent 0%, #000 v-bind("(mouseInertia.x + mouseInertia.y) * 0.5 + 'px'"));
149+
background-size: 200%;
150+
z-index: 0;
151+
pointer-events: none;
152+
}
153+
154+
& > * {
155+
z-index: 1;
156+
}
157+
158+
@keyframes background-jump {
159+
0% {
160+
background-position: center;
161+
}
162+
50% {
163+
background-position: center 45%;
164+
}
165+
100% {
166+
background-position: center;
167+
}
168+
}
93169
94170
&__loader {
95171
position: fixed;
@@ -99,6 +175,11 @@ html {
99175
height: 100%;
100176
z-index: 9999999;
101177
background: var(--va-background-primary);
178+
// Halloween loader
179+
background-image: url("https://i.imgur.com/yLvFZoB.png");
180+
background-position: center;
181+
background-repeat: no-repeat;
182+
animation: background-jump 1s infinite;
102183
}
103184
104185
&__main-section {
@@ -112,7 +193,6 @@ html {
112193
width: 100%;
113194
display: flex;
114195
justify-content: center;
115-
background: var(--va-background-primary);
116196
}
117197
118198
&__page-content {

0 commit comments

Comments
 (0)