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",
"title",
"tags",
"album",
],
can_delete=True,
extra=0,

View File

@ -183,6 +183,13 @@ class BasePage(Renderable, models.Model):
headline[-1] += suffix
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
def get_init_kwargs_from(cls, page, **kwargs):
kwargs.setdefault("cover", page.cover)

View File

@ -581,7 +581,7 @@
padding-bottom: 0.6rem;
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);
clear: both;
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 %}
<section class="container content page-content">
{% block content %}
{{ page.content|safe }}
{{ page.display_content|safe }}
{% endblock %}
</section>
{% endif %}

View File

@ -1,4 +1,5 @@
{% extends "./list_editor.html" %}
{% load i18n %}
{% block outer %}
{% with tag_id="inline-tracks" %}
@ -8,6 +9,11 @@
{% endwith %}
{% endblock %}
{% block inner %}
<template #title><h3 class="title">{% translate "Track list" %}</h3></template>
{{ block.super }}
{% endblock %}
{% block row-field %}
<a-autocomplete
: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 %}
<hr/>
<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 %}
</section>
</template>

View File

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

View File

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

View File

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