{"action":"created","issue":{"url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/16","repository_url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider","labels_url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/16/comments","events_url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/16/events","html_url":"https://github.com/getgrav/grav-plugin-lightslider/pull/16","id":165181655,"number":16,"title":"Added association with admin templates, JS fixed, added lang files","user":{"login":"Piterden","id":5930429,"avatar_url":"https://avatars.githubusercontent.com/u/5930429?v=3","gravatar_id":"","url":"https://api.github.com/users/Piterden","html_url":"https://github.com/Piterden","followers_url":"https://api.github.com/users/Piterden/followers","following_url":"https://api.github.com/users/Piterden/following{/other_user}","gists_url":"https://api.github.com/users/Piterden/gists{/gist_id}","starred_url":"https://api.github.com/users/Piterden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Piterden/subscriptions","organizations_url":"https://api.github.com/users/Piterden/orgs","repos_url":"https://api.github.com/users/Piterden/repos","events_url":"https://api.github.com/users/Piterden/events{/privacy}","received_events_url":"https://api.github.com/users/Piterden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-12T21:10:24Z","updated_at":"2016-07-12T21:49:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/pulls/16","html_url":"https://github.com/getgrav/grav-plugin-lightslider/pull/16","diff_url":"https://github.com/getgrav/grav-plugin-lightslider/pull/16.diff","patch_url":"https://github.com/getgrav/grav-plugin-lightslider/pull/16.patch"},"body":"I've make some corrects in JS-code (get slider settings in the loop, wrap in scope) and have tested this patch with clean official version of [Grav + Admin Plugin](https://github.com/getgrav/grav/releases/download/1.0.10/grav-admin-v1.0.10.zip) and default `Animatter` theme without any changes in template except one. It was moving JS assets pipe render (vendor) to the bottom part of page in base.twig template.\r\n\r\nAny way I don't force you to move your JS to the \"before closed body tag\" position. There is some more useful changes in this PR:\r\n\r\n> In readme you have wrote: *\"This plugin is provided as a modular page within Grav.\"* But it's not completely truth, because plugin provides templates only for public part of site and disallow visibility of its templates for user inside admin interface.\r\n> I suppose much more convenient and secure is to add slides from within admin interface.\r\n\r\n+ [x] I've fix this problem, by patching plugin handling events (add `onGetPageTemplates` to register tpls) \r\n+ [x] Also I've add blueprint `yaml`-config which provides 2 new form tabs for slides and for settings to the `lightslider` modular page\r\n+ [x] Another patch is creating of lang files and setting some `PLUGIN_VARS` for creating further admin multilang interface.\r\n\r\nI'm not finished yet, therefore only `image` slider mode works well.\r\n\r\n@TODO\r\n\r\n- [ ] Need to fix issue with multiple sliders in one page\r\n- [ ] `text` slider mode with caption and link\r\n- [ ] Preview of slide image on lightslider modular page form\r\n- [ ] Change slide fields in `Slides` tab list if it is possible. In perfect form I want to have fields structure like this:\r\n\r\n```yaml\r\nimageMode:\r\n  - image\r\n  - link to promo page / outside link\r\ntextMode:\r\n  - image\r\n  - header\r\n  - description\r\n  - link to promo page / outside link\r\nvideoMode: (if possible)\r\n  - video (We can parse popular video services by video id)\r\n  - link to promo page / outside link\r\n```"},"comment":{"url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/comments/232192536","html_url":"https://github.com/getgrav/grav-plugin-lightslider/pull/16#issuecomment-232192536","issue_url":"https://api.github.com/repos/getgrav/grav-plugin-lightslider/issues/16","id":232192536,"user":{"login":"Piterden","id":5930429,"avatar_url":"https://avatars.githubusercontent.com/u/5930429?v=3","gravatar_id":"","url":"https://api.github.com/users/Piterden","html_url":"https://github.com/Piterden","followers_url":"https://api.github.com/users/Piterden/followers","following_url":"https://api.github.com/users/Piterden/following{/other_user}","gists_url":"https://api.github.com/users/Piterden/gists{/gist_id}","starred_url":"https://api.github.com/users/Piterden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Piterden/subscriptions","organizations_url":"https://api.github.com/users/Piterden/orgs","repos_url":"https://api.github.com/users/Piterden/repos","events_url":"https://api.github.com/users/Piterden/events{/privacy}","received_events_url":"https://api.github.com/users/Piterden/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T21:49:44Z","updated_at":"2016-07-12T21:49:44Z","body":"O, sorry, I forget to show changes which I've implemented in `Animatter` theme.\r\nThere is only one file to change\r\n```twig\r\n{% set theme_config = attribute(config.themes, config.system.pages.theme) %}\r\n<!DOCTYPE html>\r\n<html lang=\"{{ grav.language.getActive ?: theme_config.default_lang }}\">\r\n<head>\r\n\r\n{% block head %}\r\n    <meta charset=\"utf-8\" />\r\n    <title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>\r\n    {% include 'partials/metadata.html.twig' %}\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\r\n    <link rel=\"icon\" type=\"image/png\" href=\"{{ url('theme://images/favicon.png', true) }}\" />\r\n    <link rel=\"canonical\" href=\"{{ page.url(true, true) }}\" />\r\n\r\n    {% block stylesheets %}\r\n        {% do assets.addCss('theme://css/pure-0.5.0/grids-min.css', 103) %}\r\n        {% do assets.addCss('theme://css-compiled/nucleus.css',102) %}\r\n        {% do assets.addCss('theme://css-compiled/template.css',101) %}\r\n        {% do assets.addCss('theme://css/custom.css',100) %}\r\n        {% do assets.addCss('theme://css/font-awesome.min.css',100) %}\r\n        {% do assets.addCss('theme://css/slidebars.min.css') %}\r\n\r\n        {% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}\r\n            {% do assets.addCss('theme://css/nucleus-ie10.css') %}\r\n        {% endif %}\r\n        {% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}\r\n            {% do assets.addCss('theme://css/nucleus-ie9.css') %}\r\n            {% do assets.addJs('theme://js/html5shiv-printshiv.min.js') %}\r\n        {% endif %}\r\n    {% endblock %}\r\n    {{ assets.css() }}\r\n\r\n    // There was js assets block right here\r\n\r\n{% endblock head%}\r\n</head>\r\n<body id=\"top\" class=\"{{ page.header.body_classes }}\">\r\n    <div id=\"sb-site\">\r\n        {% block header %}\r\n        <header id=\"header\">\r\n            <div id=\"logo\">\r\n                <h3><a href=\"{{ base_url == '' ? '/' : base_url }}\">{{ config.site.title }}</a></h3>\r\n            </div>\r\n            <div id=\"navbar\">\r\n                {% block header_extra %}{% endblock %}\r\n                {% if config.plugins.langswitcher.enabled %}\r\n                {% include 'partials/langswitcher.html.twig' %}\r\n                {% endif %}\r\n                {% block header_navigation %}\r\n                {% include 'partials/navigation.html.twig' %}\r\n                {% endblock %}\r\n                <span class=\"panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars\"></span>\r\n            </div>\r\n        </header>\r\n        {% endblock %}\r\n\r\n        {% block showcase %}{% endblock %}\r\n\r\n        {% block body %}\r\n        <section id=\"body\" class=\"{{ class }}\">\r\n            {% block content %}{% endblock %}\r\n        </section>\r\n        {% endblock %}\r\n\r\n        {% block footer %}\r\n        <footer id=\"footer\">\r\n            <div class=\"totop\">\r\n                <span><a href=\"#\" id=\"toTop\"><i class=\"fa fa-arrow-up\"></i></a></span>\r\n            </div>\r\n            <p><a href=\"http://getgrav.org\">Grav</a> was <i class=\"fa fa-code\"></i> with <i class=\"fa fa-heart\"></i> by <a href=\"http://www.rockettheme.com\">RocketTheme</a>.</p>\r\n        </footer>\r\n        {% endblock %}\r\n    </div>\r\n    <div class=\"sb-slidebar sb-left sb-width-thin\">\r\n        <div id=\"panel\">\r\n        {% include 'partials/navigation.html.twig' %}\r\n        </div>\r\n    </div>\r\n\r\n    /**\r\n     * This block of code was moved from the top\r\n     */\r\n    {% block javascripts %}\r\n        {% do assets.addJs('jquery',101) %}\r\n        {% do assets.addJs('theme://js/modernizr.custom.71422.js',100) %}\r\n        {% do assets.addJs('theme://js/antimatter.js') %}\r\n        {% do assets.addJs('theme://js/slidebars.min.js') %}\r\n    {% endblock %}\r\n    {{ assets.js() }}\r\n    // End of moved block\r\n\r\n    {% block bottom %}\r\n        {{ assets.js('bottom') }}\r\n        <script>\r\n        $(function () {\r\n            $(document).ready(function() {\r\n              $.slidebars({\r\n                hideControlClasses: true,\r\n                scrollLock: true\r\n              });\r\n            });\r\n        });\r\n        </script>\r\n    {% endblock %}\r\n</body>\r\n</html>\r\n```"}}
{"actor":{"display_login":"Piterden"}}