Update forgejo/gitea/templates/base/head.tmpl

This commit is contained in:
Korbs 2025-04-19 14:24:38 -04:00
parent bbb552144d
commit 7341a1bcb1

View file

@ -1,6 +1,8 @@
<!DOCTYPE html>
<html lang="{{ctx.Locale.Lang}}" data-theme="{{ThemeName .SignedUser}}">
<head>
<script defer src="https://stats.sudovanilla.org/script.js" data-website-id="4b90bace-cce2-40e5-b5c6-64a4bac4f2bf"></script>
<meta name="darkreader-lock">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{/* Display `- .Repsository.FullName` only if `.Title` does not already start with that. */}}
@ -22,10 +24,7 @@
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
{{template "base/head_script" .}}
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
<p id="nojs">JavaScript appears to be disabled on your web browser, some functions may not work such as opening menus.</p>
</noscript>
{{template "base/head_opengraph" .}}
{{template "base/head_style" .}}
@ -49,6 +48,19 @@
{{end}}
<style>
#nojs {
position: fixed;
bottom: 0px;
left: 50%;
transform: translate(-50%);
background: yellow;
color: black;
border-radius: 6px;
padding: 6px 12px;
z-index: 100;
}
.sudovanilla-logo img {
width: 32px;
}
@ -72,7 +84,7 @@ mobilebar {
}
}
@media screen and (max-width: 800px) {
header, .sidebar {
.header-row-top, .header-row-bottom, .sidebar {
display: none !important;
}
.page-content {
@ -173,41 +185,38 @@ mobilebar p {
}
.language-menu {
flex-direction: column;
top: 50px !important;
z-index: 60 !important;
transform: translate(-140px);
background: black !important;
backdrop-filter: blur(30px);
position: fixed !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
z-index: 10 !important;
background-color: var(--color-box-body) !important;
display: grid !important;
grid-template-columns: repeat(auto-fit,minmax(224px,1fr)) !important;
width: 50% !important;
height: max-content !important;
border-radius: 6px !important;
border: none !important;
padding: 6px !important;
}
.language-menu a {
display: flex !important;
margin-bottom: -25px;
background: var(--color-box-header);
border-radius: 6px !important;
min-width: 245px;
}
#_aria_auto_id_0 .language-menu {
display: grid !important;
z-index: 100 !important;
width: 70% !important;
gap: 0px !important;
min-width: 70% !important;
flex-wrap: wrap;
}
header {
/* position: absolute !important; */
top: 0px !important;
max-width: 1200px !important;
margin: auto !important;
width: 100% !important;
z-index: 50 !important;
}
header .header-content {
display: flex !important;
flex-direction: column !important;
}
header .header-content .header-link-item {
.header-link-item {
color: var(--sudovanilla-forgejo-color) !important;
display: flex !important;
gap: 6px !important;
@ -217,95 +226,102 @@ header .header-content .header-link-item {
text-wrap: nowrap !important;
}
header .header-content .header-link-item:hover {
.header-link-item:hover {
color: var(--sudovanilla-forgejo-color) !important;
}
header .header-content .header-link-item svg {
.header-link-item svg {
width: 0px !important;
}
header .header-content .header-login-button {
.header-login-button {
align-items: center !important;
display: flex !important;
padding: 2px 16px 2px 2px !important;
cursor: pointer !important;
}
header .header-content .header-login-button img {
.header-login-button img {
margin-right: 12px !important;
}
header .header-content .header-login-button img {
.header-login-button img {
width: 32px !important;
height: 32px !important;
border-radius: 10rem !important;
}
header .header-content .header-row-top {
display: flex !important;
.header-row-top {
display: flex;
align-items: center !important;
justify-content: space-between !important;
padding: 24px 0px;
max-width: 1200px !important;
margin: auto;
}
header .header-content .header-row-top div:nth-child(1) {
.header-row-top div:nth-child(1) {
display: flex !important;
gap: 12px !important;
}
header .header-content .header-row-top div:nth-child(2) {
.header-row-top div:nth-child(2) {
display: flex !important;
gap: 24px !important;
overflow: none !important;
margin-left: 24px !important;
}
header .header-content .header-row-bottom {
.header-row-bottom {
background: transparent !important;
border-radius: 10px !important;
border: 1px #2b2b2b solid !important;
overflow: none !important;
width: 100% !important;
top: 24px !important;
max-width: 1200px !important;
backdrop-filter: blur(24px) brightness(1) !important;
display: flex !important;
margin: auto;
backdrop-filter: blur(12px) brightness(1) !important;
display: flex;
justify-content: space-between !important;
align-items: center !important;
z-index: 50 !important;
min-height: 56px !important;
top: 12px;
position: sticky;
}
header .header-content .header-row-bottom #show-w-scroll {
.header-row-bottom #show-w-scroll {
transition: width 0.3s, opacity 0.3s !important;
width: 0px !important;
opacity: 0 !important;
display: block !important;
}
header .header-content .header-row-bottom .header-sub-service {
.header-row-bottom .header-sub-service {
color: var(--sudovanilla-forgejo-color) !important;
font-weight: bold !important;
padding: 0px 32px !important;
padding: 0px 16px !important;
border-right: 1px #3f3c3c solid !important;
display: flex !important;
align-items: center !important;
}
.header-row-bottom .header-sub-service img {
transform: scale(1.32);
margin-right: 8px !important;
}
header .header-content .header-row-bottom div {
.header-row-bottom div {
display: flex !important;
gap: 24px !important;
align-items: center !important;
margin-right: 24px !important;
}
header .header-content .header-row-bottom div .header-button {
.header-row-bottom div .header-button {
color: var(--sudovanilla-forgejo-color) !important;
cursor: pointer !important;
}
header .header-content .header-row-bottom div a {
.header-row-bottom div a {
color: var(--sudovanilla-forgejo-color) !important;
display: flex !important;
align-items: center !important;
@ -315,13 +331,22 @@ header .header-content .header-row-bottom div a {
text-wrap: nowrap !important;
}
header .header-content .header-row-bottom div a:hover {
.header-row-bottom div a:hover {
color: var(--sudovanilla-forgejo-color) !important;
}
header .header-content .header-row-bottom div a svg {
.header-row-bottom div a svg {
width: 18px !important;
}
.ui.dropdown.upward.language {
background: var(--steel-700);
padding: 10px 16px;
border-radius: 3rem;
margin: -4px 0px;
}
.ui.dropdown.upward.language:hover {
filter: brightness(1.25);
}
@media (max-width: 800px) {
.page-footer {
margin-bottom: 86px;
@ -334,16 +359,18 @@ header .header-content .header-row-bottom div a svg {
border-radius: 6px !important;
max-width: 1200px !important;
margin: auto;
margin-bottom: auto;
margin-bottom: 24px;
width: 100%;
border: none;
margin-bottom: 6px;
background: transparent;
padding: 6px 0px;
padding: 24px;
}
.page-footer .right-links > a {
border: none;
margin-left: 12px;
}
.page-footer p {
margin: 0px !important;
}
</style>