diff --git a/system/Settings.php b/system/Settings.php
index 37b632c..6e6c767 100644
--- a/system/Settings.php
+++ b/system/Settings.php
@@ -19,11 +19,13 @@ class Settings
# no individual image sizes are allowed sind 1.3.4
$settings['images'] = $defaultSettings['images'];
- # if there is no theme set
- if(!isset($settings['theme']))
+ # we have to check if the theme has been deleted
+ $themefolder = $settings['rootPath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR;
+
+ # if there is no theme in settings or theme has been deleted
+ if(!isset($settings['theme']) OR !file_exists($themefolder . $settings['theme']))
{
# scan theme folder and get the first theme
- $themefolder = $settings['rootPath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR;
$themes = array_diff(scandir($themefolder), array('..', '.'));
$firsttheme = reset($themes);
@@ -72,7 +74,7 @@ class Settings
'userPath' => $rootPath . 'settings' . DIRECTORY_SEPARATOR . 'users',
'authorPath' => __DIR__ . DIRECTORY_SEPARATOR . 'author' . DIRECTORY_SEPARATOR,
'editor' => 'visual',
- 'formats' => ['markdown', 'headline', 'ulist', 'olist', 'table', 'quote', 'image', 'video', 'file', 'toc', 'hr', 'definition', 'code'],
+ 'formats' => ['markdown', 'headline', 'ulist', 'olist', 'table', 'quote', 'notice', 'image', 'video', 'file', 'toc', 'hr', 'definition', 'code'],
'contentFolder' => 'content',
'cache' => true,
'cachePath' => $rootPath . 'cache',
diff --git a/system/Translations.php b/system/Translations.php
index f8d00ba..810c170 100644
--- a/system/Translations.php
+++ b/system/Translations.php
@@ -17,7 +17,7 @@ class Translations
$language = $settings['language'];
}
- $theme = 'typemill';
+ $theme = 'cyanine';
if($settings !== NULL){
if(is_array($settings)){
if (array_key_exists('theme', $settings)) {
diff --git a/system/author/css/style.css b/system/author/css/style.css
index 6d2a3b8..3107c50 100644
--- a/system/author/css/style.css
+++ b/system/author/css/style.css
@@ -238,6 +238,22 @@ figcaption{
caption-side: bottom;
}
+button.note1{
+ background-color: #d00;
+ color: #fff;
+}
+button.note2{
+ background-color: #fb0;
+ color: #fff;
+}
+button.note3{
+ background-color: #08e;
+ color: #fff;
+}
+
+.blox-editor textarea.pl-notice{
+ padding-left: 40px;
+}
.notice1 {
margin: 1em 0;
padding: 10px 1em;
@@ -1814,16 +1830,21 @@ button.hdown{
left: 0px;
font-size: 1em;
font-weight: 700;
- background: #f9f8f6;
border: 0px solid #fff;
border-right: 1px solid #fff;
- color: #66b0a3;
+// background: #f9f8f6;
+// color: #66b0a3;
}
+button.hdown.headline{
+ color: #f9f8f6;
+ background: #66b0a3;
+}
+/*
button.hdown:hover,button.hdown:focus,button.hdown:active{
color: #f9f8f6;
background: #66b0a3;
}
-
+*/
.blox-editor .contenttype {
position: absolute;
top: 15px;
diff --git a/system/author/img/apple-touch-icon-144x144.png b/system/author/img/apple-touch-icon-144x144.png
deleted file mode 100644
index cb836ce..0000000
Binary files a/system/author/img/apple-touch-icon-144x144.png and /dev/null differ
diff --git a/system/author/img/apple-touch-icon-152x152.png b/system/author/img/apple-touch-icon-152x152.png
deleted file mode 100644
index fd6cef2..0000000
Binary files a/system/author/img/apple-touch-icon-152x152.png and /dev/null differ
diff --git a/system/author/img/favicon-114.png b/system/author/img/favicon-114.png
new file mode 100644
index 0000000..2072fda
Binary files /dev/null and b/system/author/img/favicon-114.png differ
diff --git a/system/author/img/favicon-144.png b/system/author/img/favicon-144.png
new file mode 100644
index 0000000..dc84936
Binary files /dev/null and b/system/author/img/favicon-144.png differ
diff --git a/system/author/img/favicon-16.png b/system/author/img/favicon-16.png
new file mode 100644
index 0000000..6e4b28c
Binary files /dev/null and b/system/author/img/favicon-16.png differ
diff --git a/system/author/img/favicon-16x16.png b/system/author/img/favicon-16x16.png
deleted file mode 100644
index 85ce61a..0000000
Binary files a/system/author/img/favicon-16x16.png and /dev/null differ
diff --git a/system/author/img/favicon-180.png b/system/author/img/favicon-180.png
new file mode 100644
index 0000000..745a12d
Binary files /dev/null and b/system/author/img/favicon-180.png differ
diff --git a/system/author/img/favicon-32.png b/system/author/img/favicon-32.png
new file mode 100644
index 0000000..4a491bd
Binary files /dev/null and b/system/author/img/favicon-32.png differ
diff --git a/system/author/img/favicon-32x32.png b/system/author/img/favicon-32x32.png
deleted file mode 100644
index 23ca6ce..0000000
Binary files a/system/author/img/favicon-32x32.png and /dev/null differ
diff --git a/system/author/img/favicon-72.png b/system/author/img/favicon-72.png
new file mode 100644
index 0000000..ed29605
Binary files /dev/null and b/system/author/img/favicon-72.png differ
diff --git a/system/author/img/favicon.ico b/system/author/img/favicon.ico
deleted file mode 100644
index 22a5bc9..0000000
Binary files a/system/author/img/favicon.ico and /dev/null differ
diff --git a/system/author/img/mstile-144x144.png b/system/author/img/mstile-144x144.png
deleted file mode 100644
index cb836ce..0000000
Binary files a/system/author/img/mstile-144x144.png and /dev/null differ
diff --git a/system/author/js/vue-blox-config.js b/system/author/js/vue-blox-config.js
index 8368a4a..3fcd1cf 100644
--- a/system/author/js/vue-blox-config.js
+++ b/system/author/js/vue-blox-config.js
@@ -63,6 +63,13 @@ let determiner = {
}
return false;
},
+ notice: function(block,lines,firstChar,secondChar,thirdChar){
+ if( firstChar == '!' && ( secondChar == '!' || secondChar == ' ') )
+ {
+ return "notice-component";
+ }
+ return false;
+ },
ulist: function(block,lines,firstChar,secondChar,thirdChar){
if( (firstChar == '*' || firstChar == '-' || firstChar == '+') && secondChar == ' ')
{
@@ -79,6 +86,7 @@ let bloxFormats = {
olist: { label: '', title: 'Numbered List', component: 'olist-component' },
table: { label: '', title: 'Table', component: 'table-component' },
quote: { label: '', title: 'Quote', component: 'quote-component' },
+ notice: { label: '', title: 'Notice', component: 'notice-component' },
image: { label: '', title: 'Image', component: 'image-component' },
video: { label: '', title: 'Video', component: 'video-component' },
file: { label: '', title: 'File', component: 'file-component' },
diff --git a/system/author/js/vue-blox.js b/system/author/js/vue-blox.js
index 27e74f1..2f673b8 100644
--- a/system/author/js/vue-blox.js
+++ b/system/author/js/vue-blox.js
@@ -165,7 +165,7 @@ const contentComponent = Vue.component('content-block', {
},
submitBlock: function(){
var emptyline = /^\s*$(?:\r\n?|\n)/gm;
- if(this.componentType == "code-component" || this.componentType == "math-component"){ }
+ if(this.componentType == "code-component" || this.componentType == "math-component" || this.componentType == "notice-component"){ }
else if(this.componentType == "ulist-component" || this.componentType == "olist-component")
{
var listend = (this.componentType == "ulist-component") ? '* \n' : '1. \n';
@@ -834,11 +834,82 @@ const olistComponent = Vue.component('olist-component', {
},
})
+
+const noticeComponent = Vue.component('notice-component', {
+ props: ['compmarkdown', 'disabled'],
+ template: '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '' +
+ '' +
+ '
',
+ data: function(){
+ return {
+ prefix: '! ',
+ notice: '',
+ noteclass: 'note1'
+ }
+ },
+ mounted: function(){
+ this.$refs.markdown.focus();
+ if(this.compmarkdown)
+ {
+ this.prefix = this.getNoticePrefix(this.compmarkdown);
+
+ var lines = this.compmarkdown.match(/^.*([\n\r]+|$)/gm);
+ for (var i = 0; i < lines.length; i++) {
+ lines[i] = lines[i].replace(/(^[\! ]+)/mg, '');
+ }
+
+ this.notice = lines.join('');
+ this.noteclass = 'note'+this.prefix.length;
+ }
+ this.$nextTick(function () {
+ autosize(document.querySelectorAll('textarea'));
+ });
+ },
+ methods: {
+ noticedown: function()
+ {
+ this.prefix = this.getNoticePrefix(this.compmarkdown);
+ this.prefix += "! ";
+ if(this.prefix.length > 4)
+ {
+ this.prefix = "! ";
+ }
+ this.noteclass = 'note' + (this.prefix.length-1);
+ this.updatemarkdown(this.notice);
+ },
+ getNoticePrefix: function(str)
+ {
+ var prefix = '';
+ for(var i = 0; i < str.length; i++){
+ if(str[i] != '!'){ return prefix }
+ prefix += '!';
+ }
+ return prefix+' ';
+ },
+ updatemarkdown: function(value)
+ {
+ this.notice = value;
+
+ var lines = value.match(/^.*([\n\r]|$)/gm);
+
+ var notice = this.prefix + lines.join(this.prefix);
+
+ this.$emit('updatedMarkdown', notice);
+ },
+ },
+})
+
+
const headlineComponent = Vue.component('headline-component', {
props: ['compmarkdown', 'disabled'],
template: '' +
'
' +
- '
' +
+ '
' +
'
' +
'
',
data: function(){
diff --git a/system/author/languages/de.yaml b/system/author/languages/de.yaml
index f287005..45315a6 100644
--- a/system/author/languages/de.yaml
+++ b/system/author/languages/de.yaml
@@ -115,6 +115,7 @@ NONE: Keine
NO_PREVIEW: Keine Vorschau
NO_SETTINGS: Keine Einstellungen
NOT_EDITABLE: Nicht editierbar
+NOTICE: Hinweis
NUMBERED_LIST: Aufzählung
OLIST: olist
ONLINE: online
diff --git a/system/author/languages/en.yaml b/system/author/languages/en.yaml
index 215085a..6d3b373 100644
--- a/system/author/languages/en.yaml
+++ b/system/author/languages/en.yaml
@@ -120,6 +120,7 @@ NONE: None
NO_PREVIEW: No Preview
NO_SETTINGS: No Settings
NOT_EDITABLE: not editable
+NOTICE: Notice
NUMBERED_LIST: Numbered List
OLIST: olist
ONLINE: online
diff --git a/system/author/layouts/layout.twig b/system/author/layouts/layout.twig
index 06ef3a3..94b900d 100644
--- a/system/author/layouts/layout.twig
+++ b/system/author/layouts/layout.twig
@@ -8,18 +8,19 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
-