template formatting

This commit is contained in:
f0x 2024-11-06 15:52:08 +01:00
parent 7f4d9b689a
commit 4a2c712b3d
36 changed files with 1037 additions and 1039 deletions

View file

@ -3,6 +3,9 @@
"go.lintFlags": [ "go.lintFlags": [
"--fast" "--fast"
], ],
"go.testEnvVars": {
"WAZERO_COMPILATION_CACHE": "~/.cache/wazero"
},
"gopls": { "gopls": {
"analyses": { "analyses": {
"composites": false "composites": false
@ -19,5 +22,9 @@
], ],
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit" "source.fixAll.eslint": "explicit"
} },
"html.format.wrapLineLength": 0,
"html.format.wrapAttributes": "preserve",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
} }

View file

@ -19,25 +19,25 @@
{{- with . }} {{- with . }}
<main> <main>
<section> <section>
<h1>404: Not Found</h1> <h1>404: Not Found</h1>
<p> <p>
GoToSocial only serves Public statuses via the web. GoToSocial only serves Public statuses via the web.
</p> </p>
<p> <p>
If you reached this page by clicking on a status link, If you reached this page by clicking on a status link,
it's likely that the status is not Public. You can try it's likely that the status is not Public. You can try
entering the status URL in your client's search bar, entering the status URL in your client's search bar,
to view the status from your account. If that doesn't to view the status from your account. If that doesn't
work, it's possible that the status has been deleted by work, it's possible that the status has been deleted by
the author, you don't have permission to view it, or it the author, you don't have permission to view it, or it
doesn't exist at all. doesn't exist at all.
</p> </p>
<p> <p>
If you believe this 404 was an error, you can contact If you believe this 404 was an error, you can contact
the instance admin. Provide them with the following the instance admin. Provide them with the following
request ID: <code>{{- .requestID -}}</code>. request ID: <code>{{- .requestID -}}</code>.
</p> </p>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -37,9 +37,9 @@
{{- if .languages }} {{- if .languages }}
<p>This instance prefers the following languages:</p> <p>This instance prefers the following languages:</p>
<ol> <ol>
{{- range .languages }} {{- range .languages }}
<li>{{- . -}}</li> <li>{{- . -}}</li>
{{- end }} {{- end }}
</ol> </ol>
{{- else }} {{- else }}
<p>No preferred languages have yet been set for this instance.</p> <p>No preferred languages have yet been set for this instance.</p>
@ -50,9 +50,9 @@
{{- if .instance.Rules }} {{- if .instance.Rules }}
<p>This instance has the following rules:</p> <p>This instance has the following rules:</p>
<ol> <ol>
{{- range .instance.Rules }} {{- range .instance.Rules }}
<li>{{- .Text -}}</li> <li>{{- .Text -}}</li>
{{- end }} {{- end }}
</ol> </ol>
{{- else }} {{- else }}
<p>No rules have yet been set for this instance.</p> <p>No rules have yet been set for this instance.</p>
@ -61,7 +61,7 @@
{{- define "customCSSLimits" -}} {{- define "customCSSLimits" -}}
<a href="https://docs.gotosocial.org/en/latest/user_guide/settings/#custom-css" target="_blank" <a href="https://docs.gotosocial.org/en/latest/user_guide/settings/#custom-css" target="_blank"
rel="noopener noreferrer">Custom CSS</a> is&nbsp; rel="noopener noreferrer">Custom CSS</a> is&nbsp;
{{- if .instance.Configuration.Accounts.AllowCustomCSS -}} {{- if .instance.Configuration.Accounts.AllowCustomCSS -}}
<b>enabled</b> <b>enabled</b>
{{- else -}} {{- else -}}
@ -84,113 +84,113 @@ Polls can have up to
{{- with . }} {{- with . }}
<nav class="sidebar" aria-labelledby="toc"> <nav class="sidebar" aria-labelledby="toc">
<h2 id="toc">Table of Contents</h2> <h2 id="toc">Table of Contents</h2>
<div> <div>
<ol> <ol>
<li><a href="#about">About</a></li> <li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li> <li><a href="#contact">Contact</a></li>
<li><a href="#features">Features</a></li> <li><a href="#features">Features</a></li>
<li><a href="#languages">Languages</a></li> <li><a href="#languages">Languages</a></li>
<li><a href="#signup">Register an Account</a></li> <li><a href="#signup">Register an Account</a></li>
<li><a href="#rules">Rules</a></li> <li><a href="#rules">Rules</a></li>
<li><a href="#terms">Terms and Conditions</a></li> <li><a href="#terms">Terms and Conditions</a></li>
<li><a href="#moderated-servers">Moderated Servers</a></li> <li><a href="#moderated-servers">Moderated Servers</a></li>
</ol> </ol>
</div> </div>
</nav> </nav>
<main class="single-page"> <main class="single-page">
<section role="region" aria-labelledby="about"> <section role="region" aria-labelledby="about">
<h2 id="about">About {{ .instance.Title -}}</h2> <h2 id="about">About {{ .instance.Title -}}</h2>
<div> <div>
{{- with . }} {{- with . }}
{{- include "description" . | indent 3 }} {{- include "description" . | indent 3 }}
{{- end }} {{- end }}
</div> </div>
</section> </section>
<section role="region" aria-labelledby="contact"> <section role="region" aria-labelledby="contact">
<h2 id="contact">Admin Contact</h2> <h2 id="contact">Admin Contact</h2>
<div> <div>
{{- if .instance.ContactAccount }} {{- if .instance.ContactAccount }}
<a href="{{- .instance.ContactAccount.URL -}}" class="account-card"> <a href="{{- .instance.ContactAccount.URL -}}" class="account-card">
<img class="avatar" src="{{- .instance.ContactAccount.Avatar -}}" alt="" /> <img class="avatar" src="{{- .instance.ContactAccount.Avatar -}}" alt="" />
<b> <b>
{{- if .instance.ContactAccount.DisplayName -}} {{- if .instance.ContactAccount.DisplayName -}}
{{- emojify .instance.ContactAccount.Emojis (escape .instance.ContactAccount.DisplayName) -}} {{- emojify .instance.ContactAccount.Emojis (escape .instance.ContactAccount.DisplayName) -}}
{{- else -}} {{- else -}}
{{- .instance.ContactAccount.Username -}} {{- .instance.ContactAccount.Username -}}
{{- end -}} {{- end -}}
</b> </b>
<span>@{{- .instance.ContactAccount.Username -}}</span> <span>@{{- .instance.ContactAccount.Username -}}</span>
</a> </a>
{{- else }} {{- else }}
<p>This instance has not yet set a contact account.</p> <p>This instance has not yet set a contact account.</p>
{{- end }} {{- end }}
{{- if .instance.Email }} {{- if .instance.Email }}
<p>Email: <a href="mailto:{{- .instance.Email -}}">{{- .instance.Email -}}</a></p> <p>Email: <a href="mailto:{{- .instance.Email -}}">{{- .instance.Email -}}</a></p>
{{- else }} {{- else }}
<p>This instance has not yet set a contact email address.</p> <p>This instance has not yet set a contact email address.</p>
{{- end }} {{- end }}
</div> </div>
</section> </section>
<section role="region" aria-labelledby="features"> <section role="region" aria-labelledby="features">
<h2 id="features">Instance Features</h2> <h2 id="features">Instance Features</h2>
<div> <div>
<ul> <ul>
<li>{{- template "statusLimits" . -}}</li> <li>{{- template "statusLimits" . -}}</li>
<li>{{- template "pollLimits" . -}}</li> <li>{{- template "pollLimits" . -}}</li>
<li>{{- template "customCSSLimits" . -}}</li> <li>{{- template "customCSSLimits" . -}}</li>
</ul> </ul>
</div> </div>
</section> </section>
<section role="region" aria-labelledby="languages"> <section role="region" aria-labelledby="languages">
<h2 id="languages">Languages</h2> <h2 id="languages">Languages</h2>
<div> <div>
{{- with . }} {{- with . }}
{{- include "languages" . | indent 3 }} {{- include "languages" . | indent 3 }}
{{- end }} {{- end }}
</div> </div>
</section> </section>
{{- include "index_register.tmpl" . | indent 1 }} {{- include "index_register.tmpl" . | indent 1 }}
<section role="region" aria-labelledby="rules"> <section role="region" aria-labelledby="rules">
<h2 id="rules">Instance Rules</h2> <h2 id="rules">Instance Rules</h2>
<div> <div>
{{- with . }} {{- with . }}
{{- include "rules" . | indent 3 }} {{- include "rules" . | indent 3 }}
{{- end }} {{- end }}
</div> </div>
</section> </section>
<section role="region" aria-labelledby="terms"> <section role="region" aria-labelledby="terms">
<h2 id="terms">Terms and Conditions</h2> <h2 id="terms">Terms and Conditions</h2>
<div> <div>
{{- with . }} {{- with . }}
{{- include "termsAndConditions" . | indent 3 }} {{- include "termsAndConditions" . | indent 3 }}
{{- end }} {{- end }}
</div> </div>
</section> </section>
<section role="region" aria-labelledby="moderated-servers"> <section role="region" aria-labelledby="moderated-servers">
<h2 id="moderated-servers">Moderated servers</h2> <h2 id="moderated-servers">Moderated servers</h2>
<div> <div>
<p> <p>
ActivityPub instances federate with other instances by exchanging data with them over the network. ActivityPub instances federate with other instances by exchanging data with them over the network.
Exchanged data includes things like accounts, statuses, likes, boosts, and media attachments. Exchanged data includes things like accounts, statuses, likes, boosts, and media attachments.
This exchange of data can be prevented for instances on specific domains via a domain block created This exchange of data can be prevented for instances on specific domains via a domain block created
by an instance admin. When an instance is domain blocked by another instance: by an instance admin. When an instance is domain blocked by another instance:
</p> </p>
<ul> <ul>
<li>Any existing data from the blocked instance is deleted from the storage of the instance doing the <li>Any existing data from the blocked instance is deleted from the storage of the instance doing the
blocking.</li> blocking.</li>
<li>Interaction between the two instances is cut off in both directions; neither instance can interact <li>Interaction between the two instances is cut off in both directions; neither instance can interact
with the other.</li> with the other.</li>
<li>No new data from the blocked instance will be created on the instance that blocks it.</li> <li>No new data from the blocked instance will be created on the instance that blocks it.</li>
</ul> </ul>
<p> <p>
{{- if .blocklistExposed }} {{- if .blocklistExposed }}
<a href="/about/suspended">View the list of domains blocked by this instance</a> <a href="/about/suspended">View the list of domains blocked by this instance</a>
{{- else }} {{- else }}
This instance does not publically share their list of blocked domains. This instance does not publically share their list of blocked domains.
{{- end }} {{- end }}
</p> </p>
</div> </div>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,25 +19,25 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="with-form" aria-labelledby="authorize"> <section class="with-form" aria-labelledby="authorize">
<h2 id="authorize">Authorize app</h2> <h2 id="authorize">Authorize app</h2>
<form action="/oauth/authorize" method="POST"> <form action="/oauth/authorize" method="POST">
<p>Hi <b>{{- .user -}}</b>!</p> <p>Hi <b>{{- .user -}}</b>!</p>
<p> <p>
Application Application
{{- if .appwebsite }} {{- if .appwebsite }}
<a href="{{- .appwebsite -}}" rel="nofollow noreferrer noopener" target="_blank">{{- .appname -}}</a> <a href="{{- .appwebsite -}}" rel="nofollow noreferrer noopener" target="_blank">{{- .appname -}}</a>
{{- else }} {{- else }}
<b>{{- .appname -}}</b> <b>{{- .appname -}}</b>
{{- end }} {{- end }}
would like to perform actions on your behalf, with scope would like to perform actions on your behalf, with scope
<em>{{- .scope -}}</em>. <em>{{- .scope -}}</em>.
</p> </p>
<p> <p>
To continue, the application will redirect to: <code>{{- .redirect -}}</code> To continue, the application will redirect to: <code>{{- .redirect -}}</code>
</p> </p>
<button type="submit" class="btn btn-success">Allow</button> <button type="submit" class="btn btn-success">Allow</button>
</form> </form>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,15 +19,15 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="with-form" aria-labelledby="confirm"> <section class="with-form" aria-labelledby="confirm">
<h2 id="confirm">Confirm email address</h2> <h2 id="confirm">Confirm email address</h2>
<form action="/confirm_email?token={{ .token }}" method="POST"> <form action="/confirm_email?token={{ .token }}" method="POST">
<p> <p>
Hi <b>{{- .username -}}</b>! Hi <b>{{- .username -}}</b>!
Please click the button to confirm your email address <b>{{- .email -}}</b>. Please click the button to confirm your email address <b>{{- .email -}}</b>.
</p> </p>
<button type="submit" class="btn btn-success">Confirm</button> <button type="submit" class="btn btn-success">Confirm</button>
</form> </form>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,12 +19,12 @@
{{- with . }} {{- with . }}
<main> <main>
<section aria-labelledby="confirmed"> <section aria-labelledby="confirmed">
<h2 id="confirmed">Email address confirmed</h2> <h2 id="confirmed">Email address confirmed</h2>
<p>Email address <b>{{- .email -}}</b> is now confirmed!</p> <p>Email address <b>{{- .email -}}</b> is now confirmed!</p>
{{- if not .approved }} {{- if not .approved }}
<p>Once an admin has approved your sign-up, you will be able to log in and use your account.</p> <p>Once an admin has approved your sign-up, you will be able to log in and use your account.</p>
{{- end }} {{- end }}
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,34 +19,34 @@
{{- with . }} {{- with . }}
<main> <main>
<section> <section>
<h1>Suspended Instances</h1> <h1>Suspended Instances</h1>
<p> <p>
The following list of domains have been suspended The following list of domains have been suspended
by the administrator(s) of this server. by the administrator(s) of this server.
</p> </p>
<p> <p>
All current and future accounts on these instances are All current and future accounts on these instances are
blocked, and no more data is federated to the remote servers. blocked, and no more data is federated to the remote servers.
This extends to subdomains, so an entry for 'example.com' This extends to subdomains, so an entry for 'example.com'
includes 'social.example.com' as well. includes 'social.example.com' as well.
</p> </p>
<div class="list domain-blocklist"> <div class="list domain-blocklist">
<div class="header entry"> <div class="header entry">
<div class="domain">Domain</div> <div class="domain">Domain</div>
<div class="public_comment">Public comment</div> <div class="public_comment">Public comment</div>
</div> </div>
{{- range .blocklist }} {{- range .blocklist }}
<div class="entry" id="{{- .Domain -}}"> <div class="entry" id="{{- .Domain -}}">
<div class="domain"> <div class="domain">
<a class="text-cutoff" href="#{{- .Domain -}}" title="{{- .Domain -}}">{{- .Domain -}}</a> <a class="text-cutoff" href="#{{- .Domain -}}" title="{{- .Domain -}}">{{- .Domain -}}</a>
</div> </div>
<div class="public_comment"> <div class="public_comment">
<p>{{- .PublicComment -}}</p> <p>{{- .PublicComment -}}</p>
</div> </div>
</div> </div>
{{- end }} {{- end }}
</div> </div>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -23,4 +23,4 @@ Hello moderator of {{ .InstanceName }} ({{ .InstanceURL }})!
{{- else if .ReportTargetDomain }}Someone from your instance has reported a user from {{ .ReportTargetDomain }}. {{- else if .ReportTargetDomain }}Someone from your instance has reported a user from {{ .ReportTargetDomain }}.
{{- else }}Someone from your instance has reported another user from your instance.{{ end }} {{- else }}Someone from your instance has reported another user from your instance.{{ end }}
To view the report, paste the following link into your browser: {{ .ReportURL }} To view the report, paste the following link into your browser: {{ .ReportURL }}

View file

@ -23,10 +23,13 @@ Someone has submitted a new account sign-up to your instance.
They provided the following details: They provided the following details:
Email address: {{ .SignupEmail }} Email address:
Username: {{ .SignupUsername }} {{ .SignupEmail }}
Username:
{{ .SignupUsername }}
{{- if .SignupReason }} {{- if .SignupReason }}
Reason: {{ .SignupReason }} Reason:
{{ .SignupReason }}
{{- end }} {{- end }}
To view the sign-up, paste the following link into your browser: {{ .SignupURL }} To view the sign-up, paste the following link into your browser: {{ .SignupURL }}

View file

@ -28,4 +28,4 @@ The following message was included by the admin user:
{{ .Message }} {{ .Message }}
{{- else }} {{- else }}
{{- end }} {{- end }}

View file

@ -19,14 +19,14 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="error"> <section class="error">
<h1>An error occured:</h1> <h1>An error occured:</h1>
<pre>{{- .error -}}</pre> <pre>{{- .error -}}</pre>
{{- if .requestID }} {{- if .requestID }}
<div> <div>
<span>Request ID:</span> <code>{{- .requestID -}}</code> <span>Request ID:</span> <code>{{- .requestID -}}</code>
</div> </div>
{{- end }} {{- end }}
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,30 +19,30 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="with-form" aria-labelledby="finalize"> <section class="with-form" aria-labelledby="finalize">
<h2 id="finalize">Finalize sign-in to {{ .instance.Title -}}</h2> <h2 id="finalize">Finalize sign-in to {{ .instance.Title -}}</h2>
<form action="/oauth/finalize" method="POST"> <form action="/oauth/finalize" method="POST">
<p> <p>
Hi <b>{{- .name -}}</b>! Hi <b>{{- .name -}}</b>!
</p> </p>
<p> <p>
You are about to create an account on <b>{{- .instance.Title -}}</b>. You are about to create an account on <b>{{- .instance.Title -}}</b>.
To finish the process, you must select your username. To finish the process, you must select your username.
</p> </p>
<div class="labelinput"> <div class="labelinput">
<label for="username"> <label for="username">
Username (lowercase a-z, numbers, and underscores; max 64 characters).<br /> Username (lowercase a-z, numbers, and underscores; max 64 characters).<br />
<small>Your username will be part of your fediverse handle, and cannot be changed later, so choose <small>Your username will be part of your fediverse handle, and cannot be changed later, so choose
thoughtfully!</small> thoughtfully!</small>
</label> </label>
<input id="username" type="text" name="username" required <input id="username" type="text" name="username" required
placeholder="Please enter your desired username" pattern="^[a-z0-9_]{1,64}$" placeholder="Please enter your desired username" pattern="^[a-z0-9_]{1,64}$"
title="lowercase a-z, numbers, and underscores; max 64 characters" title="lowercase a-z, numbers, and underscores; max 64 characters"
value="{{- .preferredUsername -}}"> value="{{- .preferredUsername -}}">
</div> </div>
<input type="hidden" name="name" value="{{- .name -}}"> <input type="hidden" name="name" value="{{- .name -}}">
<button type="submit" class="btn btn-success">Submit</button> <button type="submit" class="btn btn-success">Submit</button>
</form> </form>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -27,15 +27,15 @@
{{- with . }} {{- with . }}
<main class="index-page sectioned"> <main class="index-page sectioned">
<section role="region" aria-labelledby="about"> <section role="region" aria-labelledby="about">
<h2 id="about">About this instance</h2> <h2 id="about">About this instance</h2>
<div> <div>
{{- include "shortDescription" . | indent 3 }} {{- include "shortDescription" . | indent 3 }}
<a href="/about">See more details</a> <a href="/about">See more details</a>
</div> </div>
</section> </section>
{{- include "index_what_is_this.tmpl" . | indent 1 }} {{- include "index_what_is_this.tmpl" . | indent 1 }}
{{- include "index_register.tmpl" . | indent 1 }} {{- include "index_register.tmpl" . | indent 1 }}
{{- include "index_apps.tmpl" . | indent 1 }} {{- include "index_apps.tmpl" . | indent 1 }}
</main> </main>
{{- end }} {{- end }}

View file

@ -19,64 +19,64 @@
{{- with . }} {{- with . }}
<section role="region" class="apps" aria-labelledby="apps"> <section role="region" class="apps" aria-labelledby="apps">
<h2 id="apps">Client applications</h2> <h2 id="apps">Client applications</h2>
<div> <div>
<p> <p>
Have an account on this instance and want to log in? Have an account on this instance and want to log in?
GoToSocial does not provide its own webclient, but implements the Mastodon client API. GoToSocial does not provide its own webclient, but implements the Mastodon client API.
You can use a variety of clients to log in to your account here: You can use a variety of clients to log in to your account here:
</p> </p>
<ul class="applist nodot" role="group"> <ul class="applist nodot" role="group">
<li class="applist-entry"> <li class="applist-entry">
<div class="applist-text"> <div class="applist-text">
<p><strong>Semaphore</strong> is a web client designed for speed and simplicity.</p> <p><strong>Semaphore</strong> is a web client designed for speed and simplicity.</p>
<a href="https://semaphore.social/" rel="nofollow noreferrer noopener" target="_blank"> <a href="https://semaphore.social/" rel="nofollow noreferrer noopener" target="_blank">
Use Semaphore Use Semaphore
</a> </a>
</div> </div>
<svg role="img" aria-labelledby="semaphore-title semaphore-desc" class="applist-logo redraw" <svg role="img" aria-labelledby="semaphore-title semaphore-desc" class="applist-logo redraw"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146 120" width="100" height="100"> xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146 120" width="100" height="100">
<title id="semaphore-title">The Semaphore logo</title> <title id="semaphore-title">The Semaphore logo</title>
<desc id="semaphore-desc">A waving flag</desc> <desc id="semaphore-desc">A waving flag</desc>
<path <path
d="M68.13 0C53.94 0 42.81 20 13.9 27.1l-2.23-5.29a6.5 6.5 0 0 0-5.17-10.4 6.5 6.5 0 0 0-.81 12.95L46.2 120l5.99-2.5-14.42-33.33c22.8-6.86 32.51-22.16 49.83-20.58 9.9.9 4.87 19.56 8.11 17.93 16.22-8.15 32.44-11.41 50.29-11.41-7.96-9.78-17.38-20.55-22.71-31.74L120.8 32c-2.32-7.33-2.56-14.75.87-22.22-9.74-3.26-21.1 0-32.45 4.9C82.2 9.77 79.5 0 68.13 0zM15.26 30.42c8.95 6.63 13.63 13.86 16.07 20.94l1.62 6.32c1.24 6.58 1.07 12.8 1.27 18.03z"> d="M68.13 0C53.94 0 42.81 20 13.9 27.1l-2.23-5.29a6.5 6.5 0 0 0-5.17-10.4 6.5 6.5 0 0 0-.81 12.95L46.2 120l5.99-2.5-14.42-33.33c22.8-6.86 32.51-22.16 49.83-20.58 9.9.9 4.87 19.56 8.11 17.93 16.22-8.15 32.44-11.41 50.29-11.41-7.96-9.78-17.38-20.55-22.71-31.74L120.8 32c-2.32-7.33-2.56-14.75.87-22.22-9.74-3.26-21.1 0-32.45 4.9C82.2 9.77 79.5 0 68.13 0zM15.26 30.42c8.95 6.63 13.63 13.86 16.07 20.94l1.62 6.32c1.24 6.58 1.07 12.8 1.27 18.03z">
</path> </path>
</svg> </svg>
</li> </li>
<li class="applist-entry"> <li class="applist-entry">
<div class="applist-text"> <div class="applist-text">
<p><strong>Tusky</strong> is a lightweight mobile client for Android.</p> <p><strong>Tusky</strong> is a lightweight mobile client for Android.</p>
<a href="https://tusky.app" rel="nofollow noreferrer noopener" target="_blank"> <a href="https://tusky.app" rel="nofollow noreferrer noopener" target="_blank">
Get Tusky Get Tusky
</a> </a>
</div> </div>
<img class="applist-logo" src="/assets/tusky.svg" <img class="applist-logo" src="/assets/tusky.svg"
alt="The Tusky mascot, a cartoon elephant tooting happily" alt="The Tusky mascot, a cartoon elephant tooting happily"
title="The Tusky mascot, a cartoon elephant tooting happily" width="100" height="100" /> title="The Tusky mascot, a cartoon elephant tooting happily" width="100" height="100" />
</li> </li>
<li class="applist-entry"> <li class="applist-entry">
<div class="applist-text"> <div class="applist-text">
<p><strong>Feditext</strong> (beta) is a beautiful client for iOS, iPadOS and macOS.</p> <p><strong>Feditext</strong> (beta) is a beautiful client for iOS, iPadOS and macOS.</p>
<a href="https://github.com/feditext/feditext" rel="nofollow noreferrer noopener" target="_blank"> <a href="https://github.com/feditext/feditext" rel="nofollow noreferrer noopener" target="_blank">
Get Feditext Get Feditext
</a> </a>
</div> </div>
<img class="applist-logo" src="/assets/feditext.svg" <img class="applist-logo" src="/assets/feditext.svg"
alt="The Feditext logo, the characters 'ft' at a slight angle" alt="The Feditext logo, the characters 'ft' at a slight angle"
title="The Feditext logo, the characters 'ft' at a slight angle" width="100" height="100" /> title="The Feditext logo, the characters 'ft' at a slight angle" width="100" height="100" />
</li> </li>
<li class="applist-entry"> <li class="applist-entry">
<div class="applist-text"> <div class="applist-text">
<p>Or try one of the <strong>Mastodon clients</strong> listed on the official Mastodon page.</p> <p>Or try one of the <strong>Mastodon clients</strong> listed on the official Mastodon page.</p>
<a href="https://joinmastodon.org/apps" rel="nofollow noreferrer noopener" target="_blank"> <a href="https://joinmastodon.org/apps" rel="nofollow noreferrer noopener" target="_blank">
Get Mastodon apps Get Mastodon apps
</a> </a>
</div> </div>
<img class="applist-logo" src="/assets/mastodon.svg" <img class="applist-logo" src="/assets/mastodon.svg"
alt="The Mastodon logo, the character 'M' in a speech bubble" alt="The Mastodon logo, the character 'M' in a speech bubble"
title="The Mastodon logo, the character 'M' in a speech bubble" width="100" height="100" /> title="The Mastodon logo, the character 'M' in a speech bubble" width="100" height="100" />
</li> </li>
</ul> </ul>
</div> </div>
</section> </section>
{{- end }} {{- end }}

View file

@ -28,15 +28,15 @@ New account registration is currently&nbsp;
{{- with . }} {{- with . }}
<section role="region" aria-labelledby="signup"> <section role="region" aria-labelledby="signup">
<h2 id="signup">Register an Account on {{ .instance.Title -}}</h2> <h2 id="signup">Register an Account on {{ .instance.Title -}}</h2>
<div> <div>
<p>{{- template "registrationLimits" . -}}</p> <p>{{- template "registrationLimits" . -}}</p>
{{- if .instance.Registrations }} {{- if .instance.Registrations }}
<p>To register a new account, please first read the <a href="/about#rules">rules</a> and <a <p>To register a new account, please first read the <a href="/about#rules">rules</a> and <a
href="/about#terms">terms</a>.</p> href="/about#terms">terms</a>.</p>
<p>Then, use the <a href="/signup">sign-up page</a> to register an account.</p> <p>Then, use the <a href="/signup">sign-up page</a> to register an account.</p>
<p>Manual admin approval is <b>required</b> for new accounts.</p> <p>Manual admin approval is <b>required</b> for new accounts.</p>
{{- end }} {{- end }}
</div> </div>
</section> </section>
{{- end }} {{- end }}

View file

@ -19,50 +19,50 @@
{{- with . }} {{- with . }}
<section role="region" class="what-is-this" aria-labelledby="what-is-this"> <section role="region" class="what-is-this" aria-labelledby="what-is-this">
<h2 id="what-is-this">What is this?</h2> <h2 id="what-is-this">What is this?</h2>
<div> <div>
<p> <p>
The web page you're reading right now is served by an instance of GoToSocial, The web page you're reading right now is served by an instance of GoToSocial,
a federated, distributed, open-source microblogging software which connects a federated, distributed, open-source microblogging software which connects
to other instances across a network known as the "fediverse". to other instances across a network known as the "fediverse".
</p> </p>
<h3 id="what-is-an-instance">What is an "instance"?</h3> <h3 id="what-is-an-instance">What is an "instance"?</h3>
<p> <p>
"Instance" is a term commonly used for one node in the fediverse. Each instance "Instance" is a term commonly used for one node in the fediverse. Each instance
has its own web address, user(s), culture, rules, and settings. Instances exchange has its own web address, user(s), culture, rules, and settings. Instances exchange
data by "talking" to each other over the internet using a protocol called ActivityPub. data by "talking" to each other over the internet using a protocol called ActivityPub.
</p> </p>
<a class="activitypub-logo-wrapper" href="https://activitypub.rocks/" rel="nofollow noreferrer noopener" <a class="activitypub-logo-wrapper" href="https://activitypub.rocks/" rel="nofollow noreferrer noopener"
target="_blank"> target="_blank">
<img class="activitypub-logo" src="/assets/activitypub_light.svg" alt="ActivityPub logo by mray, CC0 1.0" <img class="activitypub-logo" src="/assets/activitypub_light.svg" alt="ActivityPub logo by mray, CC0 1.0"
title="ActivityPub logo by mray, CC0 1.0" width="250" height="65" /> title="ActivityPub logo by mray, CC0 1.0" width="250" height="65" />
Learn more about ActivityPub (opens in a new tab). Learn more about ActivityPub (opens in a new tab).
</a> </a>
<p> <p>
Each instance can, in theory, talk to each other instance, allowing people to talk Each instance can, in theory, talk to each other instance, allowing people to talk
to one another across a decentralized network that has no single authority in charge. to one another across a decentralized network that has no single authority in charge.
</p> </p>
<p> <p>
There are thousands of fediverse instances, connecting millions of people together. There are thousands of fediverse instances, connecting millions of people together.
</p> </p>
<h3 id="how-do-i-join-the-fediverse">How do I join the fediverse?</h3> <h3 id="how-do-i-join-the-fediverse">How do I join the fediverse?</h3>
<p> <p>
You can join the fediverse by running your own instance of an ActivityPub software, You can join the fediverse by running your own instance of an ActivityPub software,
or by finding an existing instance that aligns with your values and expectations, or by finding an existing instance that aligns with your values and expectations,
and registering an account. and registering an account.
</p> </p>
<p> <p>
To help you find an instance that suits you, you can try one of the following tools: To help you find an instance that suits you, you can try one of the following tools:
</p> </p>
<ul> <ul>
<li><a href="https://fediverse.observer" rel="nofollow noreferrer noopener" target="_blank">Fediverse <li><a href="https://fediverse.observer" rel="nofollow noreferrer noopener" target="_blank">Fediverse
Observer (opens in a new tab)</a></li> Observer (opens in a new tab)</a></li>
<li><a href="https://fedidb.org/network" rel="nofollow noreferrer noopener" target="_blank">FediDB (opens in <li><a href="https://fedidb.org/network" rel="nofollow noreferrer noopener" target="_blank">FediDB (opens in
a new tab)</a></li> a new tab)</a></li>
</ul> </ul>
{{- if .instance.Registrations }} {{- if .instance.Registrations }}
<p>Or, just <a href="signup">register for an account on this instance</a>!</p> <p>Or, just <a href="signup">register for an account on this instance</a>!</p>
{{- end }} {{- end }}
</div> </div>
</section> </section>
{{- end }} {{- end }}

View file

@ -19,10 +19,10 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="oob-token"> <section class="oob-token">
<h1>Hi <b>{{- .user -}}</b>!</h1> <h1>Hi <b>{{- .user -}}</b>!</h1>
<p>Here's your out-of-band token with scope "<em>{{- .scope -}}</em>", use it wisely:</p> <p>Here's your out-of-band token with scope "<em>{{- .scope -}}</em>", use it wisely:</p>
<code>{{- .oobToken -}}</code> <code>{{- .oobToken -}}</code>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -45,45 +45,45 @@ image/webp
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="{{- if .robotsMeta -}}{{- .robotsMeta -}}{{- else -}}noindex, nofollow{{- end -}}"> <meta name="robots" content="{{- if .robotsMeta -}}{{- .robotsMeta -}}{{- else -}}noindex, nofollow{{- end -}}">
{{- if .ogMeta }} {{- if .ogMeta }}
{{- include "page_ogmeta.tmpl" . | indent 2 }} {{- include "page_ogmeta.tmpl" . | indent 2 }}
{{- else }} {{- else }}
{{- end }} {{- end }}
{{- if .rssFeed }} {{- if .rssFeed }}
<link rel="alternate" type="application/rss+xml" href="{{- .rssFeed -}}" title="{{- template "instanceTitle" . -}}"> <link rel="alternate" type="application/rss+xml" href="{{- .rssFeed -}}" title="{{- template "instanceTitle" . -}}">
{{- else }} {{- else }}
{{- end }} {{- end }}
{{- if .account }} {{- if .account }}
<link rel="alternate" type="application/activity+json" href="/users/{{- .account.Username -}}"> <link rel="alternate" type="application/activity+json" href="/users/{{- .account.Username -}}">
{{- else if .status }} {{- else if .status }}
<link rel="alternate" type="application/activity+json" <link rel="alternate" type="application/activity+json"
href="/users/{{- .status.Account.Username -}}/statuses/{{- .status.ID -}}"> href="/users/{{- .status.Account.Username -}}/statuses/{{- .status.ID -}}">
{{- else }} {{- else }}
{{- end }} {{- end }}
<link rel="icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}"> <link rel="icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
<link rel="apple-touch-icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}"> <link rel="apple-touch-icon" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
<link rel="apple-touch-startup-image" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}"> <link rel="apple-touch-startup-image" href="{{- .instance.Thumbnail -}}" type="{{- template "thumbnailType" . -}}">
{{- include "page_stylesheets.tmpl" . | indent 2 }} {{- include "page_stylesheets.tmpl" . | indent 2 }}
{{- range .javascript }} {{- range .javascript }}
<script type="text/javascript" src="{{- . -}}" async="" defer=""></script> <script type="text/javascript" src="{{- . -}}" async="" defer=""></script>
{{- end }} {{- end }}
<title>{{- template "instanceTitle" . -}}</title> <title>{{- template "instanceTitle" . -}}</title>
</head> </head>
<body class="page{{if .pageType}} {{.pageType}}{{end}}"> <body class="page{{if .pageType}} {{.pageType}}{{end}}">
<header class="page-header{{if .largeHeader}} large{{end}}"> <header class="page-header{{if .largeHeader}} large{{end}}">
{{- include "page_header.tmpl" . | indent 3 }} {{- include "page_header.tmpl" . | indent 3 }}
</header> </header>
<div class="page-content"> <div class="page-content">
{{- include .pageContent . | indent 3 | outdentPre }} {{- include .pageContent . | indent 3 | outdentPre }}
</div> </div>
<footer class="page-footer"> <footer class="page-footer">
{{- include "page_footer.tmpl" . | indent 3 }} {{- include "page_footer.tmpl" . | indent 3 }}
</footer> </footer>
</body> </body>
</html> </html>

View file

@ -19,35 +19,35 @@
{{- with . }} {{- with . }}
<nav> <nav>
<ul class="nodot"> <ul class="nodot">
<li id="about"> <li id="about">
<a href="/about" class="nounderline"> <a href="/about" class="nounderline">
About {{ .instance.Title }} About {{ .instance.Title }}
</a> </a>
</li> </li>
<li id="version"> <li id="version">
<a href="https://github.com/superseriousbusiness/gotosocial" class="nounderline" <a href="https://github.com/superseriousbusiness/gotosocial" class="nounderline"
rel="nofollow noreferrer noopener" target="_blank"> rel="nofollow noreferrer noopener" target="_blank">
<span aria-hidden="true">🦥</span> <span aria-hidden="true">🦥</span>
Source - GoToSocial {{ .instance.Version }} Source - GoToSocial {{ .instance.Version }}
<span aria-hidden="true">🦥</span> <span aria-hidden="true">🦥</span>
</a> </a>
</li> </li>
{{- if .instance.ContactAccount }} {{- if .instance.ContactAccount }}
<li id="contact"> <li id="contact">
<a href="/@{{- .instance.ContactAccount.Username -}}" class="nounderline"> <a href="/@{{- .instance.ContactAccount.Username -}}" class="nounderline">
Contact account - {{ .instance.ContactAccount.Username }} Contact account - {{ .instance.ContactAccount.Username }}
</a> </a>
</li> </li>
{{- end }} {{- end }}
{{- if .instance.Email }} {{- if .instance.Email }}
<li id="email"> <li id="email">
<a href="mailto:{{- .instance.Email -}}" class="nounderline" rel="nofollow noreferrer noopener" <a href="mailto:{{- .instance.Email -}}" class="nounderline" rel="nofollow noreferrer noopener"
target="_blank"> target="_blank">
Email - {{ .instance.Email }} Email - {{ .instance.Email }}
</a> </a>
</li> </li>
{{- end }} {{- end }}
</ul> </ul>
</nav> </nav>
{{- end }} {{- end }}

View file

@ -57,18 +57,18 @@ Instance Logo
{{- with . }} {{- with . }}
<a aria-label="{{- .instance.Title -}}. Go to instance homepage" href="/" class="nounderline"> <a aria-label="{{- .instance.Title -}}. Go to instance homepage" href="/" class="nounderline">
<picture> <picture>
{{- if .instance.ThumbnailStatic }} {{- if .instance.ThumbnailStatic }}
<source srcset="{{- .instance.ThumbnailStatic -}}" type="{{- .instance.ThumbnailStaticType -}}" <source srcset="{{- .instance.ThumbnailStatic -}}" type="{{- .instance.ThumbnailStaticType -}}"
media="(prefers-reduced-motion: reduce)" /> media="(prefers-reduced-motion: reduce)" />
{{- end }} {{- end }}
<img src="{{- .instance.Thumbnail -}}" alt="{{- template "thumbnailDescription" . -}}" <img src="{{- .instance.Thumbnail -}}" alt="{{- template "thumbnailDescription" . -}}"
title="{{- template "thumbnailDescription" . -}}" /> title="{{- template "thumbnailDescription" . -}}" />
</picture> </picture>
<h1>{{- .instance.Title -}}</h1> <h1>{{- .instance.Title -}}</h1>
</a> </a>
{{- if .showStrap }} {{- if .showStrap }}
<aside>home to {{ template "strapUsers" . }} who wrote {{ template "strapPosts" . }}, federating with <aside>home to {{ template "strapUsers" . }} who wrote {{ template "strapPosts" . }}, federating with
{{ template "strapInstances" . }}</aside> {{ template "strapInstances" . }}</aside>
{{- end }}
{{- end }} {{- end }}
{{- end }}

View file

@ -54,4 +54,4 @@
<meta property="og:image:height" content="{{ .ImageHeight }}"> <meta property="og:image:height" content="{{ .ImageHeight }}">
{{- else }} {{- else }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -36,4 +36,4 @@
{{- range .stylesheets }} {{- range .stylesheets }}
<link rel="stylesheet" href="{{- . -}}"> <link rel="stylesheet" href="{{- . -}}">
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -20,17 +20,16 @@
{{- define "profileMovedTo" -}} {{- define "profileMovedTo" -}}
{{- with .account.Moved }} {{- with .account.Moved }}
<div class="moved-to"> <div class="moved-to">
<b> <b>
This account has permanently moved to This account has permanently moved to
<a <a
href="{{ .URL }}" href="{{ .URL }}"
class="nounderline" class="nounderline"
rel="nofollow noreferrer noopener" rel="nofollow noreferrer noopener"
target="_blank" target="_blank">
> @{{ .Username }}
@{{ .Username }} </a>
</a> </b>
</b>
</div> </div>
{{- end }} {{- end }}
{{- end -}} {{- end -}}
@ -42,226 +41,216 @@
{{- define "avatarWidth" -}} {{- define "avatarWidth" -}}
{{- with .account }} {{- with .account }}
{{- if isNil .AvatarAttachment -}} {{- if isNil .AvatarAttachment -}}
{{- template "defaultAvatarDimension" . -}} {{- template "defaultAvatarDimension" . -}}
{{- else -}} {{- else -}}
{{- /* Use the avatar's proper dimensions. */ -}} {{- /* Use the avatar's proper dimensions. */ -}}
{{- .AvatarAttachment.Meta.Original.Width -}} {{- .AvatarAttachment.Meta.Original.Width -}}
{{- end -}} {{- end -}}
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{- define "avatarHeight" -}} {{- define "avatarHeight" -}}
{{- with .account }} {{- with .account }}
{{- if isNil .AvatarAttachment -}} {{- if isNil .AvatarAttachment -}}
{{- template "defaultAvatarDimension" . -}} {{- template "defaultAvatarDimension" . -}}
{{- else -}} {{- else -}}
{{- /* Use the avatar's proper dimensions. */ -}} {{- /* Use the avatar's proper dimensions. */ -}}
{{- .AvatarAttachment.Meta.Original.Height -}} {{- .AvatarAttachment.Meta.Original.Height -}}
{{- end -}} {{- end -}}
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{- define "avatarAlt" -}} {{- define "avatarAlt" -}}
Avatar for {{ .account.Username -}} Avatar for {{ .account.Username -}}
{{- if .account.AvatarDescription }} {{- if .account.AvatarDescription }}
{{- /* Add the avatar's image description. */ -}} {{- /* Add the avatar's image description. */ -}}
: {{ .account.AvatarDescription -}} : {{ .account.AvatarDescription -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "headerAlt" -}} {{- define "headerAlt" -}}
Header for {{ .account.Username -}} Header for {{ .account.Username -}}
{{- if .account.HeaderDescription }} {{- if .account.HeaderDescription }}
{{- /* Add the header's image description. */ -}} {{- /* Add the header's image description. */ -}}
: {{ .account.HeaderDescription -}} : {{ .account.HeaderDescription -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "avatar" -}} {{- define "avatar" -}}
{{- with . }} {{- with . }}
<div <div
class="media photoswipe-gallery odd single avatar-image-wrapper" class="media photoswipe-gallery odd single avatar-image-wrapper"
role="group" role="group">
> <a
<a class="photoswipe-slide"
class="photoswipe-slide" href="{{- .account.Avatar -}}"
href="{{- .account.Avatar -}}" target="_blank"
target="_blank" data-pswp-width="{{- template "avatarWidth" . -}}px"
data-pswp-width="{{- template "avatarWidth" . -}}px" data-pswp-height="{{- template "avatarHeight" . -}}px"
data-pswp-height="{{- template "avatarHeight" . -}}px" data-cropped="true"
data-cropped="true" alt="{{- template "avatarAlt" . -}}"
alt="{{- template "avatarAlt" . -}}" title="{{- template "avatarAlt" . -}}">
title="{{- template "avatarAlt" . -}}" <picture
> aria-hidden="true">
<picture {{- if .account.AvatarAttachment }}
aria-hidden="true" <source
> class="avatar"
{{- if .account.AvatarAttachment }} srcset="{{- .account.AvatarStatic -}}"
<source type="{{- .account.AvatarAttachment.PreviewMIMEType -}}"
class="avatar" media="(prefers-reduced-motion: reduce)" />
srcset="{{- .account.AvatarStatic -}}" {{- end }}
type="{{- .account.AvatarAttachment.PreviewMIMEType -}}" <img
media="(prefers-reduced-motion: reduce)" class="avatar"
/> src="{{- .account.Avatar -}}"
{{- end }} alt="{{- template "avatarAlt" . -}}"
<img title="{{- template "avatarAlt" . -}}"
class="avatar" width="{{- template "avatarWidth" . -}}"
src="{{- .account.Avatar -}}" height="{{- template "avatarHeight" . -}}" />
alt="{{- template "avatarAlt" . -}}" </picture>
title="{{- template "avatarAlt" . -}}" </a>
width="{{- template "avatarWidth" . -}}"
height="{{- template "avatarHeight" . -}}"
/>
</picture>
</a>
</div> </div>
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{- with . }} {{- with . }}
<main class="profile"> <main class="profile">
<h2 class="sr-only">Profile for {{ .account.Username -}}</h2> <h2 class="sr-only">Profile for {{ .account.Username -}}</h2>
<section class="profile-header" role="region" aria-label="Basic info"> <section class="profile-header" role="region" aria-label="Basic info">
{{- if .account.Moved }} {{- if .account.Moved }}
{{- include "profileMovedTo" . | indent 2 }} {{- include "profileMovedTo" . | indent 2 }}
{{- end }} {{- end }}
<div class="header-image-wrapper"> <div class="header-image-wrapper">
<picture> <picture>
{{- if .account.HeaderAttachment }} {{- if .account.HeaderAttachment }}
<source <source
srcset="{{- .account.HeaderStatic -}}" srcset="{{- .account.HeaderStatic -}}"
type="{{- .account.HeaderAttachment.PreviewMIMEType -}}" type="{{- .account.HeaderAttachment.PreviewMIMEType -}}"
media="(prefers-reduced-motion: reduce)" media="(prefers-reduced-motion: reduce)" />
/> {{- end }}
{{- end }} <img
<img src="{{- .account.Header -}}"
src="{{- .account.Header -}}" alt="{{- template "headerAlt" . -}}"
alt="{{- template "headerAlt" . -}}" title="{{- template "headerAlt" . -}}" />
title="{{- template "headerAlt" . -}}" </picture>
/> </div>
</picture> <div class="basic-info">
</div> {{- with . }}
<div class="basic-info"> {{- include "avatar" . | indent 3 }}
{{- with . }} {{- end }}
{{- include "avatar" . | indent 3 }} <dl class="namerole">
{{- end }} <dt class="sr-only">Display name</dt>
<dl class="namerole"> <dd class="displayname text-cutoff">
<dt class="sr-only">Display name</dt> {{- if .account.DisplayName -}}
<dd class="displayname text-cutoff"> {{- emojify .account.Emojis (escape .account.DisplayName) -}}
{{- if .account.DisplayName -}} {{- else -}}
{{- emojify .account.Emojis (escape .account.DisplayName) -}} {{- .account.Username -}}
{{- else -}} {{- end -}}
{{- .account.Username -}} </dd>
{{- end -}} <div class="bot-username-wrapper">
</dd> {{- if .account.Bot }}
<div class="bot-username-wrapper"> <dt class="sr-only">Bot account</dt>
{{- if .account.Bot }} <dd>
<dt class="sr-only">Bot account</dt> <span class="sr-only">true</span>
<dd> <div
<span class="sr-only">true</span> class="bot-legend-wrapper"
<div aria-hidden="true"
class="bot-legend-wrapper" title="This is a bot account.">
aria-hidden="true" <i class="bot-icon fa fa-microchip"></i>
title="This is a bot account." <span class="bot-legend">bot</span>
> </div>
<i class="bot-icon fa fa-microchip"></i> </dd>
<span class="bot-legend">bot</span> {{- end }}
</div> <dt class="sr-only">Username</dt>
</dd> <dd class="username text-cutoff">@{{- .account.Username -}}@{{- .instance.AccountDomain -}}</dd>
{{- end }} </div>
<dt class="sr-only">Username</dt> {{- if .account.Roles }}
<dd class="username text-cutoff">@{{- .account.Username -}}@{{- .instance.AccountDomain -}}</dd> <dt class="sr-only">Role</dt>
</div> {{- range .account.Roles }}
{{- if .account.Roles }} <dd class="role {{ .Name -}}">{{- .Name -}}</dd>
<dt class="sr-only">Role</dt> {{- end }}
{{- range .account.Roles }} {{- end }}
<dd class="role {{ .Name -}}">{{- .Name -}}</dd> </dl>
{{- end }} </div>
{{- end }} </section>
</dl> <div class="column-split">
</div> <section class="about-user" role="region" aria-labelledby="about-header">
</section> <div class="col-header">
<div class="column-split"> <h3 id="about-header">About<span class="sr-only">&nbsp;{{- .account.Username -}}</span></h3>
<section class="about-user" role="region" aria-labelledby="about-header"> </div>
<div class="col-header"> {{- if .account.Fields }}
<h3 id="about-header">About<span class="sr-only">&nbsp;{{- .account.Username -}}</span></h3> {{- include "profile_fields.tmpl" . | indent 3 }}
</div> {{- end }}
{{- if .account.Fields }} <h4 class="sr-only">Bio</h4>
{{- include "profile_fields.tmpl" . | indent 3 }} <div class="bio">
{{- end }} {{- if .account.Note }}
<h4 class="sr-only">Bio</h4> {{ emojify .account.Emojis (noescape .account.Note) }}
<div class="bio"> {{- else }}
{{- if .account.Note }} <p>This GoToSocial user hasn't written a bio yet!</p>
{{ emojify .account.Emojis (noescape .account.Note) }} {{- end }}
{{- else }} </div>
<p>This GoToSocial user hasn't written a bio yet!</p> <h4 class="sr-only">Stats</h4>
{{- end }} <dl class="accountstats">
</div> <dt>Joined</dt>
<h4 class="sr-only">Stats</h4> <dd><time datetime="{{- .account.CreatedAt -}}">{{- .account.CreatedAt | timestampVague -}}</time></dd>
<dl class="accountstats"> <dt>Posts</dt>
<dt>Joined</dt> <dd>{{- .account.StatusesCount -}}</dd>
<dd><time datetime="{{- .account.CreatedAt -}}">{{- .account.CreatedAt | timestampVague -}}</time></dd> <dt>Followed by</dt>
<dt>Posts</dt> <dd>{{- if .account.HideCollections -}}<i>hidden</i>{{- else -}}{{- .account.FollowersCount -}}{{- end -}}</dd>
<dd>{{- .account.StatusesCount -}}</dd> <dt>Following</dt>
<dt>Followed by</dt> <dd>{{- if .account.HideCollections -}}<i>hidden</i>{{- else -}}{{- .account.FollowingCount -}}{{- end -}}</dd>
<dd>{{- if .account.HideCollections -}}<i>hidden</i>{{- else -}}{{- .account.FollowersCount -}}{{- end -}}</dd> </dl>
<dt>Following</dt> </section>
<dd>{{- if .account.HideCollections -}}<i>hidden</i>{{- else -}}{{- .account.FollowingCount -}}{{- end -}}</dd> <div class="statuses-wrapper" role="region" aria-label="Posts by {{ .account.Username -}}">
</dl> {{- if .pinned_statuses }}
</section> <section class="pinned statuses" aria-labelledby="pinned">
<div class="statuses-wrapper" role="region" aria-label="Posts by {{ .account.Username -}}"> <div class="col-header">
{{- if .pinned_statuses }} <h3 id="pinned">Pinned posts</h3>
<section class="pinned statuses" aria-labelledby="pinned"> <a href="#recent">jump to recent</a>
<div class="col-header"> </div>
<h3 id="pinned">Pinned posts</h3> <div class="thread">
<a href="#recent">jump to recent</a> {{- range .pinned_statuses }}
</div> <article
<div class="thread"> class="status expanded"
{{- range .pinned_statuses }} {{- includeAttr "status_attributes.tmpl" . | indentAttr 6 }}>
<article {{- include "status.tmpl" . | indent 6 }}
class="status expanded" </article>
{{- includeAttr "status_attributes.tmpl" . | indentAttr 6 }} {{- end }}
> </div>
{{- include "status.tmpl" . | indent 6 }} </section>
</article> {{- end }}
{{- end }} <section class="recent statuses" aria-labelledby="recent">
</div> <div class="col-header">
</section> <h3 id="recent" tabindex="-1">Recent posts</h3>
{{- end }} {{- if .rssFeed }}
<section class="recent statuses" aria-labelledby="recent"> <a href="{{- .rssFeed -}}" class="rss-icon" aria-label="RSS feed">
<div class="col-header"> <i class="fa fa-rss-square" aria-hidden="true"></i>
<h3 id="recent" tabindex="-1">Recent posts</h3> </a>
{{- if .rssFeed }} {{- end }}
<a href="{{- .rssFeed -}}" class="rss-icon" aria-label="RSS feed"> </div>
<i class="fa fa-rss-square" aria-hidden="true"></i> <div class="thread">
</a> {{- if not .statuses }}
{{- end }} <div data-nosnippet class="nothinghere">Nothing here!</div>
</div> {{- else }}
<div class="thread"> {{- range .statuses }}
{{- if not .statuses }} <article
<div data-nosnippet class="nothinghere">Nothing here!</div> class="status expanded"
{{- else }} {{- includeAttr "status_attributes.tmpl" . | indentAttr 6 }}>
{{- range .statuses }} {{- include "status.tmpl" . | indent 6 }}
<article </article>
class="status expanded" {{- end }}
{{- includeAttr "status_attributes.tmpl" . | indentAttr 6 }} {{- end }}
> </div>
{{- include "status.tmpl" . | indent 6 }} <nav class="backnextlinks">
</article> {{- if .show_back_to_top }}
{{- end }} <a href="/@{{- .account.Username -}}">Back to top</a>
{{- end }} {{- end }}
</div> {{- if .statuses_next }}
<nav class="backnextlinks"> <a href="{{- .statuses_next -}}" class="next">Show older</a>
{{- if .show_back_to_top }} {{- end }}
<a href="/@{{- .account.Username -}}">Back to top</a> </nav>
{{- end }} </section>
{{- if .statuses_next }} </div>
<a href="{{- .statuses_next -}}" class="next">Show older</a> </div>
{{- end }}
</nav>
</section>
</div>
</div>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,14 +19,14 @@
{{- with . }} {{- with . }}
<div class="fields"> <div class="fields">
<h4 class="sr-only">Fields</h4> <h4 class="sr-only">Fields</h4>
<dl> <dl>
{{- range .account.Fields }} {{- range .account.Fields }}
<div class="field"> <div class="field">
<dt>{{- emojify $.account.Emojis (noescape .Name) -}}</dt> <dt>{{- emojify $.account.Emojis (noescape .Name) -}}</dt>
<dd>{{- emojify $.account.Emojis (noescape .Value) -}}</dd> <dd>{{- emojify $.account.Emojis (noescape .Value) -}}</dd>
</div> </div>
{{- end }} {{- end }}
</dl> </dl>
</div> </div>
{{- end }} {{- end }}

View file

@ -19,6 +19,6 @@
{{- with . }} {{- with . }}
<main class="settings"> <main class="settings">
<div id="root"></div> <div id="root"></div>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,19 +19,19 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="with-form" aria-labelledby="sign-in"> <section class="with-form" aria-labelledby="sign-in">
<h2 id="sign-in">Sign in</h2> <h2 id="sign-in">Sign in</h2>
<form action="/auth/sign_in" method="POST"> <form action="/auth/sign_in" method="POST">
<div class="labelinput"> <div class="labelinput">
<label for="email">Email</label> <label for="email">Email</label>
<input type="email" name="username" required placeholder="Please enter your email address"> <input type="email" name="username" required placeholder="Please enter your email address">
</div> </div>
<div class="labelinput"> <div class="labelinput">
<label for="password">Password</label> <label for="password">Password</label>
<input type="password" name="password" required placeholder="Please enter your password"> <input type="password" name="password" required placeholder="Please enter your password">
</div> </div>
<button type="submit" class="btn btn-success">Sign in</button> <button type="submit" class="btn btn-success">Sign in</button>
</form> </form>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,53 +19,53 @@
{{- with . }} {{- with . }}
<main> <main>
<section class="with-form" aria-labelledby="sign-up"> <section class="with-form" aria-labelledby="sign-up">
<h2 id="sign-up">Sign up for an account on {{ .instance.Title -}}</h2> <h2 id="sign-up">Sign up for an account on {{ .instance.Title -}}</h2>
{{- if not .registrationOpen }} {{- if not .registrationOpen }}
<p>This instance is not currently open to new sign-ups.</p> <p>This instance is not currently open to new sign-ups.</p>
{{- else }} {{- else }}
<form action="/signup" method="POST"> <form action="/signup" method="POST">
<div class="labelinput"> <div class="labelinput">
<label for="email">Email</label> <label for="email">Email</label>
<input id="email" type="email" name="email" required placeholder="Email address"> <input id="email" type="email" name="email" required placeholder="Email address">
</div> </div>
<div class="labelinput"> <div class="labelinput">
<label for="password">Password</label> <label for="password">Password</label>
<input id="password" type="password" name="password" required <input id="password" type="password" name="password" required
placeholder="Please enter your desired password" autocomplete="new-password"> placeholder="Please enter your desired password" autocomplete="new-password">
</div> </div>
<div class="labelinput"> <div class="labelinput">
<label for="username"> <label for="username">
Username (lowercase a-z, numbers, and underscores; max 64 characters).<br /> Username (lowercase a-z, numbers, and underscores; max 64 characters).<br />
<small>Your username will be part of your fediverse handle, and cannot be changed later, so choose <small>Your username will be part of your fediverse handle, and cannot be changed later, so choose
thoughtfully!</small> thoughtfully!</small>
</label> </label>
<input id="username" type="text" name="username" required <input id="username" type="text" name="username" required
placeholder="Please enter your desired username" pattern="^[a-z0-9_]{1,64}$" autocapitalize="off" placeholder="Please enter your desired username" pattern="^[a-z0-9_]{1,64}$" autocapitalize="off"
spellcheck="false" title="lowercase a-z, numbers, and underscores; max 64 characters"> spellcheck="false" title="lowercase a-z, numbers, and underscores; max 64 characters">
</div> </div>
{{- if .reasonRequired }} {{- if .reasonRequired }}
<div class="labelinput"> <div class="labelinput">
<label for="reason"> <label for="reason">
Reason you want to join {{ .instance.Title }} (40-500 characters).<br /> Reason you want to join {{ .instance.Title }} (40-500 characters).<br />
<small>The admin(s) will use this text to decide whether or not to approve your sign-up.</small> <small>The admin(s) will use this text to decide whether or not to approve your sign-up.</small>
</label> </label>
<textarea id="reason" name="reason" required <textarea id="reason" name="reason" required
placeholder="Enter a few sentences about why you want to join this instance. If you know someone on the instance already, you may want to mention them here. You might want to link to any other accounts you have elsewhere too." placeholder="Enter a few sentences about why you want to join this instance. If you know someone on the instance already, you may want to mention them here. You might want to link to any other accounts you have elsewhere too."
rows="8" minlength="40" maxlength="500" autocapitalize="sentences" rows="8" minlength="40" maxlength="500" autocapitalize="sentences"
title="40-500 characters"></textarea> title="40-500 characters"></textarea>
</div> </div>
{{- end }} {{- end }}
<div class="checkbox"> <div class="checkbox">
<label for="agreement">I have read and accept the <a href="/about#terms">terms and conditions</a> of <label for="agreement">I have read and accept the <a href="/about#terms">terms and conditions</a> of
{{ .instance.Title }}, and I agree to abide by the <a href="/about#rules">instance {{ .instance.Title }}, and I agree to abide by the <a href="/about#rules">instance
rules</a>.</label> rules</a>.</label>
<input id="agreement" type="checkbox" name="agreement" required value="true"> <input id="agreement" type="checkbox" name="agreement" required value="true">
</div> </div>
<input type="hidden" name="locale" value="en"> <input type="hidden" name="locale" value="en">
<button type="submit" class="btn btn-success">Submit</button> <button type="submit" class="btn btn-success">Submit</button>
</form> </form>
{{- end }} {{- end }}
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -19,12 +19,12 @@
{{- with . }} {{- with . }}
<main> <main>
<section aria-labelledby="signed-up"> <section aria-labelledby="signed-up">
<h2 id="signed-up">Thanks for signing up to {{ .instance.Title -}}!</h2> <h2 id="signed-up">Thanks for signing up to {{ .instance.Title -}}!</h2>
<p>Hi <b>{{- .username -}}</b>!</p> <p>Hi <b>{{- .username -}}</b>!</p>
<p>Your sign-up has been registered, and a confirmation email has been sent to <b>{{- .email -}}</b>.</p> <p>Your sign-up has been registered, and a confirmation email has been sent to <b>{{- .email -}}</b>.</p>
<p>Please check your email inbox and click the link to confirm your email.</p> <p>Please check your email inbox and click the link to confirm your email.</p>
<p>Once an admin has approved your sign-up, you will be able to log in and use your account.</p> <p>Once an admin has approved your sign-up, you will be able to log in and use your account.</p>
</section> </section>
</main> </main>
{{- end }} {{- end }}

View file

@ -20,7 +20,7 @@
{{- define "statusContent" -}} {{- define "statusContent" -}}
{{- with .Content }} {{- with .Content }}
<div class="content" lang="{{- $.LanguageTag.TagStr -}}"> <div class="content" lang="{{- $.LanguageTag.TagStr -}}">
{{ noescape . | emojify $.Emojis }} {{ noescape . | emojify $.Emojis }}
</div> </div>
{{- end }} {{- end }}
{{- end -}} {{- end -}}
@ -32,50 +32,50 @@
{{- with . }} {{- with . }}
<header class="status-header"> <header class="status-header">
{{- include "status_header.tmpl" . | indent 1 }} {{- include "status_header.tmpl" . | indent 1 }}
</header> </header>
<div class="status-body"> <div class="status-body">
{{- if .SpoilerText }} {{- if .SpoilerText }}
<details class="text-spoiler"> <details class="text-spoiler">
<summary> <summary>
<span class="spoiler-text" <span class="spoiler-text"
lang="{{- .LanguageTag.TagStr -}}">{{- emojify .Emojis (escape .SpoilerText) -}}</span> lang="{{- .LanguageTag.TagStr -}}">{{- emojify .Emojis (escape .SpoilerText) -}}</span>
<span class="button" role="button" tabindex="0">Toggle visibility</span> <span class="button" role="button" tabindex="0">Toggle visibility</span>
</summary> </summary>
<div class="text"> <div class="text">
{{- with . }} {{- with . }}
{{- include "statusContent" . | indent 3 }} {{- include "statusContent" . | indent 3 }}
{{- end }} {{- end }}
{{- if .Poll }} {{- if .Poll }}
{{- include "status_poll.tmpl" . | indent 3 }} {{- include "status_poll.tmpl" . | indent 3 }}
{{- end }} {{- end }}
</div> </div>
</details> </details>
{{- else }} {{- else }}
<div class="text"> <div class="text">
{{- with . }} {{- with . }}
{{- include "statusContent" . | indent 2 }} {{- include "statusContent" . | indent 2 }}
{{- end }} {{- end }}
{{- if .Poll }} {{- if .Poll }}
{{- include "status_poll.tmpl" . | indent 2 }} {{- include "status_poll.tmpl" . | indent 2 }}
{{- end }} {{- end }}
</div> </div>
{{- end }} {{- end }}
{{- if .MediaAttachments }} {{- if .MediaAttachments }}
{{- include "status_attachments.tmpl" . | indent 1 }} {{- include "status_attachments.tmpl" . | indent 1 }}
{{- end }} {{- end }}
</div> </div>
<aside class="status-info"> <aside class="status-info">
{{- include "status_info.tmpl" . | indent 1 }} {{- include "status_info.tmpl" . | indent 1 }}
</aside> </aside>
{{- if .Local }} {{- if .Local }}
<a href="{{- .URL -}}" class="status-link" data-nosnippet title="Open thread at this post"> <a href="{{- .URL -}}" class="status-link" data-nosnippet title="Open thread at this post">
Open thread at this post Open thread at this post
</a> </a>
{{- else }} {{- else }}
<a href="{{- .URL -}}" class="status-link" data-nosnippet rel="nofollow noreferrer noopener" target="_blank" <a href="{{- .URL -}}" class="status-link" data-nosnippet rel="nofollow noreferrer noopener" target="_blank"
title="Open remote post (opens in a new window)"> title="Open remote post (opens in a new window)">
Open remote post (opens in a new window) Open remote post (opens in a new window)
</a> </a>
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -24,22 +24,22 @@
{{- define "imagePreview" }} {{- define "imagePreview" }}
<img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}" <img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}"
title="{{- .Description -}}" {{- end }} width="{{- .Meta.Original.Width -}}" title="{{- .Description -}}" {{- end }} width="{{- .Meta.Original.Width -}}"
height="{{- .Meta.Original.Height -}}" /> height="{{- .Meta.Original.Height -}}" />
{{- end }} {{- end }}
{{- define "videoPreview" }} {{- define "videoPreview" }}
<img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}" <img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}"
title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" /> title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" />
{{- end }} {{- end }}
{{- define "audioPreview" }} {{- define "audioPreview" }}
{{- if and .PreviewURL .Meta.Small.Width }} {{- if and .PreviewURL .Meta.Small.Width }}
<img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}" <img src="{{- .PreviewURL -}}" loading="lazy" {{- if .Description }} alt="{{- .Description -}}"
title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" /> title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" />
{{- else }} {{- else }}
<img src="/assets/logo.webp" loading="lazy" {{- if .Description }} alt="{{- .Description -}}" <img src="/assets/logo.webp" loading="lazy" {{- if .Description }} alt="{{- .Description -}}"
title="{{- .Description -}}" {{- end }} width="518" height="460" /> title="{{- .Description -}}" {{- end }} width="518" height="460" />
{{- end }} {{- end }}
{{- end }} {{- end }}
@ -55,83 +55,82 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{
{{- with .MediaAttachments }} {{- with .MediaAttachments }}
<div class="{{- template "galleryClass" . -}}" role="group" aria-label="{{- template "attachmentsLength" . -}}"> <div class="{{- template "galleryClass" . -}}" role="group" aria-label="{{- template "attachmentsLength" . -}}">
{{- range $index, $media := . }} {{- range $index, $media := . }}
<div class="media-wrapper"> <div class="media-wrapper">
<details class="{{- $media.Type -}}-spoiler media-spoiler" {{- if not $media.Sensitive }} open{{- end -}}> <details class="{{- $media.Type -}}-spoiler media-spoiler" {{- if not $media.Sensitive }} open{{- end -}}>
<summary> <summary>
<div class="show sensitive button" aria-hidden="true">Show sensitive media</div> <div class="show sensitive button" aria-hidden="true">Show sensitive media</div>
<span class="eye button" role="button" tabindex="0" aria-label="Toggle media"> <span class="eye button" role="button" tabindex="0" aria-label="Toggle media">
<i class="hide fa fa-fw fa-eye-slash" aria-hidden="true"></i> <i class="hide fa fa-fw fa-eye-slash" aria-hidden="true"></i>
<i class="show fa fa-fw fa-eye" aria-hidden="true"></i> <i class="show fa fa-fw fa-eye" aria-hidden="true"></i>
</span> </span>
{{- if or (eq .Type "video") (eq .Type "gifv") }} {{- if or (eq .Type "video") (eq .Type "gifv") }}
{{- include "videoPreview" $media | indent 4 }} {{- include "videoPreview" $media | indent 4 }}
{{- else if eq .Type "image" }} {{- else if eq .Type "image" }}
{{- include "imagePreview" $media | indent 4 }} {{- include "imagePreview" $media | indent 4 }}
{{- else if eq .Type "audio" }} {{- else if eq .Type "audio" }}
{{- include "audioPreview" $media | indent 4 }} {{- include "audioPreview" $media | indent 4 }}
{{- end }} {{- end }}
</summary> </summary>
{{- if or (eq .Type "video") (eq .Type "gifv") }} {{- if or (eq .Type "video") (eq .Type "gifv") }}
<video <video
{{- if eq .Type "video" }} {{- if eq .Type "video" }}
preload="none" preload="none"
{{- else }} {{- else }}
preload="auto" preload="auto"
muted muted
{{- end }} {{- end }}
class="plyr-video photoswipe-slide{{- if eq .Type "gifv" }} gifv{{ end }}" class="plyr-video photoswipe-slide{{- if eq .Type "gifv" }} gifv{{ end }}"
controls controls
playsinline playsinline
data-pswp-index="{{- $index -}}" data-pswp-index="{{- $index -}}"
poster="{{- .PreviewURL -}}" poster="{{- .PreviewURL -}}"
data-pswp-width="{{- $media.Meta.Small.Width -}}px" data-pswp-width="{{- $media.Meta.Small.Width -}}px"
data-pswp-height="{{- $media.Meta.Small.Height -}}px" data-pswp-height="{{- $media.Meta.Small.Height -}}px"
{{- if .Description }} {{- if .Description }}
alt="{{- $media.Description -}}" alt="{{- $media.Description -}}"
title="{{- $media.Description -}}" title="{{- $media.Description -}}"
{{- end }} {{- end }}>
> <source type="{{- $media.MIMEType -}}" src="{{- $media.URL -}}" />
<source type="{{- $media.MIMEType -}}" src="{{- $media.URL -}}"/> </video>
</video> {{- else if eq .Type "audio" }}
{{- else if eq .Type "audio" }} <video
<video preload="none"
preload="none" class="plyr-video photoswipe-slide"
class="plyr-video photoswipe-slide" controls
controls playsinline
playsinline data-pswp-index="{{- $index -}}"
data-pswp-index="{{- $index -}}" {{- if and $media.PreviewURL $media.Meta.Small.Width }}
{{- if and $media.PreviewURL $media.Meta.Small.Width }} poster="{{- .PreviewURL -}}"
poster="{{- .PreviewURL -}}" data-pswp-width="{{- $media.Meta.Small.Width -}}px"
data-pswp-width="{{- $media.Meta.Small.Width -}}px" data-pswp-height="{{- $media.Meta.Small.Height -}}px" {{- else }} poster="/assets/logo.webp"
data-pswp-height="{{- $media.Meta.Small.Height -}}px" {{- else }} poster="/assets/logo.webp" width="518px" height="460px" {{- end }} {{- if .Description }} alt="{{- $media.Description -}}"
width="518px" height="460px" {{- end }} {{- if .Description }} alt="{{- $media.Description -}}" title="{{- $media.Description -}}" {{- end }}>
title="{{- $media.Description -}}" {{- end }}> <source type="{{- $media.MIMEType -}}" src="{{- $media.URL -}}" />
<source type="{{- $media.MIMEType -}}" src="{{- $media.URL -}}" /> </video>
</video> {{- else if eq .Type "image" }}
{{- else if eq .Type "image" }} <a class="photoswipe-slide" href="{{- $media.URL -}}" target="_blank"
<a class="photoswipe-slide" href="{{- $media.URL -}}" target="_blank" data-pswp-width="{{- $media.Meta.Original.Width -}}px"
data-pswp-width="{{- $media.Meta.Original.Width -}}px" data-pswp-height="{{- $media.Meta.Original.Height -}}px" data-cropped="true" {{- if .Description }}
data-pswp-height="{{- $media.Meta.Original.Height -}}px" data-cropped="true" {{- if .Description }} alt="{{- $media.Description -}}" title="{{- $media.Description -}}" {{- end }}>
alt="{{- $media.Description -}}" title="{{- $media.Description -}}" {{- end }}> {{- with $media }}
{{- with $media }} {{- include "imagePreview" . | indent 4 }}
{{- include "imagePreview" . | indent 4 }} {{- end }}
{{- end }} </a>
</a> {{- else }}
{{- else }} <a class="unknown-attachment" href="{{- $media.RemoteURL -}}" rel="nofollow noreferrer noopener"
<a class="unknown-attachment" href="{{- $media.RemoteURL -}}" rel="nofollow noreferrer noopener" target="_blank" {{- if .Description }}
target="_blank" {{- if .Description }} title="Open external media: {{ $media.Description -}}&#10;&#13;{{- $media.RemoteURL -}}" {{- else }}
title="Open external media: {{ $media.Description -}}&#10;&#13;{{- $media.RemoteURL -}}" {{- else }} title="Open external media.&#10;&#13;{{- $media.RemoteURL -}}" {{- end }}>
title="Open external media.&#10;&#13;{{- $media.RemoteURL -}}" {{- end }}> <div class="placeholder" aria-hidden="true">
<div class="placeholder" aria-hidden="true"> <i class="placeholder-external-link fa fa-external-link"></i>
<i class="placeholder-external-link fa fa-external-link"></i> <i class="placeholder-icon fa fa-file-text"></i>
<i class="placeholder-icon fa fa-file-text"></i> <div class="placeholder-link-to">External media</div>
<div class="placeholder-link-to">External media</div> </div>
</div> </a>
</a> {{- end }}
{{- end }} </details>
</details> </div>
</div> {{- end }}
{{- end }}
</div> </div>
{{- end }} {{- end }}

View file

@ -52,4 +52,4 @@
id="{{- .ID -}}{{- if .Pinned -}}-pinned{{- end -}}" id="{{- .ID -}}{{- if .Pinned -}}-pinned{{- end -}}"
role="region" role="region"
aria-label="{{- template "ariaLabel" . -}}" aria-label="{{- template "ariaLabel" . -}}"
{{- end }} {{- end }}

View file

@ -19,31 +19,31 @@
{{- with .Account }} {{- with .Account }}
<address> <address>
{{- if $.Local }} {{- if $.Local }}
<a href="{{- .URL -}}" rel="author" title="Open profile"> <a href="{{- .URL -}}" rel="author" title="Open profile">
{{- else }} {{- else }}
<a href="{{- .URL -}}" rel="author nofollow noreferrer noopener" target="_blank" <a href="{{- .URL -}}" rel="author nofollow noreferrer noopener" target="_blank"
title="Open remote profile (opens in a new window)"> title="Open remote profile (opens in a new window)">
{{- end }} {{- end }}
<picture class="avatar" aria-hidden="true"> <picture class="avatar" aria-hidden="true">
{{- if .AvatarAttachment }} {{- if .AvatarAttachment }}
<source srcset="{{- .AvatarStatic -}}" type="{{- .AvatarAttachment.PreviewMIMEType -}}" <source srcset="{{- .AvatarStatic -}}" type="{{- .AvatarAttachment.PreviewMIMEType -}}"
media="(prefers-reduced-motion: reduce)" /> media="(prefers-reduced-motion: reduce)" />
{{- end }} {{- end }}
<img src="{{- .Avatar -}}" alt="Avatar for {{ .Username -}}" title="Avatar for {{ .Username -}}"> <img src="{{- .Avatar -}}" alt="Avatar for {{ .Username -}}" title="Avatar for {{ .Username -}}">
</picture> </picture>
<div class="author-strapline"> <div class="author-strapline">
<span class="displayname text-cutoff"> <span class="displayname text-cutoff">
{{- if .DisplayName -}} {{- if .DisplayName -}}
{{- emojify .Emojis (escape .DisplayName) -}} {{- emojify .Emojis (escape .DisplayName) -}}
{{- else -}} {{- else -}}
{{- .Username -}} {{- .Username -}}
{{- end -}} {{- end -}}
</span> </span>
<span class="sr-only">,</span> <span class="sr-only">,</span>
<span class="username text-cutoff">@{{- .Acct -}}</span> <span class="username text-cutoff">@{{- .Acct -}}</span>
</div> </div>
<span class="sr-only">(open profile)</span> <span class="sr-only">(open profile)</span>
</a> </a>
</address> </address>
{{- end }} {{- end }}

View file

@ -19,56 +19,56 @@
{{- with . }} {{- with . }}
<dl class="status-stats"> <dl class="status-stats">
<div class="stats-grouping"> <div class="stats-grouping">
<div class="stats-item published-at text-cutoff"> <div class="stats-item published-at text-cutoff">
<dt class="sr-only">Published</dt> <dt class="sr-only">Published</dt>
<dd> <dd>
<time datetime="{{- .CreatedAt -}}">{{- .CreatedAt | timestampPrecise -}}</time> <time datetime="{{- .CreatedAt -}}">{{- .CreatedAt | timestampPrecise -}}</time>
</dd> </dd>
</div> </div>
<div class="stats-grouping"> <div class="stats-grouping">
<div class="stats-item" title="Replies"> <div class="stats-item" title="Replies">
<dt> <dt>
<span class="sr-only">Replies</span> <span class="sr-only">Replies</span>
<i class="fa fa-reply-all" aria-hidden="true"></i> <i class="fa fa-reply-all" aria-hidden="true"></i>
</dt> </dt>
<dd>{{- .RepliesCount -}}</dd> <dd>{{- .RepliesCount -}}</dd>
</div> </div>
<div class="stats-item" title="Faves"> <div class="stats-item" title="Faves">
<dt> <dt>
<span class="sr-only">Favourites</span> <span class="sr-only">Favourites</span>
<i class="fa fa-star" aria-hidden="true"></i> <i class="fa fa-star" aria-hidden="true"></i>
</dt> </dt>
<dd>{{- .FavouritesCount -}}</dd> <dd>{{- .FavouritesCount -}}</dd>
</div> </div>
<div class="stats-item" title="Boosts"> <div class="stats-item" title="Boosts">
<dt> <dt>
<span class="sr-only">Reblogs</span> <span class="sr-only">Reblogs</span>
<i class="fa fa-retweet" aria-hidden="true"></i> <i class="fa fa-retweet" aria-hidden="true"></i>
</dt> </dt>
<dd>{{- .ReblogsCount -}}</dd> <dd>{{- .ReblogsCount -}}</dd>
</div> </div>
{{- if .Pinned }} {{- if .Pinned }}
<div class="stats-item" title="Pinned"> <div class="stats-item" title="Pinned">
<dt> <dt>
<span class="sr-only">Pinned</span> <span class="sr-only">Pinned</span>
<i class="fa fa-thumb-tack" aria-hidden="true"></i> <i class="fa fa-thumb-tack" aria-hidden="true"></i>
</dt> </dt>
<dd class="sr-only">{{- .Pinned -}}</dd> <dd class="sr-only">{{- .Pinned -}}</dd>
</div> </div>
{{- else }} {{- else }}
{{- end }} {{- end }}
</div> </div>
</div> </div>
{{- if .LanguageTag.DisplayStr }} {{- if .LanguageTag.DisplayStr }}
<div class="stats-item language" title="{{ .LanguageTag.DisplayStr }}"> <div class="stats-item language" title="{{ .LanguageTag.DisplayStr }}">
<dt class="sr-only">Language</dt> <dt class="sr-only">Language</dt>
<dd> <dd>
<span class="sr-only">{{ .LanguageTag.DisplayStr }}</span> <span class="sr-only">{{ .LanguageTag.DisplayStr }}</span>
<span aria-hidden="true">{{- .LanguageTag.TagStr -}}</span> <span aria-hidden="true">{{- .LanguageTag.TagStr -}}</span>
</dd> </dd>
</div> </div>
{{- else }} {{- else }}
{{- end }} {{- end }}
</dl> </dl>
{{- end }} {{- end }}

View file

@ -32,50 +32,50 @@
{{- with . }} {{- with . }}
<figure class="poll"> <figure class="poll">
<figcaption class="poll-info"> <figcaption class="poll-info">
<span class="poll-expiry"> <span class="poll-expiry">
{{- if .Poll.Multiple -}} {{- if .Poll.Multiple -}}
Multiple-choice poll&nbsp; Multiple-choice poll&nbsp;
{{- else -}} {{- else -}}
Poll&nbsp; Poll&nbsp;
{{- end -}} {{- end -}}
{{- if .Poll.Expired -}} {{- if .Poll.Expired -}}
closed <time datetime="{{- .Poll.ExpiresAt -}}">{{- .Poll.ExpiresAt | timestampPrecise -}}</time> closed <time datetime="{{- .Poll.ExpiresAt -}}">{{- .Poll.ExpiresAt | timestampPrecise -}}</time>
{{- else if .Poll.ExpiresAt -}} {{- else if .Poll.ExpiresAt -}}
open until <time datetime="{{- .Poll.ExpiresAt -}}">{{- .Poll.ExpiresAt | timestampPrecise -}}</time> open until <time datetime="{{- .Poll.ExpiresAt -}}">{{- .Poll.ExpiresAt | timestampPrecise -}}</time>
{{- else -}} {{- else -}}
open forever open forever
{{- end -}} {{- end -}}
</span> </span>
<span class="sr-only">,</span> <span class="sr-only">,</span>
<span class="total-votes"> <span class="total-votes">
{{- template "votes" .Poll.VotesCount -}}&nbsp; {{- template "votes" .Poll.VotesCount -}}&nbsp;
{{- if .Poll.Expired -}} {{- if .Poll.Expired -}}
total total
{{- else -}} {{- else -}}
so far so far
{{- end -}} {{- end -}}
</span> </span>
</figcaption> </figcaption>
<ul class="poll-options nodot"> <ul class="poll-options nodot">
{{- range $index, $pollOption := .PollOptions }} {{- range $index, $pollOption := .PollOptions }}
<li class="poll-option"> <li class="poll-option">
<span class="sr-only">Option {{ increment $index }},</span> <span class="sr-only">Option {{ increment $index }},</span>
<span lang="{{- .LanguageTag.TagStr -}}">{{ emojify .Emojis (noescape $pollOption.Title) }}</span> <span lang="{{- .LanguageTag.TagStr -}}">{{ emojify .Emojis (noescape $pollOption.Title) }}</span>
<meter aria-hidden="true" min="0" max="100" value="{{- $pollOption.VoteShare -}}"></meter> <meter aria-hidden="true" min="0" max="100" value="{{- $pollOption.VoteShare -}}"></meter>
<div class="poll-vote-summary"> <div class="poll-vote-summary">
{{- if isNil $pollOption.VotesCount }} {{- if isNil $pollOption.VotesCount }}
Results not yet published. Results not yet published.
{{- else }} {{- else }}
{{- with deref $pollOption.VotesCount }} {{- with deref $pollOption.VotesCount }}
<span class="poll-vote-share">{{- $pollOption.VoteShareStr -}}&#37;</span> <span class="poll-vote-share">{{- $pollOption.VoteShareStr -}}&#37;</span>
<span class="sr-only">,</span> <span class="sr-only">,</span>
<span class="poll-vote-count">{{- template "votes" . -}}</span> <span class="poll-vote-count">{{- template "votes" . -}}</span>
{{- end }} {{- end }}
{{- end }} {{- end }}
</div> </div>
</li> </li>
{{- end }} {{- end }}
</ul> </ul>
</figure> </figure>
{{- end }} {{- end }}

View file

@ -19,11 +19,11 @@
{{- with . }} {{- with . }}
<main> <main>
<h2 class="wrap-text" tabindex="-1">#{{- .tagName -}}</h2> <h2 class="wrap-text" tabindex="-1">#{{- .tagName -}}</h2>
<p>There's nothing here!</p> <p>There's nothing here!</p>
<p> <p>
For privacy reasons, GoToSocial doesn't (yet) implement public web views of tag timelines. For privacy reasons, GoToSocial doesn't (yet) implement public web views of tag timelines.
To soften the blow, here's a tongue twister: "I squeeze the soft sloth often in the mothy loft" 🦥 To soften the blow, here's a tongue twister: "I squeeze the soft sloth often in the mothy loft" 🦥
</p> </p>
</main> </main>
{{- end }} {{- end }}

View file

@ -64,36 +64,36 @@ Thread of {{ .context.ThreadLength }} posts
{{- with . }} {{- with . }}
</section> </section>
<section class="thread thread-replies" aria-labelledby="replies" open> <section class="thread thread-replies" aria-labelledby="replies" open>
<div class="col-header wrap replies{{- if not .context.ThreadRepliesShown }} hidden-only{{- end -}}"> <div class="col-header wrap replies{{- if not .context.ThreadRepliesShown }} hidden-only{{- end -}}">
<h2 id="replies">{{- template "repliesSummary" . -}}</h2> <h2 id="replies">{{- template "repliesSummary" . -}}</h2>
<a href="#thread-summary">back to top</a> <a href="#thread-summary">back to top</a>
</div> </div>
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{- with . }} {{- with . }}
<main class="thread-wrapper" data-nosnippet> <main class="thread-wrapper" data-nosnippet>
<section class="thread thread-main" aria-labelledby="thread-summary"> <section class="thread thread-main" aria-labelledby="thread-summary">
<div class="col-header wrap"> <div class="col-header wrap">
<h2 id="thread-summary">{{- template "threadSummary" . -}}</h2> <h2 id="thread-summary">{{- template "threadSummary" . -}}</h2>
{{- if .context.ThreadRepliesShown }} {{- if .context.ThreadRepliesShown }}
<a href="#replies">jump to replies</a> <a href="#replies">jump to replies</a>
{{- end }} {{- end }}
</div> </div>
{{- range $status := .context.Statuses }} {{- range $status := .context.Statuses }}
<article <article
class="status{{- if $status.ThreadContextStatus }} expanded{{- end -}}{{- if $status.Indent }} indent-{{ $status.Indent }}{{- end -}}" class="status{{- if $status.ThreadContextStatus }} expanded{{- end -}}{{- if $status.Indent }} indent-{{ $status.Indent }}{{- end -}}"
{{- includeAttr "status_attributes.tmpl" $status | indentAttr 3 }}> {{- includeAttr "status_attributes.tmpl" $status | indentAttr 3 }}>
{{- include "status.tmpl" $status | indent 3 }} {{- include "status.tmpl" $status | indent 3 }}
</article> </article>
{{- if and $status.ThreadLastMain $.context.ThreadReplies }} {{- if and $status.ThreadLastMain $.context.ThreadReplies }}
{{- include "repliesStart" $ | indent 1 }} {{- include "repliesStart" $ | indent 1 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .context.ThreadReplies }} {{- if .context.ThreadReplies }}
</section> </section>
{{- end }} {{- end }}
</main> </main>
{{- end }} {{- end }}