This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/settings/account/profile.twig

141 lines
4.6 KiB
Twig
Raw Normal View History

2016-08-02 20:35:12 +00:00
{% extends 'settings/account/master.twig' %}
{% set mode = 'Profile' %}
{% block description %}
<p>These are the external account links etc. on your profile, shouldn't need any additional explanation for this one.</p>
{% endblock %}
{% set months = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
] %}
{% set fields = {
"website": {
"title": "Website",
"type": "url",
"placeholder": "The url of your site, personal blog, anything you want!",
"name": "profile_website",
"value": user.website,
},
"twitter": {
"title": "Twitter",
"type": "text",
"placeholder": "The true shitpost platform.",
"name": "profile_twitter",
"value": user.twitter,
},
"github": {
"title": "GitHub",
"type": "text",
"placeholder": "So we can find you on there too!",
"name": "profile_github",
"value": user.github,
},
"skype": {
"title": "Skype",
"type": "text",
"placeholder": "Because people still use it for some reason...",
"name": "profile_skype",
"value": user.skype,
},
"discord": {
"title": "Discord",
"type": "text",
"placeholder": "Somehow way better than Skype.",
"name": "profile_discord",
"value": user.discord,
},
"youtube": {
"title": "YouTube",
"type": "text",
"placeholder": "Share your room tours with the world!",
"name": "profile_youtube",
"value": user.youtube,
},
"steam": {
"title": "Steam",
"type": "text",
"placeholder": "Something something video games.",
"name": "profile_steam",
"value": user.steam,
},
"osu": {
"title": "osu!",
"type": "text",
"placeholder": "Click circles like a mad motherfucker!",
"name": "profile_osu",
"value": user.osu,
},
"lastfm": {
"title": "Last.fm",
"type": "text",
"placeholder": "Somehow WAYLT threads made for a good business model.",
"name": "profile_lastfm",
"value": user.lastfm,
},
} %}
{% set birthday = user.birthday|split('-') %}
{% block settingsContent %}
2016-09-19 19:21:11 +00:00
<form enctype="multipart/form-data" method="post" action="javascript:;" onsubmit="updateSettings(this, '{{ route('settings.account.profile') }}');">
2016-08-02 20:35:12 +00:00
{% for id, vars in fields %}
<div class="profile-field {{ id }}">
<div>
<h2>{{ vars.title }}</h2>
</div>
<div>
<input class="inputStyling"
{% for name, value in vars %}
{% if name != 'title' %}
{{ name }}="{{ value }}"
{% endif %}
{% endfor %}
>
</div>
</div>
{% endfor %}
<div class="profile-field birthday">
<div>
<h2>Birthday</h2>
</div>
<div style="text-align: center;">
Day: <select name="birthday_day">
2016-11-04 17:51:11 +00:00
<option value="0"{% if birthday[2] is not defined %} selected="selected"{% endif %}>--</option>
2016-08-02 20:35:12 +00:00
{% for i in 1..31 %}
2016-11-04 17:51:11 +00:00
<option{% if birthday[2]|default(-1) == i %} selected="selected"{% endif %}>{{ i }}</option>
2016-08-02 20:35:12 +00:00
{% endfor %}
</select>
Month: <select name="birthday_month">
2016-11-04 17:51:11 +00:00
<option value="0"{% if not birthday[1] is not defined %} selected="selected"{% endif %}>--</option>
2016-08-02 20:35:12 +00:00
{% for i in 1..12 %}
2016-11-04 17:51:11 +00:00
<option value="{{ i }}"{% if birthday[1]|default(-1) == i %} selected="selected"{% endif %}>{{ months[i - 1] }}</option>
2016-08-02 20:35:12 +00:00
{% endfor %}
</select>
Year: <select name="birthday_year">
2016-11-04 17:51:11 +00:00
<option value="0"{% if not birthday[0] is not defined %} selected="selected"{% endif %}>----</option>
2016-08-02 20:35:12 +00:00
{% for i in "now"|date('Y')..("now"|date('Y') - 100) %}
2016-11-04 17:51:11 +00:00
<option{% if birthday[0]|default(-1) == i %} selected="selected"{% endif %}>{{ i }}</option>
2016-08-02 20:35:12 +00:00
{% endfor %}
</select>
</div>
</div>
<div class="profile-save">
<button name="session" value="{{ session_id() }}" class="inputStyling">Save</button>
<button type="reset" class="inputStyling">Reset</button>
</div>
</form>
{% endblock %}