diff --git a/content/01-cyanine-theme/00-footer.yaml b/content/01-cyanine-theme/00-footer.yaml
deleted file mode 100644
index 5944c97..0000000
--- a/content/01-cyanine-theme/00-footer.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-meta:
- title: '3-Column Footer'
- description: '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'
- heroimage: null
- heroimagealt: null
- owner: null
- author: trendschau
- manualdate: ''
- modified: '2021-05-18'
- created: '2020-06-11'
- time: 23-42-27
- navtitle: ''
- hide: false
- allowedrole: null
- alloweduser: null
diff --git a/content/01-cyanine-theme/03-landingpage.md b/content/01-cyanine-theme/00-landingpage.md
similarity index 100%
rename from content/01-cyanine-theme/03-landingpage.md
rename to content/01-cyanine-theme/00-landingpage.md
diff --git a/content/01-cyanine-theme/02-colors-and-fonts.md b/content/01-cyanine-theme/01-colors-and-fonts.md
similarity index 100%
rename from content/01-cyanine-theme/02-colors-and-fonts.md
rename to content/01-cyanine-theme/01-colors-and-fonts.md
diff --git a/content/01-cyanine-theme/01-content-elements.yaml b/content/01-cyanine-theme/01-content-elements.yaml
deleted file mode 100644
index baedf47..0000000
--- a/content/01-cyanine-theme/01-content-elements.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-meta:
- title: 'Content Elements'
- description: "There are a lot of other settings for your content area. For example: \n"
- heroimage: ''
- heroimagealt: null
- owner: testauthor
- author: trendschau
- manualdate: null
- modified: '2020-06-14'
- created: '2020-06-11'
- time: 21-05-02
- navtitle: 'content elements'
- hide: false
diff --git a/content/01-cyanine-theme/02-colors-and-fonts.yaml b/content/01-cyanine-theme/02-colors-and-fonts.yaml
deleted file mode 100644
index ae26f49..0000000
--- a/content/01-cyanine-theme/02-colors-and-fonts.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-meta:
- title: 'Colors and Fonts'
- description: '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. '
- heroimage: null
- heroimagealt: null
- owner: null
- author: trendschau
- manualdate: null
- modified: '2020-06-14'
- created: '2020-06-11'
- time: 20-37-12
- navtitle: 'colors and fonts'
- hide: false
diff --git a/content/01-cyanine-theme/00-footer.md b/content/01-cyanine-theme/02-footer.md
similarity index 100%
rename from content/01-cyanine-theme/00-footer.md
rename to content/01-cyanine-theme/02-footer.md
diff --git a/content/01-cyanine-theme/01-content-elements.md b/content/01-cyanine-theme/03-content-elements.md
similarity index 100%
rename from content/01-cyanine-theme/01-content-elements.md
rename to content/01-cyanine-theme/03-content-elements.md
diff --git a/content/01-cyanine-theme/03-landingpage.yaml b/content/01-cyanine-theme/03-landingpage.yaml
deleted file mode 100644
index 5ba8679..0000000
--- a/content/01-cyanine-theme/03-landingpage.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-meta:
- title: 'The Landingpage'
- description: "Cyanine provides an optional landingpage with six segments: \nIntro with the content of the home page and an additional link/button.\nInfo with individual markdown content.\nTeaser with two elements. Each element has a headline, a text and a button/link.\nContrast with a headline, text-input and a"
- author: trendschau
- created: '2020-06-11'
- time: 20-05-35
- navtitle: landingpage
- modified: '2020-06-11'
-seo:
- seoimage: ''
- seoimagealt: null
- Checkbox: null
- mycfiel: { }
diff --git a/cypress/test01-system-setup.spec.js b/cypress/test01-system-setup.spec.js
index 74eb02f..f0e3fba 100644
--- a/cypress/test01-system-setup.spec.js
+++ b/cypress/test01-system-setup.spec.js
@@ -31,6 +31,7 @@ describe('Typemill Setup', function()
cy.get('.error').should('contain', 'Length between 5 - 20')
})
+/*
it('fails without CSRF-token', function ()
{
cy.request({
@@ -45,8 +46,26 @@ describe('Typemill Setup', function()
}
})
.its('body')
- .should('include', 'Failed CSRF check')
+ .should('include', 'The form has a timeout')
})
+*/
+ it('fails without CSRF-token', function ()
+ {
+ cy.visit('/setup')
+
+ // enter correct data
+ cy.get('input[name="username"]').clear().type('trendschau')
+ cy.get('input[name="email"]').clear().type('trendschau@gmail.com')
+ cy.get('input[name="password"]').clear().type('password')
+ cy.get('#csrf_value').then(elem => {
+ elem.val('wrongvalue');
+ });
+
+ // submit and get validation errors
+ cy.get('form').submit()
+ cy.get('#flash-message').should('contain', 'form has a timeout')
+ })
+
it('submits valid form data and visit welcome and settings page', function ()
{
diff --git a/cypress/test02-initial-frontend.spec.js b/cypress/test02-initial-frontend.spec.js
index 89a328b..3e8e9f8 100644
--- a/cypress/test02-initial-frontend.spec.js
+++ b/cypress/test02-initial-frontend.spec.js
@@ -10,17 +10,18 @@ describe('Typemill Initial Frontend', function()
/* has start and setup button */
cy.get('nav').find('a').should(($a) => {
- expect($a).to.have.length(10)
+ expect($a).to.have.length(11)
expect($a[0].href).to.match(/welcome/)
- expect($a[1].href).to.match(/welcome\/setup/)
- expect($a[2].href).to.match(/welcome\/write-content/)
- expect($a[3].href).to.match(/welcome\/get-help/)
- expect($a[4].href).to.match(/welcome\/markdown-test/)
- expect($a[5].href).to.match(/cyanine-theme/)
- expect($a[6].href).to.match(/cyanine-theme\/landingpage/)
- expect($a[7].href).to.match(/cyanine-theme\/colors-and-fonts/)
- expect($a[8].href).to.match(/cyanine-theme\/footer/)
- expect($a[9].href).to.match(/cyanine-theme\/content-elements/)
+ expect($a[1].href).to.match(/welcome\/setup-your-website/)
+ expect($a[2].href).to.match(/welcome\/manage-access/)
+ expect($a[3].href).to.match(/welcome\/write-content/)
+ expect($a[4].href).to.match(/welcome\/get-help/)
+ expect($a[5].href).to.match(/welcome\/markdown-test/)
+ expect($a[6].href).to.match(/cyanine-theme/)
+ expect($a[7].href).to.match(/cyanine-theme\/landingpage/)
+ expect($a[8].href).to.match(/cyanine-theme\/colors-and-fonts/)
+ expect($a[9].href).to.match(/cyanine-theme\/footer/)
+ expect($a[10].href).to.match(/cyanine-theme\/content-elements/)
})
})
diff --git a/cypress/test05-blox-editor.spec.js b/cypress/test05-blox-editor.spec.js
index 05879d6..f9d0a65 100644
--- a/cypress/test05-blox-editor.spec.js
+++ b/cypress/test05-blox-editor.spec.js
@@ -44,8 +44,8 @@ describe('Blox Editor', function()
cy.get('.navi-list')
.should('contain', 'Testpage')
.eq(2).find('a').should(($a) => {
- expect($a).to.have.length(5)
- expect($a[4].href).to.include('/welcome\/testpage')
+ expect($a).to.have.length(6)
+ expect($a[5].href).to.include('/welcome\/testpage')
})
})
@@ -277,7 +277,7 @@ describe('Blox Editor', function()
cy.get('.navi-list')
.not('contain', 'Testpage')
.eq(2).find('a').should(($a) => {
- expect($a).to.have.length(4)
+ expect($a).to.have.length(5)
})
})
})
\ No newline at end of file
diff --git a/cypress/test99-login.spec.js b/cypress/test99-login.spec.js
index 00eb428..f2dca14 100644
--- a/cypress/test99-login.spec.js
+++ b/cypress/test99-login.spec.js
@@ -43,22 +43,6 @@ describe('Typemill Login', function()
cy.contains('Logout').click()
cy.url().should('include', '/tm/login')
})
-
- it('fails without CSRF-token', function ()
- {
- cy.request({
- method: 'POST',
- url: '/tm/login', // baseUrl is prepended to url
- form: true, // indicates the body should be form urlencoded and sets Content-Type: application/x-www-form-urlencoded headers
- failOnStatusCode: false,
- body: {
- username: 'trendschau',
- password: 'password'
- }
- })
- .its('body')
- .should('include', 'Failed CSRF check')
- })
it('blocks after 3 fails', function ()
{
@@ -82,6 +66,6 @@ describe('Typemill Login', function()
cy.get('form').submit()
cy.get('#flash-message').should('contain', 'Too many bad logins')
cy.contains('wait')
- cy.contains('Forgot password')
+ cy.contains('forgot password')
})
})
\ No newline at end of file
diff --git a/system/Controllers/SetupController.php b/system/Controllers/SetupController.php
index 02dafff..c175c7a 100644
--- a/system/Controllers/SetupController.php
+++ b/system/Controllers/SetupController.php
@@ -62,10 +62,10 @@ class SetupController extends Controller
{
if($request->isPost())
{
- if( $request->getattribute('csrf_result') === false )
+ if( ( null !== $request->getattribute('csrf_result') ) OR ( $request->getattribute('csrf_result') === false ) )
{
$this->c->flash->addMessage('error', 'The form has a timeout, please try again.');
- return $response->withRedirect($this->c->router->pathFor('setup.welcome'));
+ return $response->withRedirect($this->c->router->pathFor('setup.show'));
}
$params = $request->getParams();
diff --git a/themes/cyanine/css/style.css b/themes/cyanine/css/style.css
index 804bbd9..13da8e0 100644
--- a/themes/cyanine/css/style.css
+++ b/themes/cyanine/css/style.css
@@ -509,4 +509,53 @@ button.play-video::after {
font-size: inherit;
max-height: inherit;
}
+}
+
+@media print {
+ #contentnav, #bottompager{
+ display: none;
+ }
+ .grid-main{
+ margin-top: -10px!important;
+ padding-top: 0px!important;
+ }
+ .logo a[href]:after {
+ content: "Homepage: " attr(href);
+ display: block;
+ margin: 1rem 0;
+ font-size: 14px;
+ font-weight: normal;
+ }
+ body{
+// padding: 3rem 3rem 3rem 5rem!important;
+ }
+ main{
+ padding-bottom: 0!important;
+ }
+ aside{
+ padding-top: 0!important;
+ padding-bottom: 0!important;
+ }
+ main,footer{
+ border: 0px!important;
+ }
+ footer .ph3
+ {
+ padding-top: 0;
+ padding-bottom: 0;
+ }
+ body, .landingpagecontrast, .account, main, footer, .landingpageintro, .landingpageinfo, .landingpageteaser, .landingpagenavi, .landingpagenews, button.expander, .notice4{
+ background: #fff!important;
+ color: black!important;
+ }
+ article a[href]{
+ color: black;
+ text-decoration: underline;
+ }
+ article a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ nav .mw6{
+ width: 100%;
+ }
}
\ No newline at end of file
diff --git a/themes/cyanine/cyanine.yaml b/themes/cyanine/cyanine.yaml
index 5e2448c..7e19910 100644
--- a/themes/cyanine/cyanine.yaml
+++ b/themes/cyanine/cyanine.yaml
@@ -258,6 +258,32 @@ forms:
label: Text/label for edit link
placeholder: edit on github
+ editIcon:
+ type: checkbox
+ label: Icon
+ checkboxlabel: use an edit-icon instead of text
+
+ fieldsetPrint:
+ type: fieldset
+ legend: Print Button
+ fields:
+ printPosition:
+ type: checkboxlist
+ label: Position of the print-button (top/bottom)
+ options:
+ top: Top
+ bottom: Bottom
+
+ printText:
+ type: text
+ label: Text/label for print-button
+ placeholder: print
+
+ printIcon:
+ type: checkbox
+ label: Icon
+ checkboxlabel: use a print-icon instead of text
+
fieldsetNavigations:
type: fieldset
legend: Navigations and Chapters
diff --git a/themes/cyanine/layout.twig b/themes/cyanine/layout.twig
index 1a7e635..ec2f0aa 100644
--- a/themes/cyanine/layout.twig
+++ b/themes/cyanine/layout.twig
@@ -220,6 +220,13 @@