blog

Remove redundant stylesheet block

Author
Maarten Vangeneugden
Date
Sept. 20, 2020, 10:11 p.m.
Hash
db1a4fb4f28386760048a994257a5109405d7e64
Parent
b949e8b1ddcecce670b0f373e96605ae542c9f9d
Modified files
templates/blog/index.djhtml
templates/blog/post.djhtml

templates/blog/index.djhtml

0 additions and 1 deletion.

View changes Hide changes
1
1
{% load i18n %}
2
2
{% load static %}
3
3
4
4
{% block stylesheets %}
5
5
    {{ block.super }}
6
6
    <style>
7
7
    img {
8
8
    width: 80%;
9
9
     display: block;
10
10
  margin-left: auto;
11
11
  margin-right: auto;
12
12
    }
13
13
    video {
14
14
    width: 80%;
15
15
    } 
16
16
    </style>
17
17
     <link href="{% static "website/blog.css" %}" rel="stylesheet" media="screen, projection" />
18
-
{% endblock %}
19
18
20
19
{% block title %}{% trans "Maarten's blog" %}{% endblock title %}
21
20
22
21
{% block description %}{% blocktrans %}The always coherently put together, yet
23
22
fuzzy blog of whatever sprouts in my mind.{% endblocktrans %}
24
23
{% endblock description %}
25
24
26
25
{% block header %}
27
26
<header>                                                                                                                                                                                         
28
27
    <h1>{% trans "Notepad of a student" %}</h1>  
29
28
    <label for="nav-drawer-toggle"></label>
30
29
</header>
31
30
{% endblock header %}
32
31
33
32
{% block nav %}
34
33
<input id="nav-drawer-toggle" type="checkbox" />
35
34
<nav>
36
35
    <label for="nav-drawer-toggle"><!--🡨-->🡠</label>
37
36
    <h2>{% trans "Navigation" %}</h2>
38
37
    {% for title, date, blog_text, link in posts %}
39
38
    <a class="nav-link" href="{{ link }}">{{ title }}</a>
40
39
    {% endfor %}
41
40
    <hr class="half" />
42
41
    <a class="nav-link" href="{% url 'about-index' %}">{% trans "Front page" %}</a>
43
42
  </nav>
44
43
{% endblock nav %}
45
44
46
45
{% block main %}
47
46
48
47
<section class="emphasis">
49
48
    <h1>{% trans "Blog" %}</h1>
50
49
    <p>
51
50
        {% blocktrans %}Welcome to my blog. Here, I write
52
51
        about things that interest me. Politics, coding,
53
52
        studying, life, or anything else I fancy rambling
54
53
        about. If you're in luck, I may've written it in a
55
54
        language that you understand better than English.
56
55
        {% endblocktrans %}
57
56
    </p>
58
57
</section>
59
58
60
59
<!--<div class="fab">
61
60
    <a href="{% url 'blog-feed' %}" id="feed-fab"> 
62
61
    <i class="large material-icons">rss_feed</i>
63
62
    <b>RSS</b>
64
63
    </a>
65
64
</div>-->
66
65
67
66
<section>
68
67
    <h1>Monthly</h1>
69
68
    <a class="btn fill" href="{% url "monthly-archive" %}"> {% trans "Open archive" %}</a>
70
69
    {% include "blog/monthly.html" %}
71
70
</section>
72
71
73
72
<div class="cards">
74
73
    {% for title, date, blog_text, link in posts %}
75
74
        <div class="card">
76
75
            <h3>{{ title }}</h3>
77
76
            <h4>{{ date|date:"DATE_FORMAT" }}</h4>
78
77
        <p>{{ blog_text|safe|truncatewords_html:100 }}</p>
79
78
        <a class="btn outline" href="{{link}}">📚 {% trans "Read on" %}</a>
80
79
        </div>
81
80
    {% endfor %}
82
81
</div>
83
82
84
83
{% endblock main %}
85
84

templates/blog/post.djhtml

0 additions and 7 deletions.

View changes Hide changes
1
1
{% load humanize %}
2
2
{% load i18n %}
3
3
{% load static %}
4
4
5
5
{% block stylesheets %}
6
-
{{ block.super }}
7
-
     <link href="{% static "website/blog.css" %}" rel="stylesheet" media="screen, projection"  />
8
-
{#<link href="{% static "blog/stylesheet.css" %}" rel="stylesheet"
9
-
media="screen, projection" />#}
10
-
{% endblock %}
11
-
12
-
{% block description %}
13
6
{{ article|safe|truncatewords_html:10 }}
14
7
{% endblock description %}
15
8
{% block title %}📚 {{ navbar_title }}{% endblock title %}
16
9
17
10
18
11
{% block header %}
19
12
<header>
20
13
<h1>{{ navbar_title }}</h1>
21
14
</header>
22
15
{% endblock header %}
23
16
{% block main %}
24
17
<section style="font-family: serif;">
25
18
    <!--<article style="font-family:serif;">-->
26
19
        {{ article|safe }}
27
20
    <!--</article>-->
28
21
</section>
29
22
30
23
<h5 class="white-text">{% trans "This article in other languages" %}</h5>
31
24
32
25
{% get_language_info for 'nl' as LANG %}
33
26
<a {% if dutch_link %} href="{{dutch_link}}" {% endif %}
34
27
   class="btn fill
35
28
   {% if not dutch_link %}disabled{% endif %}">
36
29
    🇧🇪 {{ LANG.name_translated}} 🇳🇱
37
30
</a>
38
31
{% get_current_language as lang %}
39
32
{% get_language_info for 'fr' as LANG %}
40
33
<a {% if french_link %} href="{{french_link}}" {% endif %}
41
34
   class="btn fill
42
35
   {% if not french_link %}disabled{% endif %}">
43
36
    🇧🇪 {{ LANG.name_translated}} 🇫🇷
44
37
</a>
45
38
{% get_language_info for 'en' as LANG %}
46
39
<a {% if english_link %} href="{{english_link}}" {% endif %}
47
40
   class="btn fill
48
41
   {% if not english_link %}disabled{% endif %}">
49
42
    🇬🇧 {{ LANG.name_translated}} 🇺🇸
50
43
</a>
51
44
{% comment %}
52
45
{% get_language_info for 'de' as LANG %}
53
46
<a {% if german_link %} href="{{german_link}}" {% endif %}
54
47
   class="btn fill
55
48
   {% if not german_link %}disabled{% endif %}">
56
49
    🇧🇪 {{ LANG.name_translated}} 🇩🇪
57
50
</a>
58
51
{% comment %}
59
52
{% get_language_info for 'es' as LANG %}
60
53
<a {% if spanish_link %} href="{{spanish_link}}" {% endif %}
61
54
   class="btn
62
55
   {% if not spanish_link %}disabled{% endif %}">
63
56
    🇪🇸 {{ LANG.name_translated}} 🇲🇽
64
57
</a>
65
58
66
59
<h5 class="white-text">{% trans "Comments" %}</h5>
67
60
{% for comment in comments %} {# Whoops =P #}
68
61
    <span class="white-text">{{ comment.name|title }} | </span>
69
62
    <time class="grey-text" datetime="{{ comment.date|date:'c' }}">{{ comment.date|naturaltime }}</time>
70
63
    <br />
71
64
    <p class="white-text">{{ comment.text|urlize }}</p>
72
65
    <hr />
73
66
{% endfor %}
74
67
    {# Form for new comment #}
75
68
    <form action="" method="POST">
76
69
        {% csrf_token %}
77
70
        {{ form.name.label_tag }}
78
71
        <input class="white-text browser-default" type="text" id="id_name" name="name" maxlength="64" required />
79
72
        {{ form.text.label_tag }}
80
73
        <textarea id="id_text" class="white-text" name="text" maxlength="1000" required></textarea>
81
74
        <input type="submit" value="{% trans "Submit" %}" />
82
75
    </form>
83
76
84
77
85
78
{% comment %}
86
79
<a href="{% url 'blog-post' post_slug %}" class="btn {{accent_color}} accent-4 black-text tooltipped" data-position="bottom" data-delay="50" data-tooltip="{% trans "Multilingual link. Links to the version in the viewer's preferred language." %}">🏳️‍🌈 {% trans "All available languages" %}</a>
87
80
    {# TODO: Change to rainbow flag when possible #}
88
81
{% endcomment %}
89
82
    </div>
90
83
91
84
</div>
92
85
<div class="container">
93
86
    {% for title, date, description, link in post_links %}
94
87
        <h2 class="{{ color}}-text">{{ title }}</h2>
95
88
        {# FIXME: Date is in all languages of the same format. Fix for each language #}
96
89
        <span class="grey-text">{{ date|date:"l j F Y" }}</span>
97
90
        {#<p class="hide-on-small-only">{{ description }}</p>#}
98
91
        <p class="hide-on-small-only">{% lorem %}</p>
99
92
        <a class="btn {{accent_color}} accent-3" href="{{link}}">
100
93
            {% trans "Read on"%}
101
94
        </a>
102
95
        <hr />
103
96
    {% endfor %}
104
97
</div>
105
98
{% endblock main %}
106
99