Skip to content

Commit

Permalink
Use local font files and new font for nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
IRHM committed May 7, 2023
1 parent deeec0c commit 91e1e87
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 19 deletions.
32 changes: 15 additions & 17 deletions src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@

<nav>
<a href="/">
<h1 class="large">Watcharr</h1>
<h1 class="small">W</h1>
<span class="large">Watcharr</span>
<span class="small">W</span>
</a>
<input type="text" placeholder="Search" on:keydown={handleSearch} />
<button class="plain face" on:click={handleProfileClick}>:)</button>
Expand Down Expand Up @@ -91,34 +91,32 @@
a {
text-decoration: none;
color: black;
font-family: "Shrikhand", system-ui, -apple-system, BlinkMacSystemFont;
font-size: 35px;
transition: -webkit-text-stroke 150ms ease, color 150ms ease, font-weight 150ms ease;
&:hover h1,
&:focus-visible h1 {
color: black;
&:hover,
&:focus-visible {
color: white;
-webkit-text-stroke: 3px black;
font-weight: bold;
}
h1.small {
span.small {
display: none;
}
@media screen and (max-width: 580px) {
h1.large {
span.large {
display: none;
}
h1.small {
span.small {
display: unset;
}
}
}
h1 {
font-weight: bold;
color: white;
-webkit-text-stroke: 1px black;
font-size: 35px;
transition: color 150ms ease;
}
input {
width: 250px;
font-weight: bold;
Expand All @@ -133,7 +131,7 @@
}
button.face {
font-family: "Rampart One", system-ui, -apple-system, BlinkMacSystemFont;
font-family: "Shrikhand", system-ui, -apple-system, BlinkMacSystemFont;
font-size: 25px;
transform: rotate(90deg);
cursor: pointer;
Expand Down
20 changes: 18 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@
<slot />

<style lang="scss">
@import url("https://fonts.googleapis.com/css2?family=Rampart+One&display=swap");
@font-face {
font-family: "Shrikhand";
src: local("Shrikhand Regular"), local("Shrikhand-Regular"),
url("/Shrikhand-Regular.woff2") format("woff2");
font-weight: normal;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: "Rampart One";
src: local("Rampart One Regular"), local("RampartOne-Regular"),
url("/RampartOne-Regular.woff2") format("woff2");
font-weight: normal;
font-style: normal;
font-display: swap;
}
:global(*) {
padding: 0;
Expand All @@ -15,7 +31,7 @@
}
:global(h1, h2, h3, h4, h5) {
font-family: "Rampart One", system-ui, -apple-system, BlinkMacSystemFont;
font-family: "Shrikhand", system-ui, -apple-system, BlinkMacSystemFont;
}
:global(a) {
Expand Down
Binary file added static/RampartOne-Regular.woff2
Binary file not shown.
Binary file added static/Shrikhand-Regular.woff2
Binary file not shown.

0 comments on commit 91e1e87

Please sign in to comment.