Skip to content

Commit 118b3e6

Browse files
feat: pixel font for title (#555)
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 6e790a9 commit 118b3e6

5 files changed

Lines changed: 35 additions & 2 deletions

File tree

src/components/Hero/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ export default function Hero(): JSX.Element {
3939
<article className={clsx("hero", styles.heroBanner)}>
4040
<div className={`${styles.container}`}>
4141
<h1 className={`hero__title ${styles.title} ${styles.item}`}>
42-
<span ref={el} className={styles.bold} />
43-
{!typedLoaded && <span className={styles.bold}>Build</span>} ideas in
42+
<span ref={el} className={`${styles.bold} ${styles.typed}`} />
43+
{!typedLoaded && (
44+
<span className={`${styles.bold} ${styles.typed}`}>Build</span>
45+
)}{" "}
46+
ideas in
4447
<br />
4548
your <span className={styles.bold}>container</span>
4649
</h1>

src/components/Hero/styles.module.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@
9696
font-weight: bold;
9797
}
9898

99+
.typed {
100+
font-family: "Pixelify Sans", sans-serif;
101+
102+
font-size: 2.75rem;
103+
104+
@media screen and (min-width: 480px) {
105+
font-size: 2.95rem;
106+
}
107+
108+
@media screen and (min-width: 768px) {
109+
font-size: 4.6rem;
110+
}
111+
112+
@media screen and (min-width: 960px) {
113+
font-size: 5.85rem;
114+
}
115+
}
116+
99117
.llms {
100118
display: inline-flex;
101119
justify-content: center;

src/css/font-faces.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,15 @@
4545
/* Chrome 26+, Opera 23+, Firefox 39+ */
4646
url("/fonts/jetbrains-mono-v11-latin-800italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
4747
}
48+
49+
/* pixelify-sans-700 - latin */
50+
@font-face {
51+
font-family: "Pixelify Sans";
52+
font-style: normal;
53+
font-weight: 700;
54+
src:
55+
local(""),
56+
url("/fonts/pixelify-sans-v3-latin-700.woff2") format("woff2"),
57+
/* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
58+
url("/fonts/pixelify-sans-v3-latin-700.ttf") format("truetype"); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
59+
}
23 KB
Binary file not shown.
7.72 KB
Binary file not shown.

0 commit comments

Comments
 (0)