Skip to content

Commit 52dbcd8

Browse files
authored
Merge pull request #30 from marko-js/design-updates
chore: move away from google fonts
2 parents e7f399c + 97ddc10 commit 52dbcd8

File tree

9 files changed

+38
-23
lines changed

9 files changed

+38
-23
lines changed

package-lock.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"deploy": "marko-run build && gh-pages --cname next.markojs.com --nojekyll -d dist/public -u \"marko-js <noreply@markojs.com>\""
3737
},
3838
"devDependencies": {
39+
"@fontsource/ubuntu": "^5.2.5",
40+
"@fontsource/ubuntu-mono": "^5.2.5",
3941
"@marko/type-check": "^1.3.21",
4042
"@types/node": "^22.15.19",
4143
"autoprefixer": "^10.4.21",

src/routes/+layout.marko

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ html lang="en"
55
meta name="viewport" content="width=device-width, initial-scale=1.0"
66
meta name="description" content="The Marko programming language"
77
title
8-
if=hasPageTitle($global.meta) -- ${$global.meta.pageTitle} |
8+
if=typeof ($global.meta as any).pageTitle === "string"
9+
-- ${($global.meta as any).pageTitle} |
910
-- Marko
1011

1112
link rel="icon" sizes="32x32" href="/fav.png"
1213
link rel="icon" type="image/svg+xml" href="/fav.svg"
1314
link rel="preconnect" href="https://GB0QQV5RQM-dsn.algolia.net" crossorigin
14-
link rel="preconnect" href="https://fonts.googleapis.com"
15-
link rel="preconnect" href="https://fonts.gstatic.com" crossorigin
16-
link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap"
17-
link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap"
1815

1916
body
2017
#root
@@ -23,7 +20,7 @@ html lang="en"
2320
app-menu
2421
${input.content}
2522

26-
if=showFooter($global.meta)
23+
if=!($global.meta as any).hideFooter
2724
app-footer
2825

2926
script --
@@ -46,14 +43,3 @@ html lang="en"
4643
{ signal: $signal },
4744
);
4845

49-
static function hasPageTitle(
50-
meta: unknown,
51-
): meta is { pageTitle: string } {
52-
return typeof (meta as any).pageTitle === "string";
53-
}
54-
55-
static function showFooter(
56-
meta: unknown,
57-
): meta is { hideFooter: boolean } {
58-
return !(meta as any).hideFooter;
59-
}

src/routes/+layout.style.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
@use "app/styles/colors" as colors;
2+
@import "@fontsource/ubuntu/300.css";
3+
@import "@fontsource/ubuntu/400.css";
4+
@import "@fontsource/ubuntu/500.css";
5+
@import "@fontsource/ubuntu/700.css";
6+
@import "@fontsource/ubuntu-mono/400.css";
7+
28
@include colors.init;
39

410
:root {

src/routes/_home/tags/demo-page/demo-page.style.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
&Title {
6464
font-size: 1.4em;
65-
font-weight: 600;
65+
font-weight: 700;
6666
display: block;
6767
}
6868
&Button {

src/tags/app-footer/app-footer.style.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ $size: var(--footer-size);
5454
}
5555

5656
.bold {
57-
font-weight: 600;
57+
font-weight: 500;
5858
}
5959
.light {
60-
font-weight: 200;
60+
font-weight: 300;
6161
}
6262

6363
.separator {

src/tags/app-header/app-header.style.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
padding: 0 var(root-gap);
8080
justify-content: space-around;
8181
align-items: center;
82-
font-weight: 300;
8382
font-size: 1.3rem;
8483
font-weight: 500;
8584
background-image: linear-gradient(

src/tags/app-switch/app-switch.marko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const/{ on, off, ...checkboxInput }=input
99

1010
label.${styles.label}
1111
span -- ${off}
12-
span.${styles.switch}
12+
span.${styles.appSwitch}
1313
input ...checkboxInput type="checkbox"
1414
fa-icon.${styles.off}=faToggleOff
1515
fa-icon.${styles.on}=faToggleOn

src/tags/app-switch/app-switch.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.switch {
1+
.appSwitch {
22
width: 1.5rem;
33
> input {
44
display: none;

0 commit comments

Comments
 (0)