diff --git a/aircox/models/page.py b/aircox/models/page.py
index ef5b390..71df901 100644
--- a/aircox/models/page.py
+++ b/aircox/models/page.py
@@ -118,6 +118,12 @@ class BasePage(models.Model):
def is_trash(self):
return self.status == self.STATUS_TRASH
+ @property
+ def display_title(self):
+ if self.is_published():
+ return self.title
+ return self.parent.display_title()
+
@cached_property
def headline(self):
if not self.content:
diff --git a/aircox/templates/aircox/base.html b/aircox/templates/aircox/base.html
index 7bfe4ad..e1c9670 100644
--- a/aircox/templates/aircox/base.html
+++ b/aircox/templates/aircox/base.html
@@ -95,7 +95,7 @@ Usefull context:
{% block main %}
{% block content %}
{% if page and page.content %}
-
+
{% endif %}
{% endblock %}
{% endblock main %}
diff --git a/aircox/templates/aircox/home.html b/aircox/templates/aircox/home.html
index 5be1373..76a5d18 100644
--- a/aircox/templates/aircox/home.html
+++ b/aircox/templates/aircox/home.html
@@ -10,6 +10,7 @@
{% endif %}
{% endblock %}
+{% block before_list %}{% endblock %}
{% block pages_list %}
{% if page and page.content %}
{% endif %}
diff --git a/assets/public/app.js b/assets/public/app.js
index c403254..8b23ade 100644
--- a/assets/public/app.js
+++ b/assets/public/app.js
@@ -37,7 +37,7 @@ export default class AppBuilder {
self.app = null;
}
- fetch(url, options) {
+ fetch(url, {el='app', ...options}={}) {
return fetch(url, options).then(response => response.text())
.then(content => {
let doc = new DOMParser().parseFromString(content, 'text/html');
@@ -47,7 +47,7 @@ export default class AppBuilder {
})
}
- load({async=false,content=null,title=null}={}) {
+ load({async=false,content=null,title=null,el='app'}={}) {
var self = this;
return new Promise((resolve, reject) => {
let func = () => {
@@ -62,6 +62,7 @@ export default class AppBuilder {
if(title)
document.title = title;
this.app = new Vue(config);
+ window.scroll(0, 0);
resolve(self.app)
} catch(error) {
self.destroy();
diff --git a/assets/public/styles.scss b/assets/public/styles.scss
index 03bb41c..c019c55 100644
--- a/assets/public/styles.scss
+++ b/assets/public/styles.scss
@@ -104,7 +104,8 @@ a.navbar-item.is-active {
font-weight: $weight-bold;
padding: 0.2em;
top: 1em;
- background-color: $white;
+ background-color: #ffffffc7;
+ max-width: 90%;
.fas {
padding: 0.1em;
@@ -132,7 +133,7 @@ a.navbar-item.is-active {
p { padding: 0.4em 0em; }
hr { background-color: $grey-light; }
- section {
+ .page-content {
h1 { font-size: $size-1; font-weight: bolder; margin-top:0.4em; margin-bottom:0.2em; }
h2 { font-size: $size-3; font-weight: bolder; margin-top:0.4em; margin-bottom:0.2em; }
h3 { font-size: $size-4; font-weight: bolder; margin-top:0.4em; margin-bottom:0.2em; }
diff --git a/requirements.txt b/requirements.txt
index 8dbccb7..ae33273 100755
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
asgiref==3.2.10
-bleach==3.2.1
+bleach>=3.3.0
Django==3.1.1
django-admin-sortable2==0.7.7
django-ckeditor==6.0.0