Start reworking user page

This commit is contained in:
Anna Sidwell 2019-03-04 23:17:12 +11:00
parent 179ff9d7d4
commit 2e4b09fecd
4 changed files with 29 additions and 20 deletions

View File

@ -28,6 +28,8 @@ h1 {
.ojuso-yellow { color: #f9db3c; }
.ojuso-blue { color: #008ad5; }
.mx-1 { margin-left: 10px; }
/*
* LAYOUT

View File

@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load avatar_tags %}
{% load static %}
{% load i18n %}
@ -10,10 +11,12 @@
<div class="row">
<div class="col-sm-12">
<h2>{{ object.username }}</h2>
{% if object.name %}
<p>{{ object.name }}</p>
<img src="{% avatar_url user %}">
{% if object.first_name and object.last_name %}
<h2>{{ object.first_name }} {{ object.last_name }} <i>({{ object.username }})</i></h2>
{% endif %}
</div>
</div>
@ -22,13 +25,11 @@
<div class="row">
<div class="col-sm-12">
<a class="btn btn-primary" href="{% url 'profile:update' %}" role="button">{% trans 'Change Name' %}</a>
<a class="btn btn-primary" href="" role="button">E-Mail</a>
<!-- Your Stuff: Custom user template urls -->
<a class="btn btn-primary" href="{% url 'profile:update' %}">{% trans 'Change Name' %}</a>
<a class="btn btn-primary mx-1" href="{% url 'avatar_change' %}">Change Avatar</a>
</div>
</div>
<!-- End Action buttons -->
{% endif %}

View File

@ -4,6 +4,10 @@
{% block title %}{{ user.username }}{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1>{{ user.username }}</h1>
<form class="form-horizontal" method="post" action="{% url 'profile:update' %}">
{% csrf_token %}
@ -14,4 +18,8 @@
</div>
</div>
</form>
</div>
</div>
</div>
{% endblock %}

View File

@ -75,10 +75,8 @@
<img src="{% avatar_url user %}" class="img-circle" width="40" height="40" style="position:relative;margin-right:5px"/><span>{{user}}</span>
</a>
<ul class="dropdown-menu dropdown-menu-right" style="padding-bottom:0px" aria-labelledby="navbarDropdown">
<li><a href="{% url 'avatar_change' %}"><i class="fa fa-cog" aria-hidden="true"></i> Change Avatar</a></li>
<li><a href="{% url 'profile:detail' %}"><i class="fa fa-cog" aria-hidden="true"></i> Profile</a></li>
<li role="separator" style="margin-bottom:0px"></li>
<li><a class="dropdown-item no-hover" style="background-color:red;color:white;padding:0.5rem 1.5rem" href="{% url 'auth_logout' %}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans 'Logout' %}</a></li>
<li><a href="{% url 'profile:detail' %}"><i class="fa fa-cog" aria-hidden="true"></i> {%trans 'Profile' %}</a></li>
<li><a href="{% url 'auth_logout' %}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans 'Logout' %}</a></li>
</ul>
</li>