diff --git a/public/fonts/HankenGrotesk-Italic-VF.ttf b/public/fonts/HankenGrotesk-Italic-VF.ttf new file mode 100644 index 0000000..eb28513 Binary files /dev/null and b/public/fonts/HankenGrotesk-Italic-VF.ttf differ diff --git a/public/fonts/HankenGrotesk-OFL.txt b/public/fonts/HankenGrotesk-OFL.txt new file mode 100644 index 0000000..9c8185d --- /dev/null +++ b/public/fonts/HankenGrotesk-OFL.txt @@ -0,0 +1,94 @@ +Copyright 2021 The Hanken Grotesk Project Authors (https://github.com/marcologous/hanken-grotesk) + + +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: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +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. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"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. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +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. diff --git a/public/fonts/HankenGrotesk-VF.ttf b/public/fonts/HankenGrotesk-VF.ttf new file mode 100644 index 0000000..65a8f7b Binary files /dev/null and b/public/fonts/HankenGrotesk-VF.ttf differ diff --git a/public/fonts/Literata-Italic-VF.ttf b/public/fonts/Literata-Italic-VF.ttf new file mode 100644 index 0000000..8690209 Binary files /dev/null and b/public/fonts/Literata-Italic-VF.ttf differ diff --git a/public/fonts/Literata-OFL.txt b/public/fonts/Literata-OFL.txt new file mode 100644 index 0000000..9d3b4e3 --- /dev/null +++ b/public/fonts/Literata-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2017 The Literata Project Authors (https://github.com/googlefonts/literata) + +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: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +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. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"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. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +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. diff --git a/public/fonts/Literata-VF.ttf b/public/fonts/Literata-VF.ttf new file mode 100644 index 0000000..0a81b49 Binary files /dev/null and b/public/fonts/Literata-VF.ttf differ diff --git a/src/styles/app.css b/src/styles/app.css new file mode 100644 index 0000000..2c5cb95 --- /dev/null +++ b/src/styles/app.css @@ -0,0 +1,385 @@ +* { + box-sizing: border-box; +} + +html, +body, +#root { + height: 100%; +} + +body { + margin: 0; + background: var(--shell); + color: var(--ink); + font-family: var(--font-ui); + font-size: var(--t-3); + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; +} + +::selection { + background: var(--selection); +} + +button { + font-family: inherit; + color: inherit; + border: 0; + background: none; + cursor: pointer; + padding: 0; +} + +.app { + display: flex; + flex-direction: column; + height: 100vh; + overflow: hidden; +} + +.titlebar { + flex: none; + height: 46px; + display: grid; + grid-template-columns: 1fr auto 1fr; + align-items: center; + padding: 0 14px 0 84px; + background: var(--shell); + border-bottom: 1px solid var(--line); +} + +.titlebar .doc-title { + grid-column: 2; + font-size: var(--t-2); + letter-spacing: 0.02em; + color: var(--ink-soft); +} + +.titlebar .actions { + grid-column: 3; + justify-self: end; + display: flex; + gap: 4px; +} + +.icon-btn { + width: 30px; + height: 30px; + display: grid; + place-items: center; + border-radius: var(--r-sm); + color: var(--ink-soft); + transition: background 120ms var(--ease), color 120ms var(--ease); +} + +.icon-btn:hover { + background: var(--accent-wash); + color: var(--ink); +} + +.icon-btn[data-on="true"] { + color: var(--accent); +} + +.body { + flex: 1; + display: flex; + min-height: 0; +} + +.sidebar { + width: var(--pane-sidebar); + flex: none; + background: var(--sidebar); + border-right: 1px solid var(--line); + display: flex; + flex-direction: column; + padding: 6px 0 10px; +} + +.brand { + display: flex; + align-items: baseline; + gap: 7px; + padding: 12px 22px 18px; +} + +.brand .mark { + font-family: var(--font-book); + font-size: 20px; + font-weight: 500; + letter-spacing: -0.01em; +} + +.brand .dot { + width: 5px; + height: 5px; + border-radius: 50%; + background: var(--accent); + align-self: center; +} + +.nav-label { + padding: 4px 22px; + font-size: var(--t-1); + font-weight: 600; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--ink-faint); +} + +.chapters { + list-style: none; + margin: 6px 0 0; + padding: 0 10px; + overflow-y: auto; + flex: 1; +} + +.chapter { + position: relative; + display: flex; + align-items: baseline; + gap: 11px; + padding: 8px 12px; + border-radius: var(--r-sm); + color: var(--ink-soft); + cursor: pointer; + transition: background 120ms var(--ease), color 120ms var(--ease); +} + +.chapter:hover { + background: rgba(35, 32, 27, 0.04); + color: var(--ink); +} + +.chapter[data-active="true"] { + background: var(--paper); + color: var(--ink); + box-shadow: 0 1px 2px rgba(35, 32, 27, 0.05); +} + +.chapter[data-active="true"]::before { + content: ""; + position: absolute; + left: -10px; + top: 8px; + bottom: 8px; + width: 3px; + background: var(--accent); + border-radius: 0 2px 2px 0; +} + +.chapter .num { + font-size: var(--t-1); + color: var(--ink-faint); + width: 13px; + font-variant-numeric: tabular-nums; +} + +.chapter[data-active="true"] .num { + color: var(--accent); +} + +.add-chapter { + margin: 8px 18px 4px; + padding: 9px 12px; + display: flex; + align-items: center; + gap: 8px; + border-radius: var(--r-sm); + color: var(--ink-faint); + border: 1px dashed var(--line-strong); + transition: color 120ms var(--ease), border-color 120ms var(--ease); +} + +.add-chapter:hover { + color: var(--accent); + border-color: var(--accent); +} + +.editor-pane { + flex: 1; + min-width: 0; + background: var(--paper); + overflow-y: auto; +} + +.sheet { + max-width: var(--measure); + margin: 0 auto; + padding: 104px 24px 260px; +} + +.prose { + font-family: var(--font-book); + color: var(--ink); + font-optical-sizing: auto; +} + +.chapter-opener { + text-align: center; + margin: 0 0 3.4rem; +} + +.chapter-num { + font-family: var(--font-ui); + font-size: var(--t-1); + font-weight: 600; + letter-spacing: 0.28em; + text-transform: uppercase; + color: var(--ink-faint); +} + +.chapter-title { + font-weight: 500; + font-size: 31px; + line-height: 1.16; + letter-spacing: -0.01em; + margin: 15px 0 0; +} + +.prose p { + font-size: 19px; + line-height: 1.68; + margin: 0; + text-align: justify; + hyphens: auto; + -webkit-hyphens: auto; + text-indent: 1.3em; +} + +.prose p:first-of-type, +.prose .first { + text-indent: 0; +} + +.prose .first::first-letter { + float: left; + font-size: 3.1em; + line-height: 0.82; + padding: 0.05em 0.09em 0 0; + font-weight: 500; +} + +.prose blockquote { + margin: 1.7rem 0; + padding-left: 1.2rem; + border-left: 2px solid var(--line-strong); + font-style: italic; + color: var(--ink-soft); +} + +.prose blockquote p { + text-indent: 0; + font-size: 18px; +} + +.scene-break { + text-align: center; + margin: 2.1rem 0; + color: var(--ink-faint); + font-size: 17px; + letter-spacing: 0.5em; +} + +.dock { + width: var(--pane-dock); + flex: none; + background: var(--shell); + border-left: 1px solid var(--line); + overflow-y: auto; + padding: 26px 28px 80px; +} + +.dock-head { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 18px; +} + +.dock-head .label { + font-size: var(--t-1); + font-weight: 600; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--ink-faint); +} + +.dock-head .meta { + font-size: var(--t-1); + color: var(--ink-faint); + font-variant-numeric: tabular-nums; +} + +.page { + background: #fffefb; + border: 1px solid var(--line); + border-radius: 2px; + box-shadow: var(--shadow-page); + aspect-ratio: 6 / 9; + padding: 11% 12%; + overflow: hidden; +} + +.page .p-opener { + text-align: center; + margin-bottom: 15px; +} + +.page .p-num { + font-family: var(--font-ui); + font-size: 6px; + font-weight: 600; + letter-spacing: 0.24em; + text-transform: uppercase; + color: var(--ink-faint); +} + +.page .p-title { + font-family: var(--font-book); + font-size: 12px; + margin-top: 5px; +} + +.page p { + font-family: var(--font-book); + font-size: 6.6px; + line-height: 1.5; + text-align: justify; + hyphens: auto; + text-indent: 1.2em; + margin: 0; + color: #2b2720; +} + +.page .folio { + text-align: center; + font-family: var(--font-book); + font-size: 6px; + color: var(--ink-faint); + margin-top: 16px; +} + +::-webkit-scrollbar { + width: 11px; + height: 11px; +} + +::-webkit-scrollbar-thumb { + background: rgba(35, 32, 27, 0.16); + border-radius: 6px; + border: 3px solid transparent; + background-clip: content-box; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(35, 32, 27, 0.28); + background-clip: content-box; +} + +::-webkit-scrollbar-track { + background: transparent; +} diff --git a/src/styles/fonts.css b/src/styles/fonts.css new file mode 100644 index 0000000..c92e953 --- /dev/null +++ b/src/styles/fonts.css @@ -0,0 +1,31 @@ +@font-face { + font-family: "Literata"; + src: url("/fonts/Literata-VF.ttf") format("truetype-variations"); + font-weight: 200 900; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "Literata"; + src: url("/fonts/Literata-Italic-VF.ttf") format("truetype-variations"); + font-weight: 200 900; + font-style: italic; + font-display: block; +} + +@font-face { + font-family: "Hanken Grotesk"; + src: url("/fonts/HankenGrotesk-VF.ttf") format("truetype-variations"); + font-weight: 100 900; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "Hanken Grotesk"; + src: url("/fonts/HankenGrotesk-Italic-VF.ttf") format("truetype-variations"); + font-weight: 100 900; + font-style: italic; + font-display: block; +} diff --git a/src/styles/tokens.css b/src/styles/tokens.css new file mode 100644 index 0000000..abdd1d6 --- /dev/null +++ b/src/styles/tokens.css @@ -0,0 +1,39 @@ +:root { + --font-ui: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif; + --font-book: "Literata", Georgia, "Times New Roman", serif; + + --paper: #fcfbf7; + --shell: #f1ece2; + --sidebar: #ece6da; + --raised: #fbfaf6; + + --ink: #23201b; + --ink-soft: #6b6458; + --ink-faint: #9b9484; + + --line: #e3ddce; + --line-strong: #d6cfbd; + + --accent: #b5532e; + --accent-ink: #97431f; + --accent-wash: rgba(181, 83, 46, 0.1); + --selection: rgba(181, 83, 46, 0.16); + + --shadow-page: 0 1px 2px rgba(35, 32, 27, 0.06), 0 14px 30px rgba(35, 32, 27, 0.09); + --shadow-pop: 0 8px 24px rgba(35, 32, 27, 0.14); + + --r-sm: 5px; + --r-md: 8px; + --r-lg: 12px; + + --pane-sidebar: 248px; + --pane-dock: 384px; + --measure: 34em; + + --t-1: 11px; + --t-2: 12px; + --t-3: 13px; + --t-4: 15px; + + --ease: cubic-bezier(0.22, 0.61, 0.36, 1); +}