1
0
Fork 0
mirror of https://git.sr.ht/~azikx/userstyles synced 2024-10-30 07:06:19 +00:00
userstyles/codeberg/codeberg.user.css
2024-10-08 20:49:12 +09:00

119 lines
4.8 KiB
CSS

/* ==UserStyle==
@name Codeberg paradisa
@namespace github.com/axax-loll/userstyles/
@homepageURL https://github.com/axax-loll/userstyles/tree/main
@version 1.0.1
@updateURL https://github.com/axax-loll/userstyles/tree/main/codeberg/codeberg.user.css
@supportURL https://github.com/axax-loll/userstyles/tree/main
@description Paradise for Codeberg
@author azikx
@license MIT
@preprocessor less
@var select darkFlavor "Dark Flavor" ["paradisa:paradisa"]
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"]
==/UserStyle== */
@-moz-document domain('codeberg.org') {
@import (css)
url("https://paradisa.github.io/gitea/theme-paradisa-@{darkFlavor}-@{accentColor}.css")
(prefers-color-scheme: dark);
}
@-moz-document domain('codeberg.org') {
#paradisa(@lookup, @accent) {
@rosewater: @paradisa[@@lookup][@rosewater];
@flamingo: @paradisa[@@lookup][@flamingo];
@pink: @paradisa[@@lookup][@pink];
@mauve: @paradisa[@@lookup][@mauve];
@red: @paradisa[@@lookup][@red];
@maroon: @paradisa[@@lookup][@maroon];
@peach: @paradisa[@@lookup][@peach];
@yellow: @paradisa[@@lookup][@yellow];
@green: @paradisa[@@lookup][@green];
@teal: @paradisa[@@lookup][@teal];
@sky: @paradisa[@@lookup][@sky];
@sapphire: @paradisa[@@lookup][@sapphire];
@blue: @paradisa[@@lookup][@blue];
@lavender: @paradisa[@@lookup][@lavender];
@text: @paradisa[@@lookup][@text];
@subtext1: @paradisa[@@lookup][@subtext1];
@subtext0: @paradisa[@@lookup][@subtext0];
@overlay2: @paradisa[@@lookup][@overlay2];
@overlay1: @paradisa[@@lookup][@overlay1];
@overlay0: @paradisa[@@lookup][@overlay0];
@surface2: @paradisa[@@lookup][@surface2];
@surface1: @paradisa[@@lookup][@surface1];
@surface0: @paradisa[@@lookup][@surface0];
@base: @paradisa[@@lookup][@base];
@mantle: @paradisa[@@lookup][@mantle];
@crust: @paradisa[@@lookup][@crust];
@accent-color: @paradisa[@@lookup][@@accent];
/* Base styles not needed, themed in upstream Gitea port. */
--color-body: @base;
--color-nav-text: @crust;
--color-nav-hover-bg: darken(@accent-color, 5%);
--color-secondary-nav-bg: @surface0;
--color-link: @blue;
--color-footer-text: @text;
.ui.secondary.menu .dropdown.item:hover,
.ui.secondary.menu a.item:hover,
.ui.secondary.menu a.active.item:hover {
background-color: var(--color-nav-hover-bg);
color: var(--color-black);
}
.ui.basic.red.buttons .button,
.ui.basic.red.button {
&:hover,
&:focus {
background-color: @red;
border-color: var(--color-light-border);
color: @crust;
}
}
#codeberg-logo (@color) {
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><defs><linearGradient id="b" x1="42519.285" x2="42575.336" y1="-7078.7891" y2="-6966.9312" gradientUnits="userSpaceOnUse" href="#a"/><linearGradient id="a"><stop color="@{color}" offset="0" stop-opacity="0"/><stop offset=".495" stop-color="@{color}" stop-opacity=".3"/><stop offset="1" stop-color="@{color}" stop-opacity=".3"/></linearGradient></defs><path fill="url(#b)" d="M42519.285-7078.79a.76.568 0 0 0-.738.675l33.586 125.888a87.2 87.2 0 0 0 39.381-33.763l-71.565-92.52a.76.568 0 0 0-.664-.28" transform="translate(-5840.572 980.524)scale(.13766)"/><path fill="@{color}" d="M12.003.525A12.003 12.003 0 0 0 0 12.533 11.9 11.9 0 0 0 1.826 18.9L11.838 5.956c.068-.09.25-.09.324 0l10.007 12.939A11.9 11.9 0 0 0 24 12.522 12.003 12.003 0 0 0 12.003.525"/></svg>'
);
content: url("data:image/svg+xml,@{svg}");
}
#navbar-logo img {
#codeberg-logo(@crust);
}
.branding img {
#codeberg-logo(@text);
}
footer {
.button:hover {
background-color: @accent-color;
color: @crust;
}
a:hover {
color: @blue !important;
}
}
}
@media (prefers-color-scheme: dark) {
[data-theme="codeberg-dark"],
[data-theme="codeberg-light"],
[data-theme="codeberg-auto"] {
#paradisa(@darkFlavor, @accentColor);
}
}
}
/* prettier-ignore */
@paradisa: {
@paradisa: { @rosewater: #BBB6B6; @flamingo: #A988B0; @pink: #A988B0; @mauve: #A988B0; @red: #B66467; @maroon: #B66467; @peach: #B66467; @yellow: #D9BC8C; @green: #8C977D; @teal: #8AA6A2; @sky: #8AA6A2; @sapphire: #8DA3B9; @blue: #8DA3B9; @lavender: #8DA3B9; @text: #E8E3E3; @subtext1: #BBB6B6; @subtext0: #BBB6B6; @overlay2: #424242; @overlay1: #424242; @overlay0: #424242; @surface2: #2E2E2E; @surface1: #2E2E2E; @surface0: #2E2E2E; @base: #151515; @mantle: #1F1F1F; @crust: #1F1F1F; };
}