Skip to content

Commit 4ed8719

Browse files
Merge pull request #2 from brionmario/main
chore(www): fix `good brush` local font
2 parents d521e7a + ad6c113 commit 4ed8719

File tree

8 files changed

+38
-8
lines changed

8 files changed

+38
-8
lines changed

apps/www/app/custom.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url('nelum-kuluna.css');
1+
@import 'nelum-kuluna.scss';
22

33
.underlined {
44
position: relative;

apps/www/app/favicon.ico

-10.3 KB
Binary file not shown.

apps/www/app/fonts.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* MIT License
3+
*
4+
* Copyright (c) 2024, Brion Mario
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
import {Space_Grotesk, Inter} from 'next/font/google';
26+
import {NextFont} from 'next/dist/compiled/@next/font';
27+
import localFont from 'next/font/local';
28+
29+
export const spaceGrotesk: NextFont = Space_Grotesk({subsets: ['latin'], weight: ['400', '500']});
30+
export const inter: NextFont = Inter({subsets: ['latin']});
31+
export const goodBrush: NextFont = localFont({src: '../public/fonts/Good Brush.ttf', variable: '--font-good-brush'});

apps/www/app/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,11 @@
2323
*/
2424

2525
import type {Metadata} from 'next';
26-
import {Space_Grotesk, Inter} from 'next/font/google';
2726
import {ReactElement} from 'react';
28-
import {NextFont} from 'next/dist/compiled/@next/font';
2927
import ThemeProvider from '@/components/ThemeProvider';
3028
import './globals.scss';
3129
import './custom.scss';
32-
33-
const spaceGrotesk: NextFont = Space_Grotesk({subsets: ['latin'], weight: ['400', '500']});
34-
const inter: NextFont = Inter({subsets: ['latin']});
30+
import {inter, spaceGrotesk} from './fonts';
3531

3632
export const metadata: Metadata = {
3733
title: 'Create Next App',
File renamed without changes.

apps/www/components/Hero.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import CoffeeBeans from '@/icons/CoffeeBeans';
3535
import RegisterButton from './RegisterButton';
3636
import FlipWords from './FlipWords';
3737
import Meetup from '@/icons/Meetup';
38+
import {goodBrush} from '@/app/fonts';
3839

3940
export type HeroProps = HTMLAttributes<HTMLDivElement> & TestableComponent;
4041

@@ -62,7 +63,9 @@ const Hero: ForwardRefExoticComponent<HeroProps & RefAttributes<HTMLDivElement>>
6263
)}
6364
>
6465
<div className="z-50 flex flex-col items-center justify-center gap-5 px-6 text-center lg:gap-6">
65-
<h1 className="hero__title font-good-brush tracking-[-0.04em] leading-none text-[40px] md:text-5xl lg:text-[12em] max-w-lg md:max-w-xl lg:max-w-4xl text-center text-white">
66+
<h1
67+
className={`hero__title ${goodBrush.className} tracking-[-0.04em] leading-none text-[40px] md:text-5xl lg:text-[12em] max-w-lg md:max-w-xl lg:max-w-4xl text-center text-white`}
68+
>
6669
JavaScript Colombo
6770
</h1>
6871
<h3 className="flex gap-2 flex-wrap justify-center items-center font-space-grotesk leading-snug dark:text-[#FFFFFFB2] text-[#00000080] text-[20px] lg:text-xl max-w-md md:max-w-xl lg:max-w-[640px] text-center">
386 KB
Binary file not shown.

apps/www/tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import type {Config} from 'tailwindcss';
2626
import defaultTheme from 'tailwindcss/defaultTheme';
2727
import animate from 'tailwindcss-animate';
28+
import {goodBrush} from './app/fonts';
2829

2930
const config: Config = {
3031
darkMode: ['class'],
@@ -80,7 +81,6 @@ const config: Config = {
8081
fontFamily: {
8182
sans: ['Inter', ...defaultTheme.fontFamily.sans],
8283
'space-grotesk': ['Space Grotesk', 'monospace'],
83-
'good-brush': ['Good Brush'],
8484
mono: [
8585
'Menlo',
8686
'Monaco',

0 commit comments

Comments
 (0)