Skip to content

Commit

Permalink
Added Custom Fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterbryant committed Dec 12, 2023
1 parent 6bf9c65 commit 0dc8b1f
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 9 deletions.
27 changes: 27 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,30 @@
@tailwind components;
@tailwind utilities;

@font-face {
font-family: 'Favorit';
src: url('../src/lib/assets/fonts/FavoritStd-Regular.otf');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Favorit';
src: url('../src/lib/assets/fonts/FavoritStd-Medium.otf');
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: 'Favorit';
src: url('../src/lib/assets/fonts/FavoritStd-Bold.otf');
font-weight: 700;
font-style: normal;
}

@font-face {
font-family: 'Garamond';
src: url('../src/lib/assets/fonts/EBGaramond-BoldItalic.ttf');
font-weight: bold;
font-style: italic;
}
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover" class="h-full w-full bg-white p-0 sm:p-2">
<body data-sveltekit-preload-data="hover" class="h-full w-full bg-stone-100">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
2 changes: 1 addition & 1 deletion src/lib/ChatBox/ChatBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</script>

<div
class="flex-col-rev absolute bottom-2 left-2 right-2 flex max-h-[calc(100vh-1rem)] w-[calc(full-4rem)] flex-col flex-nowrap overflow-hidden rounded-3xl bg-white shadow-md sm:left-auto sm:max-h-[calc(100vh-2rem)] sm:w-[calc(27.5rem)]"
class="flex-col-rev flex max-h-[calc(100vh-1rem)] w-[calc(full-4rem)] flex-col flex-nowrap overflow-hidden rounded-3xl bg-white shadow-md sm:left-auto sm:max-h-[calc(100vh-2rem)] sm:w-[calc(27.5rem)]"
>
<!-- This initial "message" acts as the header and original kickoff button -->
{#if $messages.length == 0 || !minimized}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ChatBox/TextInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@
class="h-12 flex-none basis-12 rounded-2xl outline outline-1 outline-slate-200"
/>
{/if}
<hr class="absolute bottom-16 left-4 right-4 bg-slate-200 peer-focus:hidden" />
<!-- <hr class="absolute bottom-16 left-4 right-4 bg-slate-200 peer-focus:hidden" /> -->
</form>
Binary file added src/lib/assets/fonts/EBGaramond-BoldItalic.ttf
Binary file not shown.
Binary file added src/lib/assets/fonts/FavoritStd-Bold.otf
Binary file not shown.
Binary file added src/lib/assets/fonts/FavoritStd-Medium.otf
Binary file not shown.
Binary file added src/lib/assets/fonts/FavoritStd-Regular.otf
Binary file not shown.
12 changes: 12 additions & 0 deletions src/lib/assets/lettermark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<script>
<script lang="ts">
import '../app.css';
import studiobg from '$lib/assets/studiobg.webp';
import ChatBox from '$lib/ChatBox/ChatBox.svelte';
import lettermark from '$lib/assets/lettermark.svg';
</script>

<div
class="relative h-full overflow-hidden rounded-none bg-slate-300 bg-[url('lib/assets/studiobg.webp')] bg-cover bg-center bg-no-repeat shadow-inner sm:rounded-[2rem]"
>
<div class="grid grid-cols-5 gap-4 px-2 sm:grid-cols-9 sm:px-16">
<div class="col-span-3">
<img src={lettermark} alt="Hunters lettermark logo" class="mt-16" />
<div class="inline-flex w-full justify-between gap-4">
<h3>How?</h3>
<button class="h-12 rounded bg-blue-600 px-3 text-stone-50">Ask HuntBot</button>
</div>
<!-- <ChatBox /> -->
</div>
<slot />
<ChatBox />
</div>
7 changes: 7 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/** @type {import('tailwindcss').Config} */
import defaultTheme from 'tailwindcss/defaultTheme';

export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
fontFamily: {
sans: ['Favorit', ...defaultTheme.fontFamily.sans],
serif: ['Garamond', ...defaultTheme.fontFamily.serif],
mono: [...defaultTheme.fontFamily.mono]
},
extend: {}
},
plugins: []
Expand Down

0 comments on commit 0dc8b1f

Please sign in to comment.