Merge branch 'master' of https://github.com/osuYozora/hanayo
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/{{ if $ds }}dark/{{ end }}semantic.min.css?{{ unixNano }}">
|
||||
<link rel="stylesheet" type="text/css" href="/static/ripple.css?{{ unixNano }}">
|
||||
<link rel="stylesheet" type="text/css" href="/static/snow/snow.css?{{ unixNano }}">
|
||||
<link href="/static/css/beatmaps.dfc480ea.chunk.css" rel="stylesheet">
|
||||
</head>
|
||||
<body {{ if $ds }} class="ds"{{ end }}>
|
||||
{{/*
|
||||
|
13
templates/beatmaps.html
Normal file
13
templates/beatmaps.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{/*###
|
||||
Handler=/beatmaps
|
||||
TitleBar=Beatmaps
|
||||
KyutGrill=beatmaps.jpg
|
||||
*/}}
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
<div id="react-app"></div>
|
||||
</div>
|
||||
<script>!function (l) { function e(e) { for (var r, t, n = e[0], o = e[1], u = e[2], f = 0, i = []; f < n.length; f++)t = n[f], p[t] && i.push(p[t][0]), p[t] = 0; for (r in o) Object.prototype.hasOwnProperty.call(o, r) && (l[r] = o[r]); for (s && s(e); i.length;)i.shift()(); return c.push.apply(c, u || []), a() } function a() { for (var e, r = 0; r < c.length; r++) { for (var t = c[r], n = !0, o = 1; o < t.length; o++) { var u = t[o]; 0 !== p[u] && (n = !1) } n && (c.splice(r--, 1), e = f(f.s = t[0])) } return e } var t = {}, p = { 2: 0 }, c = []; function f(e) { if (t[e]) return t[e].exports; var r = t[e] = { i: e, l: !1, exports: {} }; return l[e].call(r.exports, r, r.exports, f), r.l = !0, r.exports } f.m = l, f.c = t, f.d = function (e, r, t) { f.o(e, r) || Object.defineProperty(e, r, { enumerable: !0, get: t }) }, f.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, f.t = function (r, e) { if (1 & e && (r = f(r)), 8 & e) return r; if (4 & e && "object" == typeof r && r && r.__esModule) return r; var t = Object.create(null); if (f.r(t), Object.defineProperty(t, "default", { enumerable: !0, value: r }), 2 & e && "string" != typeof r) for (var n in r) f.d(t, n, function (e) { return r[e] }.bind(null, n)); return t }, f.n = function (e) { var r = e && e.__esModule ? function () { return e.default } : function () { return e }; return f.d(r, "a", r), r }, f.o = function (e, r) { return Object.prototype.hasOwnProperty.call(e, r) }, f.p = "/"; var r = window.webpackJsonp = window.webpackJsonp || [], n = r.push.bind(r); r.push = e, r = r.slice(); for (var o = 0; o < r.length; o++)e(r[o]); var s = n; a() }([])</script>
|
||||
<script src="/static/js/1.7e1ca608.chunk.js"></script>
|
||||
<script src="/static/js/beatmaps.faace68d.chunk.js"></script>
|
||||
{{ end }}
|
59
templates/clan_group.html
Normal file
59
templates/clan_group.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{{/*###
|
||||
NoCompile=true
|
||||
*/}}
|
||||
{{ define "clanGroup" }}
|
||||
{{ with . }}
|
||||
<div class="ui one column center aligned stackable grid">
|
||||
{{ $teamJSON := teamJSON }}
|
||||
{{ range .members }}
|
||||
{{/* ignore fokabot */}}
|
||||
{{ if ne (int .id) 999 }}
|
||||
{{ $tj := index $teamJSON (print .id)}}
|
||||
<div class="column">
|
||||
<div class="ui left aligned fluid card">
|
||||
<div class="image">
|
||||
<img src="{{ config "AvatarURL" }}/{{ .id }}" alt="Avatar">
|
||||
</div>
|
||||
<div class="content">
|
||||
<a class="header" href="/u/{{ .id }}">{{ country .country false }}{{ .username }}</a>
|
||||
{{ with $tj.real_name }}
|
||||
<div class="meta">
|
||||
<a>{{ . }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with $tj.role }}
|
||||
<div class="description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="extra content">
|
||||
<div title="Registered">
|
||||
<i class="sign in icon"></i>
|
||||
{{ time .registered_on }}
|
||||
</div>
|
||||
<div title="Latest activity">
|
||||
<i class="sign out icon"></i>
|
||||
{{ time .latest_activity }}
|
||||
</div>
|
||||
</div>
|
||||
{{ if or $tj.twitter $tj.mail $tj.github }}
|
||||
<div class="extra content">
|
||||
<div class="center aligned">
|
||||
{{ range $k, $v := $tj }}
|
||||
{{ if and $v (in $k "github" "twitter" "mail") }}
|
||||
<a href="{{ servicePrefix $k }}{{ $v }}" title="{{ capitalise $k }}">
|
||||
<i class="{{ $k }} icon"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
44
templates/clanboard.html
Normal file
44
templates/clanboard.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{{/*###
|
||||
Handler=/clans
|
||||
TitleBar=Clans
|
||||
KyutGrill=leaderboard2.jpg
|
||||
*/}}
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
{{ $favMode := _or (atoi (.Gin.Query "mode")) }}
|
||||
<script>
|
||||
var favouriteMode = {{ $favMode }};
|
||||
var page = {{ .Gin.Query "p" | atoint | atLeastOne }};
|
||||
</script>
|
||||
<div class="ui four item menu" id="mode-menu">
|
||||
<a class="0 item" href="/clans?mode=0">osu!</a>
|
||||
<a class="1 item" href="/clans?mode=1">osu!taiko</a>
|
||||
<a class="2 item" href="/clans?mode=2">osu!catch</a>
|
||||
<a class="3 item" href="/clans?mode=3">osu!mania</a>
|
||||
</div>
|
||||
<table class="ui fixed table">
|
||||
<thead>
|
||||
{{ template "simplepag" 4 }}
|
||||
<tr>
|
||||
<th class="four wide">{{ .T "Rank" }} </th>
|
||||
<th class="four wide">{{ .T "Clan" }} </th>
|
||||
<th class="four wide">{{ .T "PP/Score" }} </th>
|
||||
<th class="four wide">{{ .T "Playcount" }} </th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="ui fixed table">
|
||||
<thead>
|
||||
{{ range (.Get "clans/stats/all?m=$d" $favMode).clans }}
|
||||
{{ if .name }}
|
||||
<tr>
|
||||
<th class="four wide">#{{ .rank }} </th>
|
||||
<th class="four wide"> <a href="/c/{{ .id }}?mode={{ $favMode }}">{{ .name }}</a></th>
|
||||
<th class="four wide">{{ .chosen_mode.pp }}pp ({{ humanize .chosen_mode.total_score }})</th>
|
||||
<th class="four wide">{{ .chosen_mode.playcount }}</th>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
48
templates/clans/create.html
Normal file
48
templates/clans/create.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
{{ $regEnabled := qb "SELECT value_int FROM system_settings WHERE name = 'ccreation_enabled'" }}
|
||||
{{ $isClan := qb "SELECT user, clan FROM user_clans WHERE user = ?" .Context.User.ID }}
|
||||
{{ if not .Context.User.ID }}
|
||||
<div class="ui segment">
|
||||
{{ .T "You need to login!" }}
|
||||
</div>
|
||||
{{ else if not ($regEnabled.value_int.Bool) }}
|
||||
<div class="ui error message">
|
||||
{{ .T "Sorry, it's not possible to create a clan at the moment. Please try again later." }}
|
||||
</div>
|
||||
{{ else if ($isClan) }}
|
||||
<div class="ui segment">
|
||||
{{ .T "You're already in a Clan." }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="tiny container">
|
||||
<div class="ui raised segments">
|
||||
<div class="ui segment">
|
||||
<form id="register-form" class="ui form" method="post" action="/clans/create">
|
||||
<div class="field">
|
||||
<label>{{ .T "Name (2 to 15 characters, alphanumeric, spaces, <code>_[]-</code>)" | html }}</label>
|
||||
<input tabindex="1" type="text" name="username" placeholder="{{ .T "Name" }}" value="{{ .FormData.username }}" required pattern="{2,15}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="left aligned">{{ "Clantag (2 to 6 characters)" }}</label>
|
||||
<input tabindex="2" type="text" name="tag" placeholder="{{ "Clantag" }}" value="{{ .FormData.tag }}" pattern="{2,6}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Description (optional)" }}</label>
|
||||
<input tabindex="3" type="text" name="password" placeholder="{{ .T "Description" }}" value="{{ .FormData.password }}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Icon [URL] (optional)" }}</label>
|
||||
<input tabindex="4" type="url" name="email" placeholder="{{ .T "Icon URL" }}" value="{{ .FormData.email }}">
|
||||
</div>
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui right aligned segment">
|
||||
<button tabindex="5" class="ui primary button" type="submit" form="register-form">{{ .T "Submit" }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
128
templates/clansample.html
Normal file
128
templates/clansample.html
Normal file
@@ -0,0 +1,128 @@
|
||||
{{/*###
|
||||
Include=members.html
|
||||
*/}}
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
|
||||
{{ if .ClanID }}
|
||||
{{ $gqm := .Gin.Query "mode" }}
|
||||
{{ $global := . }}
|
||||
{{ $favouritemode := $gqm }}
|
||||
{{ range (.Get "clans?id=%d" .ClanID).clans }}
|
||||
<div class="ui top attached segment overflow auto aligned">
|
||||
<div class="magic table">
|
||||
{{ if .icon }}
|
||||
<div class="table element">
|
||||
<img src="{{ .icon }}" alt="icon" class="clan icon" style="border-radius:5%; height:90px;">
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="table element">
|
||||
<h1 class="ui header">
|
||||
|
||||
{{ $global.T "%s" .name | html }}
|
||||
</h1>
|
||||
<div class="subtitle">
|
||||
{{ $global.T "(%s)" (.tag | htmlescaper) | html }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui four item bottom attached menu" id="mode-menu">
|
||||
<a class="mode item" href="/c/{{ .id }}?mode=0">osu!</a>
|
||||
<a class="mode item" href="/c/{{ .id }}?mode=1">osu!taiko</a>
|
||||
<a class="mode item" href="/c/{{ .id }}?mode=2">osu!catch</a>
|
||||
<a class="mode item" href="/c/{{ .id }}?mode=3">osu!mania</a>
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
<div class="ui two column divided stackable grid">
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
|
||||
{{ $global.T "%s" (.description | htmlescaper) | html }}
|
||||
{{ end }}
|
||||
<br><br><table class="ui very basic two column compact table nopad">
|
||||
<tbody>
|
||||
{{ with (.Get "clans/stats?id=%d&m=%d" .ClanID (.Gin.Query "mode"))}}
|
||||
<td></td>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Global Rank" }}</b></td>
|
||||
<td class="right aligned">#{{ humanize .rank }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "PP" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.pp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Ranked Score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.ranked_score }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total Score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.total_score }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total Playcount" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.playcount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total Replays Watched" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.replays_watched }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total Hits" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .chosen_mode.total_hits }}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{ range (.Get "clans?id=%d" .ClanID).clans }}
|
||||
</tbody>
|
||||
</table>{{ end }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ if $global.Context.User.ID }}
|
||||
{{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? LIMIT 1" .Context.User.ID }}
|
||||
{{ $p := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }}
|
||||
{{ $tc := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND clan = ? LIMIT 1" .Context.User.ID .ClanID }}
|
||||
{{ $uc := or $d.clan.Int -1 }}
|
||||
{{ if $d }}
|
||||
{{ if $tc }}
|
||||
{{ if $p }}
|
||||
<form id="register-form" class="ui form" method="post" action="/c/{{ .ClanID }}">
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
<div class="ui one item menu"><button tabindex="1" class="ui primary button" style="background-color:rgba(255,0,0,.5)" type="submit" form="register-form">{{ .T "Disband Clan" }}</button></div>
|
||||
{{ else }}
|
||||
<form id="register-form" class="ui form" method="post" action="/c/{{ .ClanID }}">
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
<div class="ui one item menu"><button tabindex="1" class="ui primary button" style="background-color:rgba(255,0,0,.3)" type="submit" form="register-form">{{ .T "Leave Clan" }}</button></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div class="ui one item menu" id="join-menu"><a class="item" style="background-color:rgba(255,0,0,.3)">Already joined a clan</a></div>
|
||||
{{end}}
|
||||
{{ else }}
|
||||
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div class="ui one item menu" id="join-menu"><a class="item" href="/login" style="background-color:rgba(0,128,255,.3)">Please login to join a clan</a></div>
|
||||
|
||||
{{ end }}
|
||||
<h1 class="ui heading">{{ .T "Clan Owner" }}</h1>
|
||||
<p>
|
||||
{{ .T "The leader of the clan." }}<br>
|
||||
</p>
|
||||
{{ template "clanMembers" (.Get "clans/members?id=%d&r=%d" .ClanID 8) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui aligned segment">
|
||||
<h1 class="ui heading">{{ .T "Members" }}</h1>
|
||||
<p>
|
||||
{{ .T "The members of the clan." }}<br>
|
||||
</p>
|
||||
{{ template "clanMembers" (.Get "clans/members?id=%d&r=%d" .ClanID 1) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
25
templates/help.html
Normal file
25
templates/help.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{{/*###
|
||||
Handler=/help
|
||||
TitleBar=Contact support
|
||||
KyutGrill=help.jpg
|
||||
*/}}
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
<div class="ui segments">
|
||||
<div class="ui segment">
|
||||
<p>
|
||||
{{ .T "If you need to get in touch with our support team (our Community Managers), you will need to either send an email to our support email address, or join our <a href='https://discord.gg/mT2EsD8'>Discord Server</a>. You can compose an email to it by clicking the button at the bottom of this page." | html }}
|
||||
</p>
|
||||
<p>
|
||||
{{ .T "When contacting the support mail, please make sure to <b>send the email from the email address you signed up on Akatsuki with</b>." | html }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ui right aligned segment">
|
||||
<a class="ui right labeled blue icon button" href="mailto:support@yozora.pw">
|
||||
<i class="right arrow icon"></i>
|
||||
{{ .T "Do be warned though, our email is rarely checked as we handle most support via the Discord server." }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
41
templates/members.html
Normal file
41
templates/members.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{{/*###
|
||||
NoCompile=true
|
||||
*/}}
|
||||
{{ define "clanMembers" }}
|
||||
{{ with . }}
|
||||
<div class="ui three column center aligned stackable grid">
|
||||
{{ $teamJSON := teamJSON }}
|
||||
{{ range .members }}
|
||||
{{/* ignore fokabot */}}
|
||||
{{ if ne (int .id) 999 }}
|
||||
{{ $tj := index $teamJSON (print .id)}}
|
||||
<div class="column">
|
||||
<div class="ui left aligned fluid card">
|
||||
<div class="image">
|
||||
<img src="{{ config "AvatarURL" }}/{{ .id }}" alt="Avatar">
|
||||
</div>
|
||||
<div class="content">
|
||||
<a class="header" href="/u/{{ .id }}">{{ country .country false }}{{ .username }}</a>
|
||||
{{ with $tj.real_name }}
|
||||
<div class="meta">
|
||||
<a>{{ . }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="extra content">
|
||||
<div title="Registered">
|
||||
<i class="sign in icon"></i>
|
||||
{{ time .registered_on }}
|
||||
</div>
|
||||
<div title="Latest activity">
|
||||
<i class="sign out icon"></i>
|
||||
{{ time .latest_activity }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -37,12 +37,26 @@
|
||||
<div class="ui dropdown item">
|
||||
<span>{{ .T "Beatmaps" }}</span>
|
||||
<div class="menu">
|
||||
{{ navbarItem .Path (.T "Listing") "/beatmaps" }}
|
||||
{{ navbarItem .Path (.T "Request beatmap ranking") "/beatmaps/rank_request" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui dropdown item">
|
||||
<span>{{ .T "Clans" }}</span>
|
||||
<div class="menu">
|
||||
{{ navbarItem .Path (.T "Create Clan") "/clans/create" }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="ui dropdown item">
|
||||
<span>{{ .T "Beatmaps" }}</span>
|
||||
<div class="menu">
|
||||
{{ navbarItem .Path (.T "Listing") "/beatmaps" }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ navbarItem .Path (.T "Donate" | printf "<i class=\"red heart icon\"></i>%s") "/donate" }}
|
||||
{{ if $isAdmin }}{{ navbarItem .Path (.T "RAP" | printf "<b>%s</b>") "https://old.yozora.pw/p/100" }}{{ end }}
|
||||
{{ if $isAdmin }}{{ navbarItem .Path (.T "Admin" | printf "<b>%s</b>") "https://old.yozora.pw/p/100" }}{{ end }}
|
||||
{{ end }}
|
||||
<div class="firetrucking-right-menu">
|
||||
<div class="item">
|
||||
|
@@ -62,15 +62,27 @@
|
||||
</div>
|
||||
<div class="table element">
|
||||
<h1 class="ui header">
|
||||
{{ $user := . }}
|
||||
|
||||
{{ if $super }}
|
||||
<div class="owner">
|
||||
{{ .username }}
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{else if $donor}}
|
||||
<div class="dev">
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
@@ -115,6 +127,11 @@
|
||||
</div>
|
||||
</div>
|
||||
{{ $user := . }}
|
||||
<div class="ui three item bottom attached menu" id="rx-menu">
|
||||
<a class="0 item" data-rx="0" href="/u/{{ $user.id }}">Vanilla</a>
|
||||
<a class="1 item" data-rx="1" href="/rx/u/{{ $user.id }}">Relax</a>
|
||||
<a class="1 item" data-rx="2" href="/ap/u/{{ $user.id }}">AutoPilot</a>
|
||||
</div>
|
||||
<div class="ui four item bottom attached menu" id="mode-menu">
|
||||
{{ range $k, $v := modes }}
|
||||
<a class="{{ favMode $favouritemode $k }}item" data-mode="{{ $k }}" href="/u/{{ $user.id }}?mode={{ $k }}">{{ $v }}</a>
|
||||
|
280
templates/profile_auto.html
Normal file
280
templates/profile_auto.html
Normal file
@@ -0,0 +1,280 @@
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
{{ if .UserID }}
|
||||
{{ $gqm := atoi (.Gin.Query "mode") }}
|
||||
{{ $global := . }}
|
||||
{{ with (.Get "users/ap/full?id=%d" .UserID) }}
|
||||
{{ $favouritemode := _or $gqm .favourite_mode }}
|
||||
<script>
|
||||
window.favouriteMode = {{ $favouritemode }};
|
||||
window.userID = {{ .id }};
|
||||
</script>
|
||||
{{ if after .silence_info.end }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>silenced</b> for %s, expires %s." (.silence_info.reason | htmlescaper) (time .silence_info.end) | html }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $sarah := has .id 1193 }}
|
||||
{{ $alicia := has .id 1000 }}
|
||||
{{ $catherine := has .id 999 }}
|
||||
|
||||
{{ $super := has .privileges 7340031 }}
|
||||
{{ $dev := has .privileges 11534335 }}
|
||||
{{ $donor := has .privileges 7 }}
|
||||
{{ $admin := has .privileges 3049983 }}
|
||||
{{ $chatmod := has .privileges 786763 }}
|
||||
{{ $bn := has .privileges 267 }}
|
||||
|
||||
{{ if hasAdmin $global.Context.User.Privileges }}
|
||||
{{ $restr := not (has .privileges 1) }}
|
||||
{{ $disab := not (has .privileges 2) }}
|
||||
{{ $pend := has .privileges 1048576 }}
|
||||
{{ if and $disab $restr }}
|
||||
{{ if $pend }}
|
||||
<div class="ui warning centered message">{{ $global.T "User is <b>%s</b>" "pending verification" | html }}.</div>
|
||||
{{ else }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "banned" | html }}.</div>
|
||||
{{ end }}
|
||||
{{ else if $restr }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "restricted" | html }}.</div>
|
||||
{{ else if $disab }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "locked" | html }}.</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $global.Get "users/userpage?id=%.0f" .id }}
|
||||
{{ if .userpage }}
|
||||
{{ with parseUserpage .userpage }}
|
||||
<div class="ui raised segment twemoji" id="userpage-content">
|
||||
{{ html . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="ui top attached segment overflow auto">
|
||||
<div class="magic table">
|
||||
<div class="table element">
|
||||
{{ if eq $global.UserID $global.Context.User.ID }}
|
||||
<a href="/settings/avatar">
|
||||
{{ end }}
|
||||
<img src="{{ config "AvatarURL" }}/{{ .id }}" alt="avatar" class="user avatar">
|
||||
{{ if eq $global.UserID $global.Context.User.ID }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="table element">
|
||||
<h1 class="ui header">
|
||||
{{ $user := . }}
|
||||
{{ if $super }}
|
||||
<div class="owner">
|
||||
{{ if $user.clan.tag }}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{else if $donor}}
|
||||
<div class="dev">
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ if .username_aka }}
|
||||
<div class="subtitle">
|
||||
{{ $global.T "(aka <b>%s</b>)" (.username_aka | htmlescaper) | html }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with bget "isOnline?id=%.0f" .id }}
|
||||
<div class="subtitle">
|
||||
<i class="{{ if .result }}green{{ else }}grey{{ end }} circle icon"></i>
|
||||
{{ if .result }}{{ $global.T "Online" }}{{ else }}{{ $global.T "Offline" }}{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="magic table floating right">
|
||||
<div class="table element">
|
||||
{{ range $k, $v := (slice .std .taiko .ctb .mania) }}
|
||||
<h1 data-mode="{{ $k }}"{{ if ne $k (int $favouritemode) }} hidden{{ end }}>{{ with and $v $v.global_leaderboard_rank }}#{{ . }}{{ else }}{{ $global.T "Unknown" }}{{ end }}</h1>
|
||||
{{ end }}
|
||||
<div id="profile-actions">
|
||||
{{ if and (ne $global.Context.User.ID $global.UserID) (ne $global.Context.User.ID 0) }}
|
||||
<button class="ui circular mini icon loading button" id="add-friend-button">
|
||||
<i class="horizontal ellipsis icon"></i>
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ if eq $global.Context.User.ID $global.UserID }}
|
||||
<a href="/settings" class="ui circular mini teal icon button"
|
||||
title="{{ $global.T "Settings" }}">
|
||||
<i class="edit icon"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if hasAdmin $global.Context.User.Privileges }}
|
||||
<a href="https://old.yozora.pw/index.php?p=103&id={{ $global.UserID }}"
|
||||
target="_blank" title="Quick edit" class="ui circular mini blue icon button">
|
||||
<i class="folder open outline icon"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $user := . }}
|
||||
<div class="ui three item bottom attached menu" id="rx-menu">
|
||||
<a class="0 item" data-rx="0" href="/u/{{ $user.id }}">Vanilla</a>
|
||||
<a class="1 item" data-rx="1" href="/rx/u/{{ $user.id }}">Relax</a>
|
||||
<a class="1 item" data-rx="2" href="/ap/u/{{ $user.id }}">AutoPilot</a>
|
||||
</div>
|
||||
<div class="ui four item bottom attached menu" id="mode-menu">
|
||||
{{ range $k, $v := modes }}
|
||||
<a class="{{ favMode $favouritemode $k }}item" data-mode="{{ $k }}" href="/u/{{ $user.id }}?mode={{ $k }}">{{ $v }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
<div class="ui three column divided stackable grid">
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
{{if $super }}
|
||||
{{ $global.T "<b >%s</b> " .username | html }}
|
||||
is an <i class="pink code small icon"></i><b>Owner</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $dev}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="blue code small icon"></i><b>Developer</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $admin}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is an <i class="red lightning small icon"></i><b>Administrator</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $chatmod}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="blue star small icon"></i><b>Chat Mod</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $bn}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="orange universal access small icon"></i><b>Nominator</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $donor }}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="pink heart small icon"></i><b>Supporter</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{ else }}
|
||||
{{ $global.T "<b>%s</b> is a player from <b>%s</b>." .username (country .country true) | html }}
|
||||
{{ end }}
|
||||
|
||||
<br>{{ $global.T "They signed up on Yozora %s." (time $user.registered_on) | html }}
|
||||
<br>{{ $global.T "Last seen: %s." (time $user.latest_activity) | html }}
|
||||
<br>{{ with playstyle .play_style $global }}{{ $global.T "They play with %s." . }}{{ end }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ if and (not .badges) (not .custom_badge) }}
|
||||
{{ $global.T "This user hasn't got any badges!" }}
|
||||
{{ else }}
|
||||
<div class="ui grid">
|
||||
{{ range .badges }}
|
||||
<div class="eight wide centered column">
|
||||
<i class="circular {{ faIcon .icon }} big icon"></i><br>
|
||||
<b>{{ .name }}</b>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .custom_badge }}
|
||||
<div class="eight wide centered column">
|
||||
<i class="circular {{ faIcon .icon }} big icon"></i><br>
|
||||
<b><i>{{ .name }}</i></b>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ range $k, $v := (slice .std .taiko .ctb .mania) }}
|
||||
<div data-mode="{{ $k }}" {{ if ne $k (int $favouritemode) }} hidden{{ end }}>
|
||||
<table class="ui very basic two column compact table nopad">
|
||||
<tbody>
|
||||
{{ with .global_leaderboard_rank }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Global rank" }}</b></td>
|
||||
<td class="right aligned">#{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ with .country_leaderboard_rank }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Country rank" }} {{ country $user.country false }}</b></td>
|
||||
<td class="right aligned">#{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "PP" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .pp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Ranked score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .ranked_score }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .total_score }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Playcount" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .playcount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Replays watched" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .replays_watched }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total hits" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .total_hits }}</td>
|
||||
</tr> <tr>
|
||||
<td><b>{{ $global.T "Accuracy" }}</b></td>
|
||||
<td class="right aligned">{{ printf "%.2f" .accuracy }}%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ui blue progress little margin top" data-percent="{{ levelPercent .level }}">
|
||||
<div class="bar">
|
||||
<div class="progress">{{ levelPercent .level }}%</div>
|
||||
</div>
|
||||
<div class="label">{{ $global.T "Level %s" (level .level) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end grid segment -->
|
||||
<div id="scores-zone">
|
||||
{{ range _range 4 }}
|
||||
<div data-mode="{{ . }}" {{ if ne . (int $favouritemode) }} hidden{{ end }} data-loaded="0">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="ui segment">
|
||||
<h2 class="ui header">{{ $global.T "Achievements" }}</h2>
|
||||
<div id="achievements" class="ui grid">
|
||||
</div>
|
||||
<div class="right aligned">
|
||||
<button class="ui disabled button" id="load-more-achievements">
|
||||
{{ $global.T "Load more" }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="content">
|
||||
<table class="ui definition table" id="score-data-table">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
280
templates/profile_relax.html
Normal file
280
templates/profile_relax.html
Normal file
@@ -0,0 +1,280 @@
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
{{ if .UserID }}
|
||||
{{ $gqm := atoi (.Gin.Query "mode") }}
|
||||
{{ $global := . }}
|
||||
{{ with (.Get "users/rx/full?id=%d" .UserID) }}
|
||||
{{ $favouritemode := _or $gqm .favourite_mode }}
|
||||
<script>
|
||||
window.favouriteMode = {{ $favouritemode }};
|
||||
window.userID = {{ .id }};
|
||||
</script>
|
||||
{{ if after .silence_info.end }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>silenced</b> for %s, expires %s." (.silence_info.reason | htmlescaper) (time .silence_info.end) | html }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $sarah := has .id 1193 }}
|
||||
{{ $alicia := has .id 1000 }}
|
||||
{{ $catherine := has .id 999 }}
|
||||
|
||||
{{ $super := has .privileges 7340031 }}
|
||||
{{ $dev := has .privileges 11534335 }}
|
||||
{{ $donor := has .privileges 7 }}
|
||||
{{ $admin := has .privileges 3049983 }}
|
||||
{{ $chatmod := has .privileges 786763 }}
|
||||
{{ $bn := has .privileges 267 }}
|
||||
|
||||
{{ if hasAdmin $global.Context.User.Privileges }}
|
||||
{{ $restr := not (has .privileges 1) }}
|
||||
{{ $disab := not (has .privileges 2) }}
|
||||
{{ $pend := has .privileges 1048576 }}
|
||||
{{ if and $disab $restr }}
|
||||
{{ if $pend }}
|
||||
<div class="ui warning centered message">{{ $global.T "User is <b>%s</b>" "pending verification" | html }}.</div>
|
||||
{{ else }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "banned" | html }}.</div>
|
||||
{{ end }}
|
||||
{{ else if $restr }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "restricted" | html }}.</div>
|
||||
{{ else if $disab }}
|
||||
<div class="ui error centered message">{{ $global.T "User is <b>%s</b>" "locked" | html }}.</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $global.Get "users/userpage?id=%.0f" .id }}
|
||||
{{ if .userpage }}
|
||||
{{ with parseUserpage .userpage }}
|
||||
<div class="ui raised segment twemoji" id="userpage-content">
|
||||
{{ html . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="ui top attached segment overflow auto">
|
||||
<div class="magic table">
|
||||
<div class="table element">
|
||||
{{ if eq $global.UserID $global.Context.User.ID }}
|
||||
<a href="/settings/avatar">
|
||||
{{ end }}
|
||||
<img src="{{ config "AvatarURL" }}/{{ .id }}" alt="avatar" class="user avatar">
|
||||
{{ if eq $global.UserID $global.Context.User.ID }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="table element">
|
||||
<h1 class="ui header">
|
||||
{{ $user := . }}
|
||||
{{ if $super }}
|
||||
<div class="owner">
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{else if $donor}}
|
||||
<div class="dev">
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ if $user.clan.tag}}
|
||||
<td class="right aligned"><a href="/c/{{ $user.clan.id }}?mode=0">[{{ $user.clan.tag }}]</a></td>
|
||||
{{ end }}
|
||||
{{ .username }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ if .username_aka }}
|
||||
<div class="subtitle">
|
||||
{{ $global.T "(aka <b>%s</b>)" (.username_aka | htmlescaper) | html }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with bget "isOnline?id=%.0f" .id }}
|
||||
<div class="subtitle">
|
||||
<i class="{{ if .result }}green{{ else }}grey{{ end }} circle icon"></i>
|
||||
{{ if .result }}{{ $global.T "Online" }}{{ else }}{{ $global.T "Offline" }}{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="magic table floating right">
|
||||
<div class="table element">
|
||||
{{ range $k, $v := (slice .std .taiko .ctb .mania) }}
|
||||
<h1 data-mode="{{ $k }}"{{ if ne $k (int $favouritemode) }} hidden{{ end }}>{{ with and $v $v.global_leaderboard_rank }}#{{ . }}{{ else }}{{ $global.T "Unknown" }}{{ end }}</h1>
|
||||
{{ end }}
|
||||
<div id="profile-actions">
|
||||
{{ if and (ne $global.Context.User.ID $global.UserID) (ne $global.Context.User.ID 0) }}
|
||||
<button class="ui circular mini icon loading button" id="add-friend-button">
|
||||
<i class="horizontal ellipsis icon"></i>
|
||||
</button>
|
||||
{{ end }}
|
||||
{{ if eq $global.Context.User.ID $global.UserID }}
|
||||
<a href="/settings" class="ui circular mini teal icon button"
|
||||
title="{{ $global.T "Settings" }}">
|
||||
<i class="edit icon"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if hasAdmin $global.Context.User.Privileges }}
|
||||
<a href="https://old.yozora.pw/index.php?p=103&id={{ $global.UserID }}"
|
||||
target="_blank" title="Quick edit" class="ui circular mini blue icon button">
|
||||
<i class="folder open outline icon"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $user := . }}
|
||||
<div class="ui three item bottom attached menu" id="rx-menu">
|
||||
<a class="0 item" data-rx="0" href="/u/{{ $user.id }}">Vanilla</a>
|
||||
<a class="1 item" data-rx="1" href="/rx/u/{{ $user.id }}">Relax</a>
|
||||
<a class="1 item" data-rx="2" href="/ap/u/{{ $user.id }}">AutoPilot</a>
|
||||
</div>
|
||||
<div class="ui four item bottom attached menu" id="mode-menu">
|
||||
{{ range $k, $v := modes }}
|
||||
<a class="{{ favMode $favouritemode $k }}item" data-mode="{{ $k }}" href="/u/{{ $user.id }}?mode={{ $k }}">{{ $v }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
<div class="ui three column divided stackable grid">
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
{{if $super }}
|
||||
{{ $global.T "<b >%s</b> " .username | html }}
|
||||
is an <i class="pink code small icon"></i><b>Owner</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $dev}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="blue code small icon"></i><b>Developer</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $admin}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is an <i class="red lightning small icon"></i><b>Administrator</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $chatmod}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="blue star small icon"></i><b>Chat Mod</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $bn}}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="orange universal access small icon"></i><b>Nominator</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{else if $donor }}
|
||||
{{ $global.T "<b>%s</b> " .username | html }}
|
||||
is a <i class="pink heart small icon"></i><b>Supporter</b>
|
||||
{{ $global.T " from <b>%s</b>." (country .country true) | html }}
|
||||
{{ else }}
|
||||
{{ $global.T "<b>%s</b> is a player from <b>%s</b>." .username (country .country true) | html }}
|
||||
{{ end }}
|
||||
|
||||
<br>{{ $global.T "They signed up on Yozora %s." (time $user.registered_on) | html }}
|
||||
<br>{{ $global.T "Last seen: %s." (time $user.latest_activity) | html }}
|
||||
<br>{{ with playstyle .play_style $global }}{{ $global.T "They play with %s." . }}{{ end }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ if and (not .badges) (not .custom_badge) }}
|
||||
{{ $global.T "This user hasn't got any badges!" }}
|
||||
{{ else }}
|
||||
<div class="ui grid">
|
||||
{{ range .badges }}
|
||||
<div class="eight wide centered column">
|
||||
<i class="circular {{ faIcon .icon }} big icon"></i><br>
|
||||
<b>{{ .name }}</b>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .custom_badge }}
|
||||
<div class="eight wide centered column">
|
||||
<i class="circular {{ faIcon .icon }} big icon"></i><br>
|
||||
<b><i>{{ .name }}</i></b>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="column">
|
||||
{{ range $k, $v := (slice .std .taiko .ctb .mania) }}
|
||||
<div data-mode="{{ $k }}" {{ if ne $k (int $favouritemode) }} hidden{{ end }}>
|
||||
<table class="ui very basic two column compact table nopad">
|
||||
<tbody>
|
||||
{{ with .global_leaderboard_rank }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Global rank" }}</b></td>
|
||||
<td class="right aligned">#{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ with .country_leaderboard_rank }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Country rank" }} {{ country $user.country false }}</b></td>
|
||||
<td class="right aligned">#{{ . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td><b>{{ $global.T "PP" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .pp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Ranked score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .ranked_score }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total score" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .total_score }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Playcount" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .playcount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Replays watched" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .replays_watched }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ $global.T "Total hits" }}</b></td>
|
||||
<td class="right aligned">{{ humanize .total_hits }}</td>
|
||||
</tr> <tr>
|
||||
<td><b>{{ $global.T "Accuracy" }}</b></td>
|
||||
<td class="right aligned">{{ printf "%.2f" .accuracy }}%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ui blue progress little margin top" data-percent="{{ levelPercent .level }}">
|
||||
<div class="bar">
|
||||
<div class="progress">{{ levelPercent .level }}%</div>
|
||||
</div>
|
||||
<div class="label">{{ $global.T "Level %s" (level .level) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end grid segment -->
|
||||
<div id="scores-zone">
|
||||
{{ range _range 4 }}
|
||||
<div data-mode="{{ . }}" {{ if ne . (int $favouritemode) }} hidden{{ end }} data-loaded="0">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="ui segment">
|
||||
<h2 class="ui header">{{ $global.T "Achievements" }}</h2>
|
||||
<div id="achievements" class="ui grid">
|
||||
</div>
|
||||
<div class="right aligned">
|
||||
<button class="ui disabled button" id="load-more-achievements">
|
||||
{{ $global.T "Load more" }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="content">
|
||||
<table class="ui definition table" id="score-data-table">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
@@ -2,52 +2,60 @@
|
||||
<div class="ui container">
|
||||
{{ $regEnabled := qb "SELECT value_int FROM system_settings WHERE name = 'registrations_enabled'" }}
|
||||
{{ if .Context.User.ID }}
|
||||
<div class="ui segment">
|
||||
{{ .T "You're already logged in!" }}
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
{{ .T "You're already logged in!" }}
|
||||
</div>
|
||||
{{ else if not ($regEnabled.value_int.Bool) }}
|
||||
<div class="ui error message">
|
||||
{{ .T "Sorry, it's not possible to register at the moment. Please try again later." }}
|
||||
</div>
|
||||
<div class="ui error message">
|
||||
{{ .T "Sorry, it's not possible to register at the moment. Please try again later." }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ if eq (.Gin.Query "stopsign") "1" }}
|
||||
<div class="ui warning message">
|
||||
{{ .T "Remember: this seems like it's your second account! Do not multiaccount, or you're likely to get restricted!" }}
|
||||
{{ if eq (.Gin.Query "stopsign") "1" }}
|
||||
<div class="ui warning message">
|
||||
{{ .T "Remember: this seems like it's your second account! Do not multiaccount, or you're likely to get restricted!" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="ui info message">
|
||||
<center> Don't have a code? Apply <a href="https://docs.google.com/forms/d/1oYO8Cky0piTsfhMDxnQOZnNOo4K4tT3itZ5CdLY-w2k">here!</a></center>
|
||||
</div>
|
||||
<div class="tiny container">
|
||||
<div class="ui raised segments">
|
||||
<div class="ui segment">
|
||||
<form id="register-form" class="ui form" method="post" action="/register">
|
||||
<div class="field">
|
||||
<label>{{ .T "Username (2 to 15 characters, alphanumeric, spaces, <code>_[]-</code>)" | html }}</label>
|
||||
<input tabindex="1" type="text" name="username" placeholder="{{ .T "Username" }}"
|
||||
value="{{ .FormData.username }}" required pattern="^[A-Za-z0-9 _\[\]-]{2,15}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Password (at least 8 characters)" }}</label>
|
||||
<input tabindex="2" type="password" name="password" placeholder="{{ .T "Password" }}"
|
||||
value="{{ .FormData.password }}" required pattern="^.{8,}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Email" }}</label>
|
||||
<input tabindex="3" type="email" name="email" placeholder="{{ .T "Email" }}"
|
||||
value="{{ .FormData.email }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Registration Key" }}</label>
|
||||
<input tabindex="3" type="text" name="key" placeholder="{{ .T "Key" }}"
|
||||
value="{{ .FormData.key }}" required>
|
||||
</div>
|
||||
{{ with config "RecaptchaSite" }}
|
||||
<div class="field">
|
||||
<div class="g-recaptcha" data-sitekey="{{ . }}"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="tiny container">
|
||||
<div class="ui raised segments">
|
||||
<div class="ui segment">
|
||||
<form id="register-form" class="ui form" method="post" action="/register">
|
||||
<div class="field">
|
||||
<label>{{ .T "Username (2 to 15 characters, alphanumeric, spaces, <code>_[]-</code>)" | html }}</label>
|
||||
<input tabindex="1" type="text" name="username" placeholder="{{ .T "Username" }}" value="{{ .FormData.username }}" required pattern="^[A-Za-z0-9 _\[\]-]{2,15}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Password (at least 8 characters)" }}</label>
|
||||
<input tabindex="2" type="password" name="password" placeholder="{{ .T "Password" }}" value="{{ .FormData.password }}" required pattern="^.{8,}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Email" }}</label>
|
||||
<input tabindex="3" type="email" name="email" placeholder="{{ .T "Email" }}" value="{{ .FormData.email }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Registration Key" }}</label>
|
||||
<input tabindex="3" type="text" name="key" placeholder="{{ .T "Key" }}" value="{{ .FormData.key }}" required>
|
||||
</div>
|
||||
{{ with config "RecaptchaSite" }}
|
||||
<div class="field">
|
||||
<div class="g-recaptcha" data-sitekey="{{ . }}"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui right aligned segment">
|
||||
<button tabindex="4" class="ui primary button" type="submit" form="register-form">{{ .T "Submit" }}</button>
|
||||
</div>
|
||||
<div class="ui right aligned segment">
|
||||
<button tabindex="4" class="ui primary button" type="submit"
|
||||
form="register-form">{{ .T "Submit" }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
86
templates/settings/clansettings.html
Normal file
86
templates/settings/clansettings.html
Normal file
@@ -0,0 +1,86 @@
|
||||
{{/*###
|
||||
Handler=/settings/clansettings
|
||||
TitleBar=Clan Settings
|
||||
Include=menu.html
|
||||
*/}}
|
||||
{{ define "tpl" }}
|
||||
<div class="ui container">
|
||||
<div class="ui stackable grid">
|
||||
{{ template "settingsSidebar" . }}
|
||||
<div class="twelve wide column">
|
||||
<div class="ui segment">
|
||||
{{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }}
|
||||
{{ $g := or $d.clan.Int -1 }}
|
||||
{{ if $d }}
|
||||
<font size="6">Clan Settings</font>
|
||||
<br>
|
||||
<br>
|
||||
<div class="ui center aligned segment">
|
||||
{{ $o := (.Get "clans/isclan?uid=%d" .Context.User.ID).clan.clan }}
|
||||
{{ $c := qb "SELECT * FROM clans WHERE id = ? LIMIT 1" $o }}
|
||||
{{ $tag := or $c.tag.String "" }}
|
||||
{{ $desc := or $c.description.String "" }}
|
||||
{{ $icon := or $c.icon.String "" }}
|
||||
{{ $bg := or $c.background.String "" }}
|
||||
<form id="register-form" class="ui form" method="post" action="/settings/clansettings">
|
||||
<div class="field">
|
||||
<label class="left aligned">{{ "Clantag (2 to 6 characters)" }}</label>
|
||||
<input tabindex="1" type="text" name="tag" placeholder="{{ "Clantag" }}" value="{{ $tag }}" pattern="{2,6}$">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="left aligned">{{ "Description (optional)" }}</label>
|
||||
<input tabindex="2" type="text" name="password" placeholder="{{ "Description" }}" value="{{ $desc }}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="left aligned">{{ "Icon [URL] (optional)" }}</label>
|
||||
<input tabindex="3" type="url" name="email" placeholder="{{ "Icon URL" }}" value="{{ $icon }}">
|
||||
</div>
|
||||
{{ if has .Context.User.Privileges 8388612 }}
|
||||
<div class="field">
|
||||
<label class="left aligned">{{ "Background [URL] (optional)" }}</label>
|
||||
<input tabindex="4" type="url" name="bg" placeholder="{{ "Background URL" }}" value="{{ $bg }}">
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{ ieForm .Gin }}
|
||||
</form>
|
||||
|
||||
<br>
|
||||
<button tabindex="5" class="ui primary button" type="submit" form="register-form">{{ .T "Save" }}</button>
|
||||
</div>
|
||||
<br>
|
||||
<font size="6">Invite</font>
|
||||
<br>
|
||||
<br><center><div class="ui two item menu" id="join-menu">
|
||||
{{ with .Get "clans/getinvite?id=%d" .Context.User.ID }}
|
||||
<input class="item" type="text" value="https://yozora.pw/clans/invite/{{ .invite }}" href="https://yozora.pw/clans/invite/{{ .invite }}" style="background-color:rgba(0,0,0,.6)" disabled></input>
|
||||
{{ end }}
|
||||
</div>
|
||||
<br><form action="/settings/clansettings" method="POST">
|
||||
{{ ieForm .Gin }}
|
||||
<button type="submit" class="ui right green button">
|
||||
{{ .T "Generate a new invite!" }}
|
||||
</button>
|
||||
</form>
|
||||
<br>
|
||||
<font size="6">Members {{ $g }}</font>
|
||||
<br>
|
||||
{{ range (.Get "clans/members?id=%d&r=%d" $g 1).members }}
|
||||
<form id="kick-form" class="ui form" method="post" action="/settings/clansettings/k">
|
||||
<div class="column">
|
||||
<div class="ui left aligned fluid card">
|
||||
<div class="content">
|
||||
<a href="/u/{{ .id }}"><a class="header" href="/u/{{ .id }}">{{ country .country false }}{{ .username }}</a> <button name="member" value="{{ .id }}" class="ui right green button" style="float:right; display:block; margin-right:0px; clear:left; width: 40%;"> Kick </button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<font size="3">You haven't joined a clan yet, or you aren't the owner of your current one.</font>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@@ -15,6 +15,8 @@ NoCompile=true
|
||||
{{ navbarItem .Path (.T "Two Factor Authentication") "/settings/2fa" }}
|
||||
|
||||
{{ navbarItem .Path (.T "Authorized applications") "/settings/authorized_applications" }}
|
||||
|
||||
{{ navbarItem .Path (.T "Clan Settings") "/settings/clansettings" }}
|
||||
|
||||
{{/* Stuff for donators */}}
|
||||
{{ if has .Context.User.Privileges 4 }}
|
||||
|
@@ -64,6 +64,9 @@ KyutGrill=team2.jpg
|
||||
{{ .T "<b>jrosdahl</b>, for <a href='https://github.com/jrosdahl/miniircd'>miniircd</a>, used as a base for our IRC server." | html }}<br>
|
||||
miniircd is licensed under GPL v2. Our implementation can be found <a href="https://zxq.co/ripple/pep.py/src/master/irc/ircserver.py">here</a>.
|
||||
</li>
|
||||
<li>
|
||||
{{ .T "<b>Kotrik</b>, for helping out with some features." | html }}.
|
||||
</li>
|
||||
<li>{{ .T "<b>Jacksonisiah</b>, for designing the Yozora logo." | html }}</li>
|
||||
<li>{{ .T "<b><a id='everyone' class='clickable'>Everyone</a></b> who has supported the Yozora project by donating or inviting other people." | html }}</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user