diff --git a/.gitignore b/.gitignore index a6dcbcc..c2caf3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.hugo_build.lock public/ themes/ diff --git a/config.yaml b/config.yaml index 8744e77..3c1e4a2 100644 --- a/config.yaml +++ b/config.yaml @@ -20,6 +20,7 @@ params: description: Git with a cup of tea author: The Gitea Authors website: https://gitea.io + custom_css: ['css/custom.css'] menu: page: @@ -56,18 +57,27 @@ menu: url: https://github.com/go-gitea/ weight: 60 pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - name: Forum url: https://discourse.gitea.io/ - weight: 80 + weight: 70 pre: group - name: Twitter url: https://twitter.com/giteaio - weight: 90 + weight: 80 pre: twitter + - name: Chatroom + weight: 90 + pre: caret-down + - name: Discord Chat + url: https://discord.gg/Gitea + weight: 100 + pre: comment + parent: Chatroom + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 110 + pre: matrix-org + parent: Chatroom languages: en-us: @@ -124,6 +134,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org zh-tw: weight: 2 @@ -175,6 +189,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org pt-br: weight: 3 @@ -226,6 +244,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org nl-nl: weight: 4 @@ -277,6 +299,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org ko-kr: weight: 5 @@ -328,6 +354,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org ja-jp: weight: 6 @@ -379,6 +409,10 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org ru-ru: weight: 7 @@ -430,3 +464,7 @@ languages: url: https://twitter.com/giteaio weight: 90 pre: twitter + - name: Matrix + url: https://matrix.to/#/#gitea:matrix.org + weight: 100 + pre: matrix-org diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..a87d6c6 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,38 @@ + + + + + + + + + {{ if .IsPage }} + + {{ end }} + + + + {{ hugo.Generator }} + + {{ if and (not .IsHome) .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }} + + {{ with .Params.goimport }}{{ end }} + {{ with .Params.gosource }}{{ end }} + + {{ with .OutputFormats.Get "RSS" }} + + + {{ end }} + + + + + + {{ range .Site.Params.custom_css }} + + {{ end }} + + + + + diff --git a/layouts/partials/toplinks.html b/layouts/partials/toplinks.html new file mode 100644 index 0000000..3ea6149 --- /dev/null +++ b/layouts/partials/toplinks.html @@ -0,0 +1,22 @@ + +{{ range .Site.Menus.page }} + {{ if .HasChildren }} + + {{ else }} + +   + {{ .Name }} + + {{ end }} +{{ end }} diff --git a/static/_headers b/static/_headers index a5de172..d97520b 100644 --- a/static/_headers +++ b/static/_headers @@ -1,5 +1,5 @@ /* - Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' https://fonts.googleapis.com https://cdnjs.cloudflare.com; font-src 'self' data: https://cdnjs.cloudflare.com https://fonts.gstatic.com + Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com X-Frame-Options: DENY X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..9ff7ed0 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,39 @@ +.dropdown-content { + background-color: #f9f9f9; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + display: none; + margin-left: -15px; + margin-top: 145px; + min-width: 160px; + position: absolute; +} + +.dropdown:hover .dropdown-content { + display: block; +} +.hero.is-primary .navbar .navbar-item.dropdown:not(.non_existent) { + color: inherit; + cursor: pointer; +} + +.hero.is-primary .navbar-item:hover { + background-color: #e5eaec; +} + +@media screen and (max-width: 1023px) { + .dropdown-content { + background-color: #395068; + margin-left: -15px; + margin-top: 0; + } + + .hero.is-primary a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current), + .hero.is-primary div.dropdown:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current) { + color: rgb(241, 234, 234); + } + + .hero.is-primary a.navbar-item:hover, + .hero.is-primary div.navbar-item:hover { + background-color: #225164; + } +} \ No newline at end of file