Add raw button to file view

Signed-off-by: Odyssey <odyssey346@disroot.org>
This commit is contained in:
Odyssey
2022-12-27 15:40:12 +01:00
parent 286fe9c7a0
commit de9ab67e8c
3 changed files with 20 additions and 5 deletions
+15
View File
@@ -9,6 +9,7 @@
:root {
--text: #fff;
--background: #252525;
--secondary-background: #353535;
--background-darker: #151515;
--accent: #00b7c3;
}
@@ -117,6 +118,8 @@ a:hover {
.userProfile h1 {
color: #00b7c3;
margin: 4px;
word-wrap: nowrap;
text-overflow: ellipsis;
}
.userProfile h2 {
@@ -195,11 +198,23 @@ a:hover {
overflow-x: auto;
}
.userContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.secondary {
background-color: var(--secondary-background);
}
@media screen and (prefers-color-scheme: light) {
:root {
--text: #000;
--background: #f1f1f1;
--secondary-background: #e1e1e1;
--background-darker: #fff;
}
body {
+4 -4
View File
@@ -8,11 +8,11 @@
</div>
<div class="userReadme">
<h3>{{.name}}</h3>
<div class="userContainer">
<h3>{{.name}}</h3>
<a href="/raw/{{.fullname}}/{{.branch}}/{{.name}}" class="button secondary">Raw</a>
</div>
{{ .file}}
</div>
<div class="downloadParent">
<a href="/raw/{{.fullname}}/{{.branch}}/{{.name}}" class="button">Download</a>
</div>
{{end}}
</main>
+1 -1
View File
@@ -9,7 +9,7 @@
<div class="userProfile">
<img src="{{ .AvatarUrl }}" alt="{{.Login}}'s avatar" class="avatar" width="150" height="150">
{{ if .Name }}
<h1>{{.Name}}</h1>
<h1 class="user-profile-h1">{{.Name}}</h1>
{{ end }}
<h2>{{.Login}}</h2>
{{ if eq .Type "User" }}