Skip to content

Commit 84a496f

Browse files
committed
v 1.2.0
1 parent 3c836ff commit 84a496f

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

shaarpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ShaarPy
44
"""
55

6-
VERSION = (1, 1, 0) # PEP 386
6+
VERSION = (1, 2, 0) # PEP 386
77
__version__ = ".".join([str(x) for x in VERSION])
88

99
default_app_config = "shaarpy.apps.ShaarpyConfig"

shaarpy/settings.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@
124124
"version": 1,
125125
"disable_existing_loggers": False,
126126
"formatters": {
127-
"verbose": {"format": "%(asctime)s %(levelname)s %(module)s %(process)d %(message)s"},
127+
"verbose": {
128+
"format": "%(asctime)s %(levelname)s %(module)s %(process)d %(message)s"
129+
},
128130
"simple": {"format": "%(levelname)s %(message)s"},
129131
},
130132
"filters": {"require_debug_false": {"()": "django.utils.log.RequireDebugFalse"}},
@@ -134,7 +136,11 @@
134136
"filters": ["require_debug_false"],
135137
"class": "django.utils.log.AdminEmailHandler",
136138
},
137-
"console": {"level": "DEBUG", "class": "logging.StreamHandler", "formatter": "simple"},
139+
"console": {
140+
"level": "DEBUG",
141+
"class": "logging.StreamHandler",
142+
"formatter": "simple",
143+
},
138144
"file": {
139145
"level": "INFO",
140146
"class": "logging.handlers.RotatingFileHandler",
@@ -186,13 +192,17 @@
186192

187193
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
188194

189-
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=["https://*.mydomain.com"])
195+
CSRF_TRUSTED_ORIGINS = env.list(
196+
"CSRF_TRUSTED_ORIGINS", default=["https://*.mydomain.com"]
197+
)
190198

191199
LOGOUT_REDIRECT_URL = reverse_lazy("home")
192200

193201
SHAARPY_AUTHOR = env.str("SHAARPY_AUTHOR", default="FoxMaSk")
194202
SHAARPY_NAME = env.str("SHAARPY_NAME", default=f"ShaarPy - {SHAARPY_AUTHOR} Links")
195-
SHAARPY_DESCRIPTION = env.str("SHAARPY_DESCRIPTION", default="Share thoughts, links ideas, notes")
203+
SHAARPY_DESCRIPTION = env.str(
204+
"SHAARPY_DESCRIPTION", default="Share thoughts, links ideas, notes"
205+
)
196206
SHAARPY_ROBOT = env.str("SHAARPY_ROBOT", default="index, follow")
197207
SHAARPY_LOCALSTORAGE_MD = env.str("SHAARPY_LOCALSTORAGE_MD", default="")
198208
SHAARPY_STYLE = env.str("SHAARPY_STYLE", default="blue")

shaarpy/templates/base.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,29 @@
3333
<div class="collapse navbar-collapse" id="navbarSupportedContent">
3434
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
3535
<li class="nav-item">
36-
<a class="navbar-brand" href="{% url 'home' %}" title="Home">
37-
<span class="menu-collapsed">{{ SHAARPY_NAME }}</span>
38-
</a>
36+
<a class="navbar-brand" href="{% url 'home' %}" title="Home">Home</a>
3937
</li>
4038
{% if user.is_authenticated %}
4139
<li class="nav-item">
42-
<a class="nav-link fab fa-python link-opacity-50-hover" href="{% url 'link_create' %}" title="{% translate 'Add a thought, a link, an idea, a note' %}">ShaarPy</a>
40+
<a class="nav-link" href="{% url 'link_create' %}" title="{% translate 'Add a thought, a link, an idea, a note' %}"><i class="fab fa-python link-opacity-50-hover"></i></a>
4341
</li>
4442
{% endif %}
4543
<li class="nav-item">
46-
<a class="nav-link fas fa-tags link-opacity-50-hover" href="{% url 'tags_list' %}" title="{% translate 'Tags Cloud' %}"> {% translate 'Tags Cloud' %}</a>
44+
<a class="nav-link" href="{% url 'tags_list' %}" title="{% translate 'Tags Cloud' %}"><i class="fas fa-tags link-opacity-50-hover" ></i></a>
4745
</li>
4846
<li class="nav-item">
49-
<a class="nav-link fas fa-calendar-day link-opacity-50-hover" href="{% url 'daily' %}" title="{% translate 'Daily links' %}"> {% translate 'Daily links' %}</a>
47+
<a class="nav-link" href="{% url 'daily' %}" title="{% translate 'Daily links' %}"><i class=" fas fa-calendar-day link-opacity-50-hover"></i></a>
5048
</li>
5149
{% if user.is_authenticated %}
5250
<li class="nav-item">
53-
<a class="nav-link fas fa-user-secret" href="{% url 'link_private' %}" title="{% translate 'Privates Links' %}"> {% translate 'Privates Links' %}</a>
51+
<a class="nav-link" href="{% url 'link_private' %}" title="{% translate 'Privates Links' %}"><i class=" fas fa-user-secret"></i></a>
5452
</li>
5553
<li class="nav-item">
56-
<a class="nav-link fas fa-universal-access" href="{% url 'link_public' %}" title="{% translate 'Publics Links' %}"> {% translate 'Publics Links' %}</a>
54+
<a class="nav-link" href="{% url 'link_public' %}" title="{% translate 'Publics Links' %}"><i class="fas fa-universal-access"></i></a>
5755
</li>
5856
{% endif %}
5957
<li class="nav-item">
60-
<a class="nav-link fas fa-rss" href="{% url 'feed' %}"> Feeds</a>
58+
<a class="nav-link" href="{% url 'feed' %}"><i class="fas fa-rss"></i></a>
6159
</li>
6260
</ul>
6361
{% if form_search %}

shaarpy/templates/shaarpy/daily_list.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ <h6>{{ current_date|date:"DATE_FORMAT" }}</h6>
2626
<div class="card">
2727
<div class="card-body">
2828
{% if data.url %}
29-
<h5 class="card-title"><a href="{{ data.url }}">{{ data.title }}</a></h5>
29+
<h5 class="card-title">
30+
<a href="{{ data.url }}">{% if data.title %}{{ data.title }}{% else %}{{ data.url }}{% endif %}</a></h5>
3031
{% else %} {# it is a note #}
3132
<h5><a href="{% url 'link_detail' data.url_hashed %}">{{ data.title }}</a></h5>
3233
{% endif %}
@@ -39,7 +40,7 @@ <h5><a href="{% url 'link_detail' data.url_hashed %}">{{ data.title }}</a></h5>
3940
</div>
4041
{% endif %}
4142
<div class="card-text">
42-
{{ data.text | markdown |safe }}
43+
{{ data.text | wrap_markdown |safe }}
4344
</div>
4445
</div>
4546
<div class="card-footer text-muted">

0 commit comments

Comments
 (0)