Adds profile and user get started views

This commit is contained in:
Mouse Reeve
2021-03-31 14:53:00 -07:00
parent 59c54e0591
commit 13e153412e
9 changed files with 165 additions and 36 deletions

View File

@ -4,7 +4,7 @@
{% block panel %}
<div class="block">
<h2 class="title is-4">{% trans "What are you reading?" %}</h2>
<form class="field has-addons" method="get" action="{% url 'get-started' %}">
<form class="field has-addons" method="get" action="{% url 'get-started-books' %}">
<div class="control">
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search for a book' %}" aria-lable="{% trans 'Search for a book' %}">
{% if request.GET.query and not book_results %}

View File

@ -19,10 +19,12 @@
</section>
<footer class="modal-card-foot is-flex is-justify-content-flex-end">
<a href="{{ next }}" class="button">
{% if next %}
<a href="{% url next %}" class="button">
<span>{% trans "Skip this step" %}</span>
<span class="icon icon-arrow-right" aria-hidden="true"></span>
</a>
{% endif %}
</footer>
</div>
<a href="/" class="modal-close is-large" aria-label="close"></a>

View File

@ -0,0 +1,58 @@
{% extends 'get_started/layout.html' %}
{% load i18n %}
{% block panel %}
<div class="block">
<h2 class="title is-4">{% trans "A little bit about you" %}</h2>
{% if form.non_field_errors %}
<p class="notification is-danger">{{ form.non_field_errors }}</p>
{% endif %}
<form name="edit-profile" action="{% url 'get-started-profile' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="columns">
<div class="column is-two-thirds">
<div class="block">
<label class="label" for="id_name">{% trans "Display name:" %}</label>
<input type="text" name="name" maxlength="100" class="input" id="id_name" placeholder="{{ user.localname }}" value="{% if request.user.name %}{{ request.user.name }}{% endif %}">
{% for error in form.name.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
<div class="block">
<label class="label" for="id_summary">{% trans "Summary:" %}</label>
<textarea name="summary" cols="None" rows="None" class="textarea" id="id_summary" placeholder="{% trans 'A little bit about you' %}" value="{{ request.user.summary }}"></textarea>
{% for error in form.summary.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
</div>
<div class="column is-one-third">
<div class="block">
<label class="label" for="id_avatar">{% trans "Avatar:" %}</label>
{{ form.avatar }}
{% for error in form.avatar.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
</div>
</div>
</div>
<div class="block">
<label class="checkbox label" for="id_manually_approves_followers">
{% trans "Manually approve followers:" %}
{{ form.manually_approves_followers }}
</label>
</div>
<div class="block">
<label class="checkbox label" for="id_discoverable">
{% trans "Show this account in suggested users:" %}
<input type="checkbox" name="discoverable" class="checkbox" id="id_discoverable" checked>
</label>
{% url 'directory' as path %}
<p class="help">{% trans "Your account will show up in the directory, and may be recommended to other BookWyrm users." %}</p>
</div>
<div class="block"><button class="button is-primary" type="submit">{% trans "Save" %}</button></div>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends 'get_started/layout.html' %}
{% load i18n %}
{% block panel %}
<div class="block">
<h2 class="title is-4">{% trans "Who to follow" %}</h2>
{% include 'feed/suggested_users.html' with suggested_users=suggested_users %}
</div>
{% endblock %}