mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 23:12:08 +03:00
landscape: add woff2 support, serve Inter & Source Code Pro
Fixes urbit/landscape#92
This commit is contained in:
parent
8c313eba67
commit
308da85851
@ -143,6 +143,7 @@
|
||||
%js (js-response:gen u.file)
|
||||
%css (css-response:gen u.file)
|
||||
%png (png-response:gen u.file)
|
||||
%woff2 (woff2-response:gen u.file)
|
||||
==
|
||||
:: get data matching the json and convert it
|
||||
::
|
||||
@ -400,7 +401,7 @@
|
||||
++ get-file-at
|
||||
|= [base=path file=path ext=@ta]
|
||||
^- (unit octs)
|
||||
?. ?=(?(%html %css %js %png) ext)
|
||||
?. ?=(?(%html %css %js %png %woff2) ext)
|
||||
~
|
||||
=/ =path
|
||||
:* (scot %p our.bowl)
|
||||
|
@ -213,12 +213,15 @@
|
||||
(lowercase (weld path.content.u.content suffix.u.content))
|
||||
==
|
||||
?. .^(? %cu scry-path) [not-found:gen %.n]
|
||||
?: ?=([~ %woff2] ext.req-line)
|
||||
:_ public.u.content
|
||||
[[200 [['content-type' '/font/woff2'] ~]] `.^(octs %cx scry-path)]
|
||||
=/ file (as-octs:mimes:html .^(@ %cx scry-path))
|
||||
:_ public.u.content
|
||||
?+ ext.req-line not-found:gen
|
||||
[~ %js] (js-response:gen file)
|
||||
[~ %css] (css-response:gen file)
|
||||
[~ %png] (png-response:gen file)
|
||||
[~ %js] (js-response:gen file)
|
||||
[~ %css] (css-response:gen file)
|
||||
[~ %png] (png-response:gen file)
|
||||
::
|
||||
[~ %html]
|
||||
%. file
|
||||
|
File diff suppressed because one or more lines are too long
BIN
pkg/arvo/app/landscape/fonts/inter-bold.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/inter-bold.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/inter-bolditalic.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/inter-bolditalic.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/inter-italic.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/inter-italic.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/inter-regular.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/inter-regular.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-extralight.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-extralight.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-light.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-light.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-medium.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-medium.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-regular.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-regular.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-semibold.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodepro-semibold.woff2
Normal file
Binary file not shown.
BIN
pkg/arvo/app/landscape/fonts/sourcecodeprop-bold.woff2
Normal file
BIN
pkg/arvo/app/landscape/fonts/sourcecodeprop-bold.woff2
Normal file
Binary file not shown.
@ -77,7 +77,7 @@
|
||||
=? hav ?=(^ fil.lon)
|
||||
:: XX this whitelist needs to be reviewed
|
||||
::
|
||||
?. ?= ?(%css %hoon %html %js %json %md %png %txt %udon %umd)
|
||||
?. ?= ?(%css %hoon %html %js %json %md %png %txt %udon %umd %woff2)
|
||||
-.tyl
|
||||
::
|
||||
:: install only files with whitelisted marks
|
||||
|
12
pkg/arvo/mar/woff2.hoon
Normal file
12
pkg/arvo/mar/woff2.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
|_ dat=octs
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/font/woff2 dat]
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ mime |=([=mite =octs] octs)
|
||||
++ noun octs
|
||||
--
|
||||
++ grad %mime
|
||||
--
|
6
pkg/interface/package-lock.json
generated
6
pkg/interface/package-lock.json
generated
@ -1693,9 +1693,9 @@
|
||||
"integrity": "sha512-3OPSdf9cejP/TSzWXuBaYbzLtAfBzQnc75SlPLkoPfwpxnv1Bvy9hiWngLY0WnKRR6lMOldnkYQCCuNWeDibYQ=="
|
||||
},
|
||||
"@tlon/indigo-react": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.5.tgz",
|
||||
"integrity": "sha512-NOQTwH74l/XXMIfQ4ZzymvZuk1WK1nmO552TmXrQxBUSb7HmdlA8anG5oRrvnLJTkajLCY59McLkDca+lCcvwg==",
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.15.tgz",
|
||||
"integrity": "sha512-h9umWEzYZwyb53ujWoCQCJQwY9RUuoDaf6189+0LH3C7y9fybJe6vzbW6g2cUVH8dXA2EZkedS5nriYR0IpQbw==",
|
||||
"requires": {
|
||||
"@reach/menu-button": "^0.10.5",
|
||||
"react": "^16.13.1",
|
||||
|
@ -2,76 +2,76 @@
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("https://media.urbit.org/fonts/Inter-Regular.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-regular.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url("https://media.urbit.org/fonts/Inter-Medium.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-medium.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url("https://media.urbit.org/fonts/Inter-SemiBold.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-semibold.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url("https://media.urbit.org/fonts/Inter-Italic.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-italic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url("https://media.urbit.org/fonts/Inter-Bold.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-bold.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: url("https://media.urbit.org/fonts/Inter-BoldItalic.woff2") format("woff2");
|
||||
src: url("/~landscape/fonts/inter-bolditalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-extralight.woff");
|
||||
src: url("/~landscape/fonts/sourcecodepro-extralight.woff2");
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-light.woff");
|
||||
src: url("/~landscape/fonts/sourcecodepro-light.woff2");
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff");
|
||||
src: url("/~landscape/fonts/sourcecodepro-regular.woff2");
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-medium.woff");
|
||||
src: url("(/~landscape/fonts/sourcecodepro-medium.woff2");
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-semibold.woff");
|
||||
src: url("/~landscape/fonts/sourcecodepro-semibold.woff2");
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Code Pro";
|
||||
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-bold.woff");
|
||||
src: url("/~landscape/fonts/sourcecodepro-bold.woff2");
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user