@@ -6,29 +6,46 @@ const getModulesSnippet = (selectedModules: Modules[], key: "html" | "css" | "js
66}
77export const generateIndexVue = ( selectedModules : Modules [ ] ) => {
88 const html = getModulesSnippet ( selectedModules , "html" )
9- const css = getModulesSnippet ( selectedModules , "css" )
10- const js = getModulesSnippet ( selectedModules , "js" )
119
1210 return `<template>
13- <div class="main-container">
14- <div class="heading">
15- <h1 class="heading__title">
16- Welcome to your new <span class="gradient__text">sidebase</span> app!
17- </h1>
18- <p class="heading__credits">
19- Read our documentation <a href="https://sidebase.io/sidebase/welcome" target="_blank">here</a>.
20- ${ selectedModules . length > 0 ? "Get started in no time with the following amazing modules:" : "Add some of our amazing modules <a href='https://sidebase.io' target='_blank'>here</a>." }
21- </p>
11+ <div class="wrapper">
12+ <div class="margins" style="padding-top: 3rem; ">
13+ <div class="content">
14+ <h1 class="heading">
15+ Welcome to your new <span class="gradient__text">sidebase</span> app!
16+ </h1>
17+ <p class="description">
18+ Read our documentation <a class="hover-underline-animation" href="https://sidebase.io/sidebase/welcome" target="_blank">here</a>.
19+ ${ selectedModules . length > 0 ? "Get started in no time with the following amazing modules:" : "Add some of our amazing modules <a href='https://sidebase.io' target='_blank'>here</a>." }
20+ </p>
21+ </div>
22+
23+ <div class="modules_grid">${ html }
24+ </div>
2225 </div>
23- <div class="cards">${ html }
26+
27+ <div class="margins footer">
28+ <div style="color: #D1D5DB">
29+ Developed with love by
30+ <NuxtLink href="https://sidestream.tech" target="_blank" class="hover-underline-animation">
31+ Sidestream
32+ </NuxtLink>
33+ </div>
34+ <div class="social">
35+ <NuxtLink href="https://discord.gg/VzABbVsqAc" target="_blank" class="hover-underline-animation">
36+ Discord
37+ </NuxtLink>
38+ <NuxtLink href="https://twitter.com/sidebase_io" target="_blank" class="hover-underline-animation">
39+ Twitter
40+ </NuxtLink>
41+ <NuxtLink href="https://github.com/sidebase" target="_blank" class="hover-underline-animation">
42+ Github
43+ </NuxtLink>
44+ </div>
2445 </div>
2546 </div>
2647</template>
27- ${ js && `
28- <script>
29- ${ js }
30- </script>\n` }
31- <style scoped>
48+ <style>
3249 * {
3350 margin: 0;
3451 padding: 0;
@@ -42,116 +59,166 @@ ${js}
4259 color: #484848;
4360 }
4461
45- .main-container {
46- max-width: 45vw;
47- margin: auto;
48- padding-top: 60px;
49- }
50-
51- /* HEADING */
52-
53- .heading {
54- text-align: center;
62+ /* Layout */
63+ .wrapper {
64+ display: flex;
65+ flex-direction: column;
66+ justify-content: space-between;
67+ width: 100%;
68+ min-height: 100vh;
69+ color: #ffffff;
70+ background-color: #0E0E10;
5571 }
72+ .margins {
73+ padding-left: 1rem;
74+ padding-right: 1rem;
5675
57- .heading__title {
58- font-weight: 600;
59- font-size: 40px;
76+ @media (min-width: 1024px) {
77+ padding-left: 5rem;
78+ padding-right: 5rem;
79+ }
6080 }
6181
62- .gradient__text {
63- background: linear-gradient(to right, #7bceb6 10%, #12a87b 40%, #0FCF97 60%, #7bceb6 90%);
64- background-size: 200% auto;
65- color: #000;
66- background-clip: text;
67- text-fill-color: transparent;
68- -webkit-background-clip: text;
69- -webkit-text-fill-color: transparent;
70- animation: shine 1s linear infinite;
82+ /* Heading */
83+ .content {
84+ display: flex;
85+ flex-direction: column;
86+ gap: 0.5rem;
7187 }
88+ .content .heading {
89+ font-size: 2.4rem;
90+ line-height: 2.25rem;
91+ font-weight: 700;
7292
73- @keyframes shine {
74- to {
75- background-position: 200% center ;
93+ @media (min-width: 1280px) {
94+ font-size: 3rem;
95+ line-height: 1 ;
7696 }
7797 }
7898
79- .heading__credits {
80- color: #888888;
81- font-size: 25px;
82- transition: all 0.5s;
83- }
99+ .content .description {
100+ font-size: 1.125rem;
101+ line-height: 1.75rem;
102+ color: #9CA3AF;
84103
85- .heading__credits a {
86- text-decoration: underline;
104+ @media (min-width: 1280px) {
105+ font-size: 1.25rem;
106+ line-height: 1.75rem;
107+ }
87108 }
88109
89- /* CARDS */
90- .cards {
110+ /* Modules */
111+ .modules_grid {
91112 display: grid;
92- gap: 20px;
93- grid-template-columns: repeat(2, minmax(0, 1fr));
94- margin-top: 30px;
95- }
113+ margin-top: 2.5rem;
114+ gap: 2rem;
96115
116+ @media (min-width: 768px) {
117+ grid-template-columns: repeat(2, minmax(0, 1fr));
118+ }
119+
120+ @media (min-width: 1280px) {
121+ grid-template-columns: repeat(3, minmax(0, 1fr));
122+ }
123+ }
97124 .card {
98- padding: 20px;
99- width: 100%;
100- min-height: 200px;
101- display: grid;
102- grid-template-rows: 20px 50px 1fr 50px;
125+ position: relative;
126+ padding: 30px;
103127 border-radius: 10px;
104- box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.25);
105- transition: all 0.2s;
106- cursor: default;
128+ transition: 0.5s;
129+ box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.2),
130+ inset -5px -5px 15px rgba(255, 255, 255, 0.1),
131+ 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.1);
107132 }
108133
109- .card:hover {
110- box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.4);
111- transform: scale(1.01);
134+ .card .layout {
135+ display: flex;
136+ flex-direction: column;
137+ gap: 2rem;
138+ justify-content: space-between;
139+ height: 100%;
112140 }
113141
114- .card__link {
115- position: relative ;
116- text-decoration: underline ;
117- color: rgba(255, 255, 255, 0.9) ;
142+ .card .layout .group {
143+ display: flex ;
144+ flex-direction: column ;
145+ gap: 0.75rem ;
118146 }
119147
120- .card__title {
121- font-weight: 400 ;
122- color: #ffffff ;
123- font-size: 30px ;
148+ .card .layout .heading {
149+ font-size: 1.5rem ;
150+ line-height: 2rem ;
151+ font-weight: 700 ;
124152 }
125153
126- .card__body {
127- grid-row: 2/4 ;
154+ .card .layout .description {
155+ color: #D1D5DB ;
128156 }
129157
130- .card__body p {
131- color: #ffffff;
158+ .card .layout .group .actions {
159+ display: flex;
160+ gap: 0.5rem;
132161 }
133162
134- .card__action {
135- grid-row: 5/6;
136- align-self: center;
163+ /* Footer */
164+ .footer {
137165 display: flex;
138- gap: 20px
166+ padding-top: 1rem;
167+ padding-bottom: 1rem;
168+ margin-top: 2.5rem;
169+ justify-content: space-between;
170+ align-items: center;
171+ border-top-width: 1px;
172+ border-color: #1F2937;
173+ width: 100%;
139174 }
140175
141- /* RESPONSIVE */
176+ .footer .social {
177+ display: flex;
178+ gap: 1.25rem;
179+ align-items: center;
180+ }
142181
143- @media (max-width: 1600px) {
144- .main-container {
145- max-width: 100vw;
146- padding: 50px;
147- }
182+ /* Special */
183+ .gradient__text {
184+ background: linear-gradient(to right, #7bceb6 10%, #12a87b 40%, #0FCF97 60%, #7bceb6 90%);
185+ background-size: 200% auto;
186+ color: #000;
187+ background-clip: text;
188+ -webkit-background-clip: text;
189+ -webkit-text-fill-color: transparent;
190+ animation: shine 1s linear infinite;
191+ }
148192
149- .cards {
150- justify-content: center;
151- grid-template-columns: repeat(1, minmax(0, 1fr)) ;
193+ @keyframes shine {
194+ to {
195+ background-position: 200% center ;
152196 }
153197 }
154- ${ css }
198+ .hover-underline-animation {
199+ display: inline-block;
200+ position: relative;
201+ color: #5BF3C7;
202+ text-decoration: none;
203+ }
204+
205+ .hover-underline-animation::after {
206+ content: '';
207+ position: absolute;
208+ width: 100%;
209+ transform: scaleX(0);
210+ height: 2px;
211+ bottom: 0;
212+ left: 0;
213+ background-color: #5BF3C7;
214+ transform-origin: bottom right;
215+ transition: transform 0.25s ease-out;
216+ }
217+
218+ .hover-underline-animation:hover::after {
219+ transform: scaleX(1);
220+ transform-origin: bottom left;
221+ }
155222</style>
156223`
157224}
0 commit comments