Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kindle theme #37

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
<option value="poster" data-text="poster">Poster</option>
<option value="dynamic" data-text="dynamic">Dynamic</option>
<option value="photo" data-text="photo">Photo</option>
<option value="kindle" data-text="kindle">Kindle</option>
</optgroup>
</select>
<select id="variant-select">
Expand Down
5 changes: 5 additions & 0 deletions src/modules/font.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const THEME_FONTS: Record<string, string[]> = {
poster: ['Averia Serif Libre', 'Allura'],
dynamic: ['Caveat', 'Indie Flower', 'Yeseva One', 'Sacramento'],
photo: ['Abril Fatface'],
kindle: ['Noto Serif'],
};

export const INITIAL_THEME_FONT_SIZE = {
Expand All @@ -26,6 +27,10 @@ export const INITIAL_THEME_FONT_SIZE = {
poster: 35,
} as const;

export const CITE_FACTOR = {
kindle: 0.5,
} as const;

const FONTS = ['Special Elite', ...new Set(Object.values(THEME_FONTS))].flat();
const CSS_FONT_VARIABLE = '--override-quote-font-family';

Expand Down
Loading
Loading