fix
This commit is contained in:
parent
81bf55ca5c
commit
e2a8f8a555
|
|
@ -5,7 +5,6 @@ export const _ = {
|
||||||
async api() {
|
async api() {
|
||||||
const { req } = apiContext(this);
|
const { req } = apiContext(this);
|
||||||
const pathname = req.url.split("/_font").pop();
|
const pathname = req.url.split("/_font").pop();
|
||||||
|
|
||||||
const f = await fetch(`https://fonts.googleapis.com${pathname}`);
|
const f = await fetch(`https://fonts.googleapis.com${pathname}`);
|
||||||
const body = await f.arrayBuffer();
|
const body = await f.arrayBuffer();
|
||||||
const res = new Response(body);
|
const res = new Response(body);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600&display=swap');
|
@import url('https://prasi.web.andromedia.co.id/_font/css2?family=Source+Sans+3:wght@400;600&display=swap');
|
||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');
|
@import url('https://prasi.web.andromedia.co.id/_font/css2?family=JetBrains+Mono&display=swap');
|
||||||
|
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export const cssFont = (
|
||||||
if (glbFont.loadedFonts.indexOf(font.family) < 0) {
|
if (glbFont.loadedFonts.indexOf(font.family) < 0) {
|
||||||
glbFont.loadedFonts.push(font.family);
|
glbFont.loadedFonts.push(font.family);
|
||||||
const doc = document;
|
const doc = document;
|
||||||
const _href = `https://fonts.googleapis.com/css2?family=${fontName}${weight}`;
|
const _href = `https://prasi.web.andromedia.co.id/css2?family=${fontName}${weight}`;
|
||||||
if (!doc.querySelector(`link[href="${_href}]`)) {
|
if (!doc.querySelector(`link[href="${_href}]`)) {
|
||||||
const link = doc.createElement("link");
|
const link = doc.createElement("link");
|
||||||
link.type = "text/css";
|
link.type = "text/css";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue