This commit is contained in:
Dym Sohin 2023-08-26 04:40:17 +02:00
parent cb5dae7d16
commit 355a36e209
4 changed files with 42 additions and 13 deletions

View File

@ -257,11 +257,20 @@
.profile .about-user .fields {
background: var(--profile-bg);
display: grid;
grid-template: max-content 1fr;
padding: 0 0.5rem;
grid-template-columns: 6rem auto;
}
.profile .about-user .fields .field + .field {
.profile .about-user .fields > * {
padding: 0.5rem;
}
.profile .about-user .fields > b {
align-self: flex-end;
justify-self: center;
}
.profile .about-user .fields > span {
}
.profile .about-user .fields > span + b,
.profile .about-user .fields > span + b + span {
border-top: 0.1rem solid var(--gray2);
}
@ -272,10 +281,10 @@
.profile .about-user .accountstats {
background: var(--bg-accent);
padding: 1rem;
padding: 0.5rem;
display: grid;
grid-template-columns: auto auto;
grid-template-columns: 6rem auto;
gap: 0.5rem 1rem;
}
.profile .about-user .accountstats > b {

View File

@ -50,7 +50,7 @@
<ul>
<li><a href="https://gotosocial.org" target="_blank">GoToSocial</a></li>
<li>official <a href="https://github.com/superseriousbusiness/gotosocial" target="_blank">source code</a></li>
<li>my <a href="https://source.garden/config/gts-web" target="_blank">custom templates</a></li>
<li>my <a href="https://source.garden/styles/gts-web" target="_blank">custom templates</a></li>
</ul>
</div>
@ -94,6 +94,16 @@
{{end}}
</p>
</div>
<div>
<h2>statis</h2>
<ul>
<li>Users: <span class="count">{{.instance.Stats.user_count}}</span></li>
<li>Posts: <span class="count">{{.instance.Stats.status_count}}</span></li>
<li>Federates with: <span class="count">{{.instance.Stats.domain_count}}</span> instances</li>
</ul>
</div>
</section>
</main>
{{ template "footer.tmpl" .}}

View File

@ -16,10 +16,20 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ -}}
{{- /*
NESTED TEMPLATE DECLARATIONS
If some if/else macro is used multiple times, declare it once here instead.
When invoking these nested templates, remember to pass in the values passed
to the executing template, ie., use '{{ template "example" . }}' not
'{{ template "example" }}', otherwise you'll end up with empty variables.
*/ -}}
{{ define "thumbnailType" }}{{ if .instance.ThumbnailType }}{{ .instance.ThumbnailType }}{{ else }}image/png{{ end }}{{ end }}
{{ define "instanceTitle" }}{{ if .ogMeta }}{{ .ogMeta.Title }}{{ else }}{{ .instance.Title }} - GoToSocial{{ end }}{{ end }}
{{- /*
BOILERPLATE GOES HERE
*/ -}}
<!DOCTYPE html>
<!-- header.tmpl -->
<html lang="en">
<head>

View File

@ -66,15 +66,15 @@
<div class="fields">
{{ range .account.Fields }}
<b>{{emojify $.account.Emojis (noescape .Name)}}</b>
<span>{{replace 'https?://' '' {{emojify $.account.Emojis (noescape .Value)}} }}</span>
<span>{{emojify $.account.Emojis (noescape .Value)}}</span>
{{ end }}
</div>
<div class="accountstats">
<b>Joined</b><time datetime="{{.account.CreatedAt}}">{{.account.CreatedAt | timestampVague}}</time>
<b>Posts</b><span>{{.account.StatusesCount}}</span>
<b>Followed by</b><span>{{.account.FollowersCount}}</span>
<b>Following</b><span>{{.account.FollowingCount}}</span>
<b>join</b><time datetime="{{.account.CreatedAt}}">{{.account.CreatedAt | timestampVague}}</time>
<b>posts</b><span>{{.account.StatusesCount}}</span>
<b>follows</b><span>{{.account.FollowingCount}}</span>
<b>followers</b><span>{{.account.FollowersCount}}</span>
</div>
</section>