add base theme stuff

This commit is contained in:
anna 2022-12-12 23:56:45 +01:00
parent a2cf98d6b9
commit 56b48a9858
Signed by: fef
GPG key ID: EC22E476DC2D3D84
6 changed files with 56 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "contrib/adobe-source-sans"]
path = contrib/adobe-source-sans
url = https://github.com/adobe-fonts/source-sans.git

@ -0,0 +1 @@
Subproject commit f07d901c3bc52b32d62d2fc0054e8316a4a46a8d

1
public/font/source-sans Symbolic link
View file

@ -0,0 +1 @@
../../contrib/adobe-source-sans

View file

@ -9,6 +9,8 @@
</head>
<body>
<nyano-blog unresolved></nyano-blog>
<link rel="stylesheet" type="text/css" href="font/source-sans/source-sans-3.css">
<link rel="stylesheet" type="text/css" href="/theme.css">
<script type="module" src="js/app.js"></script>
</body>
</html>

33
public/theme.css Normal file
View file

@ -0,0 +1,33 @@
:root {
/* background for <body> */
--base-color: #0d0113;
/* background for regular widgets */
--background-color: #1d1122;
/* text on background-color */
--text-color: #eaddf4;
/* color for buttons, links, etd */
--accent-color: #a017df;
/* clicked/hovered elements in accent-color */
--accent-highlight-color: #c356f4;
/* text on accent color */
--accent-text-color: #e0d1e1;
--accent-highlight-text-color: var(--accent-text-color);
/* border radius for smaller components like buttons */
--border-radius: 8px;
/* border radius for larger components like modals */
--border-radius-large: 16px;
--font-family: "Source Sans 3", sans-serif;
}
body {
background-color: var(--background-color);
color: var(--text-color);
font-family: "Source Sans 3", sans-serif;
font-size: 1rem;
font-weight: normal;
}

16
src/web/theme.ts Normal file
View file

@ -0,0 +1,16 @@
import {css, CSSResult} from "lit";
const SHARED_STYLES = css `
:host {
font-family: "Source Sans 3", sans-serif;
font-size: 1rem;
font-weight: normal;
}
`;
export default function withSharedStyles(styles: CSSResult): CSSResult[] {
return [
SHARED_STYLES,
styles,
];
}