Skip to content

Commit 5a8f3ef

Browse files
committed
Add custom font files and update tailwind configuration
1 parent 58eec39 commit 5a8f3ef

File tree

7 files changed

+46
-56
lines changed

7 files changed

+46
-56
lines changed

assets/css/tailwind.css

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,56 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
body {
6-
font-family: "Work Sans", sans-serif;
5+
@font-face {
6+
font-family: 'Geist';
7+
src: url('/fonts/Geist-Bold.otf') format('opentype');
8+
font-weight: bold;
9+
font-style: normal;
10+
font-display: swap;
711
}
812

9-
.swiper-pagination-bullet{
10-
@apply !bg-gray-200 dark:!bg-gray-700 !opacity-100;
13+
@font-face {
14+
font-family: 'Geist';
15+
src: url('/fonts/Geist-SemiBold.otf') format('opentype');
16+
font-weight: 600;
17+
font-style: normal;
18+
font-display: swap;
1119
}
1220

13-
.swiper-pagination-bullet-active{
14-
@apply !bg-gray-950 dark:!bg-white;
21+
@font-face {
22+
font-family: 'Geist';
23+
src: url('/fonts/Geist-Medium.otf') format('opentype');
24+
font-weight: 500;
25+
font-style: normal;
26+
font-display: swap;
1527
}
1628

17-
@keyframes loop {
18-
to {
19-
offset-distance: 100%;
20-
}
29+
@font-face {
30+
font-family: 'Geist';
31+
src: url('/fonts/Geist-Regular.otf') format('opentype');
32+
font-weight: normal;
33+
font-style: normal;
34+
font-display: swap;
2135
}
2236

23-
@layer utilities {
24-
.animate-slide {
25-
animation: slide 3s infinite;
26-
}
27-
.animate-slide-2 {
28-
animation: slide2 3s infinite;
29-
}
30-
}
31-
@layer components {
32-
.navbar-active .hamburger div:first-child {
33-
@apply translate-y-1.5 rotate-45;
34-
}
35-
.navbar-active .hamburger div:last-child {
36-
@apply -translate-y-1 -rotate-45;
37-
}
38-
.navbar-active div:first-child div:first-child div:last-child {
39-
@apply block lg:flex;
40-
}
37+
@font-face {
38+
font-family: 'GeistMono';
39+
src: url('/fonts/GeistMono-Regular.otf') format('opentype');
40+
font-weight: normal;
41+
font-style: normal;
42+
font-display: swap;
4143
}
42-
.isToggled #line1 {
43-
@apply translate-y-1.5 rotate-45;
44-
}
45-
.isToggled #line2 {
46-
@apply -translate-y-1 -rotate-45;
44+
45+
.swiper-pagination-bullet{
46+
@apply !bg-gray-200 dark:!bg-gray-700 !opacity-100;
4747
}
4848

49-
@keyframes slide {
50-
0% {
51-
transform: translateX(-20rem);
52-
}
53-
25% {
54-
transform: translateX(-10rem);
55-
}
56-
100% {
57-
transform: translateX(15rem);
58-
}
49+
.swiper-pagination-bullet-active{
50+
@apply !bg-gray-950 dark:!bg-white;
5951
}
6052

61-
@keyframes slide2 {
62-
0% {
63-
transform: translateX(-20%);
64-
}
65-
75% {
66-
transform: translateX(20vw);
67-
opacity: 1;
68-
}
69-
100% {
70-
transform: translateX(60vw);
71-
opacity: 0;
53+
@keyframes loop {
54+
to {
55+
offset-distance: 100%;
7256
}
7357
}

public/fonts/Geist-Bold.otf

57.8 KB
Binary file not shown.

public/fonts/Geist-Medium.otf

55.7 KB
Binary file not shown.

public/fonts/Geist-Regular.otf

54.6 KB
Binary file not shown.

public/fonts/Geist-SemiBold.otf

56.4 KB
Binary file not shown.

public/fonts/GeistMono-Regular.otf

54.6 KB
Binary file not shown.

tailwind.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('tailwindcss').Config} */
22
import themer from "@tailus/themer";
3+
const defaultTheme = require("tailwindcss/defaultTheme");
34

45
module.exports = {
56
content: ["./*.html", "./*.js"],
@@ -18,14 +19,19 @@ module.exports = {
1819
white: colors.white,
1920
black: colors.black,
2021
transparent: colors.transparent,
21-
}),
22+
}),
23+
fontFamily: {
24+
sans: ['Geist', 'Inter', ...defaultTheme.fontFamily.sans],
25+
mono : ['GeistMono', 'fira-code', ...defaultTheme.fontFamily.mono],
26+
},
2227
keyframes: {
2328
loop: {
2429
to: {
2530
"offset-distance": "100%",
2631
},
2732
},
28-
}
33+
},
34+
2935
},
3036
plugins: [
3137
themer({

0 commit comments

Comments
 (0)