mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 00:56:16 -06:00
fix up templates
This commit is contained in:
parent
d553b445f5
commit
28d16a9895
7 changed files with 322 additions and 88 deletions
|
|
@ -74,8 +74,9 @@ func (m *Module) statusTemplateHandler(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
c.HTML(http.StatusOK, "status.tmpl", gin.H{
|
c.HTML(http.StatusOK, "status.tmpl", gin.H{
|
||||||
"instance": instance,
|
"instance": instance,
|
||||||
"status": status,
|
"status": status,
|
||||||
"context": context,
|
"context": context,
|
||||||
|
"stylesheets": []string{"/assets/Fork-Awesome/css/fork-awesome.min.css", "/assets/status.css"},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,46 +1,71 @@
|
||||||
html, body {
|
html, body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: #525c66;
|
background: rgb(70, 79, 88);
|
||||||
color: #fafaff;
|
color: #fafaff;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 50% 1fr;
|
|
||||||
grid-template-columns: 1fr 90ch 1fr;
|
|
||||||
line-height: 1.5em;
|
|
||||||
|
|
||||||
|
grid-template-rows: auto 1fr auto;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
grid-auto-rows: auto;
|
line-height: 1.5em;
|
||||||
grid-auto-flow: dense;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body > * {
|
main {
|
||||||
|
background: #525c66;
|
||||||
|
display: grid;
|
||||||
|
padding-top: 2rem;
|
||||||
|
grid-template-columns: 1fr 50% 1fr;
|
||||||
|
grid-template-columns: auto min(92%, 90ch) auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
main .left {
|
||||||
|
grid-column: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
main .right {
|
||||||
|
grid-column: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
main.lightgray {
|
||||||
|
background: #525c66;
|
||||||
|
}
|
||||||
|
|
||||||
|
main > * {
|
||||||
align-self: start;
|
align-self: start;
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
body header, body footer, body .fullWidth {
|
|
||||||
grid-column: 1/4;
|
|
||||||
grid-column: 1/-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .left {
|
|
||||||
grid-column: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
body .right {
|
|
||||||
grid-column: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
header {
|
||||||
background: rgb(70, 79, 88);
|
background: rgb(70, 79, 88);
|
||||||
padding: 2rem;
|
padding: 2rem 0;
|
||||||
margin-bottom: 4rem;
|
padding-bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header img {
|
||||||
|
height: 4rem;
|
||||||
|
padding-left: 2rem;
|
||||||
|
padding-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header div {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 2rem;
|
||||||
|
margin-top: -2rem;
|
||||||
|
flex-grow: 1;
|
||||||
|
align-self: center;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
header div h1 {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
/* color: $acc1; */
|
/* color: $acc1; */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -160,26 +185,21 @@ footer a {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (orientation: portrait) {
|
@media screen and (orientation: portrait) {
|
||||||
body {
|
main {
|
||||||
grid-template-columns: 1fr 92% 1fr;
|
grid-template-columns: 1fr 92% 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
body footer, body .left, body .right {
|
|
||||||
grid-column: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
padding: 0;
|
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer div {
|
footer div {
|
||||||
margin: 1rem 0;
|
margin: 0.3rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.apps .applist {
|
section.apps .applist {
|
||||||
212
web/assets/status.css
Normal file
212
web/assets/status.css
Normal file
|
|
@ -0,0 +1,212 @@
|
||||||
|
main {
|
||||||
|
background: transparent;
|
||||||
|
grid-auto-rows: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thread {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot {
|
||||||
|
position: relative;
|
||||||
|
background: rgb(75, 84, 93);
|
||||||
|
padding: 2rem;
|
||||||
|
/* padding-bottom: 0; */
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 3.2rem auto 1fr;
|
||||||
|
column-gap: 0.5rem;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot a {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .avatar {
|
||||||
|
grid-row: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .avatar img {
|
||||||
|
height: 3.2rem;
|
||||||
|
width: 3.2rem;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .displayname {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
align-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .username {
|
||||||
|
color: #b0b0b5;
|
||||||
|
justify-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .text {
|
||||||
|
margin: 0;
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .text a {
|
||||||
|
color: #de8957;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media {
|
||||||
|
margin-top: 0.6rem;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
grid-column: span 3;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 50% 50%;
|
||||||
|
grid-auto-rows: 16rem;
|
||||||
|
overflow: hidden;
|
||||||
|
gap: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media a {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media .no-image-desc {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0.1rem;
|
||||||
|
right: 0.4rem;
|
||||||
|
content: "(!)";
|
||||||
|
color: white;
|
||||||
|
background: #5897df;
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
border-radius: 100%;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media .no-image-desc span {
|
||||||
|
margin-left: 0.3rem;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media .no-image-desc:hover span {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media .no-image-desc:hover {
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media.single a {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .media.odd a:first-child {
|
||||||
|
grid-row: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info div {
|
||||||
|
position: relative;
|
||||||
|
padding-right: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info .stats {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info {
|
||||||
|
|
||||||
|
color: #b0b0b5;
|
||||||
|
grid-column: span 3;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info div.stats::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info div::after {
|
||||||
|
display: block;
|
||||||
|
background: #b0b0b5;
|
||||||
|
height: 0.25rem;
|
||||||
|
width: 0.25rem;
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: calc((1.5rem - 0.25rem) / 2);
|
||||||
|
right: 0.55rem;
|
||||||
|
border-radius: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info div:last-child::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .info div:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot .toot-link {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-indent: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot {}
|
||||||
|
|
||||||
|
.toot:first-child {
|
||||||
|
/* top left, top right */
|
||||||
|
border-radius: 0.3rem 0.3rem 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot:last-child {
|
||||||
|
/* bottom left, bottom right */
|
||||||
|
border-radius: 0 0 0.3rem 0.3rem;
|
||||||
|
padding-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot.expanded {
|
||||||
|
background: #525c66;
|
||||||
|
padding-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot.expanded .displayname {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot.expanded .text {
|
||||||
|
grid-column: span 3;
|
||||||
|
grid-row: span 1;
|
||||||
|
margin-top: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot.expanded .info {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toot.expanded .media {
|
||||||
|
grid-auto-rows: 1fr;
|
||||||
|
max-height: 120rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer + div { /* something weird from the devstack.. */
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
{{ template "header.tmpl" .}}
|
{{ template "header.tmpl" .}}
|
||||||
|
<main>
|
||||||
<aside class="left logo">
|
<section>
|
||||||
<img src="/assets/sloth.png" alt="Clipart styled sloth logo">
|
<h1>404: Page Not Found</h1>
|
||||||
</aside>
|
If you believe this was an error, you can <a href="{{.instance.ContactAccount.URL}}">contact an admin</a>
|
||||||
<section>
|
</section>
|
||||||
<h1>404: Page Not Found</h1>
|
</main>
|
||||||
If you believe this was an error, you can <a href="{{.instance.ContactAccount.URL}}">contact an admin</a>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{ template "footer.tmpl" .}}
|
{{ template "footer.tmpl" .}}
|
||||||
|
|
@ -8,8 +8,9 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="og:title" content="GoToSocial Testing Instance">
|
<meta name="og:title" content="GoToSocial Testing Instance">
|
||||||
<meta name="og:description" content="">
|
<meta name="og:description" content="">
|
||||||
<link rel="stylesheet" href="/assets/bundle.css">
|
<link rel="stylesheet" href="/assets/base.css">
|
||||||
<link rel="stylesheet" href="/assets/Fork-Awesome/css/fork-awesome.min.css">
|
{{range .stylesheets}}<link rel="stylesheet" href="{{.}}">
|
||||||
|
{{end}}
|
||||||
<link rel="shortcut icon" href="/assets/logo.png" type="image/png">
|
<link rel="shortcut icon" href="/assets/logo.png" type="image/png">
|
||||||
<title>{{.instance.Title}} - GoToSocial</title>
|
<title>{{.instance.Title}} - GoToSocial</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,40 @@
|
||||||
{{ template "header.tmpl" .}}
|
{{ template "header.tmpl" .}}
|
||||||
<div class="left logo">
|
<main class="lightgray">
|
||||||
<img src="/assets/sloth.png" alt="Clipart styled sloth logo">
|
|
||||||
</div>
|
|
||||||
<section>
|
|
||||||
<h1>Home to <span class="count">{{.instance.Stats.user_count}}</span> users
|
|
||||||
who posted <span class="count">{{.instance.Stats.status_count}}</span> statuses,
|
|
||||||
federating with <span class="count">{{.instance.Stats.domain_count}}</span> other instances.</h1>
|
|
||||||
<div className="short-description">
|
|
||||||
{{.instance.ShortDescription |noescape}}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="apps">
|
<section>
|
||||||
<p>
|
<h1>Home to <span class="count">{{.instance.Stats.user_count}}</span> users
|
||||||
GoToSocial does not provide its own frontend, but implements the Mastodon client API.
|
who posted <span class="count">{{.instance.Stats.status_count}}</span> statuses,
|
||||||
You can use this server through a variety of clients:
|
federating with <span class="count">{{.instance.Stats.domain_count}}</span> other instances.</h1>
|
||||||
</p>
|
<div className="short-description">
|
||||||
<div class="applist">
|
{{.instance.ShortDescription |noescape}}
|
||||||
<div class="entry">
|
</div>
|
||||||
<svg class="logo redraw" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10000 10000">
|
</section>
|
||||||
<path d="M9212 5993H5987V823c1053 667 2747 2177 3225 5170zM3100 2690A12240 12240 0 01939 6035h2161zm676 7210h2448a3067 3067 0 003067-3067H5052V627a527 527 0 00-1052 0v6206H709a3067 3067 0 003067 3067z"></path>
|
|
||||||
</svg>
|
<section class="apps">
|
||||||
<div>
|
<p>
|
||||||
<h2>Pinafore</h2>
|
GoToSocial does not provide its own frontend, but implements the Mastodon client API.
|
||||||
<p>Pinafore is a web client designed for speed and simplicity.</p>
|
You can use this server through a variety of clients:
|
||||||
<a class="button" href="https://pinafore.social/settings/instances/add">Use Pinafore</a>
|
</p>
|
||||||
|
<div class="applist">
|
||||||
|
<div class="entry">
|
||||||
|
<svg class="logo redraw" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10000 10000">
|
||||||
|
<path d="M9212 5993H5987V823c1053 667 2747 2177 3225 5170zM3100 2690A12240 12240 0 01939 6035h2161zm676 7210h2448a3067 3067 0 003067-3067H5052V627a527 527 0 00-1052 0v6206H709a3067 3067 0 003067 3067z"></path>
|
||||||
|
</svg>
|
||||||
|
<div>
|
||||||
|
<h2>Pinafore</h2>
|
||||||
|
<p>Pinafore is a web client designed for speed and simplicity.</p>
|
||||||
|
<a class="button" href="https://pinafore.social/settings/instances/add">Use Pinafore</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="entry">
|
||||||
|
<img class="logo" src="/assets/tusky.svg" alt="The Tusky mascot, a cartoon elephant tooting happily"/>
|
||||||
|
<div>
|
||||||
|
<h2>Tusky</h2>
|
||||||
|
<p>Tusky is a lightweight mobile client for Android</p>
|
||||||
|
<a class="button" href="https://tusky.app">Get Tusky</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="entry">
|
</section>
|
||||||
<img class="logo" src="/assets/tusky.svg" alt="The Tusky mascot, a cartoon elephant tooting happily"/>
|
</main>
|
||||||
<div>
|
|
||||||
<h2>Tusky</h2>
|
|
||||||
<p>Tusky is a lightweight mobile client for Android</p>
|
|
||||||
<a class="button" href="https://tusky.app">Get Tusky</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{{ template "footer.tmpl" .}}
|
{{ template "footer.tmpl" .}}
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
{{ template "header.tmpl" .}}
|
{{ template "header.tmpl" .}}
|
||||||
<section class="login">
|
<main>
|
||||||
<h1>Login</h1>
|
<section class="login">
|
||||||
<form action="/auth/sign_in" method="POST">
|
<h1>Login</h1>
|
||||||
<label for="email">Email</label>
|
<form action="/auth/sign_in" method="POST">
|
||||||
<input type="text" class="form-control" name="username" required placeholder="Please enter your email address">
|
<label for="email">Email</label>
|
||||||
|
<input type="text" class="form-control" name="username" required placeholder="Please enter your email address">
|
||||||
|
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input type="password" class="form-control" name="password" required placeholder="Please enter your password">
|
<input type="password" class="form-control" name="password" required placeholder="Please enter your password">
|
||||||
<button type="submit" class="btn btn-success">Login</button>
|
<button type="submit" class="btn btn-success">Login</button>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
</main>
|
||||||
{{ template "footer.tmpl" .}}
|
{{ template "footer.tmpl" .}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue