-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91f3a98
commit fe01b8a
Showing
2 changed files
with
80 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { Plugin } from '$fresh/server.ts'; | ||
import { ResinCssEmitter } from './deps.ts'; | ||
// import { ensureDir, walk } from 'https://deno.land/[email protected]/fs/mod.ts'; | ||
// import { join } from 'https://deno.land/[email protected]/path/mod.ts'; | ||
|
||
export default function lunchboxPlugin(): Plugin { | ||
return { | ||
|
@@ -16,26 +14,85 @@ export default function lunchboxPlugin(): Plugin { | |
cssText: ResinCssEmitter({})!.props.children, | ||
}, | ||
], | ||
head: [ | ||
// Link to your main CSS file | ||
`<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/styles.css"></link>`, | ||
|
||
links: [ | ||
{ | ||
rel: 'stylesheet', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/styles.css', | ||
}, | ||
// Preload Figtree fonts | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-700.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
|
||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-700.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Italic.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Regular.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
// Preload FiraCode fonts | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
|
||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Bold.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Regular.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
// Preload Libre Caslon Text fonts | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-700.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`, | ||
|
||
// Load fonts.css for any additional font-related styles | ||
`<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/fonts.css"></link>`, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-700.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Italic.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
{ | ||
rel: 'preload', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Regular.woff2', | ||
as: 'font', | ||
type: 'font/woff2', | ||
crossorigin: 'anonymous', | ||
}, | ||
// Load the fonts.css for font definitions | ||
{ | ||
rel: 'stylesheet', | ||
href: | ||
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/fonts.css', | ||
}, | ||
], | ||
}; | ||
}, | ||
|