Adds ui for editing and adding shelves

This commit is contained in:
Mouse Reeve
2020-11-10 13:39:37 -08:00
parent de744483ec
commit a5a1af418c
11 changed files with 85 additions and 47 deletions

View File

@ -1,6 +1,16 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div class="block">
<h1 class="title">
{% if is_self %}Your
{% else %}
{% include 'snippets/username.html' with user=user possessive=True %}
{% endif %}
followers
</h1>
</div>
{% include 'snippets/user_header.html' with user=user %}
<div class="block">

View File

@ -1,6 +1,16 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div class="block">
<h1 class="title">
Users following
{% if is_self %}you
{% else %}
{% include 'snippets/username.html' with user=user %}
{% endif %}
</h1>
</div>
{% include 'snippets/user_header.html' with user=user %}
<div class="block">

View File

@ -1,20 +1,57 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div class="columns">
<div class="column">
<h1 class="title">
{% if is_self %}Your
{% else %}
{% include 'snippets/username.html' with user=user possessive=True %}
{% endif %}
shelves
</h1>
</div>
{% if is_self %}
<div class="column is-narrow">
<a href="/create-shelf/">
<span class="icon icon-plus">
<span class="is-sr-only">Create new shelf</span>
</span>
</a>
</div>
{% endif %}
</div>
{% include 'snippets/user_header.html' with user=user %}
<div class="block">
<div class="tabs">
<div class="tabs" aria-role="tablist">
<ul>
{% for shelf_tab in shelves %}
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}">{{ shelf_tab.name }}</a>
</li>
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}" role="tab" aria-selected="{% if shelf_tab.identifier == shelf.identifier %}true{% else %}false{% endif %}">{{ shelf_tab.name }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="columns">
<div class="column">
<h2 class="title is-3">{{ shelf.name }}</h2>
</div>
{% if is_self %}
<div class="column is-narrow">
<a href="/edit-shelf/{{ shelf.identifier }}">
<span class="icon icon-pencil">
<span class="is-sr-only">Edit shelf</span>
</span>
</a>
</div>
{% endif %}
</div>
<div class="block">
<div>
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}

View File

@ -1,19 +1,6 @@
{% load humanize %}
{% load fr_display %}
<div class="block">
<div class="level">
<h2 class="title">User Profile</h2>
{% if is_self %}
<div class="level-right">
<a href="/user-edit/" class="edit-link">edit
<span class="icon icon-pencil">
<span class="is-sr-only">Edit profile</span>
</span>
</a>
</div>
{% endif %}
</div>
<div class="columns">
<div class="column is-narrow">
<div class="media">

View File

@ -1,6 +1,21 @@
{% extends 'layout.html' %}
{% block content %}
<div class="columns">
<div class="column">
<h1 class="title">User profile</h1>
</div>
{% if is_self %}
<div class="column is-narrow">
<a href="/user-edit/">
<span class="icon icon-pencil">
<span class="is-sr-only">Edit profile</span>
</span>
</a>
</div>
{% endif %}
</div>
{% include 'snippets/user_header.html' with user=user %}
<div class="block">

View File

@ -1,25 +0,0 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
{% include 'snippets/user_header.html' with user=user %}
<div class="block">
<div class="tabs">
<ul>
{% for shelf in shelves %}
<li class="{% if true %}is-active{% endif %}">
<a href="/user/{{ user | username }}/shelves/{{ shelf.identifier }}">{{ shelf.name }}</a>
</li>
{% endfor %}
</ul>
<h2 class="title">{{ shelf.name }}</h2>
</div>
{% for shelf in shelves %}
<div class="block">
{% include 'snippets/shelf.html' with shelf=shelf ratings=ratings %}
</div>
{% endfor %}
{% endblock %}