-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase.html
More file actions
70 lines (62 loc) · 2.07 KB
/
base.html
File metadata and controls
70 lines (62 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends "base.html" %}
{% load static %}
{% block title %}
{% block sub_title %}
{% endblock sub_title %}
- ActivityPub on Democrasite
{% endblock title %}
{% block nav_user_pages %}
<li class="nav-item">
{% url 'social:note-list' as url_notes %}
<a href="{{ url_notes }}"
class="nav-link
{% if request.path == url_notes %}active{% endif %}">Notes</a>
</li>
{% if user.person %}
<li class="nav-item">
{% url 'social:following-notes' as url_following %}
<a href="{{ url_following }}"
class="nav-link
{% if request.path == url_following %}active{% endif %}">Following</a>
</li>
<li class="nav-item">
{% url 'social:person-detail' username=user.username as url_profile %}
<a href="{{ url_profile }}"
class="nav-link
{% if request.path == url_profile %}active{% endif %}">Profile</a>
</li>
{% else %}
<form class="form-inline"
action="{% url 'social:person-create' %}"
method="post">
{% csrf_token %}
<button class="btn btn-link nav-link" type="submit">Create Profile</button>
</form>
{% endif %}
{# Add profile links #}
{% endblock nav_user_pages %}
{% block content %}
{% block social_content %}
{% endblock social_content %}
{% if user.is_authenticated %}
<div class="note-create text-center mb-3">
{% if user.person %}
<a href="{% url 'social:note-create' %}"
class="btn btn-dark rounded-pill">Create Note</a>
{% else %}
<form action="{% url 'social:person-create' %}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-dark rounded-pill">Create Profile</button>
</form>
{% endif %}
</div>
{% endif %}
{% endblock content %}
{% block extra_css %}
<link href="{% static 'css/social.css' %}" rel="stylesheet" />
{% endblock extra_css %}
{% if user.person %}
{% block inline_javascript %}
<script type="text/javascript" src="{% static 'js/note_interact.js' %}"></script>
{% endblock inline_javascript %}
{% endif %}