hanayo/templates/homepage.html

61 lines
2.5 KiB
HTML
Raw Normal View History

2019-02-23 13:29:15 +00:00
{{/*###
Handler=/
TitleBar=Home Page
KyutGrill=homepage2.jpg
*/}}
{{ define "tpl" }}
{{ $cf := .ClientFlags }}
{{ $ds := band $cf 1 }}
{{ $ := . }}
<div class="ui container">
<div class="ui center aligned segment">
2019-02-23 17:23:22 +00:00
<img src="/static/logos/circle.png">
2019-02-23 13:29:15 +00:00
</div>
{{ $set := systemSettings "website_home_alert" }}
{{ with $set.website_home_alert.String }}
<div class="ui warning message">
{{ . | html }}
</div>
{{ end }}
{{/* Not logged in block */}}
{{ if not .Context.User.ID }}
<div class="ui segment">
2019-02-23 17:23:22 +00:00
<h1 class="ui header">{{ .T "Welcome to Yozora." }}</h1>
2019-02-23 13:29:15 +00:00
<p>
2019-02-23 17:23:22 +00:00
{{ .T "You look new here. Allow us to introduce you to what Yozora is." }}
2019-02-23 13:29:15 +00:00
</p>
<p>
2019-02-23 17:23:22 +00:00
{{ .T "Yozora is a private osu! server, featuring multiplayer, PP for relax, autopilot and regular osu!, leaderboards for every (submitted) map, a very active community and a development team going strong implementing new features and squashing bugs. <a href='/about'>You can check out even more features here.</a> It has also a very friendly community, and it's <a href='https://github.com/osuYozora'>open source!</a> Just so you know, <b>we currently have %s users online and %s registered users!</b>" (rediget "ripple:online_users") (rediget "ripple:registered_users") | html }}
2019-02-23 13:29:15 +00:00
</p>
2019-02-23 17:23:22 +00:00
<h3 class="ui header center aligned">{{ .T "What are you waiting for? Join Yozora! It's risk-free: you won't get your account banned on the official server if you play on Yozora.<br>You can also switch anytime between the official osu! server and Yozora!" | html }}</h3>
2019-02-23 13:29:15 +00:00
</div>
{{ else }}
<div class="ui segment">
<h1 class="ui header">{{ .T "Howdy, %s!" .Context.User.Username }}</h1>
<p>
2019-02-23 17:23:22 +00:00
{{ .T "Welcome back to Yozora. We currently have <b>%s online users and %s total registered users.</b> Nice day to farm PP, isn't it?" (rediget "ripple:online_users") (rediget "ripple:registered_users") | html }}
2019-02-23 13:29:15 +00:00
</p>
</div>
2019-02-24 16:52:26 +00:00
{ with (.Get "blog/posts?l=5") }}
<div class="ui raised segment">
<h1 class="ui center aligned header">
{{ $.T "Latest news from our <a href='https://medium.com/@yozora'>blog</a>" | html }}
</h1>
</div>
<div class="ui segments">
{{ range $i, $v := .posts }}
<div class="ui segment">
<h1 class="ui header no top margin">
<a href="https://medium.com/@yozora/{{ $v.unique_slug }}" class="inherit">{{ html $v.title }}</a>
<div class="sub header"><a href="https://medium.com/@yozora">Yozora</a>, {{ time $v.created_at }}</div>
</h1>
<p>
{{ $v.snippet }}
</p>
</div>
{{ end }}
</div>
{{ end }}
2019-02-23 13:29:15 +00:00
</div>
{{ end }}