From 5e32d98379f4269d32123b8156b3f955300fcc6c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 6 Oct 2023 08:54:54 +0700 Subject: Add label on merchant xml --- src/pages/google_merchant/products/[page].js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js index eeda4347..352b2989 100644 --- a/src/pages/google_merchant/products/[page].js +++ b/src/pages/google_merchant/products/[page].js @@ -45,7 +45,10 @@ export async function getServerSideProps({ res, query }) { 'g:condition': { '#text': 'new' }, 'g:availability': { '#text': availability }, 'g:brand': { '#text': product.manufacture?.name || '' }, - 'g:price': { '#text': `${Math.round(product.lowestPrice.price * 1.11)} IDR` } + 'g:price': { '#text': `${Math.round(product.lowestPrice.price * 1.11)} IDR` }, + 'g:custom_label_0': { + '#text': product.stockTotal > 0 ? 'Stok Tersedia' : 'Stok Tidak Tersedia' + } } if (product.lowestPrice.discountPercentage > 0) { item['g:sale_price'] = { -- cgit v1.2.3 From 39078f7b6978daaf062d1911b08d0207205526ad Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Mon, 9 Oct 2023 11:32:36 +0700 Subject: change rounded --- src/lib/product/components/ProductCard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 91c1f40e..3b96ac32 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -38,7 +38,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
-
+
{product?.lowestPrice.discountPercentage}% -- cgit v1.2.3 From 4e3d9f20b7106f12c576eeb402da2b29c660a414 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Tue, 3 Oct 2023 15:37:59 +0700 Subject: bugfix widget wa di page variant detail --- src/core/components/layouts/BasicLayout.jsx | 5 ++--- src/pages/shop/product/variant/[slug].jsx | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx index e6bd4de0..9441dbd7 100644 --- a/src/core/components/layouts/BasicLayout.jsx +++ b/src/core/components/layouts/BasicLayout.jsx @@ -24,13 +24,12 @@ const BasicLayout = ({ children }) => { const router = useRouter() const { product } = useProductContext() - useEffect(() => { - if (router.pathname === '/shop/product/[slug]') { + if (router.pathname === '/shop/product/[slug]' || router.pathname === '/shop/product/variant/[slug]') { setPayloadWa({ name: product?.name, manufacture: product?.manufacture.name, - url: createSlug('/shop/product/', product?.name, product?.id, true) + url: process.env.NEXT_PUBLIC_SELF_HOST + router.asPath }) setTemplateWA('product') diff --git a/src/pages/shop/product/variant/[slug].jsx b/src/pages/shop/product/variant/[slug].jsx index d0790249..401bce82 100644 --- a/src/pages/shop/product/variant/[slug].jsx +++ b/src/pages/shop/product/variant/[slug].jsx @@ -7,6 +7,8 @@ import { useRouter } from 'next/router' import cookie from 'cookie' import variantApi from '@/lib/product/api/variantApi' import axios from 'axios' +import { useProductContext } from '@/contexts/ProductContext' +import { useEffect } from 'react' const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout')) const Product = dynamic(() => import('@/lib/product/components/Product/Product')) @@ -19,16 +21,18 @@ export async function getServerSideProps(context) { const tier = auth.pricelist ? auth.pricelist : false const authToken = auth?.token || '' - let response = await axios( - `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/variant-detail?id=` + getIdFromSlug(slug) +'&auth=' + tier + `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/variant-detail?id=` + + getIdFromSlug(slug) + + '&auth=' + + tier ) let product = response.data // let product = await variantApi({ id: getIdFromSlug(slug), headers: { Token: authToken } }) - + if (product?.length == 1) { product = product[0] - /* const regexHtmlTags = /(<([^>]+)>)/gi + /* const regexHtmlTags = /(<([^>]+)>)/gi const regexHtmlTagsExceptP = /<\/?(?!p\b)[^>]*>/g product.description = product.description .replace(regexHtmlTagsExceptP, ' ') @@ -46,6 +50,14 @@ export async function getServerSideProps(context) { export default function ProductDetail({ product }) { const router = useRouter() + const { setProduct } = useProductContext() + + useEffect(() => { + if (product) { + setProduct(product) + } + }, [product, setProduct]) + if (!product) return return ( -- cgit v1.2.3 From e12eb243d2efb9f18a5a963fbdf5e456ce3cd249 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 6 Oct 2023 09:14:33 +0700 Subject: Update label on google merchant xml --- src/pages/google_merchant/products/[page].js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js index 352b2989..d6309090 100644 --- a/src/pages/google_merchant/products/[page].js +++ b/src/pages/google_merchant/products/[page].js @@ -45,11 +45,15 @@ export async function getServerSideProps({ res, query }) { 'g:condition': { '#text': 'new' }, 'g:availability': { '#text': availability }, 'g:brand': { '#text': product.manufacture?.name || '' }, - 'g:price': { '#text': `${Math.round(product.lowestPrice.price * 1.11)} IDR` }, - 'g:custom_label_0': { - '#text': product.stockTotal > 0 ? 'Stok Tersedia' : 'Stok Tidak Tersedia' - } + 'g:price': { '#text': `${Math.round(product.lowestPrice.price * 1.11)} IDR` } + } + + if (product.stockTotal == 0) { + item['g:custom_label_0'] = { '#text': 'Stok Tidak Tersedia' } + } else { + item['g:custom_label_1'] = { '#text': 'Stok Tersedia' } } + if (product.lowestPrice.discountPercentage > 0) { item['g:sale_price'] = { '#text': `${Math.round(product.lowestPrice.priceDiscount * 1.11)} IDR` -- cgit v1.2.3 From 5726dd5375454e8c168ca159023381ad9e3648b8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 9 Oct 2023 10:30:10 +0700 Subject: Add local font --- public/fonts/Inter/Inter-Black.woff | Bin 0 -> 138764 bytes public/fonts/Inter/Inter-Black.woff2 | Bin 0 -> 102868 bytes public/fonts/Inter/Inter-BlackItalic.woff | Bin 0 -> 146824 bytes public/fonts/Inter/Inter-BlackItalic.woff2 | Bin 0 -> 108752 bytes public/fonts/Inter/Inter-Bold.woff | Bin 0 -> 143208 bytes public/fonts/Inter/Inter-Bold.woff2 | Bin 0 -> 106140 bytes public/fonts/Inter/Inter-BoldItalic.woff | Bin 0 -> 151052 bytes public/fonts/Inter/Inter-BoldItalic.woff2 | Bin 0 -> 111808 bytes public/fonts/Inter/Inter-ExtraBold.woff | Bin 0 -> 142920 bytes public/fonts/Inter/Inter-ExtraBold.woff2 | Bin 0 -> 106108 bytes public/fonts/Inter/Inter-ExtraBoldItalic.woff | Bin 0 -> 150628 bytes public/fonts/Inter/Inter-ExtraBoldItalic.woff2 | Bin 0 -> 111708 bytes public/fonts/Inter/Inter-ExtraLight.woff | Bin 0 -> 140724 bytes public/fonts/Inter/Inter-ExtraLight.woff2 | Bin 0 -> 104232 bytes public/fonts/Inter/Inter-ExtraLightItalic.woff | Bin 0 -> 149996 bytes public/fonts/Inter/Inter-ExtraLightItalic.woff2 | Bin 0 -> 111392 bytes public/fonts/Inter/Inter-Italic.woff | Bin 0 -> 144372 bytes public/fonts/Inter/Inter-Italic.woff2 | Bin 0 -> 106876 bytes public/fonts/Inter/Inter-Light.woff | Bin 0 -> 140632 bytes public/fonts/Inter/Inter-Light.woff2 | Bin 0 -> 104332 bytes public/fonts/Inter/Inter-LightItalic.woff | Bin 0 -> 150092 bytes public/fonts/Inter/Inter-LightItalic.woff2 | Bin 0 -> 111332 bytes public/fonts/Inter/Inter-Medium.woff | Bin 0 -> 142552 bytes public/fonts/Inter/Inter-Medium.woff2 | Bin 0 -> 105924 bytes public/fonts/Inter/Inter-MediumItalic.woff | Bin 0 -> 150988 bytes public/fonts/Inter/Inter-MediumItalic.woff2 | Bin 0 -> 112184 bytes public/fonts/Inter/Inter-Regular.woff | Bin 0 -> 133844 bytes public/fonts/Inter/Inter-Regular.woff2 | Bin 0 -> 98868 bytes public/fonts/Inter/Inter-SemiBold.woff | Bin 0 -> 142932 bytes public/fonts/Inter/Inter-SemiBold.woff2 | Bin 0 -> 105804 bytes public/fonts/Inter/Inter-SemiBoldItalic.woff | Bin 0 -> 151180 bytes public/fonts/Inter/Inter-SemiBoldItalic.woff2 | Bin 0 -> 112048 bytes public/fonts/Inter/Inter-Thin.woff | Bin 0 -> 135920 bytes public/fonts/Inter/Inter-Thin.woff2 | Bin 0 -> 99632 bytes public/fonts/Inter/Inter-ThinItalic.woff | Bin 0 -> 145480 bytes public/fonts/Inter/Inter-ThinItalic.woff2 | Bin 0 -> 106496 bytes public/fonts/Inter/Inter-italic.var.woff2 | Bin 0 -> 245036 bytes public/fonts/Inter/Inter-roman.var.woff2 | Bin 0 -> 227180 bytes public/fonts/Inter/Inter.var.woff2 | Bin 0 -> 324864 bytes public/fonts/Inter/inter.css | 199 ++++++++++++++++++++++++ src/pages/_document.jsx | 3 +- src/styles/globals.css | 44 ++++-- tailwind.config.js | 2 +- 43 files changed, 232 insertions(+), 16 deletions(-) create mode 100644 public/fonts/Inter/Inter-Black.woff create mode 100644 public/fonts/Inter/Inter-Black.woff2 create mode 100644 public/fonts/Inter/Inter-BlackItalic.woff create mode 100644 public/fonts/Inter/Inter-BlackItalic.woff2 create mode 100644 public/fonts/Inter/Inter-Bold.woff create mode 100644 public/fonts/Inter/Inter-Bold.woff2 create mode 100644 public/fonts/Inter/Inter-BoldItalic.woff create mode 100644 public/fonts/Inter/Inter-BoldItalic.woff2 create mode 100644 public/fonts/Inter/Inter-ExtraBold.woff create mode 100644 public/fonts/Inter/Inter-ExtraBold.woff2 create mode 100644 public/fonts/Inter/Inter-ExtraBoldItalic.woff create mode 100644 public/fonts/Inter/Inter-ExtraBoldItalic.woff2 create mode 100644 public/fonts/Inter/Inter-ExtraLight.woff create mode 100644 public/fonts/Inter/Inter-ExtraLight.woff2 create mode 100644 public/fonts/Inter/Inter-ExtraLightItalic.woff create mode 100644 public/fonts/Inter/Inter-ExtraLightItalic.woff2 create mode 100644 public/fonts/Inter/Inter-Italic.woff create mode 100644 public/fonts/Inter/Inter-Italic.woff2 create mode 100644 public/fonts/Inter/Inter-Light.woff create mode 100644 public/fonts/Inter/Inter-Light.woff2 create mode 100644 public/fonts/Inter/Inter-LightItalic.woff create mode 100644 public/fonts/Inter/Inter-LightItalic.woff2 create mode 100644 public/fonts/Inter/Inter-Medium.woff create mode 100644 public/fonts/Inter/Inter-Medium.woff2 create mode 100644 public/fonts/Inter/Inter-MediumItalic.woff create mode 100644 public/fonts/Inter/Inter-MediumItalic.woff2 create mode 100644 public/fonts/Inter/Inter-Regular.woff create mode 100644 public/fonts/Inter/Inter-Regular.woff2 create mode 100644 public/fonts/Inter/Inter-SemiBold.woff create mode 100644 public/fonts/Inter/Inter-SemiBold.woff2 create mode 100644 public/fonts/Inter/Inter-SemiBoldItalic.woff create mode 100644 public/fonts/Inter/Inter-SemiBoldItalic.woff2 create mode 100644 public/fonts/Inter/Inter-Thin.woff create mode 100644 public/fonts/Inter/Inter-Thin.woff2 create mode 100644 public/fonts/Inter/Inter-ThinItalic.woff create mode 100644 public/fonts/Inter/Inter-ThinItalic.woff2 create mode 100644 public/fonts/Inter/Inter-italic.var.woff2 create mode 100644 public/fonts/Inter/Inter-roman.var.woff2 create mode 100644 public/fonts/Inter/Inter.var.woff2 create mode 100644 public/fonts/Inter/inter.css diff --git a/public/fonts/Inter/Inter-Black.woff b/public/fonts/Inter/Inter-Black.woff new file mode 100644 index 00000000..a18593a0 Binary files /dev/null and b/public/fonts/Inter/Inter-Black.woff differ diff --git a/public/fonts/Inter/Inter-Black.woff2 b/public/fonts/Inter/Inter-Black.woff2 new file mode 100644 index 00000000..68f64c9e Binary files /dev/null and b/public/fonts/Inter/Inter-Black.woff2 differ diff --git a/public/fonts/Inter/Inter-BlackItalic.woff b/public/fonts/Inter/Inter-BlackItalic.woff new file mode 100644 index 00000000..b6b01943 Binary files /dev/null and b/public/fonts/Inter/Inter-BlackItalic.woff differ diff --git a/public/fonts/Inter/Inter-BlackItalic.woff2 b/public/fonts/Inter/Inter-BlackItalic.woff2 new file mode 100644 index 00000000..1c9c7ca8 Binary files /dev/null and b/public/fonts/Inter/Inter-BlackItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-Bold.woff b/public/fonts/Inter/Inter-Bold.woff new file mode 100644 index 00000000..eaf3d4bf Binary files /dev/null and b/public/fonts/Inter/Inter-Bold.woff differ diff --git a/public/fonts/Inter/Inter-Bold.woff2 b/public/fonts/Inter/Inter-Bold.woff2 new file mode 100644 index 00000000..2846f29c Binary files /dev/null and b/public/fonts/Inter/Inter-Bold.woff2 differ diff --git a/public/fonts/Inter/Inter-BoldItalic.woff b/public/fonts/Inter/Inter-BoldItalic.woff new file mode 100644 index 00000000..32750761 Binary files /dev/null and b/public/fonts/Inter/Inter-BoldItalic.woff differ diff --git a/public/fonts/Inter/Inter-BoldItalic.woff2 b/public/fonts/Inter/Inter-BoldItalic.woff2 new file mode 100644 index 00000000..0b1fe8e1 Binary files /dev/null and b/public/fonts/Inter/Inter-BoldItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-ExtraBold.woff b/public/fonts/Inter/Inter-ExtraBold.woff new file mode 100644 index 00000000..c2c17ede Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraBold.woff differ diff --git a/public/fonts/Inter/Inter-ExtraBold.woff2 b/public/fonts/Inter/Inter-ExtraBold.woff2 new file mode 100644 index 00000000..c24c2bdc Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraBold.woff2 differ diff --git a/public/fonts/Inter/Inter-ExtraBoldItalic.woff b/public/fonts/Inter/Inter-ExtraBoldItalic.woff new file mode 100644 index 00000000..c42f7052 Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraBoldItalic.woff differ diff --git a/public/fonts/Inter/Inter-ExtraBoldItalic.woff2 b/public/fonts/Inter/Inter-ExtraBoldItalic.woff2 new file mode 100644 index 00000000..4a81dc79 Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraBoldItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-ExtraLight.woff b/public/fonts/Inter/Inter-ExtraLight.woff new file mode 100644 index 00000000..d0de5f39 Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraLight.woff differ diff --git a/public/fonts/Inter/Inter-ExtraLight.woff2 b/public/fonts/Inter/Inter-ExtraLight.woff2 new file mode 100644 index 00000000..f2ea706f Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraLight.woff2 differ diff --git a/public/fonts/Inter/Inter-ExtraLightItalic.woff b/public/fonts/Inter/Inter-ExtraLightItalic.woff new file mode 100644 index 00000000..81f1a28e Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraLightItalic.woff differ diff --git a/public/fonts/Inter/Inter-ExtraLightItalic.woff2 b/public/fonts/Inter/Inter-ExtraLightItalic.woff2 new file mode 100644 index 00000000..9af717ba Binary files /dev/null and b/public/fonts/Inter/Inter-ExtraLightItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-Italic.woff b/public/fonts/Inter/Inter-Italic.woff new file mode 100644 index 00000000..a806b382 Binary files /dev/null and b/public/fonts/Inter/Inter-Italic.woff differ diff --git a/public/fonts/Inter/Inter-Italic.woff2 b/public/fonts/Inter/Inter-Italic.woff2 new file mode 100644 index 00000000..a619fc54 Binary files /dev/null and b/public/fonts/Inter/Inter-Italic.woff2 differ diff --git a/public/fonts/Inter/Inter-Light.woff b/public/fonts/Inter/Inter-Light.woff new file mode 100644 index 00000000..c496464d Binary files /dev/null and b/public/fonts/Inter/Inter-Light.woff differ diff --git a/public/fonts/Inter/Inter-Light.woff2 b/public/fonts/Inter/Inter-Light.woff2 new file mode 100644 index 00000000..bc4be665 Binary files /dev/null and b/public/fonts/Inter/Inter-Light.woff2 differ diff --git a/public/fonts/Inter/Inter-LightItalic.woff b/public/fonts/Inter/Inter-LightItalic.woff new file mode 100644 index 00000000..f84a9de3 Binary files /dev/null and b/public/fonts/Inter/Inter-LightItalic.woff differ diff --git a/public/fonts/Inter/Inter-LightItalic.woff2 b/public/fonts/Inter/Inter-LightItalic.woff2 new file mode 100644 index 00000000..842b2dfc Binary files /dev/null and b/public/fonts/Inter/Inter-LightItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-Medium.woff b/public/fonts/Inter/Inter-Medium.woff new file mode 100644 index 00000000..d546843f Binary files /dev/null and b/public/fonts/Inter/Inter-Medium.woff differ diff --git a/public/fonts/Inter/Inter-Medium.woff2 b/public/fonts/Inter/Inter-Medium.woff2 new file mode 100644 index 00000000..f92498a2 Binary files /dev/null and b/public/fonts/Inter/Inter-Medium.woff2 differ diff --git a/public/fonts/Inter/Inter-MediumItalic.woff b/public/fonts/Inter/Inter-MediumItalic.woff new file mode 100644 index 00000000..459a6568 Binary files /dev/null and b/public/fonts/Inter/Inter-MediumItalic.woff differ diff --git a/public/fonts/Inter/Inter-MediumItalic.woff2 b/public/fonts/Inter/Inter-MediumItalic.woff2 new file mode 100644 index 00000000..0e3019f4 Binary files /dev/null and b/public/fonts/Inter/Inter-MediumItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-Regular.woff b/public/fonts/Inter/Inter-Regular.woff new file mode 100644 index 00000000..62d3a618 Binary files /dev/null and b/public/fonts/Inter/Inter-Regular.woff differ diff --git a/public/fonts/Inter/Inter-Regular.woff2 b/public/fonts/Inter/Inter-Regular.woff2 new file mode 100644 index 00000000..6c2b6893 Binary files /dev/null and b/public/fonts/Inter/Inter-Regular.woff2 differ diff --git a/public/fonts/Inter/Inter-SemiBold.woff b/public/fonts/Inter/Inter-SemiBold.woff new file mode 100644 index 00000000..a815f43a Binary files /dev/null and b/public/fonts/Inter/Inter-SemiBold.woff differ diff --git a/public/fonts/Inter/Inter-SemiBold.woff2 b/public/fonts/Inter/Inter-SemiBold.woff2 new file mode 100644 index 00000000..611e90c9 Binary files /dev/null and b/public/fonts/Inter/Inter-SemiBold.woff2 differ diff --git a/public/fonts/Inter/Inter-SemiBoldItalic.woff b/public/fonts/Inter/Inter-SemiBoldItalic.woff new file mode 100644 index 00000000..909e43a9 Binary files /dev/null and b/public/fonts/Inter/Inter-SemiBoldItalic.woff differ diff --git a/public/fonts/Inter/Inter-SemiBoldItalic.woff2 b/public/fonts/Inter/Inter-SemiBoldItalic.woff2 new file mode 100644 index 00000000..545685bd Binary files /dev/null and b/public/fonts/Inter/Inter-SemiBoldItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-Thin.woff b/public/fonts/Inter/Inter-Thin.woff new file mode 100644 index 00000000..62bc58cd Binary files /dev/null and b/public/fonts/Inter/Inter-Thin.woff differ diff --git a/public/fonts/Inter/Inter-Thin.woff2 b/public/fonts/Inter/Inter-Thin.woff2 new file mode 100644 index 00000000..abbc3a5c Binary files /dev/null and b/public/fonts/Inter/Inter-Thin.woff2 differ diff --git a/public/fonts/Inter/Inter-ThinItalic.woff b/public/fonts/Inter/Inter-ThinItalic.woff new file mode 100644 index 00000000..700a7f06 Binary files /dev/null and b/public/fonts/Inter/Inter-ThinItalic.woff differ diff --git a/public/fonts/Inter/Inter-ThinItalic.woff2 b/public/fonts/Inter/Inter-ThinItalic.woff2 new file mode 100644 index 00000000..ab0b2002 Binary files /dev/null and b/public/fonts/Inter/Inter-ThinItalic.woff2 differ diff --git a/public/fonts/Inter/Inter-italic.var.woff2 b/public/fonts/Inter/Inter-italic.var.woff2 new file mode 100644 index 00000000..b826d5af Binary files /dev/null and b/public/fonts/Inter/Inter-italic.var.woff2 differ diff --git a/public/fonts/Inter/Inter-roman.var.woff2 b/public/fonts/Inter/Inter-roman.var.woff2 new file mode 100644 index 00000000..6a256a06 Binary files /dev/null and b/public/fonts/Inter/Inter-roman.var.woff2 differ diff --git a/public/fonts/Inter/Inter.var.woff2 b/public/fonts/Inter/Inter.var.woff2 new file mode 100644 index 00000000..365eedc5 Binary files /dev/null and b/public/fonts/Inter/Inter.var.woff2 differ diff --git a/public/fonts/Inter/inter.css b/public/fonts/Inter/inter.css new file mode 100644 index 00000000..de6ce273 --- /dev/null +++ b/public/fonts/Inter/inter.css @@ -0,0 +1,199 @@ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 100; + font-display: swap; + src: url('Inter-Thin.woff2?v=3.19') format('woff2'), + url('Inter-Thin.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 100; + font-display: swap; + src: url('Inter-ThinItalic.woff2?v=3.19') format('woff2'), + url('Inter-ThinItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 200; + font-display: swap; + src: url('Inter-ExtraLight.woff2?v=3.19') format('woff2'), + url('Inter-ExtraLight.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 200; + font-display: swap; + src: url('Inter-ExtraLightItalic.woff2?v=3.19') format('woff2'), + url('Inter-ExtraLightItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: url('Inter-Light.woff2?v=3.19') format('woff2'), + url('Inter-Light.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 300; + font-display: swap; + src: url('Inter-LightItalic.woff2?v=3.19') format('woff2'), + url('Inter-LightItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('Inter-Regular.woff2?v=3.19') format('woff2'), + url('Inter-Regular.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 400; + font-display: swap; + src: url('Inter-Italic.woff2?v=3.19') format('woff2'), + url('Inter-Italic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('Inter-Medium.woff2?v=3.19') format('woff2'), + url('Inter-Medium.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url('Inter-MediumItalic.woff2?v=3.19') format('woff2'), + url('Inter-MediumItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('Inter-SemiBold.woff2?v=3.19') format('woff2'), + url('Inter-SemiBold.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 600; + font-display: swap; + src: url('Inter-SemiBoldItalic.woff2?v=3.19') format('woff2'), + url('Inter-SemiBoldItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('Inter-Bold.woff2?v=3.19') format('woff2'), + url('Inter-Bold.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 700; + font-display: swap; + src: url('Inter-BoldItalic.woff2?v=3.19') format('woff2'), + url('Inter-BoldItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url('Inter-ExtraBold.woff2?v=3.19') format('woff2'), + url('Inter-ExtraBold.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 800; + font-display: swap; + src: url('Inter-ExtraBoldItalic.woff2?v=3.19') format('woff2'), + url('Inter-ExtraBoldItalic.woff?v=3.19') format('woff'); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: url('Inter-Black.woff2?v=3.19') format('woff2'), + url('Inter-Black.woff?v=3.19') format('woff'); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 900; + font-display: swap; + src: url('Inter-BlackItalic.woff2?v=3.19') format('woff2'), + url('Inter-BlackItalic.woff?v=3.19') format('woff'); +} + +/* ------------------------------------------------------- +Variable font. +Usage: + + html { font-family: 'Inter', sans-serif; } + @supports (font-variation-settings: normal) { + html { font-family: 'Inter var', sans-serif; } + } +*/ +@font-face { + font-family: 'Inter var'; + font-weight: 100 900; + font-display: swap; + font-style: normal; + font-named-instance: 'Regular'; + src: url('Inter-roman.var.woff2?v=3.19') format('woff2'); +} +@font-face { + font-family: 'Inter var'; + font-weight: 100 900; + font-display: swap; + font-style: italic; + font-named-instance: 'Italic'; + src: url('Inter-italic.var.woff2?v=3.19') format('woff2'); +} + +/* -------------------------------------------------------------------------- +[EXPERIMENTAL] Multi-axis, single variable font. + +Slant axis is not yet widely supported (as of February 2019) and thus this +multi-axis single variable font is opt-in rather than the default. + +When using this, you will probably need to set font-variation-settings +explicitly, e.g. + + * { font-variation-settings: "slnt" 0deg } + .italic { font-variation-settings: "slnt" 10deg } + +*/ +@font-face { + font-family: 'Inter var experimental'; + font-weight: 100 900; + font-display: swap; + font-style: oblique 0deg 10deg; + src: url('Inter.var.woff2?v=3.19') format('woff2'); +} diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx index 5f3d2367..7db088d8 100644 --- a/src/pages/_document.jsx +++ b/src/pages/_document.jsx @@ -19,6 +19,7 @@ export default function MyDocument() { +