diff --git a/cache/index.json b/cache/index.json index 260f584..bd33467 100644 --- a/cache/index.json +++ b/cache/index.json @@ -1 +1 @@ -{"http://localhost/typemill/welcome":{"title":"Welcome","content":" Great that you give Typemill a try!! Typemill is a small open source cms and a project in work. You will probably miss some important features, but we are working hard to add everything that is needed for a handy and productive writing-system. ","url":"http://localhost/typemill/welcome"},"http://localhost/typemill/welcome/setup":{"title":"Setup","content":" Congratulations! If you see this page, then the setup of the system has worked successfully!! You can now login (/tm/login) and configure your system, your themes and your plugins. You will find all settings in the settings-area (/tm/settings). ## If it does not work If you face any problems during the installation, then please make sure, that your system supports these features: - PHP version 7+. - Apache server. - The module `mod_rewrite` and `htaccess`. If you run a linux-system like Debian or Ubuntu, then please double check that `mod_rewrite` and `htaccess` are activated. Check this [issue on GitHub](https://github.com/typemill/typemill/issues/16) for help. Please make the following folders writable with permission 774 (you can use your ftp-software for it): - Cache - Content - Media - Settings If you still get an error, then you can post an issue on [GitHub](https://github.com/typemill/typemill). ","url":"http://localhost/typemill/welcome/setup"},"http://localhost/typemill/welcome/write-content":{"title":"Write Content","content":" Typemill is a simple Flat File Content Management System (CMS). We (the community) work hard to provide the best author experience with easy and intuitive authoring tools. But Typemill is still in early development and it is likely that not everything will work perfectly out of the box. If you miss something or if you have ideas for improvements, then post a new issue on [GitHub](https://github.com/typemill/typemill/issues). ## The Navigation You can create, structure and reorder all pages with the navigation on the left side. To structure your content, you can create new folders and files with the \"add item\" button. To reorder the pages, just drag an item and drop it wherever you want. Play around with it and you will notice, that it works pretty similar to the folder- and file-system of your laptop. And in fact, this is exactly what Typemill does in the background: It stores your content in files and folders on the server. However, there are some limitations when you try to reorder elements. For example, you cannot move a complete folder to another folder, because this would change all the urls of the pages inside that folder, which is a nightmare for readers and search engines. ## The Editor You can create and format your content with the Markdown syntax, that is similar to the markup syntax of Wikipedia. If you are not familiar with Markdown, then please read the short [Markdown-tutorial](https://typemill.net/) in the documentation of Typemill. You can learn Markdown in less than 10 minutes and there is no easier and faster way to format your webpage. You will love it! Typemill provides two edit modes: The **raw mode** and the **visual mode**. You can switch between the modes in the publish-bar at the bottom of each page. The **raw mode** is the most robust way to create your content, because you write raw markdown into a simple textarea. The **visual mode** uses blocks and transforms each content block into a html-preview immediately. This means that you can directly see and check the formatted result. By default Typemill will use the **visual mode**. * You can change the default mode in the system settings. * You can also switch each format button on and off in the system settings. ## The Publish Bar The publish bar of Typemill is pretty intuitiv and sticks at the bottom of the screen so that you have always full control of the status of each page. Simply play around with it and you will quickly understand how it works. In short: * The green button \"online\" indicates, that your page is published and visible for your readers. * You can depublish a page by clicking the green \"online\" button. The button will turn gray with the label \"offline\" and the page is not visible for your readers anymore. * With the green button \"Publish\" you can either publish a page that is offline or you can publish some unpublished changes on your page. * The publish-button is gray and disabled, if the page is online and if there are no unpublished changes. * All buttons will change in real time, so you can always exactly see what is going on. * To provide an easy status-overview of the whole website, Typemill marks all pages in the navigation on the left side as published (green), changed (orange) and unpublished (red). ## Working with Drafts Ever tried to revise a published article in WordPress? Yes, it works, but if you click on \"save\", then all your changes are directly live. Typemill is much more flexible here and allows you to keep your original version live while you work on a **drafted version** in the background. This is how Typemill handles it: * In **visual mode**: Typemill stores your changes in a new draft automatically as soon as you save any content-block. * In **raw mode**: To store changes in a new draft, simply click on the \"save draft\"-button in the publish controller. * You can work on a draft as long as you want without changing the live version. Your changes go live if you click the button \"publish\". * In visual mode, you can also use the discard-button and go back to the published version. ","url":"http://localhost/typemill/welcome/write-content"},"http://localhost/typemill/welcome/get-help":{"title":"Get Help","content":" If you need any help, then please read the [documentation on typemill.net](https://typemill.net/typemill) first. Some short video-tutorials are in work right now. If you found a bug or if you have a question, then please open a new issue on [GitHub](https://github.com/typemill/typemill/issues). Do you need professional help, an individual theme or a special plugin? You can hire us at [Trendschau Digital](https://trendschau.net/typemill-development). [Contributions](https://github.com/typemill/typemill#contributors--supporters), [donations](https://www.paypal.me/typemill) and [feedback](https://github.com/typemill/typemill/issues) for this open source project are always welcome. ","url":"http://localhost/typemill/welcome/get-help"},"http://localhost/typemill/welcome/markdown-test":{"title":"Markdown Reference and Test Page","content":" Markdown is a simple and universal syntax for text formatting. More and more writers switch to markdown, because they can format their text during the writing process without using any format-buttons. Once they are familiar with the markdown syntax, they can write formatted text much easier and faster than with any standard HTML-editor. Developers love markdown, because it is much cleaner and saver than HTML. And they can easily convert markdown to a lot of other document formats like HTML and others. If you develop a theme for TYPEMILL, please take care that all elements on this page are designed properly. ## Table of Contents To create a table of contents, simply write `[TOC]` in a separate line. It will be replaced with a table of contents like this automatically. [TOC] ## Headlines ``` Headlines are simply done with hash chars like this: # First Level Headline ## Second Level Headline ### Third Level Headline #### Fourth Level Headline ##### Fifth Level Headline ###### Sixth Level Headline ``` ### Third Level Headline A third headline is more decent and lower prioritized than a second level headline. #### Fourth Level Headline A fourth level headline is more decent and lower prioritized than a third level headline. ##### Fifth Level Headline A fifth level headline is more decent and lower prioritized than a fourth level headline. ##### Sixth Level Headline A sixth level headline is more decent and lower prioritized than a fifths level headline. ##Paragraph ```` A paragraph is a simple text-block separated with a new line above and below. ```` A paragraph is a simple text-block separated with a new line above and below. ## Soft Linebreak ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ##Emphasis ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ##Lists ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 1. this ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 2. this ## Horizontal Rule ``` Easily created for example with three dashes like this: --- ``` Easily created for example with three dashes like this: --- ##Links ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. You can even use a download-link like []() ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. [markdown (PNG, 1.05 KB)](media/files/markdown.png){.tm-download file-png} ##Images ```` The same rules as with links, but with a ! ![alt-text](media/markdown.png) *With caption* ![alt-text](media/markdown.png \"my title\"){#myid .imgClass} *With caption that spans over several lines* ![alt-text](media/markdown.png \"my title\"){#myid .otherclass width=150px} ```` The same rules as with links, but with a ! ![alt](media/files/markdown.png){.center} *With Caption* ![alt](media/files/markdown.png \"title\"){.center} *With a caption that spans over several lines.* ![alt-text](media/files/markdown.png \"my title\"){#myid .otherclass width=150px} ## Linked Images ```` You can link an image with a nested syntax like this: [![alt-text](media/markdown.png)](https://typemill.net) ```` You can link an image with a nested syntax like this: [![alt-text](media/files/markdown.png){.imgClass}](https://typemill.net) ## Image Position ```` You can controll the image position with the classes .left, .right and .middle like this: ![alt-text](media/markdown.png){.left} *With caption that spans over several lines* ![alt-text](media/markdown.png){.right} *With caption that spans over several lines* ![alt-text](media/markdown.png){.center} *With caption that spans over several lines* ```` ![image float left](media/files/markdown.png){.left} *With caption that spans over several lines* The first image should float on the left side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image float right](media/files/markdown.png){.right} *With caption that spans over several lines* The second image should float on the right side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image center](media/files/markdown.png){.center} *With caption that spans over several lines* The thirds image should be placed above this paragraph and centered to the middle of the content area. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ## Blockquote ``` There are always some women and men with wise words > But I usually don't read them, to be honest. ``` There always some women and men with wise words > But I usually don't read them, to be honest. ##Footnotes ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Add the footnote text at the bottom of the page like this: [^1]: Thank you for scrolling. [^2]: This is the end of the page. ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Footnotes won't work with the visual editor right now, so please use the raw mode for them. ## Abbreviations ```` *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ```` You won't see the abbreviation directly, but if you write HTML or W3C somewhere, then you can see the tooltip with the explanation. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ## Definition List ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ## Notices You can create different notices if you add a '!', '!!', '!!!', '!!!!' before a line. This will wrap the content into a div-class with the classes `notice1`, `notice2`, `notice3` and `notice4`. You can also span notices over several lines. This logic follows some other CMS like Grav, Lektor or Yellow and it is not compatible with other markdown processors or editors. ! Notice 1 ! ! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !! Notice 2 !! !! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !!! Notice 3 !!! !!! Please note that you can use **markdown** inside of the notice so you can *format* your text here. ## Tables ```` |name |usage | |-----------|-----------| | My Name | For Me | | Your Name | For You | ```` | Name | Usage | | --------- | ------- | | My Name | For Me | | Your Name | For You | ## Code ```` Let us create some `` like this ```` Let us create some `` and now let us check, if a codeblock works: ```` Use four apostroph like this: \\```` \\```` ```` ## Math Please activate the math-plugin to use mathematical expressions with LaTeX syntax. You can choose between MathJax or the newer KaTeX library. MathJax is included from a CDN, KaTeX is included in the plugin. So if you don't want to fetch code from a CDN, use KaTeX instead. The markdown syntax in TYPEMILL is the same for both libraries. ```` Write inline math with \\(...\\) or $...$ syntax. inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` Write display math with $$...$$ or \\[...\\] syntax. $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ \\[ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) \\] ```` $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ [^1]: Thank you for scrolling. [^2]: This is the end of the page. ","url":"http://localhost/typemill/welcome/markdown-test"},"http://localhost/typemill/welcome/folder":{"title":"folder","content":" Content ","url":"http://localhost/typemill/welcome/folder"},"http://localhost/typemill/welcome/folder/file":{"title":"file","content":" Content ","url":"http://localhost/typemill/welcome/folder/file"},"http://localhost/typemill/cyanine-theme":{"title":"The Cyanine Theme","content":" Cyanine is the modern, lightweight and flexible standard theme for Typemill. You can activate a landingpage, setup different content sections for the landingpage and order them like you want. You can also change the colors, fonts and other details. To configure the theme, login to the system (/tm/login), go to the theme settings (/tm/themes) and choose the theme \"Cyanine\". If Cyanine does not fit to your needs, then you can also choose another theme in the [theme store](https://themes.typemill.net) of Typemill. ","url":"http://localhost/typemill/cyanine-theme"},"http://localhost/typemill/cyanine-theme/landingpage":{"title":"The Landingpage","content":" Cyanine provides an optional landingpage with six segments: * **Intro** with the content of the home page and an additional link/button. * **Info** with individual markdown content. * **Teaser** with two elements. Each element has a headline, a text and a link/button. * **Contrast** with a headline, text-input and a link/button. The colors are inverted. * **Navigation** with the whole content of the website. You can change the depth of the navigation. * **News** with a link to a news-folder. It will display the three latest news in a card-design. Add a hero-image to each news-entry to show a teaser image. You can activate or deactivate the whole landingpage, order all elements and enable/disable each element individually. ","url":"http://localhost/typemill/cyanine-theme/landingpage"},"http://localhost/typemill/cyanine-theme/colors-and-fonts":{"title":"Colors and Fonts","content":" First of all cyanine supports individual logos. If you want to use our logo, then please upload it in the system settings. Cyanine will automatically replace the title text with your logo. You can also upload your own favicon in the system settings. Cyanine allows you to change many colors. Please make sure that your color-combinations are readable and accessible. The following colors are editable: * **Primary Theme Color**: used for the body background and borders. * **Secondary Theme Color**: used for content background, font-colors on hover and more. * **Primary Font Color**: used for main text. * **Secondary Font Color**: used as contrast color for hovers in navigation and buttons. * **Link Color**: used for text-links. Keep accessibility in mind. * **Thin Border Color**: used for thin borders in navigations and tables. You can also change the font-family for * headlines * text * buttons and navigations Cyanine uses wide spread system fonts with fallbacks: * serif * sans-serif * courier * helvetica * avenir * athelas * georgia * times * bodoni * calisto * garamond * baskerville If the color- and font-settings are not enough for your purpose, then you can always overwrite the theme-css with your own styles in the theme settings. ","url":"http://localhost/typemill/cyanine-theme/colors-and-fonts"},"http://localhost/typemill/cyanine-theme/footer":{"title":"3-Column Footer","content":" Cyanine provides a three column footer at the bottom of each page. You can use markdown for each column. Make sure that you use the correct headline-level (we suggest a headline level 3 or level 4 to keep the logical headline hierarchy in the document). You can, of course, also add link-lists or other elements. Check the website of [Typemill](https://typemill.net) for an example. ","url":"http://localhost/typemill/cyanine-theme/footer"},"http://localhost/typemill/cyanine-theme/content-elements":{"title":"Content Elements","content":" Cyanine provides a lot of other settings for your content area. For example: * Add an edit-button for github, gitlab or other plattforms. * Show the author. * Show the publish date. * Show the chapter numbers in the navigation. The Cyanine theme supports all content elements like tables, images, notices or downloads. It also supports anchor-links next to headlines, so you can deep link to certain content sections of your page. You can activate the anchors in the system settings of Typemill. ","url":"http://localhost/typemill/cyanine-theme/content-elements"}} \ No newline at end of file +{"http://localhost/typemill/welcome":{"title":"Welcome","content":" Great that you give Typemill a try!! Typemill is a small open source cms and a project in work. You will probably miss some important features, but we are working hard to add everything that is needed for a handy and productive writing-system. ","url":"http://localhost/typemill/welcome"},"http://localhost/typemill/welcome/setup":{"title":"Setup","content":" Congratulations! If you see this page, then the setup of the system has worked successfully!! You can now login (/tm/login) and configure your system, your themes and your plugins. You will find all settings in the settings-area (/tm/settings). ## If it does not work If you face any problems during the installation, then please make sure, that your system supports these features: - PHP version 7+. - Apache server. - The module `mod_rewrite` and `htaccess`. If you run a linux-system like Debian or Ubuntu, then please double check that `mod_rewrite` and `htaccess` are activated. Check this [issue on GitHub](https://github.com/typemill/typemill/issues/16) for help. Please make the following folders writable with permission 774 (you can use your ftp-software for it): - Cache - Content - Media - Settings If you still get an error, then you can post an issue on [GitHub](https://github.com/typemill/typemill). ","url":"http://localhost/typemill/welcome/setup"},"http://localhost/typemill/welcome/write-content":{"title":"Write Content","content":" Typemill is a simple Flat File Content Management System (CMS). We (the community) work hard to provide the best author experience with easy and intuitive authoring tools. But Typemill is still in early development and it is likely that not everything will work perfectly out of the box. If you miss something or if you have ideas for improvements, then post a new issue on [GitHub](https://github.com/typemill/typemill/issues). ## The Navigation You can create, structure and reorder all pages with the navigation on the left side. To structure your content, you can create new folders and files with the \"add item\" button. To reorder the pages, just drag an item and drop it wherever you want. Play around with it and you will notice, that it works pretty similar to the folder- and file-system of your laptop. And in fact, this is exactly what Typemill does in the background: It stores your content in files and folders on the server. However, there are some limitations when you try to reorder elements. For example, you cannot move a complete folder to another folder, because this would change all the urls of the pages inside that folder, which is a nightmare for readers and search engines. ## The Editor You can create and format your content with the Markdown syntax, that is similar to the markup syntax of Wikipedia. If you are not familiar with Markdown, then please read the short [Markdown-tutorial](https://typemill.net/) in the documentation of Typemill. You can learn Markdown in less than 10 minutes and there is no easier and faster way to format your webpage. You will love it! Typemill provides two edit modes: The **raw mode** and the **visual mode**. You can switch between the modes in the publish-bar at the bottom of each page. The **raw mode** is the most robust way to create your content, because you write raw markdown into a simple textarea. The **visual mode** uses blocks and transforms each content block into a html-preview immediately. This means that you can directly see and check the formatted result. By default Typemill will use the **visual mode**. * You can change the default mode in the system settings. * You can also switch each format button on and off in the system settings. ## The Publish Bar The publish bar of Typemill is pretty intuitiv and sticks at the bottom of the screen so that you have always full control of the status of each page. Simply play around with it and you will quickly understand how it works. In short: * The green button \"online\" indicates, that your page is published and visible for your readers. * You can depublish a page by clicking the green \"online\" button. The button will turn gray with the label \"offline\" and the page is not visible for your readers anymore. * With the green button \"Publish\" you can either publish a page that is offline or you can publish some unpublished changes on your page. * The publish-button is gray and disabled, if the page is online and if there are no unpublished changes. * All buttons will change in real time, so you can always exactly see what is going on. * To provide an easy status-overview of the whole website, Typemill marks all pages in the navigation on the left side as published (green), changed (orange) and unpublished (red). ## Working with Drafts Ever tried to revise a published article in WordPress? Yes, it works, but if you click on \"save\", then all your changes are directly live. Typemill is much more flexible here and allows you to keep your original version live while you work on a **drafted version** in the background. This is how Typemill handles it: * In **visual mode**: Typemill stores your changes in a new draft automatically as soon as you save any content-block. * In **raw mode**: To store changes in a new draft, simply click on the \"save draft\"-button in the publish controller. * You can work on a draft as long as you want without changing the live version. Your changes go live if you click the button \"publish\". * In visual mode, you can also use the discard-button and go back to the published version. ","url":"http://localhost/typemill/welcome/write-content"},"http://localhost/typemill/welcome/get-help":{"title":"Get Help","content":" If you need any help, then please read the [documentation on typemill.net](https://typemill.net/typemill) first. Some short video-tutorials are in work right now. If you found a bug or if you have a question, then please open a new issue on [GitHub](https://github.com/typemill/typemill/issues). Do you need professional help, an individual theme or a special plugin? You can hire us at [Trendschau Digital](https://trendschau.net/typemill-development). [Contributions](https://github.com/typemill/typemill#contributors--supporters), [donations](https://www.paypal.me/typemill) and [feedback](https://github.com/typemill/typemill/issues) for this open source project are always welcome. ","url":"http://localhost/typemill/welcome/get-help"},"http://localhost/typemill/welcome/markdown-test":{"title":"Markdown Reference and Test Page","content":" Markdown is a simple and universal syntax for text formatting. More and more writers switch to markdown, because they can format their text during the writing process without using any format-buttons. Once they are familiar with the markdown syntax, they can write formatted text much easier and faster than with any standard HTML-editor. Developers love markdown, because it is much cleaner and saver than HTML. And they can easily convert markdown to a lot of other document formats like HTML and others. If you develop a theme for TYPEMILL, please take care that all elements on this page are designed properly. ## Table of Contents To create a table of contents, simply write `[TOC]` in a separate line. It will be replaced with a table of contents like this automatically. [TOC] ## Headlines ``` Headlines are simply done with hash chars like this: # First Level Headline ## Second Level Headline ### Third Level Headline #### Fourth Level Headline ##### Fifth Level Headline ###### Sixth Level Headline ``` ### Third Level Headline A third headline is more decent and lower prioritized than a second level headline. #### Fourth Level Headline A fourth level headline is more decent and lower prioritized than a third level headline. ##### Fifth Level Headline A fifth level headline is more decent and lower prioritized than a fourth level headline. ##### Sixth Level Headline A sixth level headline is more decent and lower prioritized than a fifths level headline. ##Paragraph ```` A paragraph is a simple text-block separated with a new line above and below. ```` A paragraph is a simple text-block separated with a new line above and below. ## Soft Linebreak ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ##Emphasis ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ##Lists ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 1. this ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 2. this ## Horizontal Rule ``` Easily created for example with three dashes like this: --- ``` Easily created for example with three dashes like this: --- ##Links ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can link to anchors like this [anchor](#images) You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. You can even use a download-link like []() ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can link to anchors like this [anchor](#images) You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. [markdown (PNG, 1.05 KB)](media/files/markdown.png){.tm-download file-png} ##Images ```` The same rules as with links, but with a ! ![alt-text](media/markdown.png) *With caption* ![alt-text](media/markdown.png \"my title\"){#myid .imgClass} *With caption that spans over several lines* ![alt-text](media/markdown.png \"my title\"){#myid .otherclass width=150px} ```` The same rules as with links, but with a ! ![alt](media/files/markdown.png){.center} *With Caption* ![alt](media/files/markdown.png \"title\"){.center} *With a caption that spans over several lines.* ![alt-text](media/files/markdown.png \"my title\"){#myid .otherclass width=150px} ## Linked Images ```` You can link an image with a nested syntax like this: [![alt-text](media/markdown.png)](https://typemill.net) ```` You can link an image with a nested syntax like this: [![alt-text](media/files/markdown.png){.imgClass}](https://typemill.net) ## Image Position ```` You can controll the image position with the classes .left, .right and .middle like this: ![alt-text](media/markdown.png){.left} *With caption that spans over several lines* ![alt-text](media/markdown.png){.right} *With caption that spans over several lines* ![alt-text](media/markdown.png){.center} *With caption that spans over several lines* ```` ![image float left](media/files/markdown.png){.left} *With caption that spans over several lines* The first image should float on the left side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image float right](media/files/markdown.png){.right} *With caption that spans over several lines* The second image should float on the right side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image center](media/files/markdown.png){.center} *With caption that spans over several lines* The thirds image should be placed above this paragraph and centered to the middle of the content area. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ## Blockquote ``` There are always some women and men with wise words > But I usually don't read them, to be honest. ``` There always some women and men with wise words > But I usually don't read them, to be honest. ##Footnotes ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Add the footnote text at the bottom of the page like this: [^1]: Thank you for scrolling. [^2]: This is the end of the page. ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Footnotes won't work with the visual editor right now, so please use the raw mode for them. ## Abbreviations ```` *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ```` You won't see the abbreviation directly, but if you write HTML or W3C somewhere, then you can see the tooltip with the explanation. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ## Definition List ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ## Notices You can create different notices if you add a '!', '!!', '!!!', '!!!!' before a line. This will wrap the content into a div-class with the classes `notice1`, `notice2`, `notice3` and `notice4`. You can also span notices over several lines. This logic follows some other CMS like Grav, Lektor or Yellow and it is not compatible with other markdown processors or editors. ! Notice 1 ! ! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !! Notice 2 !! !! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !!! Notice 3 !!! !!! Please note that you can use **markdown** inside of the notice so you can *format* your text here. ## Tables ```` |name |usage | |-----------|-----------| | My Name | For Me | | Your Name | For You | ```` | Name | Usage | | --------- | ------- | | My Name | For Me | | Your Name | For You | ## Code ```` Let us create some `` like this ```` Let us create some `` and now let us check, if a codeblock works: ```` Use four apostroph like this: \\```` \\```` ```` ## Math Please activate the math-plugin to use mathematical expressions with LaTeX syntax. You can choose between MathJax or the newer KaTeX library. MathJax is included from a CDN, KaTeX is included in the plugin. So if you don't want to fetch code from a CDN, use KaTeX instead. The markdown syntax in TYPEMILL is the same for both libraries. ```` Write inline math with \\(...\\) or $...$ syntax. inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` Write display math with $$...$$ or \\[...\\] syntax. $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ \\[ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) \\] ```` $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ [^1]: Thank you for scrolling. [^2]: This is the end of the page. ","url":"http://localhost/typemill/welcome/markdown-test"},"http://localhost/typemill/cyanine-theme":{"title":"The Cyanine Theme","content":" Cyanine is the modern, lightweight and flexible standard theme for Typemill. You can activate a landingpage, setup different content sections for the landingpage and order them like you want. You can also change the colors, fonts and other details. To configure the theme, login to the system (/tm/login), go to the theme settings (/tm/themes) and choose the theme \"Cyanine\". If Cyanine does not fit to your needs, then you can also choose another theme in the [theme store](https://themes.typemill.net) of Typemill. ","url":"http://localhost/typemill/cyanine-theme"},"http://localhost/typemill/cyanine-theme/landingpage":{"title":"The Landingpage","content":" Cyanine provides an optional landingpage with six segments: * **Intro** with the content of the home page and an additional link/button. * **Info** with individual markdown content. * **Teaser** with two elements. Each element has a headline, a text and a link/button. * **Contrast** with a headline, text-input and a link/button. The colors are inverted. * **Navigation** with the whole content of the website. You can change the depth of the navigation. * **News** with a link to a news-folder. It will display the three latest news in a card-design. Add a hero-image to each news-entry to show a teaser image. You can activate or deactivate the whole landingpage, order all elements and enable/disable each element individually. ","url":"http://localhost/typemill/cyanine-theme/landingpage"},"http://localhost/typemill/cyanine-theme/colors-and-fonts":{"title":"Colors and Fonts","content":" First of all cyanine supports individual logos. If you want to use our logo, then please upload it in the system settings. Cyanine will automatically replace the title text with your logo. You can also upload your own favicon in the system settings. Cyanine allows you to change many colors. Please make sure that your color-combinations are readable and accessible. The following colors are editable: * **Primary Theme Color**: used for the body background and borders. * **Secondary Theme Color**: used for content background, font-colors on hover and more. * **Primary Font Color**: used for main text. * **Secondary Font Color**: used as contrast color for hovers in navigation and buttons. * **Link Color**: used for text-links. Keep accessibility in mind. * **Thin Border Color**: used for thin borders in navigations and tables. You can also change the font-family for * headlines * text * buttons and navigations Cyanine uses wide spread system fonts with fallbacks: * serif * sans-serif * courier * helvetica * avenir * athelas * georgia * times * bodoni * calisto * garamond * baskerville If the color- and font-settings are not enough for your purpose, then you can always overwrite the theme-css with your own styles in the theme settings. ","url":"http://localhost/typemill/cyanine-theme/colors-and-fonts"},"http://localhost/typemill/cyanine-theme/footer":{"title":"3-Column Footer","content":" Cyanine provides a three column footer at the bottom of each page. You can use markdown for each column. Make sure that you use the correct headline-level (we suggest a headline level 3 or level 4 to keep the logical headline hierarchy in the document). You can, of course, also add link-lists or other elements. Check the website of [Typemill](https://typemill.net) for an example. ","url":"http://localhost/typemill/cyanine-theme/footer"},"http://localhost/typemill/cyanine-theme/content-elements":{"title":"Content Elements","content":" Cyanine provides a lot of other settings for your content area. For example: * Add an edit-button for github, gitlab or other plattforms. * Show the author. * Show the publish date. * Show the chapter numbers in the navigation. The Cyanine theme supports all content elements like tables, images, notices or downloads. It also supports anchor-links next to headlines, so you can deep link to certain content sections of your page. You can activate the anchors in the system settings of Typemill. ","url":"http://localhost/typemill/cyanine-theme/content-elements"}} \ No newline at end of file diff --git a/cache/readme.md b/cache/readme.md deleted file mode 100644 index e233ab8..0000000 --- a/cache/readme.md +++ /dev/null @@ -1 +0,0 @@ -Please make this folder writable \ No newline at end of file diff --git a/composer.json b/composer.json index f180aa1..bdc3889 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "erusev/parsedown-extra": "dev-master", "jbroadway/urlify": "1.1.3", "vlucas/valitron": "dev-master", - "laminas/laminas-permissions-acl": "^2.7" + "laminas/laminas-permissions-acl": "^2.7", + "akrabat/proxy-detection-middleware": "^0.4.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 1b33e3a..a9b5502 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,57 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "87094a87b3a795ce73c299e4535358fb", + "content-hash": "7539fdddfa1c0b8d030fa5955b45a928", "packages": [ + { + "name": "akrabat/proxy-detection-middleware", + "version": "0.4", + "source": { + "type": "git", + "url": "https://github.com/akrabat/proxy-detection-middleware.git", + "reference": "226be882e2cce69b7f4140d8fb2e73147317a8a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/akrabat/proxy-detection-middleware/zipball/226be882e2cce69b7f4140d8fb2e73147317a8a2", + "reference": "226be882e2cce69b7f4140d8fb2e73147317a8a2", + "shasum": "" + }, + "require": { + "psr/http-message": "^1.0" + }, + "require-dev": { + "php": ">=7.0", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2.3", + "zendframework/zend-diactoros": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "RKA\\Middleware\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + } + ], + "description": "PSR-7 Middleware that determines the scheme, host and port from the 'X-Forwarded-Proto', 'X-Forwarded-Host' and 'X-Forwarded-Port' headers and updates the Request's Uri object.", + "homepage": "http://github.com/akrabat/proxy-detection-middleware", + "keywords": [ + "IP", + "middleware", + "psr7" + ], + "time": "2018-09-11T10:28:26+00:00" + }, { "name": "erusev/parsedown", "version": "1.8.0-beta-7", diff --git a/content/00-welcome/02-get-help.md b/content/00-welcome/02-get-help.md index 148b2c6..b121e36 100644 --- a/content/00-welcome/02-get-help.md +++ b/content/00-welcome/02-get-help.md @@ -1,6 +1,6 @@ # Get Help -If you need any help, then please read the [documentation on typemill.net](https://typemill.net/typemill) first. Some short video-tutorials are in work right now. +If you need any help, then please read the [documentation on typemill.net](https://typemill.net/typemill) first. Some short video-tutorials are in work right now. [linktest](/welcome) If you found a bug or if you have a question, then please open a new issue on [GitHub](https://github.com/typemill/typemill/issues). diff --git a/content/00-welcome/03-markdown-test.md b/content/00-welcome/03-markdown-test.md index 18c5aa6..093fd9a 100644 --- a/content/00-welcome/03-markdown-test.md +++ b/content/00-welcome/03-markdown-test.md @@ -117,6 +117,7 @@ Easily created for example with three dashes like this: ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). +You can link to anchors like this [anchor](#images) You can also add a [title](http://typemill.net "typemill"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. @@ -127,6 +128,8 @@ This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). +You can link to anchors like this [anchor](#images) + You can also add a [title](http://typemill.net "typemill"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. diff --git a/media/custom/pexels-bugra-dogan-3561946-100x100.jpeg b/media/custom/pexels-bugra-dogan-3561946-100x100.jpeg new file mode 100644 index 0000000..f37b86b Binary files /dev/null and b/media/custom/pexels-bugra-dogan-3561946-100x100.jpeg differ diff --git a/media/custom/pexels-bugra-dogan-3561946-250x250.jpeg b/media/custom/pexels-bugra-dogan-3561946-250x250.jpeg new file mode 100644 index 0000000..e5b4cfa Binary files /dev/null and b/media/custom/pexels-bugra-dogan-3561946-250x250.jpeg differ diff --git a/media/custom/union-berlin-100x100.jpeg b/media/custom/union-berlin-100x100.jpeg new file mode 100644 index 0000000..3ca58ff Binary files /dev/null and b/media/custom/union-berlin-100x100.jpeg differ diff --git a/media/live/example-1.webp b/media/live/example-1.webp new file mode 100644 index 0000000..d32eb7a Binary files /dev/null and b/media/live/example-1.webp differ diff --git a/media/live/example.webp b/media/live/example.webp new file mode 100644 index 0000000..d32eb7a Binary files /dev/null and b/media/live/example.webp differ diff --git a/media/live/pexels-bugra-dogan-3561946.jpeg b/media/live/pexels-bugra-dogan-3561946.jpeg new file mode 100644 index 0000000..3840135 Binary files /dev/null and b/media/live/pexels-bugra-dogan-3561946.jpeg differ diff --git a/media/live/procontra.png b/media/live/procontra.png new file mode 100644 index 0000000..1f03bf2 Binary files /dev/null and b/media/live/procontra.png differ diff --git a/media/live/streetstyle-nyc16.jpeg b/media/live/streetstyle-nyc16.jpeg new file mode 100644 index 0000000..8d0cea6 Binary files /dev/null and b/media/live/streetstyle-nyc16.jpeg differ diff --git a/media/original/example-1.webp b/media/original/example-1.webp new file mode 100644 index 0000000..89e6075 Binary files /dev/null and b/media/original/example-1.webp differ diff --git a/media/original/example.webp b/media/original/example.webp new file mode 100644 index 0000000..89e6075 Binary files /dev/null and b/media/original/example.webp differ diff --git a/media/original/pexels-bugra-dogan-3561946.jpeg b/media/original/pexels-bugra-dogan-3561946.jpeg new file mode 100644 index 0000000..4c5bfe9 Binary files /dev/null and b/media/original/pexels-bugra-dogan-3561946.jpeg differ diff --git a/media/original/procontra.png b/media/original/procontra.png new file mode 100644 index 0000000..66223d1 Binary files /dev/null and b/media/original/procontra.png differ diff --git a/media/original/streetstyle-nyc16.jpeg b/media/original/streetstyle-nyc16.jpeg new file mode 100644 index 0000000..ca46ab8 Binary files /dev/null and b/media/original/streetstyle-nyc16.jpeg differ diff --git a/media/thumbs/example-1.webp b/media/thumbs/example-1.webp new file mode 100644 index 0000000..bce1841 Binary files /dev/null and b/media/thumbs/example-1.webp differ diff --git a/media/thumbs/example.webp b/media/thumbs/example.webp new file mode 100644 index 0000000..bce1841 Binary files /dev/null and b/media/thumbs/example.webp differ diff --git a/media/thumbs/pexels-bugra-dogan-3561946.jpeg b/media/thumbs/pexels-bugra-dogan-3561946.jpeg new file mode 100644 index 0000000..0f634fe Binary files /dev/null and b/media/thumbs/pexels-bugra-dogan-3561946.jpeg differ diff --git a/media/thumbs/procontra.png b/media/thumbs/procontra.png new file mode 100644 index 0000000..e7b86d0 Binary files /dev/null and b/media/thumbs/procontra.png differ diff --git a/media/thumbs/streetstyle-nyc16.jpeg b/media/thumbs/streetstyle-nyc16.jpeg new file mode 100644 index 0000000..c9f9f6a Binary files /dev/null and b/media/thumbs/streetstyle-nyc16.jpeg differ diff --git a/system/Assets.php b/system/Assets.php index bc6265d..ad7e83e 100644 --- a/system/Assets.php +++ b/system/Assets.php @@ -38,7 +38,7 @@ class Assets $resize = '-'; - if(ctype_digit($width) && $width < 10000) + if(is_int($width) && $width < 10000) { $resize .= $width; $desiredSizes['custom']['width'] = $width; @@ -46,7 +46,7 @@ class Assets $resize .= 'x'; - if(ctype_digit($height) && $height < 10000) + if(is_int($height) && $height < 10000) { $resize .= $height; $desiredSizes['custom']['height'] = $height; @@ -125,7 +125,7 @@ class Assets public function src() { - return $this->imageUrl; + return $this->baseUrl . '/' . $this->imageUrl; } public function addCSS($CSS) diff --git a/system/Controllers/ArticleApiController.php b/system/Controllers/ArticleApiController.php index b2fc511..351a9de 100644 --- a/system/Controllers/ArticleApiController.php +++ b/system/Controllers/ArticleApiController.php @@ -977,7 +977,7 @@ class ArticleApiController extends ContentController } # parse markdown-content-array to content-string - $content[$key] = ['id' => $key, 'html' => $parsedown->markup($contentArray, $relurl)]; + $content[$key] = ['id' => $key, 'html' => $parsedown->markup($contentArray)]; } if($toc) diff --git a/system/Controllers/AuthController.php b/system/Controllers/AuthController.php index b908f02..205ecfe 100644 --- a/system/Controllers/AuthController.php +++ b/system/Controllers/AuthController.php @@ -116,6 +116,13 @@ class AuthController extends Controller if($userdata && password_verify($params['password'], $userdata['password'])) { + # check if user has confirmed the account + if(isset($userdata['optintoken']) && $userdata['optintoken']) + { + $this->c->flash->addMessage('error', 'Your registration is not confirmed yet. Please check your e-mails and use the confirmation link.'); + return $response->withRedirect($this->c->router->pathFor('auth.show')); + } + $user->login($userdata['username']); /* clear the user login attemps */ diff --git a/system/Controllers/BlockApiController.php b/system/Controllers/BlockApiController.php index 07d6857..73b3be6 100644 --- a/system/Controllers/BlockApiController.php +++ b/system/Controllers/BlockApiController.php @@ -143,7 +143,7 @@ class BlockApiController extends ContentController else { # parse markdown-content-array to content-string - $blockHTML = $parsedown->markup($blockArray, $relurl); + $blockHTML = $parsedown->markup($blockArray); # if it is a headline if($blockMarkdown[0] == '#') @@ -195,7 +195,7 @@ class BlockApiController extends ContentController } # parse markdown-content-array to content-string - $content[$key] = ['id' => $key, 'html' => $parsedown->markup($contentArray, $relurl)]; + $content[$key] = ['id' => $key, 'html' => $parsedown->markup($contentArray)]; } # if page has a table of content @@ -353,7 +353,7 @@ class BlockApiController extends ContentController else { # parse markdown-content-array to content-string - $blockHTML = $parsedown->markup($blockArray, $relurl); + $blockHTML = $parsedown->markup($blockArray); # if it is a headline if($blockMarkdown[0] == '#') diff --git a/system/Controllers/ContentBackendController.php b/system/Controllers/ContentBackendController.php index 2d8b24a..9a637ea 100644 --- a/system/Controllers/ContentBackendController.php +++ b/system/Controllers/ContentBackendController.php @@ -157,7 +157,7 @@ class ContentBackendController extends ContentController $contentArray = $parsedown->text($block); /* parse markdown-content-array to content-string */ - $content[$key] = $parsedown->markup($contentArray, $relurl); + $content[$key] = $parsedown->markup($contentArray); } # extract title and delete from content array, array will start at 1 after that. diff --git a/system/Controllers/PageController.php b/system/Controllers/PageController.php index 3a58db3..62bd779 100644 --- a/system/Controllers/PageController.php +++ b/system/Controllers/PageController.php @@ -206,15 +206,15 @@ class PageController extends Controller $parsedown->setSafeMode(true); /* parse markdown-file to content-array */ - $contentArray = $parsedown->text($contentMD, $itemUrl); + $contentArray = $parsedown->text($contentMD); $contentArray = $this->c->dispatcher->dispatch('onContentArrayLoaded', new OnContentArrayLoaded($contentArray))->getData(); /* parse markdown-content-array to content-string */ - $contentHTML = $parsedown->markup($contentArray, $itemUrl); + $contentHTML = $parsedown->markup($contentArray); $contentHTML = $this->c->dispatcher->dispatch('onHtmlLoaded', new OnHtmlLoaded($contentHTML))->getData(); /* extract the h1 headline*/ - $contentParts = explode("", $contentHTML); + $contentParts = explode("", $contentHTML, 2); $title = isset($contentParts[0]) ? strip_tags($contentParts[0]) : $settings['title']; $contentHTML = isset($contentParts[1]) ? $contentParts[1] : $contentHTML; @@ -240,9 +240,19 @@ class PageController extends Controller $img_alt = isset($img_alt_result[1]) ? $img_alt_result[1] : false; } } + elseif($logo) + { + $img_url = $logo; + $pathinfo = pathinfo($settings['logo']); + $img_alt = $pathinfo['filename']; + } } - $firstImage = array('img_url' => $base_url . '/' . $img_url, 'img_alt' => $img_alt); + $firstImage = false; + if($img_url) + { + $firstImage = array('img_url' => $base_url . '/' . $img_url, 'img_alt' => $img_alt); + } $route = empty($args) && isset($settings['themes'][$theme]['cover']) ? '/cover.twig' : '/index.twig'; diff --git a/system/Controllers/SettingsController.php b/system/Controllers/SettingsController.php index 422b3d5..9ac4dd8 100644 --- a/system/Controllers/SettingsController.php +++ b/system/Controllers/SettingsController.php @@ -23,7 +23,7 @@ class SettingsController extends Controller $route = $request->getAttribute('route'); $navigation = $this->getNavigation(); - $content = '

Hello

'; + $content = '

Hello

I am the showBlank method from the settings controller

In most cases I have been called from a plugin. But if you see this content, then the plugin does not work or has forgotten to inject its own content.

'; return $this->render($response, 'settings/blank.twig', array( 'settings' => $settings, @@ -40,7 +40,7 @@ class SettingsController extends Controller *********************/ public function showSettings($request, $response, $args) - { + { $user = new User(); $settings = $this->c->get('settings'); $defaultSettings = \Typemill\Settings::getDefaultSettings(); @@ -65,7 +65,7 @@ class SettingsController extends Controller 'locale' => $locale, 'formats' => $defaultSettings['formats'], 'access' => $options, - 'route' => $route->getName() + 'route' => $route->getName() )); } @@ -83,18 +83,26 @@ class SettingsController extends Controller if($newSettings) { - /* make sure only allowed fields are stored */ + # check for image settings + $imgwidth = isset($newSettings['images']['live']['width']) ? $newSettings['images']['live']['width'] : false; + $imgheight = isset($newSettings['images']['live']['height']) ? $newSettings['images']['live']['height'] : false; + + # make sure only allowed fields are stored $newSettings = array( - 'title' => $newSettings['title'], - 'author' => $newSettings['author'], - 'copyright' => $newSettings['copyright'], - 'year' => $newSettings['year'], - 'language' => $newSettings['language'], - 'langattr' => $newSettings['langattr'], - 'editor' => $newSettings['editor'], - 'access' => $newSettings['access'], - 'formats' => $newSettings['formats'], - 'headlineanchors' => isset($newSettings['headlineanchors']) ? $newSettings['headlineanchors'] : null, + 'title' => $newSettings['title'], + 'author' => $newSettings['author'], + 'copyright' => $newSettings['copyright'], + 'year' => $newSettings['year'], + 'language' => $newSettings['language'], + 'langattr' => $newSettings['langattr'], + 'editor' => $newSettings['editor'], + 'access' => $newSettings['access'], + 'formats' => $newSettings['formats'], + 'headlineanchors' => isset($newSettings['headlineanchors']) ? $newSettings['headlineanchors'] : null, + 'displayErrorDetails' => isset($newSettings['displayErrorDetails']) ? true : null, + 'twigcache' => isset($newSettings['twigcache']) ? true : null, + 'proxy' => isset($newSettings['proxy']) ? true : null, + 'trustedproxies' => $newSettings['trustedproxies'] ); # https://www.slimframework.com/docs/v3/cookbook/uploading-files.html; @@ -102,6 +110,17 @@ class SettingsController extends Controller $copyright = $this->getCopyright(); $validate->settings($newSettings, $copyright, $defaultSettings['formats'], 'settings'); + + # use custom image settings + if( $imgwidth && ctype_digit($imgwidth) && (strlen($imgwidth) < 5) ) + { + $newSettings['images']['live']['width'] = $imgwidth; + } + if( $imgheight && ctype_digit($imgheight) && (strlen($imgheight) < 5) ) + { + $newSettings['images']['live']['height'] = $imgheight; + } + } else { @@ -733,7 +752,9 @@ class SettingsController extends Controller { # set image size $settings = $this->c->get('settings'); - $settings->replace(['images' => ['live' => ['width' => 500, 'height' => 500]]]); + $imageSizes = $settings['images']; + $imageSizes['live'] = ['width' => 500, 'height' => 500]; + $settings->replace(['images' => $imageSizes]); $imageresult = $this->saveImages($imageFields, $userdata, $settings, $images['user']); if(isset($_SESSION['slimFlash']['error'])) @@ -818,6 +839,42 @@ class SettingsController extends Controller } } + public function clearCache($request, $response, $args) + { + $settings = $this->c->get('settings'); + $dir = $settings['basePath'] . 'cache'; + $iterator = new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS); + $files = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST); + + $error = false; + + foreach($files as $file) + { + if ($file->isDir()) + { + if(!rmdir($file->getRealPath())) + { + $error = 'Could not delete some folders.'; + } + } + elseif($file->getExtension() !== 'css') + { + if(!unlink($file->getRealPath()) ) + { + $error = 'Could not delete some files.'; + } + } + } + + if($error) + { + return $response->withJson(['errors' => $error], 500); + } + + return $response->withJson(array('errors' => false)); + + } + private function getUserFields($role) { $fields = []; @@ -996,7 +1053,6 @@ class SettingsController extends Controller protected function saveImages($imageFields, $userInput, $userSettings, $files) { - # initiate image processor with standard image sizes $processImages = new ProcessImage($userSettings['images']); @@ -1029,5 +1085,6 @@ class SettingsController extends Controller } } return $userInput; - } -} + } + +} \ No newline at end of file diff --git a/system/Extensions/ParsedownExtension.php b/system/Extensions/ParsedownExtension.php index fafe83e..e38d6bc 100644 --- a/system/Extensions/ParsedownExtension.php +++ b/system/Extensions/ParsedownExtension.php @@ -6,13 +6,16 @@ use \URLify; class ParsedownExtension extends \ParsedownExtra { - function __construct($showAnchor = NULL) + function __construct($showAnchor = NULL, $skipAbsoluteUrls = NULL) { parent::__construct(); # show anchor next to headline? $this->showAnchor = $showAnchor; + # base url is needed for media/images and relative links (e.g. if www.mydomain.com/mywebsite) + $this->baseUrl = $skipAbsoluteUrls ? '' : TM_BASE_URL; + # math support $this->BlockTypes['\\'][] = 'Math'; $this->BlockTypes['$'][] = 'Math'; @@ -38,18 +41,18 @@ class ParsedownExtension extends \ParsedownExtra public function text($text, $relurl = null) { - $this->relurl = $relurl ? $relurl : ''; + # $this->relurl = $relurl ? $relurl : ''; $Elements = $this->textElements($text); return $Elements; } - public function markup($Elements, $relurl) + public function markup($Elements) { # make relurl available for other functions - $this->relurl = $relurl; +# $this->relurl = $relurl; # convert to markup $markup = $this->elements($Elements); @@ -75,7 +78,6 @@ class ParsedownExtension extends \ParsedownExtra $markup .= "\n" . $this->element($Element); } - return $markup; } @@ -352,7 +354,7 @@ class ParsedownExtension extends \ParsedownExtra 'text' => $text, 'handler' => 'line', 'attributes' => array( - 'id' => "$headline" + 'id' => "h-$headline" ) ) ); @@ -363,8 +365,9 @@ class ParsedownExtension extends \ParsedownExtra array( 'name' => 'a', 'attributes' => array( - 'href' => $this->relurl . "#" . $headline, - 'class' => 'tm-heading-anchor', +# 'href' => $this->relurl . "#" . $headline, + 'href' => "#h-" . $headline, + 'class' => 'tm-heading-anchor', ), 'text' => '#', ), @@ -391,15 +394,16 @@ class ParsedownExtension extends \ParsedownExtra $thisLevel = $headline['level']; $prevLevel = $key > 0 ? $headlines[$key-1]['level'] : 1; $nextLevel = isset($headlines[$key+1]) ? $headlines[$key+1]['level'] : 0; - + if($thisLevel > $prevLevel) { $markup .= ''; $thisLevel--; } + + if($thisLevel > 0) + { + $markup .= ''; + } } } - $markup .= ''; - return $markup; } @@ -434,7 +441,8 @@ class ParsedownExtension extends \ParsedownExtra $href = $element['element']['element']['attributes']['href']; - $element['element']['element']['attributes']['href'] = $this->relurl . $href; +# $element['element']['element']['attributes']['href'] = $this->relurl . $href; + $element['element']['element']['attributes']['href'] = $href; return $element; } @@ -487,8 +495,9 @@ class ParsedownExtension extends \ParsedownExtra $backLinkElements[] = array( 'name' => 'a', 'attributes' => array( - 'href' => $this->relurl . "#fnref$number:$definitionId", - 'rev' => 'footnote', +# 'href' => $this->relurl . "#fnref$number:$definitionId", + 'href' => "#fnref$number:$definitionId", + 'rev' => 'footnote', 'class' => 'footnote-backref', ), 'rawHtml' => '↩', @@ -704,98 +713,188 @@ class ParsedownExtension extends \ParsedownExtra protected $regexAttribute = '(?:[#.][-\w:\\\]+[ ]*|[-\w:\\\]+(?:=(?:["\'][^\n]*?["\']|[^\s]+)?)?[ ]*)'; - # turn markdown into an array of markdown blocks for typemill edit mode - function markdownToArrayBlocks($markdown) + + + # manipulated method linesElements, returns array of markdown blocks + public function markdownToArrayBlocks($markdown) { + + # make sure no definitions are set + $this->DefinitionData = array(); + # standardize line breaks - $markdown = str_replace(array("\r\n", "\r"), "\n", $markdown); + $text = str_replace(array("\r\n", "\r"), "\n", $markdown); # remove surrounding line breaks - $markdown = trim($markdown, "\n"); + $text = trim($text, "\n"); - # trim to maximum two linebreaks - - # split text into blocks - $blocks = explode("\n\n", $markdown); - - # clean up code blocks - $cleanBlocks = array(); - - # holds the content of codeblocks - $codeBlock = ''; - - # flag if codeblock is on or off. - $codeBlockOn = false; - - # holds the content of a definition list - $definitionList = ""; + # split text into lines + $lines = explode("\n", $text); - # flag if definition-list is on or off. - $definitionListOn = false; + # manipulated method linesElements - foreach($blocks as $block) + $Elements = array(); + $CurrentBlock = null; +/*new*/ $mdElements = array(); + + foreach ($lines as $line) { - # remove empty lines - if (chop($block) === '') continue; - - # if the block starts with a fenced code - if(substr($block,0,2) == '``') + if (chop($line) === '') { - # and if we are in an open code-block - if($codeBlockOn) + if (isset($CurrentBlock)) { - # it must be the end of the codeblock, so add it to the codeblock - $block = $codeBlock . "\n" . $block; - - # reset codeblock-value and close the codeblock. - $codeBlock = ''; - $codeBlockOn = false; + $CurrentBlock['interrupted'] = (isset($CurrentBlock['interrupted']) + ? $CurrentBlock['interrupted'] + 1 : 1 + ); } - else - { - # it must be the start of the codeblock. - $codeBlockOn = true; - } - } - if($codeBlockOn) - { - # if the codeblock is complete - if($this->isComplete($block)) - { - $block = $codeBlock . "\n" . $block; - # reset codeblock-value and close the codeblock. - $codeBlock = ''; - $codeBlockOn = false; - } - else + continue; + } + + while (($beforeTab = strstr($line, "\t", true)) !== false) + { + $shortage = 4 - mb_strlen($beforeTab, 'utf-8') % 4; + + $line = $beforeTab + . str_repeat(' ', $shortage) + . substr($line, strlen($beforeTab) + 1) + ; + } + + $indent = strspn($line, ' '); + + $text = $indent > 0 ? substr($line, $indent) : $line; + + # ~ + + $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); + + # ~ + + # if we are in a multiline block element + if (isset($CurrentBlock['continuable'])) + { + $methodName = 'block' . $CurrentBlock['type'] . 'Continue'; + $Block = $this->$methodName($Line, $CurrentBlock); + + # if this line still belongs to the current multiline block + if (isset($Block)) { - $codeBlock .= "\n" . $block; + $CurrentBlock = $Block; +/*new*/ $mdCurrentBlock = $mdCurrentBlock . "\n" . $line; continue; } + # if this line does not belong to the current multiline block + else + { + # if multiline block element is finished + if ($this->isBlockCompletable($CurrentBlock['type'])) + { + $methodName = 'block' . $CurrentBlock['type'] . 'Complete'; + $CurrentBlock = $this->$methodName($CurrentBlock); +/*new*/ $mdCurrentBlock = $mdCurrentBlock; + } + } } - - # handle definition lists - $checkDL = preg_split('/\r\n|\r|\n/',$block); - if(isset($checkDL[1]) && substr($checkDL[1],0,2) == ': ') + + # ~ + + $marker = $text[0]; + + # ~ + + $blockTypes = $this->unmarkedBlockTypes; + + if (isset($this->BlockTypes[$marker])) { - $definitionList .= $block . "\n\n"; - $definitionListOn = true; - continue; + foreach ($this->BlockTypes[$marker] as $blockType) + { + $blockTypes []= $blockType; + } } - elseif($definitionListOn) + + # + # ~ + + foreach ($blockTypes as $blockType) { - $cleanBlocks[] = $definitionList; - $definitionList = ""; - $definitionListOn = false; + $Block = $this->{"block$blockType"}($Line, $CurrentBlock); +/*new*/ $mdBlock = $line; + if (isset($Block)) + { + $Block['type'] = $blockType; + if ( ! isset($Block['identified'])) + { + if (isset($CurrentBlock)) + { + $Elements[] = $this->extractElement($CurrentBlock); +/*new*/ $mdElements[] = $mdCurrentBlock; + } + + $Block['identified'] = true; + } + + if ($this->isBlockContinuable($blockType)) + { + $Block['continuable'] = true; + } + + $CurrentBlock = $Block; +/*new*/ $mdCurrentBlock = $mdBlock; + continue 2; + } } - - $block = trim($block, "\n"); - - $cleanBlocks[] = $block; + + # ~ + + if (isset($CurrentBlock) and $CurrentBlock['type'] === 'Paragraph') + { + $Block = $this->paragraphContinue($Line, $CurrentBlock); +/*new*/ $mdBlock = $mdCurrentBlock . "\n" . $line; + } + + if (isset($Block)) + { + $CurrentBlock = $Block; +/*new*/ $mdCurrentBlock = $mdBlock; + } + else + { + if (isset($CurrentBlock)) + { + $Elements[] = $this->extractElement($CurrentBlock); +/*new*/ $mdElements[] = $mdCurrentBlock; + } + + $CurrentBlock = $this->paragraph($Line); +/*new*/ $mdCurrentBlock = $line; + $CurrentBlock['identified'] = true; + } + } - return $cleanBlocks; + + # ~ + + if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) + { + $methodName = 'block' . $CurrentBlock['type'] . 'Complete'; + $CurrentBlock = $this->$methodName($CurrentBlock); +/*new*/ $mdCurrentBlock = $mdCurrentBlock; + } + + # ~ + + if (isset($CurrentBlock)) + { + $Elements[] = $this->extractElement($CurrentBlock); +/*new*/ $mdElements[] = $mdCurrentBlock; + } + + # ~ +/*new*/ return $mdElements; +# return $Elements; } + public function arrayBlocksToMarkdown(array $arrayBlocks) { @@ -823,4 +922,106 @@ class ParsedownExtension extends \ParsedownExtra } return false; } + + + protected function inlineLink($Excerpt) + { + $Element = array( + 'name' => 'a', + 'handler' => array( + 'function' => 'lineElements', + 'argument' => null, + 'destination' => 'elements', + ), + 'nonNestables' => array('Url', 'Link'), + 'attributes' => array( + 'href' => null, + 'title' => null, + ), + ); + + $extent = 0; + + $remainder = $Excerpt['text']; + + if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches)) + { + $Element['handler']['argument'] = $matches[1]; + + $extent += strlen($matches[0]); + + $remainder = substr($remainder, $extent); + } + else + { + return; + } + + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*+"|\'[^\']*+\'))?\s*+[)]/', $remainder, $matches)) + { + # start typemill: if relative link or media-link + $href = $matches[1]; + if($href[0] == '/') + { + $href = $this->baseUrl . $href; + } + elseif(substr( $href, 0, 6 ) === "media/") + { + $href = $this->baseUrl . '/' . $href; + } + # end typemill + + $Element['attributes']['href'] = $href; + + if (isset($matches[2])) + { + $Element['attributes']['title'] = substr($matches[2], 1, - 1); + } + + $extent += strlen($matches[0]); + } + else + { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) + { + $definition = strlen($matches[1]) ? $matches[1] : $Element['handler']['argument']; + $definition = strtolower($definition); + + $extent += strlen($matches[0]); + } + else + { + $definition = strtolower($Element['handler']['argument']); + } + + if ( ! isset($this->DefinitionData['Reference'][$definition])) + { + return; + } + + $Definition = $this->DefinitionData['Reference'][$definition]; + + $Element['attributes']['href'] = $Definition['url']; + $Element['attributes']['title'] = $Definition['title']; + } + + $Link = array( + 'extent' => $extent, + 'element' => $Element, + ); + + # Parsedown Extra + $remainder = $Link !== null ? substr($Excerpt['text'], $Link['extent']) : ''; + + if (preg_match('/^[ ]*{('.$this->regexAttribute.'+)}/', $remainder, $matches)) + { + $Link['element']['attributes'] += $this->parseAttributeData($matches[1]); + + $Link['extent'] += strlen($matches[0]); + } + + return $Link; + + } + } \ No newline at end of file diff --git a/system/Extensions/TwigMarkdownExtension.php b/system/Extensions/TwigMarkdownExtension.php index 4d0c0c7..ae4aa6c 100644 --- a/system/Extensions/TwigMarkdownExtension.php +++ b/system/Extensions/TwigMarkdownExtension.php @@ -19,6 +19,6 @@ class TwigMarkdownExtension extends \Twig_Extension $markdownArray = $parsedown->text($markdown); - return $parsedown->markup($markdownArray, false); + return $parsedown->markup($markdownArray); } } \ No newline at end of file diff --git a/system/Models/ProcessAssets.php b/system/Models/ProcessAssets.php index 4752e89..b64c08d 100644 --- a/system/Models/ProcessAssets.php +++ b/system/Models/ProcessAssets.php @@ -249,5 +249,5 @@ class ProcessAssets } return $bytes; - } + } } \ No newline at end of file diff --git a/system/Models/ProcessImage.php b/system/Models/ProcessImage.php index a62c58f..4bfceee 100644 --- a/system/Models/ProcessImage.php +++ b/system/Models/ProcessImage.php @@ -177,7 +177,7 @@ class ProcessImage extends ProcessAssets $new = imagecreatetruecolor($desired['width'], $desired['height']); // preserve transparency - if($imageType == "gif" or $imageType == "png") + if($imageType == "gif" or $imageType == "png" or $imageType == "webp") { imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127)); imagealphablending($new, false); @@ -214,6 +214,10 @@ class ProcessImage extends ProcessAssets { $result = imagegif( $image, $folder . $name . '.gif' ); } + elseif($type == "webp") + { + $result = imagewebp( $image, $folder . $name . '.webp', 100); + } elseif($type == "jpg" OR $type == "jpeg") { $result = imagejpeg( $image, $folder . $name . '.' . $type ); @@ -400,6 +404,7 @@ class ProcessImage extends ProcessAssets case 'jpg' : case 'jpeg': $image = imagecreatefromjpeg($imagePath); break; case 'png': $image = imagecreatefrompng($imagePath); break; + case 'webp': $image = imagecreatefromwebp($imagePath); break; default: return 'image type not supported'; } diff --git a/system/Models/User.php b/system/Models/User.php index d990b5f..ec2f6e9 100644 --- a/system/Models/User.php +++ b/system/Models/User.php @@ -38,26 +38,12 @@ class User extends WriteYaml } public function createUser($params) - { - $userdata = array( - 'username' => $params['username'], - 'email' => $params['email'], - 'password' => $this->generatePassword($params['password']), - 'userrole' => $params['userrole'] - ); - - if(isset($params['firstname'])) - { - $userdata['firstname'] = $params['firstname']; - } - if(isset($params['lastname'])) - { - $userdata['lastname'] = $params['lastname']; - } + { + $params['password'] = $this->generatePassword($params['password']); - if($this->updateYaml('settings/users', $userdata['username'] . '.yaml', $userdata)) + if($this->updateYaml('settings/users', $params['username'] . '.yaml', $params)) { - return $userdata['username']; + return $params['username']; } return false; } @@ -81,11 +67,14 @@ class User extends WriteYaml } $update = array_merge($userdata, $params); + + # cleanup data here + $this->updateYaml('settings/users', $userdata['username'] . '.yaml', $update); # if user updated his own profile, update session data - if($_SESSION['user'] == $params['username']) + if(isset($_SESSION['user']) && $_SESSION['user'] == $params['username']) { $_SESSION['role'] = $update['userrole']; diff --git a/system/Models/Validation.php b/system/Models/Validation.php index 84b0554..0391abe 100644 --- a/system/Models/Validation.php +++ b/system/Models/Validation.php @@ -29,12 +29,12 @@ class Validation Validator::addRule('image_types', function($field, $value, array $params, array $fields) use ($user) { - $allowed = ['jpg', 'jpeg', 'png']; + $allowed = ['jpg', 'jpeg', 'png', 'webp']; $pathinfo = pathinfo($value); $extension = strtolower($pathinfo['extension']); - if(array_search($extension, $allowed)){ return true; } + if(in_array($extension, $allowed)){ return true; } return false; - }, 'only jpg, jpeg, png allowed'); + }, 'only jpg, jpeg, png, webp, allowed'); Validator::addRule('userAvailable', function($field, $value, array $params, array $fields) use ($user) { @@ -50,6 +50,19 @@ class Validation return false; }, 'does not exist'); + Validator::addRule('iplist', function($field, $value, array $params, array $fields) use ($user) + { + $iplist = explode(",", $value); + foreach($iplist as $ip) + { + if( filter_var( trim($ip), \FILTER_VALIDATE_IP) === false) + { + return false; + } + } + return true; + }, 'contains one or more invalid ip-adress'); + Validator::addRule('checkPassword', function($field, $value, array $params, array $fields) use ($user) { $userdata = $user->getUser($fields['username']); @@ -218,6 +231,7 @@ class Validation $v->rule('in', 'editor', ['raw', 'visual']); $v->rule('values_allowed', 'formats', $formats); $v->rule('in', 'copyright', $copyright); + $v->rule('iplist', 'trustedproxies'); return $this->validationResult($v, $name); } diff --git a/system/Models/WriteCache.php b/system/Models/WriteCache.php index 2d0f461..cfb80c2 100644 --- a/system/Models/WriteCache.php +++ b/system/Models/WriteCache.php @@ -46,11 +46,16 @@ class WriteCache extends Write public function updateCache($folderName, $cacheFileName, $requestFileName, $cacheData) { $sCacheData = serialize($cacheData); - $this->writeFile($folderName, $cacheFileName, $sCacheData); - if($requestFileName) + if($this->writeFile($folderName, $cacheFileName, $sCacheData)) { - $this->writeFile($folderName, $requestFileName, time()); + if($requestFileName) + { + $this->writeFile($folderName, $requestFileName, time()); + } + + return true; } + return false; } /** diff --git a/system/Plugin.php b/system/Plugin.php index 216f4cc..2ec3eaa 100644 --- a/system/Plugin.php +++ b/system/Plugin.php @@ -153,7 +153,7 @@ abstract class Plugin implements EventSubscriberInterface $parsedown = new ParsedownExtension(); $contentArray = $parsedown->text($markdown); - $html = $parsedown->markup($contentArray,false); + $html = $parsedown->markup($contentArray); return $html; } diff --git a/system/Plugins.php b/system/Plugins.php index f40000a..5e4ba9e 100644 --- a/system/Plugins.php +++ b/system/Plugins.php @@ -77,8 +77,7 @@ class Plugins if( isset($route['httpMethod']) AND in_array($route['httpMethod'], array('get','post','put','delete','head','patch','options')) AND isset($route['route']) AND is_string($route['route']) - AND isset($route['class']) AND is_string($route['class']) - AND !$this->in_array_r(strtolower($route['route']),$routes)) + AND isset($route['class']) AND is_string($route['class'])) { return true; } diff --git a/system/Routes/Api.php b/system/Routes/Api.php index f1095a6..ab786a5 100644 --- a/system/Routes/Api.php +++ b/system/Routes/Api.php @@ -10,6 +10,7 @@ use Typemill\Controllers\MetaApiController; use Typemill\Middleware\RestrictApiAccess; $app->get('/api/v1/themes', SettingsController::class . ':getThemeSettings')->setName('api.themes')->add(new RestrictApiAccess($container['router'])); +$app->delete('/api/v1/clearcache', SettingsController::class . ':clearCache')->setName('api.clearcache')->add(new RestrictApiAccess($container['router'])); $app->post('/api/v1/article/markdown', ArticleApiController::class . ':getArticleMarkdown')->setName('api.article.markdown')->add(new RestrictApiAccess($container['router'])); $app->post('/api/v1/article/html', ArticleApiController::class . ':getArticleHtml')->setName('api.article.html')->add(new RestrictApiAccess($container['router'])); diff --git a/system/Settings.php b/system/Settings.php index b553cea..6119810 100644 --- a/system/Settings.php +++ b/system/Settings.php @@ -20,8 +20,11 @@ class Settings $settings = array_merge($defaultSettings, $userSettings); } - # no individual image sizes are allowed sind 1.3.4 - $settings['images'] = $defaultSettings['images']; + # no individual image sizes are allowed since 1.3.4 + # $settings['images'] = $defaultSettings['images']; + # make sure that thumb sizes are still there. + $images = array_merge($defaultSettings['images'], $settings['images']); + $settings['images'] = $images; # we have to check if the theme has been deleted $themefolder = $settings['rootPath'] . $settings['themeFolder'] . DIRECTORY_SEPARATOR; @@ -60,10 +63,9 @@ class Settings public static function getDefaultSettings() { $rootPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR; - + return [ 'determineRouteBeforeAppMiddleware' => true, - 'displayErrorDetails' => false, 'title' => 'TYPEMILL', 'author' => 'Unknown', 'copyright' => 'Copyright', @@ -80,8 +82,6 @@ class Settings 'editor' => 'visual', 'formats' => ['markdown', 'headline', 'ulist', 'olist', 'table', 'quote', 'notice', 'image', 'video', 'file', 'toc', 'hr', 'definition', 'code'], 'contentFolder' => 'content', - 'cache' => true, - 'cachePath' => $rootPath . 'cache', 'version' => '1.3.8', 'setup' => true, 'welcome' => true, @@ -166,11 +166,17 @@ class Settings 'setup' => true, 'welcome' => true, 'images' => true, + 'live' => true, + 'width' => true, + 'height' => true, 'plugins' => true, 'themes' => true, 'latestVersion' => true, 'logo' => true, - 'favicon' => true + 'favicon' => true, + 'twigcache' => true, + 'proxy' => true, + 'trustedproxies' => true, ]; # cleanup the existing usersettings diff --git a/system/Translations.php b/system/Translations.php index 3bd1abf..9f7b854 100644 --- a/system/Translations.php +++ b/system/Translations.php @@ -62,7 +62,9 @@ class Translations } } foreach($plugin_labels as $key => $value) { - $plugins_labels = array_merge($plugins_labels, $value); + if(is_array($value)){ + $plugins_labels = array_merge($plugins_labels, $value); + } } } } diff --git a/system/author/css/style.css b/system/author/css/style.css index 7911176..20c86e8 100644 --- a/system/author/css/style.css +++ b/system/author/css/style.css @@ -185,6 +185,7 @@ body,input,select,textarea{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } + header, nav, h1, h2, h3, h4, h5, h6{ font-family: arial, sans-serif; } @@ -593,9 +594,6 @@ footer{ margin-left: auto; margin-right: auto; } -.setupWrapper label{ - font-weight: 700; -} .setupWrapper input[type="submit"] { border-radius: 0px; @@ -607,7 +605,7 @@ footer{ border: 2px solid #f9f8f6; } .setupWrapper .formElement{ - margin: 0 0 20px 0; + margin: 0 0 30px 0; } /************************ @@ -899,6 +897,9 @@ form .hidden{ .large img{ width: 100%; } +.large.img-component img, .large .img-upload img{ + width: auto; +} fieldset{ display: block; position: relative; @@ -911,20 +912,19 @@ fieldset{ label,.label{ display: inline-block; width: 100%; - font-size: 0.75em; + font-size: 0.9em; font-weight: 300; padding: 0px; line-height: 1.5em; - text-transform: uppercase; } -input, select, textarea{ +input, select, textarea{ display: inline-block; box-shadow: none; width: 100%; font-size: 1em; box-sizing: border-box; min-height: 42px; - border: 1px solid #f9f8f6; + border: 1px solid #eee; background: #f9f8f6; } input:focus, select:focus, textarea:focus{ @@ -1150,11 +1150,15 @@ ul.cardInfo{ overflow: hidden; border: 1px; } +.description{ + font-size: .8em; + font-style: italic; +} .cardFields .cardField:first-child{ margin-top: 50px; } .cardFields input, .cardFields select, .cardFields textarea, .cardFields .onoffswitch{ - margin-bottom: 12px; + margin-bottom: 6px; } .cardFields label{ margin-top: 12px; @@ -1168,7 +1172,7 @@ ul.cardInfo{ position: relative; width: 100%; display: inline-block; - margin: 10px 0; + margin: 26px 0 0; } .cardField.full{ width: 100%; @@ -1660,8 +1664,8 @@ label .help, .label .help{ background:#e0474c; color: #fff; } -.editor button:disabled, -.editor button[disabled]{ +button:disabled, +button[disabled]{ border: 1px solid #eee; background: #eee; color: #444; diff --git a/system/author/editor/editor-blox.twig b/system/author/editor/editor-blox.twig index 5a037d5..cf249e0 100644 --- a/system/author/editor/editor-blox.twig +++ b/system/author/editor/editor-blox.twig @@ -51,7 +51,7 @@
- +
diff --git a/system/author/js/author.js b/system/author/js/author.js index 372e401..8ddc12b 100644 --- a/system/author/js/author.js +++ b/system/author/js/author.js @@ -297,8 +297,39 @@ visiblefilename.value = ''; } - }()); + }()); } + + /************************************* + ** Clear Cache ** + *************************************/ + + var cachebutton = document.getElementById("clearcache"); + + if(cachebutton) + { + + cachebutton.addEventListener("click", function(event){ + + event.preventDefault(); + + myaxios.delete('/api/v1/clearcache',{ + data: { + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) { + cachebutton.disabled = true; + document.getElementById("cacheresult").innerHTML = "Done!"; + }) + .catch(function (error) + { + document.getElementById("cacheresult").innerHTML = "" + error.response.data.errors + ""; + }); + }); + } + /************************************* ** COLOR PICKER ** diff --git a/system/author/js/vue-blox.js b/system/author/js/vue-blox.js index 2433121..cd979d7 100644 --- a/system/author/js/vue-blox.js +++ b/system/author/js/vue-blox.js @@ -16,7 +16,7 @@ const contentComponent = Vue.component('content-block', { '' + '
' + '' + - '' + + '' + '
' + '
' + '
' + @@ -79,6 +79,10 @@ const contentComponent = Vue.component('content-block', { }, updateMarkdown: function($event) { + eventBus.$emit('markdownChanged', $event); + self.$root.$data.unsafed = true; + this.edit = true; + this.unsafed = true; this.compmarkdown = $event; this.setComponentSize(); }, @@ -105,10 +109,19 @@ const contentComponent = Vue.component('content-block', { switchToEditMode: function() { if(this.edit){ return; } + + if(this.$root.$data.unsafed) + { + publishController.errors.message = "Please save or cancel your changes."; + return; + } + eventBus.$emit('closeComponents'); + self = this; + self.$root.$data.freeze = true; /* freeze the data */ - self.$root.$data.sortdisabled = true; /* disable sorting */ + self.$root.$data.sortdisabled = true; /* disable sorting */ this.preview = 'hidden'; /* hide the html-preview */ this.edit = true; /* show the edit-mode */ this.compmarkdown = self.$root.$data.blockMarkdown; /* get markdown data */ @@ -125,19 +138,25 @@ const contentComponent = Vue.component('content-block', { this.$refs.preview.style.minHeight = "auto"; } }, + cancel: function() + { + self = this; + self.$root.$data.unsafed = false; + this.switchToPreviewMode(); + }, switchToPreviewMode: function() { self = this; - self.$root.$data.freeze = false; /* activate the data again */ - self.$root.sortdisabled = false; /* activate sorting again */ - this.preview = 'visible'; /* show the html-preview */ - this.edit = false; /* hide the edit mode */ - this.compmarkdown = ''; /* clear markdown content */ - this.componentType = false; /* delete the component type */ + self.$root.$data.freeze = false; /* activate the data again */ + self.$root.sortdisabled = false; /* activate sorting again */ + this.preview = 'visible'; /* show the html-preview */ + this.edit = false; /* hide the edit mode */ + this.compmarkdown = ''; /* clear markdown content */ + this.componentType = false; /* delete the component type */ self.$root.$data.blockType = false; self.$root.$data.blockMarkdown = false; self.$root.$data.file = false; - publishController.errors.message = false; /* delete all error messages */ + publishController.errors.message = false; /* delete all error messages */ this.$refs.preview.style.minHeight = "auto"; }, freezePage: function() @@ -216,7 +235,8 @@ const contentComponent = Vue.component('content-block', { { if(this.compmarkdown == undefined || this.compmarkdown.replace(/(\r\n|\n|\r|\s)/gm,"") == '') { - this.switchToPreviewMode(); + this.$root.$data.unsafed = false; + this.switchToPreviewMode(); } else { @@ -263,6 +283,7 @@ const contentComponent = Vue.component('content-block', { var oldVideoID = this.$root.$data.blockMarkdown.match(/#.*? /); if(this.compmarkdown.indexOf(oldVideoID[0].substring(1).trim()) !== -1) { + this.$root.$data.unsafed = false; this.activatePage(); this.switchToPreviewMode(); return; @@ -294,6 +315,7 @@ const contentComponent = Vue.component('content-block', { { if(httpStatus == 400) { + this.$root.$data.unsafed = false; self.activatePage(); publishController.errors.message = "Looks like you are logged out. Please login and try again."; } @@ -305,12 +327,14 @@ const contentComponent = Vue.component('content-block', { if(result.errors) { + self.$root.$data.unsafed = false; publishController.errors.message = result.errors.message; } else { var thisBlockType = self.$root.$data.blockType; - + + self.$root.$data.unsafed = false; self.switchToPreviewMode(); if(self.$root.$data.blockId == 99999) @@ -374,6 +398,7 @@ const contentComponent = Vue.component('content-block', { } else if(httpStatus != 200) { + self.$root.$data.unsafed = false; self.activatePage(); publishController.errors.message = "Sorry, something went wrong. Please refresh the page and try again."; } @@ -405,11 +430,13 @@ const contentComponent = Vue.component('content-block', { { if(httpStatus == 400) { + self.$root.$data.unsafed = false; self.activatePage(); publishController.errors.message = "Looks like you are logged out. Please login and try again."; } if(response) { + self.$root.$data.unsafed = false; self.activatePage(); var result = JSON.parse(response); @@ -798,8 +825,9 @@ const noticeComponent = Vue.component('notice-component', { 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, ''); + for (var i = 0; i < lines.length; i++) + { + lines[i] = lines[i].replace(/(^[\! ]+(?!\[))/mg, ''); } this.notice = lines.join(''); @@ -1432,11 +1460,11 @@ const imageComponent = Vue.component('image-component', { } } - var imgpreview = imgmarkdown.match(/\(.*?\)/); - if(imgpreview) + var imgfile = imgmarkdown.match(/\(.*?\)/); + if(imgfile) { - this.imgpreview = imgpreview[0].slice(1,-1); - this.imgfile = this.imgpreview; + this.imgfile = imgfile[0].slice(1,-1); + this.imgpreview = this.$root.$data.root + '/' + this.imgfile; } } }, @@ -1822,500 +1850,6 @@ const fileComponent = Vue.component('file-component', { } }) -const medialib = Vue.component('medialib', { - props: ['parentcomponent'], - template: '
' + - '
' + - '
' + - '' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
{{errors}}
' + - '' + - '
' + - '' + - ' click to select' + - '' + - '
' + - '
{{ image.name }}
' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '' + - '
' + - '
' + - '
' + - '
Name
{{ imagedetaildata.name}}
' + - '
URL
{{ imagedetaildata.src_live}}
' + - '
' + - '
' + - '
Size
{{ getSize(imagedetaildata.bytes) }}
' + - '
' + - '
' + - '
Dimensions
{{ imagedetaildata.width }}x{{ imagedetaildata.height }} px
' + - '
' + - '
' + - '
Type
{{ imagedetaildata.type }}
' + - '
' + - '
' + - '
Date
{{ getDate(imagedetaildata.timestamp) }}
' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '' + - '
' + - '

Image used in:

' + - '' + - '
No pages found.
'+ - '
' + - '
' + - '' + - '
' + - '' + - '
' + - '' + - '
' + - '
' + - '
{{ file.name }}
' + - '' + - '' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
{{ filedetaildata.info.extension }}
' + - '
' + - '
' + - '
' + - '
Name
{{ filedetaildata.name}}
' + - '
URL
{{ filedetaildata.url}}
' + - '
' + - '
' + - '
Size
{{ getSize(filedetaildata.bytes) }}
' + - '
' + - '
' + - '
Type
{{ filedetaildata.info.extension }}
' + - '
' + - '
' + - '
Date
{{ getDate(filedetaildata.timestamp) }}
' + - '
' + - '
' + - '
' + - '' + - '' + - '
' + - '
' + - '
' + - '' + - '
' + - '

File used in:

' + - '' + - '
No pages found.
'+ - '
' + - '
' + - '
' + - '
' + - '
', - data: function(){ - return { - imagedata: false, - showimages: true, - imagedetaildata: false, - showimagedetails: false, - filedata: false, - showfiles: false, - filedetaildata: false, - showfiledetails: false, - detailindex: false, - load: false, - baseurl: false, - search: '', - errors: false, - } - }, - mounted: function(){ - - if(this.parentcomponent == 'files') - { - this.showFiles(); - } - - this.errors = false; - var self = this; - - myaxios.get('/api/v1/medialib/images',{ - params: { - 'url': document.getElementById("path").value, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - self.imagedata = response.data.images; - }) - .catch(function (error) - { - if(error.response) - { - self.errors = error.response.data.errors; - } - }); - }, - computed: { - filteredImages() { - - var searchimages = this.search; - var filteredImages = {}; - var images = this.imagedata; - if(images) - { - Object.keys(images).forEach(function(key) { - var searchindex = key + ' ' + images[key].name; - if(searchindex.toLowerCase().indexOf(searchimages.toLowerCase()) !== -1) - { - filteredImages[key] = images[key]; - } - }); - } - return filteredImages; - }, - filteredFiles() { - - var searchfiles = this.search; - var filteredFiles = {}; - var files = this.filedata; - if(files) - { - Object.keys(files).forEach(function(key) { - var searchindex = key + ' ' + files[key].name; - if(searchindex.toLowerCase().indexOf(searchfiles.toLowerCase()) !== -1) - { - filteredFiles[key] = files[key]; - } - }); - } - return filteredFiles; - } - }, - methods: { - isImagesActive: function() - { - if(this.showimages) - { - return 'bg-tm-green white'; - } - return 'bg-light-gray black'; - }, - isFilesActive: function() - { - if(this.showfiles) - { - return 'bg-tm-green white'; - } - return 'bg-light-gray black'; - }, - closemedialib: function() - { - this.$parent.showmedialib = false; - }, - getBackgroundImage: function(image) - { - return 'background-image: url(' + image.src_thumb + ');width:250px'; - }, - showImages: function() - { - this.errors = false; - this.showimages = true; - this.showfiles = false; - this.showimagedetails = false; - this.showfiledetails = false; - this.imagedetaildata = false; - this.detailindex = false; - }, - showFiles: function() - { - this.showimages = false; - this.showfiles = true; - this.showimagedetails = false; - this.showfiledetails = false; - this.imagedetaildata = false; - this.filedetaildata = false; - this.detailindex = false; - - if(!this.files) - { - this.errors = false; - var filesself = this; - - myaxios.get('/api/v1/medialib/files',{ - params: { - 'url': document.getElementById("path").value, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - filesself.filedata = response.data.files; - }) - .catch(function (error) - { - if(error.response) - { - filesself.errors = error.response.data.errors; - } - }); - } - }, - showImageDetails: function(image,index) - { - this.errors = false; - this.showimages = false; - this.showfiles = false; - this.showimagedetails = true; - this.detailindex = index; - this.baseurl = myaxios.defaults.baseURL + '/tm/content/visual'; - - var imageself = this; - - myaxios.get('/api/v1/image',{ - params: { - 'url': document.getElementById("path").value, - 'name': image.name, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - imageself.imagedetaildata = response.data.image; - }) - .catch(function (error) - { - if(error.response) - { - imageself.errors = error.response.data.errors; - } - }); - }, - showFileDetails: function(file,index) - { - this.errors = false; - this.showimages = false; - this.showfiles = false; - this.showimagedetails = false; - this.showfiledetails = true; - this.detailindex = index; - - this.baseurl = myaxios.defaults.baseURL + '/tm/content/visual'; - - var fileself = this; - - myaxios.get('/api/v1/file',{ - params: { - 'url': document.getElementById("path").value, - 'name': file.name, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - fileself.filedetaildata = response.data.file; - }) - .catch(function (error) - { - if(error.response) - { - fileself.errors = error.response.data.errors; - } - }); - }, - selectImage: function(image) - { - this.showImages(); - - if(this.parentcomponent == 'images') - { - var imgmarkdown = {target: {value: '![alt]('+ image.src_live +')' }}; - - this.$parent.imgfile = image.src_live; - this.$parent.imgpreview = image.src_live; - this.$parent.imgmeta = true; - - this.$parent.showmedialib = false; - - this.$parent.createmarkdown(image.src_live); -/* this.$parent.updatemarkdown(imgmarkdown, image.src_live); */ - } - if(this.parentcomponent == 'files') - { - var filemarkdown = {target: {value: '[' + image.name + '](' + image.src_live +'){.tm-download}' }}; - - this.$parent.filemeta = true; - this.$parent.filetitle = image.name; - - this.$parent.showmedialib = false; - - this.$parent.updatemarkdown(filemarkdown, image.src_live); - } - }, - selectFile: function(file) - { - /* if image component is open */ - if(this.parentcomponent == 'images') - { - var imgextensions = ['png','jpg', 'jpeg', 'gif', 'svg']; - if(imgextensions.indexOf(file.info.extension) == -1) - { - this.errors = "you cannot insert a file into an image component"; - return; - } - var imgmarkdown = {target: {value: '![alt]('+ file.url +')' }}; - - this.$parent.imgfile = file.url; - this.$parent.imgpreview = file.url; - this.$parent.imgmeta = true; - - this.$parent.showmedialib = false; - - this.$parent.createmarkdown(file.url); -/* this.$parent.updatemarkdown(imgmarkdown, file.url);*/ - } - if(this.parentcomponent == 'files') - { - var filemarkdown = {target: {value: '['+ file.name +']('+ file.url +'){.tm-download file-' + file.info.extension + '}' }}; - - this.$parent.showmedialib = false; - - this.$parent.filemeta = true; - this.$parent.filetitle = file.info.filename + ' (' + file.info.extension.toUpperCase() + ')'; - - this.$parent.updatemarkdown(filemarkdown, file.url); - } - this.showFiles(); - }, - removeImage: function(index) - { - this.imagedata.splice(index,1); - }, - removeFile: function(index) - { - this.filedata.splice(index,1); - }, - deleteImage: function(image, index) - { - imageself = this; - - myaxios.delete('/api/v1/image',{ - data: { - 'url': document.getElementById("path").value, - 'name': image.name, - 'index': index, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - imageself.showImages(); - imageself.removeImage(index); - }) - .catch(function (error) - { - if(error.response) - { - imageself.errors = error.response.data.errors; - } - }); - }, - deleteFile: function(file, index) - { - fileself = this; - - myaxios.delete('/api/v1/file',{ - data: { - 'url': document.getElementById("path").value, - 'name': file.name, - 'index': index, - 'csrf_name': document.getElementById("csrf_name").value, - 'csrf_value': document.getElementById("csrf_value").value, - } - }) - .then(function (response) - { - fileself.showFiles(); - fileself.removeFile(index); - }) - .catch(function (error) - { - if(error.response) - { - fileself.errors = error.response.data.errors; - } - }); - }, - getDate(timestamp) - { - date = new Date(timestamp * 1000); - - datevalues = { - 'year': date.getFullYear(), - 'month': date.getMonth()+1, - 'day': date.getDate(), - 'hour': date.getHours(), - 'minute': date.getMinutes(), - 'second': date.getSeconds(), - }; - return datevalues.year + '-' + datevalues.month + '-' + datevalues.day; - }, - getSize(bytes) - { - var i = Math.floor(Math.log(bytes) / Math.log(1024)), - sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - - return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i]; - }, - isChecked: function(classname) - { - if(this.imgclass == classname) - { - return ' checked'; - } - }, - }, -}) - let activeFormats = []; @@ -2342,6 +1876,7 @@ let editor = new Vue({ blockMarkdown: false, file: false, freeze: false, + unsafed: false, newBlocks: [], addblock: false, draftDisabled: true, @@ -2495,7 +2030,8 @@ let editor = new Vue({ }, setData: function(event, blocktype, body) { - // change this, not needed anymore. + if(this.unsafed){ return; } + this.blockId = event.currentTarget.dataset.id; this.blockMarkdown = this.markdown[this.blockId]; if(blocktype) diff --git a/system/author/js/vue-meta.js b/system/author/js/vue-meta.js index 225a302..bbfeb1e 100644 --- a/system/author/js/vue-meta.js +++ b/system/author/js/vue-meta.js @@ -2,7 +2,7 @@ const FormBus = new Vue(); Vue.filter('translate', function (value) { if (!value) return '' - transvalue = value.replace(/[ ]/g,"_").replace(/[.]/g, "_").replace(/[,]/g, "_").replace(/[-]/g, "_").replace(/[,]/g,"_").replace(/[(]/g,"_").replace(/[)]/g,"_").toUpperCase() + transvalue = value.replace(/[ ]/g,"_").replace(/[.]/g, "_").replace(/[,]/g, "_").replace(/[-]/g, "_").replace(/[,]/g,"_").toUpperCase() translated_string = labels[transvalue] if(!translated_string || translated_string.length === 0){ return value diff --git a/system/author/js/vue-shared.js b/system/author/js/vue-shared.js index 1a13a8e..31790b3 100644 --- a/system/author/js/vue-shared.js +++ b/system/author/js/vue-shared.js @@ -1,6 +1,6 @@ Vue.component('component-image', { props: ['class', 'id', 'description', 'maxlength', 'hidden', 'readonly', 'required', 'disabled', 'placeholder', 'label', 'name', 'type', 'value', 'errors'], - template: '
' + + template: '
' + '' + '
' + '
' + @@ -52,7 +52,7 @@ Vue.component('component-image', { } }, mounted: function(){ - this.imgpreview = this.value; + this.imgpreview = myaxios.defaults.baseURL + '/' + this.value; }, methods: { update: function(value) @@ -138,4 +138,503 @@ Vue.component('component-image', { } } }, -}) \ No newline at end of file +}) + +const medialib = Vue.component('medialib', { + props: ['parentcomponent'], + template: '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
{{errors}}
' + + '' + + '
' + + '' + + ' click to select' + + '' + + '
' + + '
{{ image.name }}
' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '
Name
{{ imagedetaildata.name}}
' + + '
URL
{{ getImageUrl(imagedetaildata.src_live)}}
' + + '
' + + '
' + + '
Size
{{ getSize(imagedetaildata.bytes) }}
' + + '
' + + '
' + + '
Dimensions
{{ imagedetaildata.width }}x{{ imagedetaildata.height }} px
' + + '
' + + '
' + + '
Type
{{ imagedetaildata.type }}
' + + '
' + + '
' + + '
Date
{{ getDate(imagedetaildata.timestamp) }}
' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '

Image used in:

' + + '' + + '
No pages found.
'+ + '
' + + '
' + + '' + + '
' + + '' + + '
' + + '' + + '
' + + '
' + + '
{{ file.name }}
' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
{{ filedetaildata.info.extension }}
' + + '
' + + '
' + + '
' + + '
Name
{{ filedetaildata.name}}
' + + '
URL
{{ filedetaildata.url}}
' + + '
' + + '
' + + '
Size
{{ getSize(filedetaildata.bytes) }}
' + + '
' + + '
' + + '
Type
{{ filedetaildata.info.extension }}
' + + '
' + + '
' + + '
Date
{{ getDate(filedetaildata.timestamp) }}
' + + '
' + + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '

File used in:

' + + '' + + '
No pages found.
'+ + '
' + + '
' + + '
' + + '
' + + '
', + data: function(){ + return { + imagedata: false, + showimages: true, + imagedetaildata: false, + showimagedetails: false, + filedata: false, + showfiles: false, + filedetaildata: false, + showfiledetails: false, + detailindex: false, + load: false, + baseurl: myaxios.defaults.baseURL, + adminurl: false, + search: '', + errors: false, + } + }, + mounted: function(){ + + if(this.parentcomponent == 'files') + { + this.showFiles(); + } + + this.errors = false; + var self = this; + + myaxios.get('/api/v1/medialib/images',{ + params: { + 'url': document.getElementById("path").value, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + self.imagedata = response.data.images; + }) + .catch(function (error) + { + if(error.response) + { + self.errors = error.response.data.errors; + } + }); + }, + computed: { + filteredImages() { + + var searchimages = this.search; + var filteredImages = {}; + var images = this.imagedata; + if(images) + { + Object.keys(images).forEach(function(key) { + var searchindex = key + ' ' + images[key].name; + if(searchindex.toLowerCase().indexOf(searchimages.toLowerCase()) !== -1) + { + filteredImages[key] = images[key]; + } + }); + } + return filteredImages; + }, + filteredFiles() { + + var searchfiles = this.search; + var filteredFiles = {}; + var files = this.filedata; + if(files) + { + Object.keys(files).forEach(function(key) { + var searchindex = key + ' ' + files[key].name; + if(searchindex.toLowerCase().indexOf(searchfiles.toLowerCase()) !== -1) + { + filteredFiles[key] = files[key]; + } + }); + } + return filteredFiles; + } + }, + methods: { + isImagesActive: function() + { + if(this.showimages) + { + return 'bg-tm-green white'; + } + return 'bg-light-gray black'; + }, + isFilesActive: function() + { + if(this.showfiles) + { + return 'bg-tm-green white'; + } + return 'bg-light-gray black'; + }, + closemedialib: function() + { + this.$parent.showmedialib = false; + }, + getBackgroundImage: function(image) + { + return 'background-image: url(' + this.baseurl + '/' + image.src_thumb + ');width:250px'; + }, + getImageUrl(relativeUrl) + { + return this.baseurl + '/' + relativeUrl; + }, + showImages: function() + { + this.errors = false; + this.showimages = true; + this.showfiles = false; + this.showimagedetails = false; + this.showfiledetails = false; + this.imagedetaildata = false; + this.detailindex = false; + }, + showFiles: function() + { + this.showimages = false; + this.showfiles = true; + this.showimagedetails = false; + this.showfiledetails = false; + this.imagedetaildata = false; + this.filedetaildata = false; + this.detailindex = false; + + if(!this.files) + { + this.errors = false; + var filesself = this; + + myaxios.get('/api/v1/medialib/files',{ + params: { + 'url': document.getElementById("path").value, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + filesself.filedata = response.data.files; + }) + .catch(function (error) + { + if(error.response) + { + filesself.errors = error.response.data.errors; + } + }); + } + }, + showImageDetails: function(image,index) + { + this.errors = false; + this.showimages = false; + this.showfiles = false; + this.showimagedetails = true; + this.detailindex = index; + this.adminurl = myaxios.defaults.baseURL + '/tm/content/visual'; + + var imageself = this; + + myaxios.get('/api/v1/image',{ + params: { + 'url': document.getElementById("path").value, + 'name': image.name, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + imageself.imagedetaildata = response.data.image; + }) + .catch(function (error) + { + if(error.response) + { + imageself.errors = error.response.data.errors; + } + }); + }, + showFileDetails: function(file,index) + { + this.errors = false; + this.showimages = false; + this.showfiles = false; + this.showimagedetails = false; + this.showfiledetails = true; + this.detailindex = index; + + this.adminurl = myaxios.defaults.baseURL + '/tm/content/visual'; + + var fileself = this; + + myaxios.get('/api/v1/file',{ + params: { + 'url': document.getElementById("path").value, + 'name': file.name, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + fileself.filedetaildata = response.data.file; + }) + .catch(function (error) + { + if(error.response) + { + fileself.errors = error.response.data.errors; + } + }); + }, + selectImage: function(image) + { + this.showImages(); + + if(this.parentcomponent == 'images') + { + var imgmarkdown = {target: {value: '![alt]('+ image.src_live +')' }}; + + this.$parent.imgfile = image.src_live; + this.$parent.imgpreview = this.baseurl + '/' + image.src_live; + this.$parent.imgmeta = true; + + this.$parent.showmedialib = false; + + this.$parent.createmarkdown(image.src_live); +/* this.$parent.updatemarkdown(imgmarkdown, image.src_live); */ + } + if(this.parentcomponent == 'files') + { + var filemarkdown = {target: {value: '[' + image.name + '](' + image.src_live +'){.tm-download}' }}; + + this.$parent.filemeta = true; + this.$parent.filetitle = image.name; + + this.$parent.showmedialib = false; + + this.$parent.updatemarkdown(filemarkdown, image.src_live); + } + }, + selectFile: function(file) + { + /* if image component is open */ + if(this.parentcomponent == 'images') + { + var imgextensions = ['png','jpg', 'jpeg', 'gif', 'svg', 'webp']; + if(imgextensions.indexOf(file.info.extension) == -1) + { + this.errors = "you cannot insert a file into an image component"; + return; + } + var imgmarkdown = {target: {value: '![alt]('+ file.url +')' }}; + + this.$parent.imgfile = file.url; + this.$parent.imgpreview = file.url; + this.$parent.imgmeta = true; + + this.$parent.showmedialib = false; + + this.$parent.createmarkdown(file.url); +/* this.$parent.updatemarkdown(imgmarkdown, file.url);*/ + } + if(this.parentcomponent == 'files') + { + var filemarkdown = {target: {value: '['+ file.name +']('+ file.url +'){.tm-download file-' + file.info.extension + '}' }}; + + this.$parent.showmedialib = false; + + this.$parent.filemeta = true; + this.$parent.filetitle = file.info.filename + ' (' + file.info.extension.toUpperCase() + ')'; + + this.$parent.updatemarkdown(filemarkdown, file.url); + } + this.showFiles(); + }, + removeImage: function(index) + { + this.imagedata.splice(index,1); + }, + removeFile: function(index) + { + this.filedata.splice(index,1); + }, + deleteImage: function(image, index) + { + imageself = this; + + myaxios.delete('/api/v1/image',{ + data: { + 'url': document.getElementById("path").value, + 'name': image.name, + 'index': index, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + imageself.showImages(); + imageself.removeImage(index); + }) + .catch(function (error) + { + if(error.response) + { + imageself.errors = error.response.data.errors; + } + }); + }, + deleteFile: function(file, index) + { + fileself = this; + + myaxios.delete('/api/v1/file',{ + data: { + 'url': document.getElementById("path").value, + 'name': file.name, + 'index': index, + 'csrf_name': document.getElementById("csrf_name").value, + 'csrf_value': document.getElementById("csrf_value").value, + } + }) + .then(function (response) + { + fileself.showFiles(); + fileself.removeFile(index); + }) + .catch(function (error) + { + if(error.response) + { + fileself.errors = error.response.data.errors; + } + }); + }, + getDate(timestamp) + { + date = new Date(timestamp * 1000); + + datevalues = { + 'year': date.getFullYear(), + 'month': date.getMonth()+1, + 'day': date.getDate(), + 'hour': date.getHours(), + 'minute': date.getMinutes(), + 'second': date.getSeconds(), + }; + return datevalues.year + '-' + datevalues.month + '-' + datevalues.day; + }, + getSize(bytes) + { + var i = Math.floor(Math.log(bytes) / Math.log(1024)), + sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + + return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i]; + }, + isChecked: function(classname) + { + if(this.imgclass == classname) + { + return ' checked'; + } + }, + }, +}) diff --git a/system/author/languages/de.yaml b/system/author/languages/de.yaml index cc6c258..9c2e61c 100644 --- a/system/author/languages/de.yaml +++ b/system/author/languages/de.yaml @@ -34,8 +34,8 @@ CODE: Code COG: Einstellungen CONTENT: Inhalt COPYRIGHT: Copyright -CREATED_AT__READ_ONLY_: Erstellt am (nur lesen) -CREATED_AT__READONLY_: Erstellt am (nur lesen) +CREATED_AT_(READ_ONLY): Erstellt am (nur lesen) +CREATED_AT_(READONLY): Erstellt am (nur lesen) CREATE_NEW_USER: + Neuen Nutzer CREATE_USER: + Nutzer CROSS: Kreuz @@ -91,7 +91,7 @@ ITALIC: kursiv LANGUAGE: Language LANGUAGE_ADMIN: Sprache (Admin-UI) LANGUAGE_ATTR: Sprach-Attribut (website) -LAST_MODIFIED_LIVE__READONLY_: Live zuletzt geändert (nur lesen) +LAST_MODIFIED_LIVE_(READONLY): Live zuletzt geändert (nur lesen) LAST_NAME: Zuname LEFT: Links LICENCE: Lizenz @@ -195,7 +195,7 @@ YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: Du kannst das CSS des T SETUP_WELCOME: Setup Willkommen HURRA: Hurra YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Dein Account wurde erstellt und du bist jetzt angemeldet. -NEXT_STEP: Nächster Schritt: +NEXT_STEP: Nächster Schritt VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Besuche die Autorenoberfläche und richte die Seite ein. Du kannst das System konfigurieren, Themes auswählen and Plugins hinzufügen. GET_HELP: Hilfe erhalten IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: Wenn du Fragen hast, lies bitte die diff --git a/system/author/languages/en.yaml b/system/author/languages/en.yaml index 6d3b373..466252c 100644 --- a/system/author/languages/en.yaml +++ b/system/author/languages/en.yaml @@ -13,16 +13,20 @@ ADD_LEFT_COLUMN: add left column ADD_RIGHT_COLUMN: add right column ADD_ROW_ABOVE: add row above ADD_ROW_BELOW: add row below +ADMINISTRATOR: administrator +ALL: all ALL_USERS: All users ALT_TEXT: Alt-Text ALTERNATIVE_TEXT_FOR_THE_HERO_IMAGE: Alternative Text for the hero image AUTHOR: Author +AUTHOR_DESCRIPTION_(MARKDOWN): Author-Description (Markdown) BACK_TO_STARTPAGE: back to startpage BOLD: bold BOTTOM: Bottom BROWSE: BROWSE BULLET_LIST: Bullet List BY: by +CAN_BE_USED_FOR_AUTHOR_LINE_IN_FRONTEND_: Can be used for author line in frontend. CANCEL: cancel CAPTION: Caption CELL: cell @@ -36,8 +40,8 @@ COG: cog CONTENT: Content CONTENT: Content COPYRIGHT: Copyright -CREATED_AT__READ_ONLY_: Created at (readonly) -CREATED_AT__READONLY_: Created at (read only) +CREATED_AT_(READ_ONLY): Created at (readonly) +CREATED_AT_(READONLY): Created at (read only) CREATE_NEW_USER: Create New User CREATE_USER: Create User CROSS: cross @@ -61,6 +65,7 @@ DRAFT: Draft DRAG_A_PICTURE_OR_CLICK_TO_SELECT: upload an image DUTCH__FLEMISH: Dutch, Flemish EDIT: edit +EDITOR: editor EDIT_USER: Edit User E_G_: e.g. E_MAIL: E-Mail @@ -76,6 +81,7 @@ FORMAT: Format GENERAL_PRESENTATION: General Presentation GERMAN: German GOOGLE_SITEMAP: Google Sitemap +HAS_EDIT_RIGHTS_FOR_THIS_ARTICLE_: Has edit rights for this article. HEAD: Head HEADLINE_ANCHORS: Headline Anchors HEADLINE: Headline @@ -89,13 +95,14 @@ HR: hr IF_NOT_FILLED__THE_DESCRIPTION_IS_EXTRACTED_FROM_CONTENT_: If not filled, the description is extracted from content. IMAGE: Image IMAGES: Images -IMAGE_URL__READ_ONLY_: Image URL (read only) +IMAGE_URL: Image URL +IMAGE_URL_(READ_ONLY): Image URL (read only) ITALIAN: Italian ITALIC: italic LANGUAGE: Language LANGUAGE_ADMIN: Language (admin-ui) LANGUAGE_ATTR: Language Attribute (website) -LAST_MODIFIED_LIVE__READONLY_: Last modified live (readonly) +LAST_MODIFIED_LIVE_(READONLY): Last modified live (readonly) LAST_NAME: Last Name LEFT: Left LICENCE: Licence @@ -107,6 +114,7 @@ LOGOUT: Logout MANUAL_DATE: Manual date MARKDOWN: markdown MAXIMUM_SIZE_FOR_AN_IMAGE_IS_5_MB__HERO_IMAGES_ARE_NOT_SUPPORTED_BY_ALL_THEMES_: Maximum size for an image is 5 MB. Hero images are not supported by all themes. +MEMBER: member MENU: Menu META_DESCRIPTION: Meta description META: meta @@ -125,6 +133,7 @@ NUMBERED_LIST: Numbered List OLIST: olist ONLINE: online ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: Only the following special characters are allowed: +OWNER_(USERNAME): owner (username) PARAGRAPH: Paragraph PASSWORD: Password PLEASE_CONFIRM: Please confirm @@ -132,6 +141,7 @@ PLEASE_CORRECT_THE_ERRORS_ABOVE: Please correct the errors above PLUGINS: Plugins PLUGIN_STORE: Plugin Store POWER_OFF: power-off +PROFILE_IMAGE: Profile-Image PUBLISH: Publish QUOTE: Quote QUOTES: Quote @@ -140,6 +150,7 @@ RAW_MARKDOWN_EDITOR: Raw Markdown Editor RAW_MODE: raw mode RAW: raw READONLY: Readonly +REGISTERED_USERS_ONLY: registered users only REMEMBER_TO_BOOKMARK_THIS_PAGE: Remember to bookmark this page REQUIRED: Required RIGHT: Right @@ -181,6 +192,7 @@ USE_A_VALID_LANGUAGE_ATTRIBUTE: Use a valid language attribute USE_A_VALID_YEAR: Use a valid year USED_AS_FALLBACK_WHEN_NO_MANUAL_DATE_IS_SET_: Used as fallback when no manual date is set. USERNAME: Username +USERNAME_(READ_ONLY): Username (read only) USERS: Users USER: User VIDEO: Video @@ -193,6 +205,7 @@ VISUAL: visual WAIT: wait WEBSITE_TITLE: Website Title WEB: Web +WEBSITE_VISIBLE_FOR: Website visible for WRITING: Writing YEAR: Year YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: You can overwrite the theme-css with your own css here. diff --git a/system/author/languages/fr.yaml b/system/author/languages/fr.yaml index 4900406..ea4aa5a 100644 --- a/system/author/languages/fr.yaml +++ b/system/author/languages/fr.yaml @@ -37,7 +37,7 @@ CODE: Code COG: cog CONTENT: Contenu COPYRIGHT: Copyright -CREATED_AT__READ_ONLY_: Date de création (lecture seule) +CREATED_AT_(READ_ONLY): Date de création (lecture seule) CREATE_NEW_USER: Créer un nouvel utilisateur CREATE_USER: Créer un utilisateur CROSS: croix @@ -97,7 +97,7 @@ ITALIC: Italique LANGUAGE: Langue LANGUAGE_ADMIN: Langue de l'interface d'administration LANGUAGE_ATTR: Langue du site (website) -LAST_MODIFIED_LIVE__READONLY_: Dernière modification (lecture seule) +LAST_MODIFIED_LIVE_(READONLY): Dernière modification (lecture seule) LAST_NAME: Prénom LEFT: Gauche LICENCE: Licence @@ -206,9 +206,9 @@ YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: Vous pouvez surcharger SETUP_WELCOME: Bienvenue dans l'installation HURRA: Hourrah YOUR_ACCOUNT_HAS_BEEN_CREATED_AND_YOU_ARE_LOGGED_IN_NOW_: Votre compte a été créé et vous êtes maintenant connecté -NEXT_STEP: Prochaine étape: -VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Visitez le compte Utilisateur et configurez votre nouveau site. Vous pouvez paramétrer le système, choisir un thème et ajouter des plugins. -GET_HELP: Obtenir de l'aide: +NEXT_STEP: Prochaine étape +VISIT_THE_AUTHOR_PANEL_AND_SETUP_YOUR_NEW_WEBSITE__YOU_CAN_CONFIGURE_THE_SYSTEM__CHOOSE_THEMES_AND_ADD_PLUGINS_: Visitez le volet Auteur et configurez votre nouveau site. Vous pouvez paramétrer le système, choisir un thème et ajouter des plugins. +GET_HELP: Obtenir de l'aide IF_YOU_HAVE_ANY_QUESTIONS__PLEASE_READ_THE: Pour toutes questions, veuillez consulter la DOCS: documentation OR_OPEN_A_NEW_ISSUE_ON: ou ouvrir un nouveau bug sur diff --git a/system/author/languages/it.yaml b/system/author/languages/it.yaml index 7375004..02da3ff 100644 --- a/system/author/languages/it.yaml +++ b/system/author/languages/it.yaml @@ -13,16 +13,20 @@ ADD_LEFT_COLUMN: aggiungi colonna a sinistra ADD_RIGHT_COLUMN: aggiungi colonna a destra ADD_ROW_ABOVE: aggiungi la riga sopra ADD_ROW_BELOW: aggiungi la riga sotto +ADMINISTRATOR: Amministratore +ALL: Tutti ALL_USERS: Tutti gli utenti ALT_TEXT: Testo alternativo ALTERNATIVE_TEXT_FOR_THE_HERO_IMAGE: Testo alternativo per l'immagine hero AUTHOR: Autore +AUTHOR_DESCRIPTION_(MARKDOWN): Descrizione dell'autore (Markdown) BACK_TO_STARTPAGE: torna alla pagina iniziale BOLD: grassetto BOTTOM: Sotto BROWSE: Sfoglia BULLET_LIST: Elenco puntato BY: di +CAN_BE_USED_FOR_AUTHOR_LINE_IN_FRONTEND_: Può essere usato per la linea autore nel sito. CANCEL: Annulla CAPTION: Didascalia CELL: cella @@ -36,8 +40,8 @@ COG: ingranaggio CONTENT: Contenuto CONTENT: Contenuto COPYRIGHT: Diritti d'autore -CREATED_AT__READ_ONLY_: Creato il (sola lettura) -CREATED_AT__READONLY_: Creato il (sola lettura) +CREATED_AT_(READ_ONLY): Creato il (sola lettura) +CREATED_AT_(READONLY): Creato il (sola lettura) CREATE_NEW_USER: Crea nuovo utente CREATE_USER: Crea utente CROSS: croce @@ -60,7 +64,8 @@ DO_YOU_WANT_TO_DISCARD_YOUR_CHANGES_AND_SET_THE_CONTENT_BACK_TO_THE_LIVE_VERSION DRAFT: Bozza DRAG_A_PICTURE_OR_CLICK_TO_SELECT: trascina un'immagine o fai clic per selezionare DUTCH__FLEMISH: Olandese, Fiammingo -EDIT: modifica +EDIT: Modifica +EDITOR: Curatore EDIT_USER: Modifica utente E_G_: per es.: E_MAIL: Posta elettronica @@ -76,6 +81,7 @@ FORMAT: Format GENERAL_PRESENTATION: Presentazione generale GERMAN: Tedesco GOOGLE_SITEMAP: Sitemap di Google +HAS_EDIT_RIGHTS_FOR_THIS_ARTICLE_: Ha i diritti di modifica per questo articolo. HEAD: Intestazione HEADLINE_ANCHORS: Ancoraggi del titolo HEADLINE: Titolo @@ -89,13 +95,14 @@ HR: Linea orizzontale IF_NOT_FILLED__THE_DESCRIPTION_IS_EXTRACTED_FROM_CONTENT_: Se non compilato, la descrizione viene estratta dal contenuto. IMAGE: Immagine IMAGES: Immagini -IMAGE_URL__READ_ONLY_: Immagine URL (sola lettura) +IMAGE_URL: URL immagine +IMAGE_URL_(READ_ONLY): URL immagine (sola lettura) ITALIAN: Italiano ITALIC: corsivo LANGUAGE: Lingua LANGUAGE_ADMIN: Lingua (admin-ui) LANGUAGE_ATTR: Attributo Lingua (sito) -LAST_MODIFIED_LIVE__READONLY_: Ultima modifica (sola lettura) +LAST_MODIFIED_LIVE_(READONLY): Ultima modifica (sola lettura) LAST_NAME: Cognome LEFT: Sinistra LICENCE: Licenza @@ -107,6 +114,7 @@ LOGOUT: Esci MANUAL_DATE: Data manuale MARKDOWN: Markdown MAXIMUM_SIZE_FOR_AN_IMAGE_IS_5_MB__HERO_IMAGES_ARE_NOT_SUPPORTED_BY_ALL_THEMES_: La dimensione massima per un'immagine è di 5 MB. Le immagini hero non sono supportate da tutti i temi. +MEMBER: Membro MENU: Menu META_DESCRIPTION: Descrizione META: Metadati @@ -125,6 +133,7 @@ NUMBERED_LIST: Elenco numerato OLIST: Elenchi ordinati ONLINE: in linea ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: Sono ammessi solo i seguenti caratteri speciali: +OWNER_(USERNAME): proprietario (nome utente) PARAGRAPH: Paragrafo PASSWORD: Parola d'ordine PLEASE_CONFIRM: Per favore conferma @@ -132,6 +141,7 @@ PLEASE_CORRECT_THE_ERRORS_ABOVE: Si prega di correggere gli errori sopra PLUGINS: Plugin PLUGIN_STORE: Deposito plugin POWER_OFF: spegni +PROFILE_IMAGE: Immagine del profilo PUBLISH: Pubblica QUOTE: Citazione QUOTES: Citazione @@ -140,7 +150,8 @@ RAW: grezzo RAW_MARKDOWN_EDITOR: Editore grezzo Markdown RAW_MODE: modo grezzo READONLY: Sola lettura -REMEMBER_TO_BOOKMARK_THIS_PAGE: Ricorda di aggiungere questa pagina ai segnalibri +REGISTERED_USERS_ONLY: Solo utenti registrati +REMEMBER_TO_BOOKMARK_THIS_PAGE: Ricorda di creare un segnalibro per la pagina REQUIRED: Richiesto RIGHT: Destra ROLE: Ruolo @@ -181,6 +192,7 @@ USE_A_VALID_LANGUAGE_ATTRIBUTE: Use a valid language attribute USE_A_VALID_YEAR: Usa un anno valido USED_AS_FALLBACK_WHEN_NO_MANUAL_DATE_IS_SET_: Utilizzato come ripiego quando non è impostata alcuna data manuale. USERNAME: Nome utente +USERNAME_(READ_ONLY): Nome utente (sola lettura) USERS: Utenti USER: Utente VIDEO: Video @@ -193,6 +205,7 @@ VISUAL: visivo WAIT: aspetta WEBSITE_TITLE: Titolo del sito WEB: Sito +WEBSITE_VISIBLE_FOR: Sito visibile per WRITING: Scrittura YEAR: Anno YOU_CAN_OVERWRITE_THE_THEME_CSS_WITH_YOUR_OWN_CSS_HERE_: È possibile sovrascrivere il css del tema con il proprio CSS qui. diff --git a/system/author/languages/nl.yaml b/system/author/languages/nl.yaml index a2ac48f..8e944c3 100644 --- a/system/author/languages/nl.yaml +++ b/system/author/languages/nl.yaml @@ -31,8 +31,8 @@ CODE: Code COG: tandwiel CONTENT: Inhoud COPYRIGHT: Auteursrecht -CREATED_AT__READ_ONLY_: Gemaakt om (alleen lezen) -CREATED_AT__READONLY_: Gemaakt om (alleen lezen) +CREATED_AT_(READ_ONLY): Gemaakt om (alleen lezen) +CREATED_AT_(READONLY): Gemaakt om (alleen lezen) CREATE_NEW_USER: Nieuwe gebruiker maken CREATE_USER: Gebruiker maken CROSS: kruis @@ -75,7 +75,7 @@ ITALIC: cursief LANGUAGE: Taal LANGUAGE_ADMIN: Taal (admin-ui) LANGUAGE_ATTR: Language Attribute (website) -LAST_MODIFIED_LIVE__READONLY_: Laatst gewijzigd live (alleen-lezen) +LAST_MODIFIED_LIVE_(READONLY): Laatst gewijzigd live (alleen-lezen) LAST_NAME: achternaam LEFT: Links LICENCE: Licentie diff --git a/system/author/languages/ru.yaml b/system/author/languages/ru.yaml index 5a488cc..f8ce84e 100644 --- a/system/author/languages/ru.yaml +++ b/system/author/languages/ru.yaml @@ -36,8 +36,8 @@ COG: cog CONTENT: Редактор CONTENT: Контент COPYRIGHT: Копирайт -CREATED_AT__READ_ONLY_: Создано в (только просмотр) -CREATED_AT__READONLY_: Создано в (только просмотр) +CREATED_AT_(READ_ONLY): Создано в (только просмотр) +CREATED_AT_(READONLY): Создано в (только просмотр) CREATE_NEW_USER: Создание нового пользователя CREATE_USER: Создать пользователя CROSS: Зачёркнутый @@ -83,7 +83,7 @@ ITALIC: Наклонный LANGUAGE: Язык LANGUAGE_ADMIN: Язык (admin-ui) LANGUAGE_ATTR: Language Attribute (website) -LAST_MODIFIED_LIVE__READONLY_: Последнее изменение (только просмотр) +LAST_MODIFIED_LIVE_(READONLY): Последнее изменение (только просмотр) LAST_NAME: Фамилия LEFT: Слева LICENCE: Лицензия diff --git a/system/author/layouts/layout.twig b/system/author/layouts/layout.twig index 7284f58..b63a8af 100644 --- a/system/author/layouts/layout.twig +++ b/system/author/layouts/layout.twig @@ -7,8 +7,6 @@ - - @@ -21,44 +19,13 @@ + + {{ assets.renderCSS() }} + - - - - external-link - - - - text-file - - - - cog - - - - power-off - - - - - - - - - - - - - - - - - - {{ assets.renderSvg() }} - - + + {% include 'partials/symbols.twig' %}
{% include 'partials/navi.twig' %} @@ -79,11 +46,16 @@ const myaxios = axios.create(); myaxios.defaults.baseURL = "{{ base_url }}"; + + + + {{ assets.renderJS() }} + \ No newline at end of file diff --git a/system/author/layouts/layoutAuth.twig b/system/author/layouts/layoutAuth.twig index 67c75f8..24ce000 100644 --- a/system/author/layouts/layoutAuth.twig +++ b/system/author/layouts/layoutAuth.twig @@ -7,8 +7,6 @@ - - @@ -21,34 +19,12 @@ - + + {{ assets.renderCSS() }} + - - - - external-link - - - - text-file - - - - cog - - - - power-off - - - - bookmark-o - - - - - + {% include 'partials/symbols.twig' %} {% include 'partials/flash.twig' %}
diff --git a/system/author/layouts/layoutBlank.twig b/system/author/layouts/layoutBlank.twig index 6263470..55a25e2 100644 --- a/system/author/layouts/layoutBlank.twig +++ b/system/author/layouts/layoutBlank.twig @@ -6,9 +6,7 @@ - - - + @@ -20,28 +18,11 @@ + - - - - external-link - - - - text-file - - - - cog - - - - power-off - - - - + + {% include 'partials/symbols.twig' %}
{% include 'partials/navi.twig' %} @@ -54,5 +35,6 @@
+ \ No newline at end of file diff --git a/system/author/layouts/layoutBlox.twig b/system/author/layouts/layoutBlox.twig index d033196..8e68602 100644 --- a/system/author/layouts/layoutBlox.twig +++ b/system/author/layouts/layoutBlox.twig @@ -6,9 +6,7 @@ - - - + @@ -27,162 +25,8 @@ - - - - - {{ __('EXTERNAL_LINK') }} - - - - {{ __('TEXT_FILE') }} - - - - {{ __('COG') }} - - - - {{ __('POWER_OFF') }} - - - - - {{ __('DELETE') }} - - - - {{ __('ADD') }} - - - - {{ __('DELETE_CLOSE') }} - - - - {{ __('HOME') }} - - - - {{ __('MOVE_VERTICAL') }} - - - - {{ __('FOLDER') }} - - - - {{ __('UPLOAD') }} - - - - {{ __('IMAGE') }} - - - - - - {{ __('NOTICE') }} - - - - {{ __('PAPERCLIP') }} - - - - {{ __('VIDEO') }} - - - - {{ __('QUOTES') }} - - - - {{ __('NUMBERED_LIST') }} - - - - {{ __('BULLET_LIST') }} - - - - {{ ('LINK') }} - - - - - {{ __('BOLD') }} - - - - {{ __('ITALIC') }} - - - - {{ __('HORIZONTAL_LINE') }} - - - - {{ __('TABLE') }} - - - - {{ __('PARAGRAPH') }} - - - - {{ __('CODE') }} - - - - - {{ __('HEADLINE') }} - - - - {{ __('TABLE_OF_CONTENTS') }} - - - - {{ __('DEFINITION') }} - - - - {{ __('CHECK') }} - - - - {{ __('CROSS') }} - - - - {{ __('TRASH') }} - - - - {{ __('INFO') }} - - - - - - {{ __('EYE_BLOCKED') }} - - - - - - {{ __('SEARCH') }} - - - - {{ __('CANCEL') }} - - - - {{ assets.renderSvg() }} - - + + {% include 'partials/symbols.twig' %}
{% include 'partials/navi.twig' %} diff --git a/system/author/layouts/layoutEditor.twig b/system/author/layouts/layoutEditor.twig index 6e934d3..c50f816 100644 --- a/system/author/layouts/layoutEditor.twig +++ b/system/author/layouts/layoutEditor.twig @@ -7,8 +7,6 @@ - - @@ -25,50 +23,8 @@ - - - - {{ __('EXTERNAL_LINK') }} - - - - {{ __('TEXT_FILE') }} - - - - {{ __('DELETE') }} - - - - {{ __('ADD') }} - - - - {{ __('DELETE_CLOSE') }} - - - - {{ __('HOME') }} - - - - {{ __('MOVE_VERTICAL') }} - - - - {{ __('FOLDER') }} - - - - {{ __('COG') }} - - - - {{ __('POWER_OFF') }} - - - - + + {% include 'partials/symbols.twig' %}
{% include 'partials/navi.twig' %} diff --git a/system/author/partials/fields.twig b/system/author/partials/fields.twig index 6238d3e..93a6693 100644 --- a/system/author/partials/fields.twig +++ b/system/author/partials/fields.twig @@ -9,7 +9,7 @@
- +
@@ -18,7 +18,7 @@
{{ __('Upload an image') }}
- +
@@ -69,7 +69,7 @@ diff --git a/system/author/partials/navi.twig b/system/author/partials/navi.twig index b1d01d0..de04e0c 100644 --- a/system/author/partials/navi.twig +++ b/system/author/partials/navi.twig @@ -10,9 +10,9 @@ {{ __('Content') }}
  • {% endif %} {% if acl.isAllowed(get_role(), 'system', 'view') %} - {{ __('Settings') }}
  • + {{ __('Settings') }}
  • {% else %} - {{ __('Settings') }}
  • + {{ __('Settings') }}
  • {% endif %} {{ __('View Site') }}
  • {{ __('Logout') }}
  • diff --git a/system/author/partials/symbols.twig b/system/author/partials/symbols.twig new file mode 100644 index 0000000..89e9abb --- /dev/null +++ b/system/author/partials/symbols.twig @@ -0,0 +1,173 @@ + + + + {{ __('EXTERNAL_LINK') }} + + + + {{ __('TEXT_FILE') }} + + + + {{ __('COG') }} + + + + {{ __('POWER_OFF') }} + + + + {{ __('DELETE') }} + + + + {{ __('ADD') }} + + + + {{ __('DELETE_CLOSE') }} + + + + {{ __('HOME') }} + + + + {{ __('MOVE_VERTICAL') }} + + + + {{ __('FOLDER') }} + + + + {{ __('UPLOAD') }} + + + + {{ __('IMAGE') }} + + + + + + {{ __('NOTICE') }} + + + + {{ __('PAPERCLIP') }} + + + + {{ __('VIDEO') }} + + + + {{ __('QUOTES') }} + + + + {{ __('NUMBERED_LIST') }} + + + + {{ __('BULLET_LIST') }} + + + + {{ ('LINK') }} + + + + + {{ __('BOLD') }} + + + + {{ __('ITALIC') }} + + + + {{ __('HORIZONTAL_LINE') }} + + + + {{ __('TABLE') }} + + + + {{ __('PARAGRAPH') }} + + + + {{ __('CODE') }} + + + + + {{ __('HEADLINE') }} + + + + {{ __('TABLE_OF_CONTENTS') }} + + + + {{ __('DEFINITION') }} + + + + {{ __('CHECK') }} + + + + {{ __('CROSS') }} + + + + {{ __('TRASH') }} + + + + {{ __('INFO') }} + + + + + + {{ __('EYE_BLOCKED') }} + + + + + + {{ __('SEARCH') }} + + + + {{ __('CANCEL') }} + + + + + bookmark-o + + + + + + + + + + + + + + + + + + {{ assets.renderSvg() }} + + diff --git a/system/author/settings/blank.twig b/system/author/settings/blank.twig index 70063a6..dca410a 100644 --- a/system/author/settings/blank.twig +++ b/system/author/settings/blank.twig @@ -8,7 +8,10 @@
    {{ content }}
    - + + + {{ csrf_field() | raw }} +
    {% endblock %} \ No newline at end of file diff --git a/system/author/settings/system.twig b/system/author/settings/system.twig index 4fb337d..3779cb5 100644 --- a/system/author/settings/system.twig +++ b/system/author/settings/system.twig @@ -147,7 +147,60 @@ {% endfor %} -
    +
    +
    +
    +

    {{ __('Developer') }}

    +

    The following options are only for developers and experienced administrators. Only change the options if you really understand them. For example: Never activate the error reporting for a live website, use this option only for bug-fixing.

    +
    +
    + + +
    +
    + + +
    +
    +
    {{ __('Delete all cache files') }}
    +
    +
    +
    + + +
    This applies only for future images in the content area.
    + {% if errors.settings.images.live.width %} + {{ errors.settings.images.live.width | first }} + {% endif %} +
    +
    + + +
    If you add a value for the height, then the image will be cropped.
    + {% if errors.settings.images.live.height %} + {{ errors.settings.images.live.height | first }} + {% endif %} +
    +
    + + +
    +
    + + + {% if errors.settings.trustedproxies %} + {{ errors.settings.trustedproxies | first }} + {% endif %} +
    diff --git a/system/author/settings/userlist.twig b/system/author/settings/userlist.twig index 3344337..8ec6be3 100644 --- a/system/author/settings/userlist.twig +++ b/system/author/settings/userlist.twig @@ -14,10 +14,10 @@
      • -
      • Username -
      • Role -
      • Edit
      • +
      • {{ __('Username') }}
      • +
      • {{ __('Role') }}
      • + +
      • {{ __('Edit') }}
    • {% for user in userdata %} @@ -25,7 +25,7 @@
      • {{ user.username }} -
      • {{ user.userrole }} +
      • {{ __(user.userrole) }}
      • {{ __('edit') }}
      diff --git a/system/author/settings/usernew.twig b/system/author/settings/usernew.twig index 4bd186c..23c90c7 100644 --- a/system/author/settings/usernew.twig +++ b/system/author/settings/usernew.twig @@ -27,7 +27,7 @@ {% if errors.userrole %} diff --git a/system/system.php b/system/system.php index 72360fa..904f012 100644 --- a/system/system.php +++ b/system/system.php @@ -48,6 +48,12 @@ $app = new \Slim\App($settings); $container = $app->getContainer(); +if(isset($settings['settings']['proxy']) && $settings['settings']['proxy']) +{ + $trustedProxies = isset($settings['settings']['trustedproxies']) ? explode(",", $settings['settings']['trustedproxies']) : []; + $app->add(new RKA\Middleware\ProxyDetection($trustedProxies)); +} + /************************ * LOAD & UPDATE PLUGINS * ************************/ @@ -149,6 +155,8 @@ $container['dispatcher'] = function($container) use ($dispatcher) # delete username and password from uri $uri = $container['request']->getUri()->withUserInfo(''); +define("TM_BASE_URL", $uri->getBaseUrl()); + /******************************** * ADD ASSET-FUNCTION FOR TWIG * ********************************/ @@ -224,8 +232,10 @@ $container['view'] = function ($container) use ($uri) { $path = array($container->get('settings')['themePath'], $container->get('settings')['authorPath']); + $cache = ( isset($container->get('settings')['twigcache']) && $container->get('settings')['twigcache'] ) ? $container->get('settings')['rootPath'] . '/cache/twig' : false; + $view = new \Slim\Views\Twig( $path, [ - 'cache' => false, + 'cache' => $cache, 'autoescape' => false, 'debug' => true ]); @@ -238,7 +248,7 @@ $container['view'] = function ($container) use ($uri) $view->addExtension(new Typemill\Extensions\TwigMarkdownExtension()); $view->addExtension(new Typemill\Extensions\TwigMetaExtension()); $view->addExtension(new Typemill\Extensions\TwigPagelistExtension()); - + # use {{ base_url() }} in twig templates $view['base_url'] = $uri->getBaseUrl(); $view['current_url'] = $uri->getPath(); diff --git a/themes/cyanine/404.twig b/themes/cyanine/404.twig index d9826ee..eaa2431 100644 --- a/themes/cyanine/404.twig +++ b/themes/cyanine/404.twig @@ -4,18 +4,18 @@ {% block content %} -
      +
      -

      Not Found

      +

      Not Found

      Sorry, but we did not find the page that you are looking for.

      - Home + Home
      diff --git a/themes/cyanine/css/style.css b/themes/cyanine/css/style.css index 07c81f1..790773c 100644 --- a/themes/cyanine/css/style.css +++ b/themes/cyanine/css/style.css @@ -76,7 +76,10 @@ article h6{ font-size: 1em; font-style: italic; font-weight:300; margin: 1em 0 0 article .h1, article .h2, article .h3, article .h4, article .h5, article .h6{ height: auto; /* fix for tachyons */ } -hr{} +hr{ + border: none; + border-top: 1px solid; +} ol{} footer ul{ padding-left:1em; } li{} @@ -114,7 +117,10 @@ a, a:link, a:visited, a:focus, a:hover, a:active, button{ transition: all .15s ease!important; transition-property: color, background-color, text-shadow, border; } - +article a:hover, article a:focus, article a:active, +footer a:hover, footer a:focus, footer a:active{ + text-decoration: none; +} /* Fix background for hightlight plugin */ code.hljs{ background: transparent; } @@ -180,12 +186,12 @@ ul.TOC,.TOC ul{ text-decoration: none; display: inline-block; width: 100%; - border-bottom: 1px dashed lightseagreen; + border-bottom: 1px dashed; line-height: 1em; margin: .3em 0; } .TOC li a:hover,.TOC li a:focus,.TOC li a:active{ - border-bottom: 1px solid lightseagreen; + border-bottom: 1px solid; } .TOC li a:after{ content: '\203A'; @@ -199,14 +205,10 @@ ul.TOC,.TOC ul{ .notice1 { margin: 1em 0; padding: 10px 1em; - background-color: #ffded4; - border-left: 4px solid #f65a3c; } .notice2 { margin: 1em 0; padding: 10px 1em; - background-color: #fff3d4; - border-left: 4px solid #f6b73c; } .notice3, .notice4, @@ -258,9 +260,8 @@ a.tm-download::before{ margin-left: -40px; width: 30px; height: 30px; - line-height: 30px; - font-family: Calibri, "Segoe UI", Roboto, Courier, Helvetica, -apple-system, BlinkMacSystemFont, sans-serif, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 1.3em; + font-family: Courier, Calibri, "Segoe UI", Roboto, Helvetica, -apple-system, BlinkMacSystemFont, sans-serif, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 1em; font-weight: 900; border-radius: 50%; text-align: center; @@ -310,6 +311,15 @@ button.play-video::after { content: ' '; } +.landingpageinfo h2{ + font-size: 2.25rem; +} +.landingpageinfo h3{ + font-size: 1.5rem; +} +.landingpageinfo h4{ + font-size: 1.25rem; +} /************************************ * TACHYONS ADDITIONS * diff --git a/themes/cyanine/cyanine.yaml b/themes/cyanine/cyanine.yaml index b05eb60..4bffa34 100644 --- a/themes/cyanine/cyanine.yaml +++ b/themes/cyanine/cyanine.yaml @@ -18,6 +18,14 @@ settings: forms: fields: + layoutsize: + type: select + label: Layout Size + options: + standard: Standard + large: Large + full: Full Width + landingpage: type: checkbox checkboxlabel: Activate a landingpage @@ -30,6 +38,15 @@ forms: type: number label: Position of Intro Segment description: Use 0 to disable the section + introTitle: + type: text + label: Title for your landingpage intro + placeholder: Typemill + description: Leave empty to use the title of your base content page. + introMarkdown: + type: textarea + label: Text for your landingpage intro (use markdown) + description: Leave empty to use the content of your base content page. introButtonLink: type: text label: Link for startbutton @@ -247,76 +264,137 @@ forms: fields: font: type: select - label: Basic font-family - description: All fonts are system fonts with (fallbacks) if the font is not installed - options: - serif: serif - sans-serif-tm: sans-serif - courier: courier (sans-serif) - helvetica: helvetica (sans-serif) - avenir: avenir (sans-serif) - athelas: athelas (serif) - georgia: georgia (serif) - times: times (serif) - bodoni: bodoni (serif) - calisto: calisto (serif) - garamond: garamond (serif) - baskerville: baskerville (serif) + label: General font-family + description: All fonts are system fonts with fallbacks + options: + BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif: sans-serif + georgia,times,serif: serif + courier,sans-serif: courier (sans-serif) + helvetica,sans-serif: helvetica (sans-serif) + avenir,sans-serif: avenir (sans-serif) + athelas,serif: athelas (serif) + georgia,serif: georgia (serif) + times,serif: times (serif) + bodoni,serif: bodoni (serif) + calisto,serif: calisto (serif) + garamond,serif: garamond (serif) + baskerville,serif: baskerville (serif) fontheadline: type: select label: Font-family for headlines - description: All fonts are system fonts with (fallbacks) if the font is not installed - options: - serif: serif - sans-serif-tm: sans-serif + description: All fonts are system fonts with fallbacks + options: + BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif: sans-serif + georgia,times,serif: serif + courier,sans-serif: courier (sans-serif) + helvetica,sans-serif: helvetica (sans-serif) + avenir,sans-serif: avenir (sans-serif) + athelas,serif: athelas (serif) + georgia,serif: georgia (serif) + times,serif: times (serif) + bodoni,serif: bodoni (serif) + calisto,serif: calisto (serif) + garamond,serif: garamond (serif) + baskerville,serif: baskerville (serif) fontnavi: type: select label: Font-family for navigations - description: All fonts are system fonts with (fallbacks) if the font is not installed - options: - serif: serif - sans-serif-tm: sans-serif - courier: courier (sans-serif) - helvetica: helvetica (sans-serif) - avenir: avenir (sans-serif) - athelas: athelas (serif) - georgia: georgia (serif) - times: times (serif) - bodoni: bodoni (serif) - calisto: calisto (serif) - garamond: garamond (serif) - baskerville: baskerville (serif) + description: All fonts are system fonts with fallbacks + options: + BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif: sans-serif + georgia,times,serif: serif + courier,sans-serif: courier (sans-serif) + helvetica,sans-serif: helvetica (sans-serif) + avenir,sans-serif: avenir (sans-serif) + athelas,serif: athelas (serif) + georgia,serif: georgia (serif) + times,serif: times (serif) + bodoni,serif: bodoni (serif) + calisto,serif: calisto (serif) + garamond,serif: garamond (serif) + baskerville,serif: baskerville (serif) fieldsetColors: type: fieldset legend: Colors fields: brandcolorprimary: type: text - label: Primary brand color + label: Background color for body placeholder: 'leightseagreen' - description: Used for the body background and borders - brandcolorsecondary: - type: text - label: Secondary brand color - placeholder: '#f7f7f7' - description: Used for content background, font-colors on hover and more + fieldsize: half fontcolorprimary: type: text - label: Primary font color - placeholder: 'lightseagreen' - description: Used for text - fontcolorsecondary: + label: Font color for body + placeholder: 'white' + fieldsize: half + newsbackground: type: text - label: Secondary font color + label: Background color for news-box + placeholder: 'white' + fieldsize: half + newscolor: + type: text + label: Font color for news-box + placeholder: '#333' + fieldsize: half + brandcolortertiary: + type: text + label: Background color for buttons + placeholder: 'lightseagreen' + fieldsize: half + fontcolortertiary: + type: text + label: Font color for buttons placeholder: '#F7F7F7' - description: Used as contrary color for hovers in navigation and buttons + fieldsize: half + bordercolortertiary: + type: text + label: Border color for buttons + placeholder: '#F7F7F7' + fieldsize: half fontcolorlink: type: text - label: text-links + label: Font color for content links placeholder: '#007F7F' - description: Used for links, check contrast for a11y. + fieldsize: half + brandcolorsecondary: + type: text + label: Background color for content + placeholder: '#f7f7f7' + fieldsize: half + fontcolorsecondary: + type: text + label: Font color for content + placeholder: '#333' + fieldsize: half + codebackground: + type: text + label: Background color for code + placeholder: '#ddd' + fieldsize: half + codecolor: + type: text + label: Font color for code + placeholder: '#333' + fieldsize: half + contentnavihoverbackground: + type: text + label: Background color for hover of content navigation + placeholder: 'lightseagreen' + fieldsize: half + contentnavihovercolor: + type: text + label: Font color for hover of content navigation + placeholder: 'white' + fieldsize: half thinbordercolor: type: text label: Thin border color placeholder: 'lightgray' - description: Used for thin borders in navigations and tables + description: Used for content navigation, table and horizontal line + fieldsize: half + noticecolors: + type: checkbox + label: Color for notices + checkboxlabel: Use grayscale color schema for notices + fieldsize: half diff --git a/themes/cyanine/home/landingpageContrast.twig b/themes/cyanine/home/landingpageContrast.twig index 72dbaf8..c95098b 100644 --- a/themes/cyanine/home/landingpageContrast.twig +++ b/themes/cyanine/home/landingpageContrast.twig @@ -1,9 +1,9 @@ -
      +
      -

      {{ settings.themes.cyanine.contrastTitle }}

      +

      {{ settings.themes.cyanine.contrastTitle }}

      {{ settings.themes.cyanine.contrastText }}

      - {{ settings.themes.cyanine.contrastLabel }} + {{ settings.themes.cyanine.contrastLabel }}
      diff --git a/themes/cyanine/home/landingpageInfo.twig b/themes/cyanine/home/landingpageInfo.twig index 34beb02..75d0ffc 100644 --- a/themes/cyanine/home/landingpageInfo.twig +++ b/themes/cyanine/home/landingpageInfo.twig @@ -1,6 +1,6 @@ -
      +
      -
      +
      {{ markdown(settings.themes.cyanine.infoMarkdown) }} diff --git a/themes/cyanine/home/landingpageIntro.twig b/themes/cyanine/home/landingpageIntro.twig index afb286f..383abb7 100644 --- a/themes/cyanine/home/landingpageIntro.twig +++ b/themes/cyanine/home/landingpageIntro.twig @@ -1,17 +1,25 @@ -
      +
      -

      {{ title }}

      + {% if settings.themes.cyanine.introTitle %} +

      {{ settings.themes.cyanine.introTitle }}

      + {% else %} +

      {{ title }}

      + {% endif %}
      - {{ content }} + {% if settings.themes.cyanine.introMarkdown %} + {{ markdown(settings.themes.cyanine.introMarkdown) }} + {% else %} + {{ content }} + {% endif %}
      {% if settings.themes.cyanine.introButtonLink %} - {{ settings.themes.cyanine.introButtonLabel }} + {{ settings.themes.cyanine.introButtonLabel }} {% endif %} diff --git a/themes/cyanine/home/landingpageNavi.twig b/themes/cyanine/home/landingpageNavi.twig index 8f2ad06..fde7c0c 100644 --- a/themes/cyanine/home/landingpageNavi.twig +++ b/themes/cyanine/home/landingpageNavi.twig @@ -1,9 +1,9 @@ -
      +
      -

      {{ settings.themes.cyanine.naviTitle }}

      -