Skip to content

Commit d70c4f5

Browse files
authored
37 update theme with the one from the style guide (#38)
# Description Update theme to use the styleguide. - Closes #37 ## Type of change - [x] New Feature # How to Test? Pull branch and see that styles look the same and are not broken in any screen size. 1. Pull and run locally 2. See that css is coming through as well as the theme. Best examples are the underline on hover in the nav (showing css) and the colors properly coming through (tailwind config) # Checklist: - [x] I have performed a self-review of my code - [x] I have commented my code & PR, particularly in hard-to-understand areas - [x] I have checked at all the breakpoints to make sure it works on all screen sizes --------- Co-authored-by: Claire Olmstead <[email protected]>
1 parent 2f54c7a commit d70c4f5

18 files changed

+918
-111
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ test-results
1111
vite.config.js.timestamp-*
1212
vite.config.ts.timestamp-*
1313
_site
14+
.idea

package-lock.json

Lines changed: 882 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@
4343
"vite": "^5.4.10",
4444
"vitest": "2.1.3"
4545
},
46-
"type": "module"
46+
"type": "module",
47+
"dependencies": {
48+
"@frequency-chain/style-guide": "^0.1.9"
49+
}
4750
}

src/components/FounderProfile.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
export let linkedinUrl: string;
66
</script>
77

8-
<div class="max-w-[100px] sm:text-indigo lg:text-cream">
8+
<div class="max-w-[100px] sm:text-brightBlue lg:text-cream">
99
<a href={linkedinUrl} target="_blank">
1010
<div class="relative">
1111
<img src={imgSrc} alt="headshot" class="mb-4 h-[100px] rounded-full drop-shadow-lg" />

src/components/IconBtn.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<a
88
aria-label={label}
9-
class="h-[38px] w-[38px] rounded bg-black p-1 transition-colors duration-[0.3s] hover:bg-indigo"
9+
class="hover:bg-indigo h-[38px] w-[38px] rounded bg-black p-1 transition-colors duration-[0.3s]"
1010
{href}
1111
target="_blank"
1212
>

src/components/JoinSocials.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</script>
66

77
<div class="w-full max-w-[425px] pb-[80px] sm:pt-[80px] lg:pl-[140px] lg:pt-6">
8-
<h3 class="text-base font-semibold">Join the Digital Revolution</h3>
8+
<h3 class="text-normal font-semibold">Join the Digital Revolution</h3>
99
<p class="text-sm">Become a part of shaping the future of the digital landscape with Frequency.</p>
1010
<div class="mt-4 flex gap-4" aria-label="Social Links">
1111
<IconBtn label="X/Twitter" imgSrc={XLogo} href={'https://twitter.com/one_frequency'} />

src/components/OpenCloseIcon.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
y1="50%"
1717
x2="100%"
1818
y2="50%"
19-
class={`origin-left translate-y-[20%] stroke-[10%] transition-all duration-[0.3s] ${isOpen ? 'translate-x-[8px] translate-y-[35%] -rotate-45 stroke-cream' : 'rotate-0 stroke-indigo'}`}
19+
class={`origin-left translate-y-[20%] stroke-[10%] transition-all duration-[0.3s] ${isOpen ? 'translate-x-[8px] translate-y-[35%] -rotate-45 stroke-cream' : 'stroke-indigo rotate-0'}`}
2020
/>
2121
<line
2222
x1="0"
2323
y1="50%"
2424
x2="100%"
2525
y2="50%"
26-
class={`origin-left translate-y-[-20%] stroke-[10%] transition-all duration-[0.3s] ${isOpen ? 'translate-x-[8px] translate-y-[-35%] rotate-45 stroke-cream' : 'rotate-0 stroke-indigo'}`}
26+
class={`origin-left translate-y-[-20%] stroke-[10%] transition-all duration-[0.3s] ${isOpen ? 'translate-x-[8px] translate-y-[-35%] rotate-45 stroke-cream' : 'stroke-indigo rotate-0'}`}
2727
/>
2828
</svg>
2929
</button>

src/components/SectionNumber.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</script>
55

66
<div
7-
class={`absolute -rotate-90 text-[150px] font-black leading-none ${isLeft ? 'sm:-left-3' : 'sm:-right-3'} bottom-0 sm:text-[85px] md:text-100 lg:-right-6 lg:left-[auto] ${classes}`}
7+
class={`absolute -rotate-90 text-[150px] font-black leading-none ${isLeft ? 'sm:-left-3' : 'sm:-right-3'} bottom-0 sm:text-[85px] md:text-[100px] lg:-right-6 lg:left-[auto] ${classes}`}
88
>
99
<slot />
1010
</div>

src/components/Sections/Section2.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="flex gap-4 text-right sm:items-end lg:items-start">
1616
<!-- Desktop section number -->
1717
<SectionNumber
18-
classes="md:text-100 lg:block lg:font-normal relative lg:bottom-auto lg:right-auto lg:top-[16px] sm:hidden"
18+
classes="md:text-[100px] lg:block lg:font-normal relative lg:bottom-auto lg:right-auto lg:top-[16px] sm:hidden"
1919
>.02</SectionNumber
2020
>
2121
<SlideIn>

src/components/Sections/Section3.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<SectionWrapper
1111
id="section3"
12-
classes="z-0 flex sm:justify-center md:justify-center overflow-hidden sm:pt-[40px] vertical-lg:pt-0 text-cream"
12+
classes="z-0 flex sm:justify-center md:justify-center overflow-hidden sm:pt-[40px] vertical-lg:pt-0 text-white"
1313
>
1414
<!-- Desktop Wave -->
1515
<div class="absolute bottom-0 left-0 h-full w-[50%] sm:hidden lg:block vertical-lg:hidden">
@@ -40,5 +40,5 @@
4040
</SectionParagraph>
4141
</SplitSection>
4242
</section>
43-
<SectionNumber classes="sm:bottom-4 lg:-bottom-[20px] lg:text-200 lg:-right-[80px]">.03</SectionNumber>
43+
<SectionNumber classes="sm:bottom-4 lg:-bottom-[20px] lg:text-[200px] lg:-right-[80px]">.03</SectionNumber>
4444
</SectionWrapper>

src/components/Sections/Section4.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
</SectionParagraph>
2626
</section>
2727
</div>
28-
<SectionNumber isLeft={true} classes="text-yellow sm:bottom-[100px] md:bottom-[120px] lg:text-200 lg:-right-[80px]"
29-
>.04</SectionNumber
28+
<SectionNumber
29+
isLeft={true}
30+
classes="text-yellow sm:bottom-[100px] md:bottom-[120px] lg:text-[200px] lg:-right-[80px]">.04</SectionNumber
3031
>
3132

3233
<div class="absolute bottom-0 left-0 flex h-full w-full">

src/components/Sections/Section5.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<SectionWrapper
1111
id="section5"
12-
classes="relative bg-indigo flex sm:flex-col vertical-lg:flex-col lg:flex-row sm:pt-[50px] vertical-lg:pt-[50px] lg:pt-0"
12+
classes="relative bg-brightBlue flex sm:flex-col vertical-lg:flex-col lg:flex-row sm:pt-[50px] vertical-lg:pt-[50px] lg:pt-0"
1313
>
1414
<!-- Image -->
1515
<div class="absolute bottom-0 left-0 flex h-full w-full overflow-hidden sm:hidden lg:block vertical-lg:hidden">
@@ -25,23 +25,23 @@
2525
<SlideIn>
2626
<h2 class="title-75 text-yellow sm:pr-5 lg:max-w-[600px]">The Core of Our Technology</h2>
2727
</SlideIn>
28-
<SectionParagraph classes="sm:pr-5 md:pr-[140px] lg:px-0 text-cream">
28+
<SectionParagraph classes="sm:pr-5 md:pr-[140px] lg:px-0 text-white">
2929
The creators of Frequency are at the forefront of innovation. They've created the Decentralized Social
3030
Networking Protocol (DSNP), an open-source solution that establishes a shared social graph independent of
3131
specific applications or centralized platforms.
3232
</SectionParagraph>
3333
<a href="https://docs.frequency.xyz/" target="_blank"
3434
><button
35-
class="max-w-[200px] border-2 border-cream px-10 py-3 text-xs font-semibold text-cream transition-colors duration-500 hover:bg-cream hover:bg-opacity-30"
35+
class="max-w-[200px] border-2 border-white px-10 py-3 text-xs font-semibold text-white transition-colors duration-500 hover:bg-cream hover:bg-opacity-30"
3636
>Learn More</button
3737
></a
3838
>
39-
<SectionNumber classes="text-cream sm:hidden lg:block mr-[70px] bottom-4 right-0 vertical-lg:hidden"
39+
<SectionNumber classes="text-white sm:hidden lg:block mr-[70px] bottom-4 right-0 vertical-lg:hidden"
4040
>.05</SectionNumber
4141
>
4242
</section>
4343

4444
<Founders />
4545
</div>
46-
<SectionNumber classes="text-cream bottom-4 lg:hidden vertical-lg:block">.05</SectionNumber>
46+
<SectionNumber classes="text-white bottom-4 lg:hidden vertical-lg:block">.05</SectionNumber>
4747
</SectionWrapper>

src/components/Sections/Section5Wave.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@keyframes wave {
55
0%,
66
100% {
7-
margin-left: 20;
7+
margin-left: 20px;
88
}
99
50% {
1010
margin-left: -20px;

src/lib/assets/section5waves.svg

Lines changed: 1 addition & 1 deletion
Loading

src/routes/(home)/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
1313
$: section = 1;
1414
15-
const indigo = '#5E69FF';
15+
const brightBlue = '#5E69FF';
1616
const cream = '#FEFAF3';
1717
1818
const logoMap = new Map([
19-
[1, { logo: indigo, nav: 'navy' }],
19+
[1, { logo: brightBlue, nav: 'navy' }],
2020
[2, { logo: cream, nav: 'cream' }],
21-
[3, { logo: indigo, nav: 'cream' }],
22-
[4, { logo: indigo, nav: 'navy' }],
21+
[3, { logo: brightBlue, nav: 'cream' }],
22+
[4, { logo: brightBlue, nav: 'navy' }],
2323
[5, { logo: cream, nav: 'cream' }],
2424
]);
2525

src/routes/+layout.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import '../style/app.css';
2-
32
// since there's no server side data here, we can prerender
43
export const prerender = true;
54
export const ssr = false;

src/style/app.css

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
@apply font-title leading-[1] tracking-wider sm:text-[40px] md:text-[44px] lg:text-[44px];
2222
}
2323
.title-75 {
24-
@apply font-title leading-[1] tracking-wide sm:text-[40px] md:text-[55px] lg:text-75;
24+
@apply font-title leading-[1] tracking-wide sm:text-[40px] md:text-[55px] lg:text-[75px];
2525
}
2626
.title-100 {
27-
@apply font-title leading-[1] tracking-wide sm:text-[55px] md:text-75 lg:text-100;
27+
@apply font-title leading-[1] tracking-wide sm:text-[55px] md:text-[75px] lg:text-[100px];
2828
}
2929
.subtitle {
3030
@apply font-semibold sm:text-lg md:text-lg lg:text-xl;
3131
}
3232
.body {
33-
@apply sm:text-xs md:text-sm lg:text-base;
33+
@apply sm:text-xs md:text-sm lg:text-normal;
3434
}
3535

3636
/* Layout */
@@ -50,25 +50,6 @@
5050
@apply w-full;
5151
}
5252

53-
/* Underline on hover animation */
54-
.underline-on-hover {
55-
@apply relative block cursor-pointer overflow-hidden px-0 py-1;
56-
}
57-
58-
.underline-on-hover::after {
59-
@apply absolute bottom-0 left-0 h-[0.1em] w-full opacity-0 transition-opacity content-[''];
60-
transition:
61-
opacity 300ms,
62-
transform 300ms;
63-
transform: translate3d(-100%, 0, 0);
64-
}
65-
66-
.underline-on-hover:hover::after,
67-
.underline-on-hover:focus::after {
68-
@apply opacity-100;
69-
transform: translate3d(0, 0, 0);
70-
}
71-
7253
@keyframes slide-from-right {
7354
0% {
7455
opacity: 0;
@@ -89,14 +70,14 @@
8970

9071
@layer base {
9172
body {
92-
@apply flex flex-col items-center bg-cream text-base text-black;
73+
@apply flex flex-col items-center bg-white text-normal text-black;
9374
}
9475

9576
button {
9677
@apply select-none;
9778
}
9879

9980
::placeholder {
100-
@apply text-disabled !important;
81+
@apply text-gray2 !important;
10182
}
10283
}

tailwind.config.js

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/** @type {import('tailwindcss').Config} */
2+
import frequencyConfig from '@frequency-chain/style-guide/tailwind.config';
23

34
import { MAX_PAGE_WIDTH } from './src/lib/consts';
45

@@ -10,23 +11,8 @@ export default {
1011
sans: ['Poppins', 'sans-serif'],
1112
},
1213
colors: {
13-
transparent: 'transparent',
14-
current: 'currentColor',
15-
white: '#ffffff',
16-
black: '#000000',
17-
disabled: '#BCBAC0',
18-
cream: '#FEFAF3',
19-
navy: '#19455E',
20-
yellow: '#FFD747',
21-
teal: '#4BA0A5',
22-
tealBright: '#00B6AF',
23-
purple: '#2B2F6E',
24-
orange: '#F87C48',
25-
indigo: '#5E69FF',
2614
darkIndigo: '#445BC3',
27-
rose: '#A06B87',
28-
red: '#EB5757',
29-
gray: '#C8CDD0',
15+
tealBright: '#00B6AF',
3016
},
3117
width: {
3218
page: `${MAX_PAGE_WIDTH}px`,
@@ -40,19 +26,6 @@ export default {
4026
page: `${MAX_PAGE_WIDTH}px`,
4127
full: '100%',
4228
},
43-
extend: {
44-
fontSize: {
45-
xs: '14px',
46-
sm: '16px',
47-
base: '18px',
48-
lg: '20px',
49-
xl: '25px',
50-
'2xl': '30px',
51-
75: '75px',
52-
100: '100px',
53-
200: '200px',
54-
},
55-
},
5629
screens: {
5730
sm: '0px',
5831
md: '900px',
@@ -65,4 +38,5 @@ export default {
6538
},
6639
},
6740
safelist: ['after:bg-navy', 'after:bg-cream', 'invalid:border-red'],
41+
presets: [frequencyConfig],
6842
};

0 commit comments

Comments
 (0)