Improve claim page

This commit is contained in:
rubenwardy 2018-12-22 13:14:08 +00:00
parent f6384e2e15
commit d61f77a805
11 changed files with 124 additions and 90 deletions

@ -1,7 +1,7 @@
title: WTFPL is a terrible license title: WTFPL is a terrible license
no_h1: true no_h1: true
<div id="warning" class="box box_grey alert alert-warning"> <div id="warning" class="alert alert-warning">
<span class="icon_message"></span> <span class="icon_message"></span>
Please reconsider the choice of WTFPL as a license. Please reconsider the choice of WTFPL as a license.

@ -1,6 +1,6 @@
title: Package Inclusion Policy and Guidance title: Package Inclusion Policy and Guidance
<div class="box box_grey alert alert-warning"> <div class="alert alert-warning">
<b>Note:</b> This is a draft <b>Note:</b> This is a draft
</div> </div>

@ -15,6 +15,22 @@
max-height: 1em; max-height: 1em;
} }
#alerts {
display: block;
list-style: none;
position: fixed;
bottom: 0;
left:0;
right:0;
margin: 0;
padding:0;
z-index: 1000;
}
#alerts li {
list-style: none;
}
.jumbotron { .jumbotron {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;

@ -12,10 +12,10 @@
<li><a href="{{ url_for('switch_user_page') }}">Sign in as another user</a></li> <li><a href="{{ url_for('switch_user_page') }}">Sign in as another user</a></li>
</ul> </ul>
<div class="box box_grey"> <div class="card my-4">
<h2>Do action</h2> <h2 class="card-header">Do action</h2>
<form method="post" action="" class="box-body"> <form method="post" action="" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<select name="action"> <select name="action">
<option value="importmodlist" selected>Import forum topics</option> <option value="importmodlist" selected>Import forum topics</option>
@ -29,10 +29,10 @@
</form> </form>
</div> </div>
<div class="box box_grey"> <div class="card my-4">
<h2>Restore Package</h2> <h2 class="card-header">Restore Package</h2>
<form method="post" action="" class="box-body"> <form method="post" action="" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden" name="action" value="restore" /> <input type="hidden" name="action" value="restore" />
<select name="package"> <select name="package">

@ -95,7 +95,7 @@
{% if messages %} {% if messages %}
<ul id="alerts"> <ul id="alerts">
{% for category, message in messages %} {% for category, message in messages %}
<li class="box box_grey alert alert-{{category}}"> <li class="alert alert-{{category}} container">
<span class="icon_message"></span> <span class="icon_message"></span>
{{ message|safe }} {{ message|safe }}

@ -5,76 +5,76 @@ Sign in
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="sidebar_container"> <div class="row">
<div class="left box box_grey"> <div class="col-sm-8">
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %} <div class="card">
<h2>{%trans%}Sign in{%endtrans%}</h2> {% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
<h2 class="card-header">{%trans%}Sign in{%endtrans%}</h2>
<form action="" method="POST" class="form box-body" role="form"> <form action="" method="POST" class="form card-body" role="form">
<h3>Sign in with username/password</h3> {{ form.hidden_tag() }}
{{ form.hidden_tag() }}
{# Username or Email field #} {# Username or Email field #}
{% set field = form.username if user_manager.enable_username else form.email %} {% set field = form.username if user_manager.enable_username else form.email %}
<div class="form-group {% if field.errors %}has-error{% endif %}"> <div class="form-group {% if field.errors %}has-error{% endif %}">
{# Label on left, "New here? Register." on right #} {# Label on left, "New here? Register." on right #}
<div class="row"> <label for="{{ field.id }}" class="control-label">{{ field.label.text }}</label>
<div class="col-xs-6"> {{ field(class_='form-control', tabindex=110) }}
<label for="{{ field.id }}" class="control-label">{{ field.label.text }}</label> {% if field.errors %}
</div> {% for e in field.errors %}
<p class="help-block">{{ e }}</p>
{% endfor %}
{% endif %}
</div> </div>
{{ field(class_='form-control', tabindex=110) }}
{% if field.errors %}
{% for e in field.errors %}
<p class="help-block">{{ e }}</p>
{% endfor %}
{% endif %}
</div>
{# Password field #} {# Password field #}
{% set field = form.password %} {% set field = form.password %}
<div class="form-group {% if field.errors %}has-error{% endif %}"> <div class="form-group {% if field.errors %}has-error{% endif %}">
<div class="row">
<label for="{{ field.id }}" class="control-label">{{ field.label.text }} <label for="{{ field.id }}" class="control-label">{{ field.label.text }}
{% if user_manager.enable_forgot_password %} {% if user_manager.enable_forgot_password %}
<a href="{{ url_for('user.forgot_password') }}" tabindex='195'> <a href="{{ url_for('user.forgot_password') }}" tabindex='195'>
[{%trans%}Forgot My Password{%endtrans%}]</a> [{%trans%}Forgot My Password{%endtrans%}]</a>
{% endif %} {% endif %}
</label> </label>
{{ field(class_='form-control', tabindex=120) }}
{% if field.errors %}
{% for e in field.errors %}
<p class="help-block">{{ e }}</p>
{% endfor %}
{% endif %}
</div> </div>
{{ field(class_='form-control', tabindex=120) }}
{% if field.errors %} {# Remember me #}
{% for e in field.errors %} {% if user_manager.enable_remember_me %}
<p class="help-block">{{ e }}</p> {{ render_checkbox_field(login_form.remember_me, tabindex=130) }}
{% endfor %}
{% endif %} {% endif %}
{# Submit button #}
<p>
{{ render_submit_field(form.submit, tabindex=180) }}
</p>
</form>
</div>
<div class="card mt-4">
{% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
<h2 class="card-header">{%trans%}Sign in with Github{%endtrans%}</h2>
<div class="card-body">
<a class="btn btn-primary" href="{{ url_for('github_signin_page') }}">GitHub</a>
</div> </div>
</div>
{# Remember me #}
{% if user_manager.enable_remember_me %}
{{ render_checkbox_field(login_form.remember_me, tabindex=130) }}
{% endif %}
{# Submit button #}
<p>
{{ render_submit_field(form.submit, tabindex=180) }}
</p>
<h3>Sign in with Github</h3>
<p><a class="btn" href="{{ url_for('github_signin_page') }}">GitHub</a></p>
</form>
</div> </div>
<div class="right"> <aside class="col-sm-4">
<aside class="box box_grey"> <div class="card">
<h2>New here?</h2> {% from "flask_user/_macros.html" import render_field, render_checkbox_field, render_submit_field %}
<h2 class="card-header">{%trans%}New here?{%endtrans%}</h2>
<div class="box-body"> <div class="card-body">
<p>Create an account using your forum account or email.</p> <p>Create an account using your forum account or email.</p>
<a href="{{ url_for('user_claim_page') }}" class="btn">{%trans%}Claim your account{%endtrans%}</a> <a href="{{ url_for('user_claim_page') }}" class="btn btn-primary">{%trans%}Claim your account{%endtrans%}</a>
</div> </div>
</aside> </div>
</div> </aside>
</div> </div>
{% endblock %} {% endblock %}

@ -2,9 +2,9 @@
{% block container %} {% block container %}
<main> <main>
<div class="box box_grey"> <div class="card">
<!-- <h2>{{ self.title() }}</h2> --> <h2 class="card-header">{{ self.title() }}</h2>
<div class="box-body"> <div class="card-body">
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>

@ -23,7 +23,7 @@
<script src="/static/polltask.js"></script> <script src="/static/polltask.js"></script>
<script src="/static/package_create.js"></script> <script src="/static/package_create.js"></script>
<noscript> <noscript>
<div class="box box_grey alert alert-warning"> <div class="alert alert-warning">
<span class="icon_message"></span> <span class="icon_message"></span>
Javascript is needed to automatically import metadata from VCS. Javascript is needed to automatically import metadata from VCS.
</div> </div>

@ -24,7 +24,7 @@
This edit request was merged. This edit request was merged.
</div> </div>
{% elif request.status == 2 %} {% elif request.status == 2 %}
<div class="box box_grey alert alert-error"> <div class="box box_grey alert alert-danger">
This edit request was rejected. This edit request was rejected.
</div> </div>
{% elif package.checkPerm(current_user, "APPROVE_CHANGES") %} {% elif package.checkPerm(current_user, "APPROVE_CHANGES") %}

@ -5,10 +5,10 @@ Creating an Account
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="box box_grey"> <div class="card">
<h2>{{ self.title() }}</h2> <h2 class="card-header">{{ self.title() }}</h2>
<div class="box-body"> <div class="card-body">
<p> <p>
If you have a forum account, you'll need to prove that you own it If you have a forum account, you'll need to prove that you own it
to get an account on ContentDB. to get an account on ContentDB.
@ -28,7 +28,7 @@ Creating an Account
out of the Minetest community. out of the Minetest community.
</p> </p>
<a href="https://forum.minetest.net/ucp.php?mode=register"> <a class="btn btn-primary" href="https://forum.minetest.net/ucp.php?mode=register">
Create a Forum Account Create a Forum Account
</a> </a>
{% endif %} {% endif %}
@ -36,18 +36,23 @@ Creating an Account
</div> </div>
{% if not current_user.is_authenticated %} {% if not current_user.is_authenticated %}
<div class="box box_grey"> <div class="row mt-4">
<h2>Option 1 - Use GitHub field in forum profile</h2> <div class="col-sm-4">
<div class="card">
<div class="card-header">
<span class="badge badge-pill badge-dark mr-2">Option 1</span>
Use GitHub field in forum profile
</div>
<form method="post" class="box-body" action="{{ url_for('user_claim_page') }}"> <form method="post" class="card-body" action="{{ url_for('user_claim_page') }}">
<input type="hidden" name="claim_type" value="github"> <input class="form-control" type="hidden" name="claim_type" value="github">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input class="form-control" type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<p> <p>
Enter your forum username here: Enter your forum username here:
</p> </p>
<input type="text" name="username" value="{{ username }}" required placeholder="Forum username"> <input class="form-control my-4" type="text" name="username" value="{{ username }}" required placeholder="Forum username">
<p> <p>
You'll need to have the GitHub field in your forum profile You'll need to have the GitHub field in your forum profile
@ -56,14 +61,19 @@ Creating an Account
do that here</a>. do that here</a>.
</p> </p>
<input type="submit" value="Next: log in with GitHub"> <input class="btn btn-primary" type="submit" value="Next: log in with GitHub">
</form> </form>
</div> </div>
</div>
<div class="box box_grey"> <div class="col-sm-4">
<h2>Option 2 - Paste verification token into signature</h2> <div class="card">
<div class="card-header">
<span class="badge badge-pill badge-dark mr-2">Option 2</span>
Verification token
</div>
<form method="post" class="box-body" action="{{ url_for('user_claim_page') }}"> <form method="post" class="card-body" action="{{ url_for('user_claim_page') }}">
<input type="hidden" name="claim_type" value="forum"> <input type="hidden" name="claim_type" value="forum">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
@ -71,7 +81,7 @@ Creating an Account
Enter your forum username here: Enter your forum username here:
</p> </p>
<input type="text" name="username" value="{{ username }}" required placeholder="Forum username"> <input class="form-control my-3" type="text" name="username" value="{{ username }}" required placeholder="Forum username">
<p> <p>
Go to Go to
@ -79,11 +89,12 @@ Creating an Account
User Control Panel > Profile > Edit signature User Control Panel > Profile > Edit signature
</a> </a>
</p> </p>
<p> <p>
Paste this into your signature: Paste this into your signature:
</p> </p>
<input type="text" value="{{ key }}" readonly size=32> <input class="form-control my-3" type="text" value="{{ key }}" readonly size=32>
<p> <p>
Click next so we can check it. Click next so we can check it.
@ -92,15 +103,20 @@ Creating an Account
Don't worry, you can remove it after this is done. Don't worry, you can remove it after this is done.
</p> </p>
<input type="submit" value="Next"> <input class="btn btn-primary" type="submit" value="Next">
</form> </form>
</div> </div>
</div>
<div class="box box_grey"> <div class="col-sm-4">
<h2>Option 3 - Email/password sign up</h2> <div class="card">
<div class="card-header">
<span class="badge badge-pill badge-dark mr-2">Option 3</span>
Email/password sign up
</div>
<div class="box-body"> <div class="card-body">
<p> <p class="alert alert-danger">
<b>Only do this if you don't have a forum account!</b> <b>Only do this if you don't have a forum account!</b>
</p> </p>
<p> <p>
@ -108,8 +124,10 @@ Creating an Account
options. options.
</p> </p>
<a class="btn" href="{{ url_for('user.register') }}">Register</a> <a class="btn btn-primary" href="{{ url_for('user.register') }}">Register</a>
</div> </div>
</div> </div>
</div>
</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

@ -7,7 +7,7 @@
{% block content %} {% block content %}
{% if optional %} {% if optional %}
<div class="box box_grey alert alert-primary"> <div class="alert alert-primary">
It is recommended that you set a password for your account. It is recommended that you set a password for your account.
<a class="alert_right button" href="{{ url_for('home_page') }}">Skip</a> <a class="alert_right button" href="{{ url_for('home_page') }}">Skip</a>