Add template bits for notification badges

This commit is contained in:
Jason McBrayer 2018-09-07 21:08:56 -04:00
parent 5b88462a0e
commit 1523e3f229
4 changed files with 39 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,27 +7,30 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title> <title>
{% block title %} {% block title %}
{% if own_acct %} {% if own_acct %}
brutaldon ('{{ own_acct.username }}') brutaldon ('{{ own_acct.username }}')
{% else %} {% else %}
brutaldon brutaldon
{% endif %} {% endif %}
{% endblock %}</title> {% endblock %}</title>
<link rel="manifest" href="{% static 'manifest.webmanifest' %}"> <link rel="manifest" href="{% static 'manifest.webmanifest' %}">
{% if not preferences %} {% if not preferences %}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'css/bulma.min.css' %}"> href="{% static 'css/bulma.min.css' %}">
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}"> href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet" href="{% static "css/brutaldon.css" %}"> <link rel="stylesheet" href="{% static "css/brutaldon.css" %}">
{% else %} {% else %}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static preferences.theme.main_css %}"> href="{% static preferences.theme.main_css %}">
<link rel="stylesheet" href="{% static preferences.theme.tweaks_css %}"> <link rel="stylesheet" href="{% static preferences.theme.tweaks_css %}">
{% if not preferences.theme.is_brutalist %} {% if not preferences.theme.is_brutalist %}
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}"> href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
href="{% static 'css/photobox.css' %}"> href="{% static 'css/photobox.css' %}">
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script> <script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script>
@ -97,7 +100,16 @@
ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');" ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');"
ic-indicator="#page-load-indicator"> ic-indicator="#page-load-indicator">
<span class="fa fa-bell-o"></span> <span class="fa fa-bell-o"></span>
<span >&nbsp; Notifications</span> {% if notifications and not preferences.theme.is_brutalist %}
<span class="badge"
data-badge="{{ notifications }}">
&nbsp; Notifications
</span>
{% elif notifications %}
<span >&nbsp; Notifications ({{ notifications }})</span>
{% else %}
<span >&nbsp; Notifications</span>
{% endif %}
</a> </a>
<a class="navbar-item" href="{% url "local" %}" <a class="navbar-item" href="{% url "local" %}"
ic-get-from="{% url "local" %}" ic-get-from="{% url "local" %}"

View File

@ -1,6 +1,7 @@
{ {
"dependencies": { "dependencies": {
"bulma": "^0.7.1", "bulma": "^0.7.1",
"bulma-extensions": "^2.2.2",
"bulmaswatch": "^0.6.2", "bulmaswatch": "^0.6.2",
"fork-awesome": "^1.1.0", "fork-awesome": "^1.1.0",
"intercooler": "^1.2.1", "intercooler": "^1.2.1",

View File

@ -2,6 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
bulma-extensions@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/bulma-extensions/-/bulma-extensions-2.2.2.tgz#d46f11d1242a3fdc60a983afaea0b5e6c137362d"
bulma@^0.7.1: bulma@^0.7.1:
version "0.7.1" version "0.7.1"
resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.1.tgz#73c2e3b2930c90cc272029cbd19918b493fca486" resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.1.tgz#73c2e3b2930c90cc272029cbd19918b493fca486"