{"id":19388852,"url":"https://github.com/james2doyle/pyro-swipe-module","last_synced_at":"2025-04-23T23:31:49.329Z","repository":{"id":7997700,"uuid":"9404831","full_name":"james2doyle/pyro-swipe-module","owner":"james2doyle","description":"PyroCMS Swipe.js module","archived":false,"fork":false,"pushed_at":"2014-12-05T18:08:45.000Z","size":235,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:33:08.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/james2doyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-12T22:13:30.000Z","updated_at":"2017-01-29T15:49:32.000Z","dependencies_parsed_at":"2022-08-28T07:51:38.878Z","dependency_job_id":null,"html_url":"https://github.com/james2doyle/pyro-swipe-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-swipe-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-swipe-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-swipe-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Fpyro-swipe-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james2doyle","download_url":"https://codeload.github.com/james2doyle/pyro-swipe-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250532133,"owners_count":21446125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T10:13:53.060Z","updated_at":"2025-04-23T23:31:48.960Z","avatar_url":"https://github.com/james2doyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyro-swipe-module\n=================\n\nCreate multiple sliders with [swipe.js by Brad Birdsall](https://github.com/bradbirdsall/Swipe). Swipe is great because it is lightweight, framework-independent(no jQuery) and touch-capable.\n\nThis module lets you create multiple sliders and then call them using their id and the modules plugin. You just create a new folder in the `swipe` directory in the files module, and choose that new folder as your image source folder.\n\nThe slider will then generate a form for each image. If you want to sort your images, just use the **dragging sort** in the files module.\n\nSlides have their own titles, and can be linked to pages on your site, or an outside URL.\n\n### Usage\n\nSuggested HTML markup using all the plugins helper keys.\n\n```html\n\u003c!-- the id of the slider you want --\u003e\n{{ swipe:slider id=\"1\" }}\n  \u003c!-- keep the slider unique with the id --\u003e\n  \u003cdiv id=\"slider_{{id}}\" class=\"swipe\"\u003e\n    \u003cdiv class=\"swipe-wrap\"\u003e\n      {{ files }}\n        \u003cdiv\u003e\n          \u003c!-- handle slides with links differently --\u003e\n          {{ if swipe_link }}\n            \u003ca href=\"{{ swipe_link }}\" title=\"{{ swipe_title }}\"\u003e\n              \u003cimg src=\"{{ path }}\" width=\"1200\" height=\"420\" alt=\"{{ alt_attribute }} {{ description }} {{ swipe_title }}\" id=\"slide-count-{{ count }}\" /\u003e\n            \u003c/a\u003e\n          {{ else }}\n            \u003cimg src=\"{{ path }}\" width=\"1200\" height=\"420\" alt=\"{{ alt_attribute }} {{ description }} {{ swipe_title }}\" id=\"slide-count-{{ count }}\"/\u003e\n          {{ endif }}\n        \u003c/div\u003e\n      {{ /files }}\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003c!-- source is set in plugin --\u003e\n  \u003cscript src=\"{{ source }}\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n    window.onload = function() {\n    // window onload fires last... on most browsers...\n    {{ script }}\n  };\n  \u003c/script\u003e\n{{ /swipe:slider }}\n```\n\n**side note**: If you plan on using the assets plugin or minifying and concatenating all your js files, go ahead and ignore the {{ source }} and just add your js in the footer as you would normally.\n\nCSS styles. These can be modified to suit your needs. But this is the basic setup from the [repos readme file](https://github.com/bradbirdsall/Swipe/blob/master/README.md).\n\n```css\n.swipe {\n  overflow: hidden;\n  visibility: hidden;\n  position: relative;\n}\n\n.swipe-wrap {\n  overflow: hidden;\n  position: relative;\n}\n\n.swipe-wrap .slide {\n  float: left;\n  width: 100%;\n  position: relative;\n}\n\n.swipe-wrap .slide img {\n  max-width: 100%;\n  height: auto;\n}\n```\n\n### Using the {{ script }} key\n\nIn order to keep the HTML small, or to just be lazy, you can just use the built in script that the plugin returns. It just sets up everything in its place. But, this setup requires you to use the prefered html with `slide_{{id}}` set correctly.\n\n```php\n// currently in the plugin.php file\n$swipe['script'] = \"window.swipe{$swipe[id]} = new Swipe(document.getElementById('slider_{$swipe[id]}'), {\n  startSlide: {$swipe[startslide]},\n  speed: {$swipe[speed]},\n  auto: {$swipe[auto]},\n  continuous: {$swipe[continuous]},\n  disableScroll: {$swipe[disablescroll]},\n  stopPropagation: {$swipe[stoppropagation]}\n});\";\n```\n\n### Todo\n\n* Add pagination option\n* Add left-right controls option\n\n### License\n\n(The MIT License)\n\nCopyright (c) 2013 James Doyle(james2doyle) james2doyle@gmail.com\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fpyro-swipe-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames2doyle%2Fpyro-swipe-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Fpyro-swipe-module/lists"}