fuck tailwind, cosmetic fixes
This commit is contained in:
parent
d00856807e
commit
4dec2539af
4 changed files with 68 additions and 9 deletions
40
web/static/main.css
Normal file
40
web/static/main.css
Normal file
|
@ -0,0 +1,40 @@
|
|||
body, html {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.title a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
background-color: #09c;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.nav-bar a {
|
||||
color: white;
|
||||
padding: 7px;
|
||||
margin: 0px 3px;
|
||||
}
|
||||
|
||||
/* containers */
|
||||
|
||||
.container {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 33.75em) { /* 540px */
|
||||
.container {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 60em) { /* 960px */
|
||||
.container {
|
||||
width: 75%;
|
||||
max-width: 60rem;
|
||||
}
|
||||
}
|
1
web/static/tailwind.min.css
vendored
1
web/static/tailwind.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -5,29 +5,41 @@
|
|||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" href="/static/tailwind.min.css" />
|
||||
<link rel="stylesheet" href="/static/main.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container mx-auto">
|
||||
<p>Logged in: {{ .LoggedIn }}</p>
|
||||
<div class="container">
|
||||
<h1 class="title">
|
||||
<a href="/">subscribe-bot</a>
|
||||
</h1>
|
||||
|
||||
<div class="nav-bar">
|
||||
<a href="/">home</a>
|
||||
|
||||
{{ if .LoggedIn }}
|
||||
<a href="/logout">logout</a>
|
||||
{{ else }}
|
||||
<a href="/login">login</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<p>Maps:</p>
|
||||
|
||||
<table class="table-auto">
|
||||
<thead>
|
||||
<th>Mapper</th>
|
||||
<th>Artist</th>
|
||||
<th>Title</th>
|
||||
<th>Links</th>
|
||||
</thead>
|
||||
{{ range .Beatmapsets }}
|
||||
<tbody>
|
||||
<td>{{ .Creator }}</td>
|
||||
<td>{{ .Artist }}</td>
|
||||
<td>{{ .Title }}</td>
|
||||
<td>
|
||||
<a href="https://osu.ppy.sh/s/{{ .ID }}" class="underline">osu</a>
|
||||
<a href="https://osu.ppy.sh/u/{{ .UserID }}" target="_blank">{{ .Creator }}</a>
|
||||
</td>
|
||||
<td>{{ .Artist }} - {{ .Title }}</td>
|
||||
<td>
|
||||
<a href="https://osu.ppy.sh/s/{{ .ID }}" target="_blank">osu</a>
|
||||
</td>
|
||||
</tbody>
|
||||
{{ end }}
|
||||
|
|
|
@ -51,6 +51,14 @@ func RunWeb(config *config.Config, api *osuapi.Osuapi) {
|
|||
DisableCache: config.Debug,
|
||||
})
|
||||
|
||||
r.GET("/logout", func(c *gin.Context) {
|
||||
session := sessions.Default(c)
|
||||
session.Delete("access_token")
|
||||
session.Save()
|
||||
|
||||
c.Redirect(http.StatusTemporaryRedirect, "/")
|
||||
})
|
||||
|
||||
r.GET("/login", func(c *gin.Context) {
|
||||
url := url.URL{
|
||||
Scheme: "https",
|
||||
|
|
Loading…
Reference in a new issue