Migrate to mithril.js

This commit is contained in:
2023-02-18 09:22:43 +03:00
parent 024d7fb10d
commit bdc8f8496f
79 changed files with 1697 additions and 149 deletions

View File

@@ -1,4 +1,4 @@
{% extends "skeleton.html" %}
{% extends "/public/skeleton.html" %}
{% block content %}
<h3>Статьи</h3>
@@ -16,13 +16,9 @@
<pagination-component v-bind:pagination="pagination" v-bind:click-handler="getPages"></pagination-component>
<backtotop-component></backtotop-component>
{% endblock %}
{% block script %}
<script type="text/javascript" src="/static/components/backtotop.js"></script>
<link rel="stylesheet" href="/static/components/backtotop.css"></link>
<script type="text/javascript" src="/static/components/pagination.js"></script>
<script>

View File

@@ -1,4 +1,4 @@
{% extends "private/skeleton.html" %}
{% extends "/private/skeleton.html" %}
{% block content %}
{% raw %}
@@ -11,8 +11,6 @@
<span v-html="page.body"></span>
<backtotop-component></backtotop-component>
{% endraw %}
{% endblock %}
@@ -27,8 +25,6 @@
{% endblock %}
{% block script %}
<script type="text/javascript" src="/static/components/backtotop.js"></script>
<link rel="stylesheet" href="/static/components/backtotop.css"></link>
<script type="text/javascript" src="/static/components/tags.js"></script>
<script type="text/javascript">

View File

@@ -1,4 +1,4 @@
{% extends "private/skeleton.html" %}
{% extends "/private/skeleton.html" %}
{% block content %}
@@ -37,9 +37,6 @@
{% endblock %}
{% block script %}
{% import 'inc/editor.js' as editor %}
{{ editor.plugin('tinymce') }}
<script type="text/javascript">
var app = new Vue({
el: '#app',
@@ -53,7 +50,7 @@ var app = new Vue({
send: function () {
/* Сохранить */
let vm = this;
{{ editor.getValue('"body"', 'vm.page.body', type='tinymce') }}
/* editor.getValue('"body"', 'vm.page.body', type='tinymce') */
axios.post(
'/api',
{
@@ -74,9 +71,6 @@ var app = new Vue({
);
}
},
mounted: function () {
{{ editor.tinymce('"body"') }}
}
})
</script>
{% endblock %}

View File

@@ -1,4 +1,4 @@
{% extends "private/skeleton.html" %}
{% extends "/private/skeleton.html" %}
{% block content %}
<h3>
@@ -38,9 +38,6 @@
{% endblock %}
{% block script %}
{% import 'inc/editor.js' as editor %}
{{ editor.plugin('tinymce') }}
<script type="text/javascript">
var app = new Vue({
el: '#app',

View File

@@ -1,4 +1,4 @@
{% extends "private/skeleton.html" %}
{% extends "/private/skeleton.html" %}
{% block content %}
<h3>
@@ -45,13 +45,9 @@
<pagination-component v-bind:pagination="pagination" v-bind:click-handler="getPages"></pagination-component>
<backtotop-component></backtotop-component>
{% endblock %}
{% block script %}
<script type="text/javascript" src="/static/components/backtotop.js"></script>
<link rel="stylesheet" href="/static/components/backtotop.css"></link>
<script type="text/javascript" src="/static/components/pagination.js"></script>
<script>