This commit is contained in:
bkfox 2024-03-26 01:19:20 +01:00
parent c3c748eebb
commit bda4efe336
10 changed files with 19 additions and 9 deletions

View File

@ -78,7 +78,6 @@ TrackFormSet = modelformset_factory(
"artist", "artist",
"title", "title",
"tags", "tags",
"album",
], ],
can_delete=True, can_delete=True,
extra=0, extra=0,

View File

@ -183,6 +183,13 @@ class BasePage(Renderable, models.Model):
headline[-1] += suffix headline[-1] += suffix
return mark_safe(" ".join(headline)) return mark_safe(" ".join(headline))
_url_re = re.compile("(https?://[^\s\n]+)")
@cached_property
def display_content(self):
content = self._url_re.sub(r'<a href="\1" target="new">\1</a>', self.content)
return content.replace("\n\n", "\n").replace("\n", "<br>")
@classmethod @classmethod
def get_init_kwargs_from(cls, page, **kwargs): def get_init_kwargs_from(cls, page, **kwargs):
kwargs.setdefault("cover", page.cover) kwargs.setdefault("cover", page.cover)

View File

@ -581,7 +581,7 @@
padding-bottom: 0.6rem; padding-bottom: 0.6rem;
border-bottom: 2px var(--break-color) solid; border-bottom: 2px var(--break-color) solid;
} }
.page section.container > .title { .page section.container > .title, .page section.container h3.title {
font-size: var(--title-2-sz); font-size: var(--title-2-sz);
clear: both; clear: both;
margin: 0.6rem 0; margin: 0.6rem 0;

File diff suppressed because one or more lines are too long

View File

@ -134,7 +134,7 @@ Usefull context:
{% if page and page.content %} {% if page and page.content %}
<section class="container content page-content"> <section class="container content page-content">
{% block content %} {% block content %}
{{ page.content|safe }} {{ page.display_content|safe }}
{% endblock %} {% endblock %}
</section> </section>
{% endif %} {% endif %}

View File

@ -1,4 +1,5 @@
{% extends "./list_editor.html" %} {% extends "./list_editor.html" %}
{% load i18n %}
{% block outer %} {% block outer %}
{% with tag_id="inline-tracks" %} {% with tag_id="inline-tracks" %}
@ -8,6 +9,11 @@
{% endwith %} {% endwith %}
{% endblock %} {% endblock %}
{% block inner %}
<template #title><h3 class="title">{% translate "Track list" %}</h3></template>
{{ block.super }}
{% endblock %}
{% block row-field %} {% block row-field %}
<a-autocomplete <a-autocomplete
:input-class="['input', item.error(attr) ? 'is-danger' : 'half-field']" :input-class="['input', item.error(attr) ? 'is-danger' : 'half-field']"

View File

@ -9,7 +9,7 @@
{% include "./dashboard/tracklist_editor.html" with formset=tracklist_formset %} {% include "./dashboard/tracklist_editor.html" with formset=tracklist_formset %}
<hr/> <hr/>
<section class="container"> <section class="container">
<h3 class="title">{% translate "Sound files" %}</h3> <h3 class="title">{% translate "Podcasts" %}</h3>
{% include "./dashboard/soundlist_editor.html" with formset=soundlist_formset %} {% include "./dashboard/soundlist_editor.html" with formset=soundlist_formset %}
</section> </section>
</template> </template>

View File

@ -49,7 +49,6 @@ const Component = {
...AList.props, ...AList.props,
columns: Array, columns: Array,
labels: Object, labels: Object,
allowCreate: Boolean,
}, },
data() { data() {

View File

@ -36,7 +36,6 @@
</section> </section>
<section v-show="page == Page.List" class="panel"> <section v-show="page == Page.List" class="panel">
<a-rows :set="set" :columns="columns" :labels="initData.fields" <a-rows :set="set" :columns="columns" :labels="initData.fields"
:allow-create="true"
:orderable="true" @move="listItemMove" @colmove="columnMove" :orderable="true" @move="listItemMove" @colmove="columnMove"
@cell="onCellEvent"> @cell="onCellEvent">
<template v-for="[name,slot] of rowsSlots" :key="slot" <template v-for="[name,slot] of rowsSlots" :key="slot"

View File

@ -25,7 +25,7 @@
border-bottom: 2px var(--break-color) solid; border-bottom: 2px var(--break-color) solid;
} }
> .title { > .title, h3.title {
font-size: var(--title-2-sz); font-size: var(--title-2-sz);
clear: both; clear: both;
margin: v.$mp-3 0; margin: v.$mp-3 0;