added option to display kid-friendly Comic fonts

This commit is contained in:
Ed Silkworth 2023-08-09 23:05:33 -07:00
parent b211729df7
commit e4b06912d2
No known key found for this signature in database
GPG Key ID: 26F260F04191F431
7 changed files with 194 additions and 14 deletions

View File

@ -38,4 +38,5 @@ Jun 7, 2023 · rebased theme on main commit 1ea5c8b0ff5ca9f81a06b195a7dff870d784
Jun 15, 2023 · fixed theme regressions Jun 15, 2023 · fixed theme regressions
Jul 14, 2023 · rebased theme on version 1.19.4 Jul 14, 2023 · rebased theme on version 1.19.4
Aug 3, 2023 · rebased theme on version 1.20.2 Aug 3, 2023 · rebased theme on version 1.20.2
Aug 8, 2023 · simplified and refined colors, and fixed reopen issue button Aug 8, 2023 · simplified and refined colors, and fixed reopen issue button
Aug 9, 2023 · added option to display kid-friendly Comic fonts

View File

@ -5,20 +5,22 @@
## Directions ## Directions
01. Locate your custom directory: Site Administration > Configuration > Custom File Root Path (e.g., /var/lib/gitea/custom) 01. Locate your custom directory: Site Administration > Configuration > Custom File Root Path (e.g., /var/lib/gitea/custom)
02. Verify if a public directory exists within the custom directory 02. Verify if a public and templates directory exist within the custom directory
03. If the public directory exists, make sure it contains two directories: css and img 03. If the public and templates directory exist, make sure the public directory contains two directories: css and img, and make sure the templates directory contains one directory: base
04. If the css and img directories do not exist, then create them 04. If the css, img and base directories do not exist, then create them
05. To add just the themes (not the red Gitea logos), copy [theme-auto-red.css](./public/css/theme-auto-red.css), [theme-red.css](./public/css/theme-red.css), and [theme-arc-red.css](./public/css/theme-arc-red.css) into the css directory 05. To add just the themes (not the red Gitea logos or Comic fonts), copy [theme-auto-red.css](./public/css/theme-auto-red.css), [theme-red.css](./public/css/theme-red.css), and [theme-arc-red.css](./public/css/theme-arc-red.css) into the css directory
06. To add the red Gitea logos, backup any existing img directory, and copy all the [logos](./public/img/) into your img directory 06. To add the red Gitea logos, backup any existing img directory, and copy all the [logos](./public/img/) into your img directory
07. Locate your configuration file: Site Administration > Configuration > Configuration File Path (e.g., /etc/gitea/app.ini) 07. To add kid-friendly Comic fonts, copy [head_style.tmpl](./templates/base/head_style.tmpl) into the base directory
08. Add to the configuration file: 08. Locate your configuration file: Site Administration > Configuration > Configuration File Path (e.g., /etc/gitea/app.ini)
09. Add to the configuration file:
```ini ```ini
[ui] [ui]
THEMES = auto,gitea,arc-green,auto-red,red,arc-red THEMES = auto,gitea,arc-green,auto-red,red,arc-red
DEFAULT_THEME = auto-red DEFAULT_THEME = auto-red
``` ```
09. Restart Gitea 10. Restart Gitea
10. Existing users: Go to user Settings > Appearance > change default theme 11. Existing users: Go to user Settings > Appearance > change default theme
> Comic fonts (if added) will display automatically.
## Photos ## Photos
@ -27,17 +29,32 @@ Red (Original) \
<img src='./screenshots/repo_lite.png' alt="repo lite" width="704"/> \ <img src='./screenshots/repo_lite.png' alt="repo lite" width="704"/> \
(redacted) (redacted)
Stylized collapsible elements: \ <table>
<img src='./screenshots/details_lite.png' alt="details lite" width="200"/> <tr>
<td>Stylized collapsible elements:</td>
<td>Comic fonts:</td>
</tr>
<tr>
<td style="vertical-align: top"><img src='./screenshots/details_lite.png' alt="details lite" width="200"/></td>
<td style="vertical-align: top"><img src='./screenshots/comic_fonts_lite.png' alt="comic fonts lite" width="250"/></td>
</tr>
</table>
Arc-Red \ Arc-Red \
<img src='./screenshots/home_dark.png' alt="home dark" width="704"/> \ <img src='./screenshots/home_dark.png' alt="home dark" width="704"/> \
<img src='./screenshots/repo_dark.png' alt="repo dark" width="704"/> \ <img src='./screenshots/repo_dark.png' alt="repo dark" width="704"/> \
(redacted) (redacted)
Stylized collapsible elements: \ <table>
<img src='./screenshots/details_dark.png' alt="details dark" width="200"/> <tr>
<td>Stylized collapsible elements:</td>
<td>Comic fonts:</td>
</tr>
<tr>
<td style="vertical-align: top"><img src='./screenshots/details_dark.png' alt="details dark" width="200"/></td>
<td style="vertical-align: top"><img src='./screenshots/comic_fonts_dark.png' alt="comic fonts dark" width="250"/></td>
</tr>
</table>
> Disable the Dark Reader web browser extension for your website. > Disable the Dark Reader web browser extension for your website.

View File

@ -0,0 +1,8 @@
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{AssetVersion}}">
{{if .IsSigned}}
{{if ne .SignedUser.Theme "gitea"}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
{{end}}
{{else if ne DefaultTheme "gitea"}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{DefaultTheme | PathEscape}}.css?v={{AssetVersion}}">
{{end}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

122
templates/base/LICENSES Normal file
View File

@ -0,0 +1,122 @@
Comic Neue
Copyright 2014 The Comic Neue Project Authors (https://github.com/crozynski/comicneue)
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.
Comic Mono
MIT License
Original work Copyright (c) 2018 Shannon Miwa
Modified work Copyright (c) 2019 dtinth
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,32 @@
{{/* GITEA SOURCE */}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{AssetVersion}}">
{{if .IsSigned}}
{{if ne .SignedUser.Theme "gitea"}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
{{end}}
{{else if ne DefaultTheme "gitea"}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{DefaultTheme | PathEscape}}.css?v={{AssetVersion}}">
{{end}}
{{/* CUSTOM FONTS */}}
{{/* Comic Neue */}}
{{/* Font source: https://fonts.google.com/specimen/Comic+Neue */}}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap" rel="stylesheet">
<style>
:root {
--fonts-proportional: "Comic Neue", cursive, -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial !important;
}
</style>
{{/* Comic Mono */}}
{{/* Font source: https://github.com/dtinth/comic-mono-font */}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/comic-mono@0.0.1/index.css">
<style>
:root {
--fonts-monospace: "Comic Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji) !important;
}
</style>