Skip to content

Commit 2ef9f6c

Browse files
ErwanDecoster64ix
andauthored
feat: update style and components (#54)
Co-authored-by: Mathis Debuire <[email protected]>
1 parent 5db3d2c commit 2ef9f6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1777
-1209
lines changed

.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default withMermaid(
123123

124124
socialLinks: [
125125
{ icon: 'github', link: 'https://github.com/iExecBlockchainComputing' },
126-
{ icon: 'x', link: 'https://twitter.com/iEx_ec' },
126+
{ icon: 'x', link: 'https://x.com/iEx_ec' },
127127
{ icon: 'discord', link: 'https://discord.com/invite/pbt9m98wnU' },
128128
],
129129

.vitepress/sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function getSidebar() {
66
{
77
text: 'GET STARTED',
88
items: [
9-
{ text: '💡 Welcome', link: '/get-started/welcome' },
9+
{ text: 'Welcome', link: '/get-started/welcome' },
1010
{
1111
text: 'Toolkit',
1212
link: '/get-started/toolkit',

.vitepress/theme/style.css

Lines changed: 211 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,37 +92,114 @@
9292
--vp-c-default-2: var(--vp-c-gray-2);
9393
--vp-c-default-3: var(--vp-c-gray-3);
9494
--vp-c-default-soft: var(--vp-c-gray-soft);
95+
}
96+
97+
/**
98+
* Colors: Text
99+
*
100+
* - `text-1`: Used for primary text.
101+
*
102+
* - `text-2`: Used for muted texts, such as "inactive menu" or "info texts".
103+
*
104+
* - `text-3`: Used for subtle texts, such as "placeholders" or "caret icon".
105+
* -------------------------------------------------------------------------- */
95106

96-
--vp-c-brand-1: #917600;
97-
--vp-c-brand-2: #fcd15a;
98-
--vp-c-brand-3: #917600;
99-
--vp-c-brand-soft: var(--vp-c-indigo-soft);
107+
:root {
108+
/* --vp-c-text-1: #3c3c43; */
109+
--vp-c-text-1: #1d1d24;
110+
/* --vp-c-text-2: #67676c; */
111+
--vp-c-text-2: #5d5d69;
112+
--vp-c-text-3: #929295;
113+
}
114+
115+
.dark {
116+
/* --vp-c-text-1: #dfdfd6; */
117+
--vp-c-text-1: #fff;
118+
/* --vp-c-text-2: #98989f; */
119+
--vp-c-text-2: #a3a3a8;
120+
--vp-c-text-3: #6a6a71;
121+
}
122+
123+
/**
124+
* Colors: Function
125+
*
126+
* - `default`: The color used purely for subtle indication without any
127+
* special meanings attached to it such as bg color for menu hover state.
128+
*
129+
* - `brand`: Used for primary brand colors, such as link text, button with
130+
* brand theme, etc.
131+
*
132+
* - `tip`: Used to indicate useful information. The default theme uses the
133+
* brand color for this by default.
134+
*
135+
* - `warning`: Used to indicate warning to the users. Used in custom
136+
* container, badges, etc.
137+
*
138+
* - `danger`: Used to show error, or dangerous message to the users. Used
139+
* in custom container, badges, etc.
140+
*
141+
* To understand the scaling system, refer to "Colors: Palette" section.
142+
* -------------------------------------------------------------------------- */
143+
144+
:root {
145+
--vp-c-default-1: var(--vp-c-gray-1);
146+
--vp-c-default-2: var(--vp-c-gray-2);
147+
--vp-c-default-3: var(--vp-c-gray-3);
148+
--vp-c-default-soft: var(--vp-c-gray-soft);
149+
150+
--vp-c-brand-1: #183ee9;
151+
--vp-c-brand-2: var(--vp-c-indigo-2);
152+
--vp-c-brand-3: var(--vp-c-indigo-3);
153+
--vp-c-brand-soft: #e3e8ff;
100154

101155
--vp-c-tip-1: var(--vp-c-brand-1);
102156
--vp-c-tip-2: var(--vp-c-brand-2);
103157
--vp-c-tip-3: var(--vp-c-brand-3);
104158
--vp-c-tip-soft: var(--vp-c-brand-soft);
105159

106-
--vp-c-warning-1: var(--vp-c-yellow-1);
107-
--vp-c-warning-2: var(--vp-c-yellow-2);
108-
--vp-c-warning-3: var(--vp-c-yellow-3);
109-
--vp-c-warning-soft: var(--vp-c-yellow-soft);
160+
--vp-c-note-1: var(--vp-c-brand-1);
161+
--vp-c-note-2: var(--vp-c-brand-2);
162+
--vp-c-note-3: var(--vp-c-brand-3);
163+
--vp-c-note-soft: var(--vp-c-brand-soft);
164+
165+
--vp-c-success-1: #00704b;
166+
--vp-c-success-2: var(--vp-c-green-2);
167+
--vp-c-success-3: var(--vp-c-green-3);
168+
--vp-c-success-soft: #eafcf6;
110169

111170
--vp-c-important-1: var(--vp-c-purple-1);
112171
--vp-c-important-2: var(--vp-c-purple-2);
113172
--vp-c-important-3: var(--vp-c-purple-3);
114173
--vp-c-important-soft: var(--vp-c-purple-soft);
115174

116-
--vp-c-danger-1: var(--vp-c-red-1);
175+
--vp-c-warning-1: #da7b0b;
176+
--vp-c-warning-2: var(--vp-c-yellow-2);
177+
--vp-c-warning-3: var(--vp-c-yellow-3);
178+
--vp-c-warning-soft: #fdefde;
179+
180+
--vp-c-danger-1: #bf3131;
117181
--vp-c-danger-2: var(--vp-c-red-2);
118182
--vp-c-danger-3: var(--vp-c-red-3);
119-
--vp-c-danger-soft: var(--vp-c-red-soft);
183+
--vp-c-danger-soft: #f3d7d7;
184+
185+
--vp-c-caution-1: var(--vp-c-red-1);
186+
--vp-c-caution-2: var(--vp-c-red-2);
187+
--vp-c-caution-3: var(--vp-c-red-3);
188+
--vp-c-caution-soft: var(--vp-c-red-soft);
120189
}
121190

122191
.dark {
123-
--vp-c-brand-1: #fcd15a;
124-
--vp-c-brand-2: #917600;
125-
--vp-c-brand-3: #fcd15a;
192+
--vp-c-brand-1: #a2b3ff;
193+
--vp-c-brand-soft: #1d2032;
194+
195+
--vp-c-success-1: #74ecc5;
196+
--vp-c-success-soft: #243030;
197+
198+
--vp-c-danger-1: #bf3131;
199+
--vp-c-danger-soft: #2b1d21;
200+
201+
--vp-c-warning-1: #f49425;
202+
--vp-c-warning-soft: #312720;
126203
}
127204

128205
/**
@@ -195,3 +272,124 @@ html:not(.dark) .dark-only {
195272
input {
196273
@apply w-full rounded-md border border-[var(--vp-c-divider)] bg-[var(--vp-c-bg-soft)] px-4 py-3 text-base text-[var(--vp-c-text-1)] transition focus:border-[var(--vp-c-brand-2)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-70;
197274
}
275+
276+
/**
277+
* Component: Banner
278+
* -------------------------------------------------------------------------- */
279+
280+
:root {
281+
--c-bg-gradient-from: #e1e6f7;
282+
--c-bg-gradient-to: #f1f2f6;
283+
--c-border: #b6b7c3;
284+
--c-text: #b6b7c3;
285+
}
286+
287+
.dark {
288+
--c-bg-gradient-from: #2e334a;
289+
--c-bg-gradient-to: #292b34;
290+
--c-border: #5a5b68;
291+
--c-text: #b6b7c3;
292+
}
293+
294+
.vp-doc .custom-block {
295+
@apply p-6 text-base;
296+
}
297+
298+
.vp-doc .custom-block.tip {
299+
@apply border-l-4 border-l-[var(--vp-c-brand-1)];
300+
}
301+
302+
.vp-doc .custom-block.tip strong {
303+
@apply text-[var(--vp-c-brand-1)];
304+
}
305+
306+
.custom-block.tip code {
307+
@apply bg-[var(--vp-code-bg)];
308+
}
309+
310+
.vp-doc .custom-block.warning {
311+
@apply border-l-4 border-l-[var(--vp-c-warning-1)];
312+
}
313+
314+
.vp-doc .custom-block.warning strong {
315+
@apply text-[var(--vp-c-warning-1)];
316+
}
317+
318+
.vp-doc .custom-block.info {
319+
@apply border-l-4 border-l-[var(--vp-c-info-1)];
320+
}
321+
322+
.vp-doc .custom-block.info strong {
323+
@apply text-[var(--vp-c-info-1)];
324+
}
325+
326+
.vp-doc .custom-block.danger {
327+
@apply border-l-4 border-l-[var(--vp-c-danger-1)];
328+
}
329+
330+
.vp-doc .custom-block.danger strong {
331+
@apply text-[var(--vp-c-danger-1)];
332+
}
333+
334+
.vp-doc .custom-block.details {
335+
@apply border-l-4 border-l-[var(--vp-c-details-1)];
336+
}
337+
338+
.vp-doc .custom-block.details strong {
339+
@apply text-[var(--vp-c-details-1)];
340+
}
341+
342+
/**
343+
* HomePage: rewrite
344+
* -------------------------------------------------------------------------- */
345+
346+
:root {
347+
--vp-home-hero-name-color: var(--vp-c-text-1);
348+
--vp-button-brand-bg: #fcd15a;
349+
--vp-button-brand-hover-bg: #fcd15a;
350+
}
351+
352+
.VPHero .VPButton {
353+
@apply font-medium transition hover:-translate-y-0.5 hover:shadow-md;
354+
}
355+
356+
.VPHero .VPButton.brand {
357+
@apply text-[var(--vp-c-black)]!;
358+
}
359+
360+
.VPImage.image-src {
361+
@apply max-h-none max-w-none lg:size-[448px]!;
362+
}
363+
364+
article.box .icon {
365+
@apply size-14 rounded-[14px] bg-[var(--vp-c-bg-soft)] p-2;
366+
box-shadow:
367+
-12.835px -12.835px 21.392px 0 var(--vp-c-bg),
368+
12.835px 12.835px 21.392px 0 var(--vp-c-bg);
369+
}
370+
371+
.image .image-container {
372+
@apply relative flex items-center justify-center;
373+
}
374+
375+
.image .image-container::before {
376+
@apply pointer-events-none absolute top-[60%] left-1/2 -z-10 h-[929px] w-[995px] -translate-x-1/2 -translate-y-1/2 bg-contain bg-center bg-no-repeat;
377+
content: '';
378+
background-image: url('/bg-gradient.svg');
379+
}
380+
381+
.image .image-container .VPImage.image-src {
382+
@apply relative z-10;
383+
}
384+
385+
.VPHero.has-image.VPHomeHero {
386+
@apply pb-0;
387+
}
388+
389+
.VPLink.link.VPFeature {
390+
@apply relative rounded-[32px] border bg-gradient-to-b from-[var(--vp-c-white)] to-[var(--vp-c-white)] transition-all duration-300 *:relative *:z-20 after:absolute after:inset-px after:z-10 after:rounded-[31px] after:bg-[var(--vp-c-bg-soft)] hover:shadow-lg;
391+
}
392+
393+
.dark .VPLink.link.VPFeature {
394+
@apply from-[var(--c-border)] to-transparent;
395+
}

0 commit comments

Comments
 (0)