mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 14:35:40 +00:00
ui: improve commit graph layout
This commit is contained in:
parent
61314f05fc
commit
dbe2846e3b
|
@ -3,9 +3,9 @@
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div id="git-graph-container" class="ui segment{{if eq .Mode "monochrome"}} monochrome{{end}}">
|
<div id="git-graph-container" class="ui segment{{if eq .Mode "monochrome"}} monochrome{{end}}">
|
||||||
<h2 class="ui header dividing">
|
<div id="git-graph-heading">
|
||||||
{{ctx.Locale.Tr "repo.commit_graph"}}
|
<div id="git-graph-heading-left">
|
||||||
<div class="ui icon buttons small color-buttons">
|
<h2>{{ctx.Locale.Tr "repo.commit_graph"}}</h2>
|
||||||
<div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
|
<div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
|
||||||
<input type="hidden" name="flow">
|
<input type="hidden" name="flow">
|
||||||
<div class="default text">{{ctx.Locale.Tr "repo.commit_graph.select"}}</div>
|
<div class="default text">{{ctx.Locale.Tr "repo.commit_graph.select"}}</div>
|
||||||
|
@ -45,14 +45,17 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui icon buttons small">
|
||||||
<button id="flow-color-monochrome" class="ui icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}</button>
|
<button id="flow-color-monochrome" class="ui icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}</button>
|
||||||
<button id="flow-color-colored" class="ui icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.color"}}</button>
|
<button id="flow-color-colored" class="ui icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.color"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</div>
|
||||||
<div class="ui dividing"></div>
|
<div id="git-graph-content">
|
||||||
<div class="is-loading tw-py-32 tw-hidden" id="loading-indicator"></div>
|
<div class="is-loading tw-py-32 tw-hidden" id="loading-indicator"></div>
|
||||||
{{template "repo/graph/svgcontainer" .}}
|
{{template "repo/graph/svgcontainer" .}}
|
||||||
{{template "repo/graph/commits" .}}
|
{{template "repo/graph/commits" .}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,24 +1,48 @@
|
||||||
#git-graph-container {
|
#git-graph-content {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 350px;
|
min-height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#git-graph-container h2 {
|
#git-graph-heading {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#git-graph-container .ui.header.dividing {
|
#git-graph-heading-left {
|
||||||
padding-bottom: 10px;
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#git-graph-heading h2 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 767.98px) {
|
||||||
|
#git-graph-heading {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
#git-graph-heading,
|
||||||
|
#git-graph-heading-left {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#git-graph-heading-left {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
#flow-select-refs-dropdown {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#git-graph-container #flow-select-refs-dropdown {
|
#git-graph-container #flow-select-refs-dropdown {
|
||||||
border-top-right-radius: 0;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
min-width: 250px;
|
min-width: 250px;
|
||||||
border-right: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#git-graph-container #flow-select-refs-dropdown .ui.label {
|
#git-graph-container #flow-select-refs-dropdown .ui.label {
|
||||||
|
|
Loading…
Reference in a new issue