Skip to content

Commit

Permalink
Add fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sumi-k committed Feb 8, 2024
1 parent 1505f81 commit e1bb40c
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 5 deletions.
2 changes: 1 addition & 1 deletion infrastructure/frontend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Resources:
HttpApiFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: .output/server/
CodeUri: nuxt-frontend/.output/server/
Handler: index.handler
Runtime: nodejs20.x
Architectures:
Expand Down
64 changes: 64 additions & 0 deletions nuxt-frontend/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,67 @@
font-weight: 600;
src: url(../fonts/Open-Sans-SemiBold.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Source CodePro;
font-style: normal;
font-weight: 400;
src: url(../fonts/Source-codePro.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Poppins Regular;
font-style: normal;
font-weight: 400;
src: url(../fonts/Poppins-Regular.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Poppins Medium;
font-style: medium;
font-weight: 500;
src: url(../fonts/Poppins-Medium.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Inter-ExtraLight;
font-style: normal;
font-weight: 200;
src: url(../fonts/Inter-ExtraLight.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Comme-Light;
font-style: normal;
font-weight: 300;
src: url(../fonts/Comme-Light.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Comme-Regular;
font-style: normal;
font-weight: 400;
src: url(../fonts/Comme-Regular.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Comme-Medium;
font-style: normal;
font-weight: 500;
src: url(../fonts/Comme-Medium.woff2) format("woff2");
}

@font-face {
font-display: swap;
font-family: Comme-SemiBold;
font-style: normal;
font-weight: 600;
src: url(../fonts/Comme-SemiBold.woff2) format("woff2");
}
Binary file added nuxt-frontend/assets/fonts/Comme-Light.woff2
Binary file not shown.
Binary file added nuxt-frontend/assets/fonts/Comme-Medium.woff2
Binary file not shown.
Binary file added nuxt-frontend/assets/fonts/Comme-Regular.woff2
Binary file not shown.
Binary file added nuxt-frontend/assets/fonts/Comme-SemiBold.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added nuxt-frontend/assets/fonts/Poppins-Regular.woff2
Binary file not shown.
Binary file added nuxt-frontend/assets/fonts/Source-codePro.woff2
Binary file not shown.
8 changes: 5 additions & 3 deletions nuxt-frontend/pages/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ if (status.value !== config.SUCCESS) {
published_time = new Date(post?.value?.published_on).toLocaleTimeString();
await useAsyncData("recommandedBlog", () =>
recStore.loadRecommandedBlog(slug.value, config.SHOW_DRAFT_POSTS),
recStore.loadRecommandedBlog(slug.value, config.SHOW_DRAFT_POSTS)
);
recommandedPosts = filterPostsByCategoryAndTag(
post.value,
recommandedBlog.value,
recommandedBlog.value
);
useHead({
Expand All @@ -76,7 +76,9 @@ useHead({
onLoad: () => {
// Load media preview
document.querySelectorAll("oembed[url]").forEach((element) => {
iframely.load(element, element.attributes.url.value);
if (!element.getAttribute("data-loaded")) {
iframely.load(element, element.attributes.url.value);
}
});
},
},
Expand Down
10 changes: 9 additions & 1 deletion nuxt-frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ module.exports = {
"inter-regular": ["Inter-Regular"],
"opensans-bold": ["Opensans-Bold"],
"opensans-semibold": ["Opensans-SemiBold"],
"source-codepro": ["Source CodePro"],
"poppins-regular": ["Poppins Regular"],
"poppins-medium": ["Poppins Medium"],
"inter-extralight": ["Inter-ExtraLight"],
"comme-light": ["Comme-Light"],
"comme-regular": ["Comme-Regular"],
"comme-medium": ["Comme-Medium"],
"comme-semibold": ["Comme-SemiBold"],
},
letterSpacing: {
"extra-wider": "0.0625em",
Expand Down Expand Up @@ -321,7 +329,7 @@ module.exports = {
120: "120deg",
135: "135deg",
}),
},
}
);
}),
function ({ addComponents }) {
Expand Down

0 comments on commit e1bb40c

Please sign in to comment.