diff options
author | Ashelyn Rose <git@ashen.earth> | 2025-03-22 18:02:52 -0600 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2025-03-22 18:02:52 -0600 |
commit | f5f542777febe6a2a4463bb8042e9a72e628e724 (patch) | |
tree | c7cb33a5bbb023f99e1c012af55e6819f26c5c93 | |
parent | 2bf70606fc62c989973f84f2961df2d42d7f9c04 (diff) |
Fonts
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | public/fonts/DraftingMono-ExtraLight.woff2 | bin | 0 -> 27616 bytes | |||
-rw-r--r-- | public/fonts/Quicksand-Regular.ttf | bin | 0 -> 78932 bytes | |||
-rw-r--r-- | readme.md | 103 | ||||
-rw-r--r-- | src/components/app.rs | 8 | ||||
-rw-r--r-- | src/components/layout/layout.module.css | 19 | ||||
-rw-r--r-- | src/components/layout/mod.rs | 3 | ||||
-rw-r--r-- | styles/fonts.scss | 16 | ||||
-rw-r--r-- | styles/global.scss (renamed from global.scss) | 3 |
9 files changed, 145 insertions, 9 deletions
diff --git a/Cargo.toml b/Cargo.toml index 1ffc006..68a9c52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,4 +62,4 @@ lib-profile-release = "wasm-release" output_file="./.generated-style.scss" folders = ["./src/"] extensions = [".module.css"] -scss_prelude = "@import './global.scss';" +scss_prelude = "@import './styles/global.scss';" diff --git a/public/fonts/DraftingMono-ExtraLight.woff2 b/public/fonts/DraftingMono-ExtraLight.woff2 new file mode 100644 index 0000000..eab6026 --- /dev/null +++ b/public/fonts/DraftingMono-ExtraLight.woff2 Binary files differdiff --git a/public/fonts/Quicksand-Regular.ttf b/public/fonts/Quicksand-Regular.ttf new file mode 100644 index 0000000..c03548a --- /dev/null +++ b/public/fonts/Quicksand-Regular.ttf Binary files differdiff --git a/readme.md b/readme.md new file mode 100644 index 0000000..fefdcb0 --- /dev/null +++ b/readme.md @@ -0,0 +1,103 @@ +# StormScribe + +Uhhh . . . a realtime collaborative wiki or something, because Confluence +is slow and everything else is a pain to set up + +I'll add more info here later + +--- + +### Acknowledgements + +Drafting Mono and Quicksand included in this project under the Open Font License + +Copyright 2021 The Drafting Mono Project Authors (https://github.com/indestructible-type/Drafting) + +Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”. + +<details> + <summary>OFL Version 1.1</summary> +<pre> +This Font Software is licensed under the SIL Open Font License, Version 1.1 . This license is copied below, and is also available with a FAQ at: https://openfontlicense.org + +SIL OPEN FONT LICENSE +===================== + +Version 1.1 - 26 February 2007 + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting — in part or in whole — any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. +</pre> +</details> diff --git a/src/components/app.rs b/src/components/app.rs index 7e2676a..d93a870 100644 --- a/src/components/app.rs +++ b/src/components/app.rs @@ -51,12 +51,8 @@ pub fn App() -> impl IntoView { /// Renders the home page of your application. #[component] fn HomePage() -> impl IntoView { - // Creates a reactive value to update the button - let count = RwSignal::new(0); - let on_click = move |_| *count.write() += 1; - view! { - <h1>"Welcome to Leptos!"</h1> - <button on:click=on_click>"Click Me: " {count}</button> + <h1>Article</h1> + <p>Article content here we guess?</p> } } diff --git a/src/components/layout/layout.module.css b/src/components/layout/layout.module.css index abcf876..7a6a818 100644 --- a/src/components/layout/layout.module.css +++ b/src/components/layout/layout.module.css @@ -33,6 +33,16 @@ padding: var(--container-padding) 0; } +.layout header a#siteTitle { + color: inherit; + text-decoration: none; + font-family: var(--font-family-heading); + + &:hover { + text-decoration: initial; + } +} + .layout nav { grid-row: 2 / 3; grid-column: 1 / 2; @@ -49,6 +59,15 @@ background-clip: padding-box; } +.layout main h1, +.layout main h2, +.layout main h3, +.layout main h4, +.layout main h5, +.layout main h6 { + font-family: var(--font-family-heading); +} + .layout footer { grid-column: 2 / 3; grid-row: 3 / 4; diff --git a/src/components/layout/mod.rs b/src/components/layout/mod.rs index 4b8061e..e688f5f 100644 --- a/src/components/layout/mod.rs +++ b/src/components/layout/mod.rs @@ -9,13 +9,12 @@ pub fn Layout() -> impl IntoView { view! { <div class=styles::layout> <header> - <h1>Site Title</h1> + <a href="/" id="siteTitle">Site Title</a> </header> <nav> <p>Nav</p> </nav> <main> - <p>Article</p> <Outlet/> </main> <footer> diff --git a/styles/fonts.scss b/styles/fonts.scss new file mode 100644 index 0000000..af6c36a --- /dev/null +++ b/styles/fonts.scss @@ -0,0 +1,16 @@ +@font-face { + font-family: "Quicksand"; + font-weight: 400; + src: url("/fonts/Quicksand-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Drafting"; + font-weight: 200; + src: url("/fonts/DraftingMono-ExtraLight.woff2") format("woff2"); +} + +:root { + --font-family-heading: "Drafting", Times, serif; + --font-family-body: "Quicksand", Arial, sans-serif; +} diff --git a/global.scss b/styles/global.scss index f8ef821..53e5090 100644 --- a/global.scss +++ b/styles/global.scss @@ -1,3 +1,5 @@ +@import './fonts.scss'; + html { margin: 0; padding: 0; @@ -9,5 +11,6 @@ body { min-height: 100vh; margin: 0 auto; box-sizing: border-box; + font-family: var(--font-family-body); } |