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

@ -37,4 +37,5 @@
<glyph unicode="&#xe9d8;" glyph-name="star-half" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538zM512 206.502l-0.942-0.496 0.942 570.768 111.736-226.396 249.836-36.304-180.788-176.222 42.678-248.83-223.462 117.48z" />
<glyph unicode="&#xe9d9;" glyph-name="star-full" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
<glyph unicode="&#xe9da;" glyph-name="heart" d="M755.188 896c-107.63 0-200.258-87.554-243.164-179-42.938 91.444-135.578 179-243.216 179-148.382 0-268.808-120.44-268.808-268.832 0-301.846 304.5-380.994 512.022-679.418 196.154 296.576 511.978 387.206 511.978 679.418 0 148.392-120.43 268.832-268.812 268.832z" />
<glyph unicode="&#xea0a;" glyph-name="plus" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?jhaogg');
src: url('fonts/icomoon.eot?jhaogg#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?jhaogg') format('truetype'),
url('fonts/icomoon.woff?jhaogg') format('woff'),
url('fonts/icomoon.svg?jhaogg#icomoon') format('svg');
src: url('fonts/icomoon.eot?rd4abb');
src: url('fonts/icomoon.eot?rd4abb#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?rd4abb') format('truetype'),
url('fonts/icomoon.woff?rd4abb') format('woff'),
url('fonts/icomoon.svg?rd4abb#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
@ -115,3 +115,6 @@
.icon-heart:before {
content: "\e9da";
}
.icon-plus:before {
content: "\ea0a";
}

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 %}