{"id":24184516,"url":"https://github.com/angsdev/pagestack","last_synced_at":"2026-04-11T05:08:15.788Z","repository":{"id":59939247,"uuid":"496902662","full_name":"angsdev/pagestack","owner":"angsdev","description":"An animated library based on the cards shuffle concept to make websites/apps or simply presentations like powerpoint.","archived":false,"fork":false,"pushed_at":"2022-11-18T19:53:17.000Z","size":337,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.1","last_synced_at":"2024-04-26T07:02:36.416Z","etag":null,"topics":["css","html","javascript","nodejs","plugin","scss","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-27T07:32:21.000Z","updated_at":"2022-05-27T08:38:42.000Z","dependencies_parsed_at":"2023-01-21T23:50:52.270Z","dependency_job_id":null,"html_url":"https://github.com/angsdev/pagestack","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angsdev%2Fpagestack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angsdev%2Fpagestack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angsdev%2Fpagestack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angsdev%2Fpagestack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angsdev","download_url":"https://codeload.github.com/angsdev/pagestack/tar.gz/refs/heads/1.1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241584173,"owners_count":19986100,"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":["css","html","javascript","nodejs","plugin","scss","vue"],"created_at":"2025-01-13T10:15:28.655Z","updated_at":"2025-12-30T20:05:51.129Z","avatar_url":"https://github.com/angsdev.png","language":"JavaScript","funding_links":["https://www.paypal.com/paypalme/AngelQuinonezS"],"categories":[],"sub_categories":[],"readme":"# PageStack\n\n## Description\nAn animated library based on the cards shuffle concept to make websites/apps or simply presentations like powerpoint.\n\n## Prerequisites\nIt doesn't have prerequisites.\n\n## Installation\n### Global\nThere's a global version, you just need to include the global file with a ```\u003cscript/\u003e``` tag:\n```\n\u003cscript src=\"pagestack.global.js\"/\u003e\n```\n\n### ESM\nThere's an ESM version, you just need to import the needed feature:\n```\n// Importing all functions as set.\nimport * as pagestack from 'pagestack.esm.js'\n\n// Importing individually.\nimport { defineConfig } from 'pagestack.esm.js'\n```\n\n### Vue\nThere's a Vue version, and to install it you just need to run in CMD:\n```\nnpm i @angsdev/vue-pagestack\n```\nThen, import the ```createPageStack``` method and you will pass an object with the config:\n```\nimport { createPageStack } from '@angsdev/vue-pagestack';\nexport default createPageStack(...configObject);\n```\nFinally, use the plugin in your vue instantiation:\n```\nimport { createApp } from 'vue';\nimport PS from 'pagestack';\n\nconst app = createApp(App);\napp.use(PS)\n   .mount('#app');\n```\n\n## Setup\nTo define the library functionality you can stablish custom options or use the default.\nYou have to pass an object to methods\n```defineConfig``` in case you'are using ESM (also available in Vue),\n```createPageStack``` in case you're using Vue or global ```pagestack```:\n```\n// ESM version\ndefineConfig(...configObject);\n\n// Global version\npagestack(...configObject); or window.pagestack(...configObject);\n// or if you want to change later\npagestack.defineConfig(...configObject);\n\n// Vue version\ncreatePageStack(...configObject);\n// or already within vue app but it's recommended the previous\nthis.$pagestak.defineConfig(...configObject);\n```\n### Notice:\nIn any case, you must link manually the library styles because it provide both css and scss, to you choose your preferred one.\n\u003cbr/\u003e\nIn case you use scss, you can modify it class names to keep a semantic sense with your decided customized id|class name but it's NOT RECOMMENDED, so do it under your responsibility.\n\n### The config object can contain the following options:\n\n- Property: ```container```\n  - Type: string\n  - Default: ```#ps-pages```\n  - Description: The container or stack id|class of all pages.\n\n- Property: ```pageSelector```\n  - Type: string\n  - Default: ```.ps-page```\n  - Description: The id|class of each pages from the stack.\n\n- Property: ```direction```\n  - Type: string\n  - Default: ```up```\n  - Description: The direction where each page will slide.\n    Possible values:\n    - To slide up: ```up```, ```top```, ```vertical```\n    - To slide right: ```right```, ```horizontal```\n    - To slide down: ```down```, ```bottom```, ```vertical-inverted```\n    - To slide left: ```left```, ```horizontal-inverted```\n\n- Property: ```scrollingSpeed```\n  - Type: number\n  - Default: ```700```\n  - Description: The speed of scrolling.\n\n\n- Property: ```hashHistorial```\n  - Type: boolean\n  - Default: ```false```\n  - Description: An option which allow manages pages changing depending on url hash.\n\n- Property: ```menu```\n  - Type: string|null\n  - Default: ```null```\n  - Description: The id|class of a menu to handle when the navigation change.\n\n- Property: ```anchors```\n  - Type: string[]\n  - Default: ```[]```\n  - Description: An array of ids to move through the pages.\n\n- Property: ```loopTop```\n  - Type: boolean\n  - Default: ```false```\n  - Description: Specify if when it reach the last page scrolling down returns to the first one.\n\n- Property: ```loopBottom```\n  - Type: boolean\n  - Default: ```false```\n  - Description: Specify if when it reach the first page scrolling up returns to the last one.\n\n- Property: ```keyboardScrolling```\n  - Type: boolean\n  - Default: ```false```\n  - Description: Specify if the pages are changeable with the keyboard.\n\n\n- Property: ```beforeChange```\n  - Type: function\n  - Default: ```null```\n  - Description: A function to execute some instruction just before the page change.\n\n- Property: ```afterChange```\n  - Type: function\n  - Default: ```null```\n  - Description: A function to execute some instruction just after the page change.\n\n- Property: ```navigation```\n  - Type: object\n  - Properties:\n    - Property: ```container```\n      - Type: string\n      - Default: ```#ps-nav```\n      - Description: The container id|class of the navigation bar.\n\n    - Property: ```dynamic```\n      - Type: boolean\n      - Default: ```false```\n      - Description: Establish if the pages navigation bar will be created dynamically.\n    \n    - Property: ```position```\n      - Type: string\n      - Default: ```right```\n      - Description: The position where will be positioned the pages navigation bar. Note: It only works if the dynamic is ```true```.\n        Possible values:\n        - Positioning up: ```up``` and ```top```\n        - Positioning right: ```right```\n        - Positioning down: ```down``` and ```bottom```\n        - Positioning left: ```left```\n\n    - Property: ```class```\n      - Type: string[]\n      - Default: ```[]```\n      - Description: Array of classes to add to the navigation bar container. Note: It only works if the dynamic is ```true```.\n\n    - Property: ```tooltips```\n      - Type: string\n      - Default: ```[]```\n      - Description: Array of tooltips to add to each navigation bar item. Note: It only works if the dynamic is ```true```.\n\n### Snippets\nBelow will be some examples on how to build each necessary part of the library to work:\n\n  - Pages stack:\n    ```\n    // Pages stack container\n    \u003carticle id=\"ps-pages\"\u003e\n\n      // Each Page\n      \u003carticle id=\"page1\" class=\"ps-page ps-scrollable\"\u003e\n        // ...Rest of content\n      \u003c/article\u003e\n    \u003c/article\u003e\n    ```\n\n  - Pages navigation:\n    ```\n    \u003cul id=\"ps-nav\" class=\"right\"\u003e\n      \u003cli\u003e\u003ca href=\"#page1\"\u003e\u003cspan\u003e\u003c/span\u003e\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#page2\"\u003e\u003cspan\u003e\u003c/span\u003e\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#page3\"\u003e\u003cspan\u003e\u003c/span\u003e\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#page4\"\u003e\u003cspan\u003e\u003c/span\u003e\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    ```\n\nBut if you're using ```vue-pagestack``` there are some components:\n\n  - Component: ```ps-container```\n    - Description: Contain the pages stack container and give you a slot to put inside different pages.\n    - Attributes: \n      - id: The indentifier of the pages stack.\n      - class: The desired classes to add to the pages stack.\n\n  - Component: ```ps-page```\n    - Description: Contain all the content of a single page and give you a slot to put inside different content.\n    - Attributes: \n      - id: The indentifier of the page.\n      - scrollable: A boolean attribute to specify if the page is scrollable.\n\n  - Component: ```ps-nav```\n    - Description: Pages navigation bar.\n    - Attributes: \n      - id: The indentifier of the page.\n      - position: The desired position of the navigation bar.\n\n  - Component: ```ps-nav-item```\n    - Description: Pages navigation bar item.\n    - Attributes:\n      - anchor: The anchor which will be binded with each page.\n\n## Donations\nIf you have enjoyed using this library and you can and want to support it\nyou can do it in the following buttons.\n\n\u003ca href=\"https://www.paypal.com/paypalme/AngelQuinonezS\"\u003e\u003cimg src=\"./src/img/paypal-donate-button.png\" alt=\"Donations\" width=\"250\" height=\"100\"\u003e\u003c/a\u003e\n\n## License\nCopyright 2022 - Angel Quiñonez\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangsdev%2Fpagestack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangsdev%2Fpagestack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangsdev%2Fpagestack/lists"}