From c782de678daf18d36a48e2d82b008b2af40b0567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ku=C4=8Dera?= Date: Wed, 16 Feb 2022 21:21:25 +0000 Subject: [PATCH 1/4] Component for vivit source & titles for sections --- components/form-layout.js | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/components/form-layout.js b/components/form-layout.js index cee62ac..8f92541 100644 --- a/components/form-layout.js +++ b/components/form-layout.js @@ -17,7 +17,8 @@ class Text { author, description, preayer, - vivit + vivit, + vivitsource ) { this.day = day; // the name of day celebration this.date = date; // the simply date @@ -28,6 +29,7 @@ class Text { this.description = description; this.preayer = preayer; this.vivit = vivit; // Christus Vivit + this.vivitsource = vivitsource; this.slug = date; } } @@ -45,6 +47,7 @@ function saveData() { const description = document.getElementById("fdescription").value; const preayer = document.getElementById("fpreayer").value; const vivit = document.getElementById("fvivit").value; + const vivitsource = document.getElementById("fvivitsource").value; if ( day !== "" && @@ -55,7 +58,8 @@ function saveData() { author !== "" && description !== "" && preayer !== "" && - vivit !== "" + vivit !== "" && + vivitsource !== "" ) { const text = new Text( day, @@ -66,7 +70,8 @@ function saveData() { author, description, preayer, - vivit + vivit, + vivitsource ); console.log(date); downloadObjectAsJson(text, date); @@ -122,6 +127,7 @@ export default function FormLayout() {

Texty

+

Bible

+

Christus Vivit

- +
- + + +
+ +

Modlitba

+
+
+