mirror of https://gitea.com/gitea/website.git
Added dropdown
This commit is contained in:
parent
0df316627b
commit
69108df1b6
|
@ -1,2 +1,3 @@
|
|||
.hugo_build.lock
|
||||
public/
|
||||
themes/
|
||||
|
|
18
config.yaml
18
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,22 +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: Matrix
|
||||
url: https://matrix.to/#/#gitea:matrix.org
|
||||
weight: 100
|
||||
pre: matrix-org
|
||||
parent: Chatroom
|
||||
- name: Discord Chat
|
||||
url: https://discord.gg/Gitea
|
||||
weight: 110
|
||||
pre: comment
|
||||
parent: Chatroom
|
||||
|
||||
languages:
|
||||
en-us:
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" />
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}styles/main.css">
|
||||
{{ range .Site.Params.custom_css }}
|
||||
<link rel="stylesheet" href="{{ . | absURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}images/favicon.png">
|
||||
<link rel="icon" type="image/x-icon" href="{{ .Site.BaseURL }}images/favicon.png">
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<span class="navbar-item logo"><img src="{{ .Site.BaseURL }}images/gitea.png" alt="{{ .Site.Title }}"></span>
|
||||
{{ range .Site.Menus.page }}
|
||||
{{ if .HasChildren }}
|
||||
<div class="navbar-item dropdown">
|
||||
<i class="fa fa-{{ .Pre }}"></i>
|
||||
<span>{{ .Name }}</span>
|
||||
<div class="dropdown-content">
|
||||
{{ range .Children }}
|
||||
<a class="navbar-item" href="{{ .URL }}">
|
||||
<i class="fa fa-{{ .Pre }}"></i>
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a class="navbar-item" href="{{ .URL }}">
|
||||
<i class="fa fa-{{ .Pre }}"></i>
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue