Verified Commit 8c798df6 authored by Jonas Sulzer's avatar Jonas Sulzer 馃捇

馃憣 IMPROVE:dynamically add link input fields

Signed-off-by: Jonas Sulzer's avatarJonas Sulzer <jonas@violoncello.ch>
parent 05b96e6b
......@@ -96,7 +96,7 @@
/* 2 */
/***/ (function(module, exports) {
module.exports = "\n\n<div class=\"uk-block uk-block-default uk-text-center\">\n <h1>Violoncello Page Settings</h1>\n</div>\n\n<div class=\"uk-block uk-block-muted\" style=\"border:1px solid #ede7e7; padding: 10px;\">\n <div class=\"uk-form uk-form-horizontal\">\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Page type</label>\n <div class=\"uk-form-controls\">\n <select class=\"uk-width-1-2\" v-model=\"node.theme.page_type\">\n <option value=\"\">Default</option>\n <option value=\"home\">Home</option>\n <option value=\"archive\">Archive</option>\n <option value=\"about\">About</option>\n </select>\n </div>\n </div>\n <div v-if=\"node.theme.page_type === 'about'\">\n <hr>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Show about images</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.about_images\" type=\"checkbox\">\n </div>\n </div>\n <div v-if=\"node.theme.about_images\" class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Folder with images</label>\n <div class=\"uk-form-controls\">\n <input-link class=\"uk-width-1-2\" :link.sync=\"node.theme.image_folder\"></input-link>\n <p>Make sure to select a folder and not a file or URL here.<br>The folder should only contain the images you want to see on the about page (no other files/subfolders). The images are ordered alphabetically by name.</p>\n </div>\n </div>\n\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Show about videos</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.about_videos\" type=\"checkbox\">\n </div>\n </div>\n <div v-if=\"node.theme.about_videos\" class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Link(s?)</label>\n <div class=\"uk-form-controls\">\n <input-link class=\"uk-width-1-2\" :link.sync=\"node.theme.about_video\"></input-link>\n </div>\n </div> <!-- TODO: dynamically add new empty input fields ? -->\n\n\n <hr>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Hide site title</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.title_hide\" type=\"checkbox\">\n </div>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Remove main area margin</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.margin_remove\" type=\"checkbox\">\n </div>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Page background image</label>\n <div class=\"uk-form-controls\">\n <input-image :source.sync=\"node.theme.page_image\"></input-image>\n </div>\n </div>\n </div>\n</div>\n\n";
module.exports = "\n\n<div class=\"uk-block uk-block-default uk-text-center\">\n <h1>Violoncello Page Settings</h1>\n</div>\n\n<div class=\"uk-block uk-block-muted\" style=\"border:1px solid #ede7e7; padding: 10px;\">\n <div class=\"uk-form uk-form-horizontal\">\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Page type</label>\n <div class=\"uk-form-controls\">\n <select class=\"uk-width-1-2\" v-model=\"node.theme.page_type\">\n <option value=\"\">Default</option>\n <option value=\"home\">Home</option>\n <option value=\"archive\">Archive</option>\n <option value=\"about\">About</option>\n </select>\n </div>\n </div>\n <div v-if=\"node.theme.page_type === 'about'\">\n <hr>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Show about images</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.about_images\" type=\"checkbox\">\n </div>\n </div>\n <div v-if=\"node.theme.about_images\" class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Folder with images</label>\n <div class=\"uk-form-controls\">\n <input-link class=\"uk-width-1-2\" :link.sync=\"node.theme.image_folder\"></input-link>\n <p>Make sure to select a folder and not a file or URL here.<br>The folder should only contain the images you want to see on the about page (no other files/subfolders). The images are ordered alphabetically by name.</p>\n </div>\n </div>\n\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Show about videos</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.about_videos\" type=\"checkbox\">\n </div>\n </div>\n <div v-if=\"node.theme.about_videos\" class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Link(s?)</label>\n <div v-for=\"(key, video_link) in node.theme.about_video_links\" class=\"uk-form-controls\">\n <input-link class=\"uk-width-1-2\" :link.sync=\"node.theme.about_video_links[key]\"></input-link>\n </div>\n <div class=\"uk-form-controls\">\n <input-link id=\"new\" class=\"uk-width-1-2\" :link.sync=\"node.theme.about_video_links[node.theme.about_video_links.length]\"></input-link>\n </div>\n </div>\n\n\n <hr>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Hide site title</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.title_hide\" type=\"checkbox\">\n </div>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Remove main area margin</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-width-medium\" v-model=\"node.theme.margin_remove\" type=\"checkbox\">\n </div>\n </div>\n <div class=\"uk-form-row\">\n <label class=\"uk-form-label\" for=\"form-h-it\">Page background image</label>\n <div class=\"uk-form-controls\">\n <input-image :source.sync=\"node.theme.page_image\"></input-image>\n </div>\n </div>\n </div>\n</div>\n\n";
/***/ })
/******/ ]);
\ No newline at end of file
......@@ -41,10 +41,13 @@
</div>
<div v-if="node.theme.about_videos" class="uk-form-row">
<label class="uk-form-label" for="form-h-it">Link(s?)</label>
<div v-for="(key, video_link) in node.theme.about_video_links" class="uk-form-controls">
<input-link class="uk-width-1-2" :link.sync="node.theme.about_video_links[key]"></input-link>
</div>
<div class="uk-form-controls">
<input-link class="uk-width-1-2" :link.sync="node.theme.about_video"></input-link>
<input-link id="new" class="uk-width-1-2" :link.sync="node.theme.about_video_links[node.theme.about_video_links.length]"></input-link>
</div>
</div> <!-- TODO: dynamically add new empty input fields ? -->
</div>
<hr>
......
......@@ -48,9 +48,9 @@ return [
'page_image' => '',
'page_type' => '',
'about_image' => false,
'image_folder' => 'storage',
'image_folder' => '',
'about_video' => false,
'about_videos' => '',
'about_video_links' => [],
],
'config' => [
......
......@@ -190,6 +190,9 @@
<div uk-slideshow="animation:push">
<div class="uk-position-relative uk-visible-toggle uk-dark">
<ul class="uk-slideshow-items">
<?php
$videos = $params['about_video_links'];
?>
<?php foreach ($videos as $video): ?>
<li>
<iframe src="<?= $video ?>" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment