Skip to content

Commit

Permalink
fix: implent fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
MGarcia93 committed Jul 12, 2023
1 parent 9b5b536 commit 7245465
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 36 deletions.
69 changes: 53 additions & 16 deletions public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,60 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
@font-face {
font-family: Messapia;
font-weight: 400;
src: url(fonts\messapia\Messapia-Regular.otf) format('otf');
}
@font-face {
font-family: Messapia;
font-weight: 700;
src: url(fonts\messapia\Messapia-Bold.otf) format('otf');
}
@font-face {
font-family: 'Inter';
font-weight: 500;
src: url(fonts/Inter/Inter-Regular.otf) format('otf');
}

@font-face {
font-family: Messapia;
font-weight: 400;
src: url('public/fonts/messapia/Messapia-Regular.otf') format('opentype');
}
@font-face {
font-family: Messapia;
font-weight: 700;
src: url('public/fonts/messapia/Messapia-Bold.otf') format('opentype');
}
@font-face {
font-family: 'Inter';
font-weight: 300;
src: url('public/fonts/Inter/Inter-Light.otf') format('opentype');
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Inter';
font-weight: 400;
src: url('fonts/Inter/Inter-Regular.otf') format('opentype');
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Inter';
font-weight: 500;
src: url('public/fonts/Inter/Inter-Medium.ttf') format('truetype');
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Inter';
font-weight: 600;
src: url('public/fonts/Inter/Inter-SemiBold.ttf') format('truetype');
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Inter';
font-weight: 700;
src: url('public/fonts/Inter/Inter-Bold.ttf') format('truetype');
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Inter';
font-weight: 800;
src: url('public/fonts/Inter/Inter-Black.ttf') format('truetype');
font-style: normal;
font-display: swap;
}

@layer utilities {
.color-gradient {
@apply from-[#FEAC5E] via-[#C779D0] to-[#4BC0C8];
Expand Down
22 changes: 2 additions & 20 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,9 @@ module.exports = {
extend: {
fontFamily: {
sans: ['Messapia', 'Helvetica'],
Inter: ['Inter', 'sans-serif'],
},
},
},
plugins: [
plugin(function ({ addBase }) {
addBase({
'@font-face': {
fontFamily: 'Messapia',
fontWheight: '400',
src: 'url(/fonts/messapia/Messapia-Regular.otf)',
},
})
}),
plugin(function ({ addBase }) {
addBase({
'@font-face': {
fontFamily: 'Messapia',
fontWheight: '700',
src: "url(/fonts/messapia/Messapia-Bold.otf) format('otf')",
},
})
}),
],
plugins: [],
}

0 comments on commit 7245465

Please sign in to comment.