Verified Commit 05b96e6b authored by Jonas Sulzer's avatar Jonas Sulzer 馃捇

馃憣 IMPROVE: source images from folder & add info text to admin UI

Signed-off-by: Jonas Sulzer's avatarJonas Sulzer <jonas@violoncello.ch>
parent f44f6407
......@@ -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 </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 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";
/***/ })
/******/ ]);
\ No newline at end of file
......@@ -29,6 +29,7 @@
<label class="uk-form-label" for="form-h-it">Folder with images</label>
<div class="uk-form-controls">
<input-link class="uk-width-1-2" :link.sync="node.theme.image_folder"></input-link>
<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>
</div>
</div>
......
......@@ -171,10 +171,10 @@
<div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-grid-collapse" uk-grid="masonry: true">
<?php
$images = ['testimage.jpg', 'test2image.jpg'];
$images = array_diff(scandir($params['image_folder']), array('.', '..'));
?>
<?php foreach ($images as $image): ?>
<img data-src="<?= $params['image_folder'] ?>/<?= $image ?>" alt="<?= $image ?>" uk-img="" width="600" height="308">
<img data-src="<?= $params['image_folder'] ?>/<?= $image ?>" alt="<?= $image ?>" uk-img="">
<?php endforeach; ?>
</div>
<?php endif; ?>
......
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