├── .assets ├── nuxt7.png └── nuxt7.sketch ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── ISSUE_TEMPLATE.md └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── examples ├── kitchen-sink │ ├── README.md │ ├── css │ │ └── app.css │ ├── img │ │ ├── beach.jpg │ │ ├── f7-icon.png │ │ ├── lock.jpg │ │ ├── monkey.jpg │ │ └── mountains.jpg │ ├── layouts │ │ └── default.vue │ ├── nuxt.config.ts │ ├── pages │ │ ├── 404.vue │ │ ├── about.vue │ │ ├── accordion.vue │ │ ├── action-sheet.vue │ │ ├── appbar.vue │ │ ├── autocomplete.vue │ │ ├── badge.vue │ │ ├── buttons.vue │ │ ├── calendar-page.vue │ │ ├── calendar.vue │ │ ├── cards-expandable.vue │ │ ├── cards.vue │ │ ├── checkbox.vue │ │ ├── chips.vue │ │ ├── color-picker.vue │ │ ├── color-themes.vue │ │ ├── contacts-list.vue │ │ ├── content-block.vue │ │ ├── data-table.vue │ │ ├── default.vue │ │ ├── dialog.vue │ │ ├── elevation.vue │ │ ├── fab-morph.vue │ │ ├── fab.vue │ │ ├── form-storage.vue │ │ ├── gauge.vue │ │ ├── grid.vue │ │ ├── home.vue │ │ ├── icons.vue │ │ ├── index.html.vue │ │ ├── index.vue │ │ ├── infinite-scroll.vue │ │ ├── inputs.vue │ │ ├── lazy-load.vue │ │ ├── list-index.vue │ │ ├── list.vue │ │ ├── login-screen-page.vue │ │ ├── login-screen.vue │ │ ├── master-detail-detail.vue │ │ ├── master-detail-master.vue │ │ ├── menu.vue │ │ ├── messages.vue │ │ ├── navbar-hide-scroll.vue │ │ ├── navbar.vue │ │ ├── notifications.vue │ │ ├── panel-left.vue │ │ ├── panel-right.vue │ │ ├── panel.vue │ │ ├── photo-browser.vue │ │ ├── picker.vue │ │ ├── popover.vue │ │ ├── popup.vue │ │ ├── preloader.vue │ │ ├── progressbar.vue │ │ ├── pull-to-refresh.vue │ │ ├── radio.vue │ │ ├── range.vue │ │ ├── routable-actions.vue │ │ ├── routable-modals.vue │ │ ├── routable-popup.vue │ │ ├── searchbar-expandable.vue │ │ ├── searchbar.vue │ │ ├── sheet-modal.vue │ │ ├── skeleton.vue │ │ ├── smart-select.vue │ │ ├── sortable.vue │ │ ├── statusbar.vue │ │ ├── stepper.vue │ │ ├── subnavbar-title.vue │ │ ├── subnavbar.vue │ │ ├── swipeout.vue │ │ ├── swiper-3d-coverflow.vue │ │ ├── swiper-3d-cube.vue │ │ ├── swiper-3d-flip.vue │ │ ├── swiper-custom-controls.vue │ │ ├── swiper-fade.vue │ │ ├── swiper-gallery.vue │ │ ├── swiper-horizontal.vue │ │ ├── swiper-lazy.vue │ │ ├── swiper-loop.vue │ │ ├── swiper-multiple.vue │ │ ├── swiper-nested.vue │ │ ├── swiper-pagination-fraction.vue │ │ ├── swiper-pagination-progress.vue │ │ ├── swiper-parallax.vue │ │ ├── swiper-scrollbar.vue │ │ ├── swiper-space-between.vue │ │ ├── swiper-vertical.vue │ │ ├── swiper-zoom.vue │ │ ├── swiper.vue │ │ ├── tabbar-labels.vue │ │ ├── tabbar-scrollable.vue │ │ ├── tabbar.vue │ │ ├── tabs-animated.vue │ │ ├── tabs-routable.vue │ │ ├── tabs-static.vue │ │ ├── tabs-swipeable.vue │ │ ├── tabs.vue │ │ ├── timeline-horizontal-calendar.vue │ │ ├── timeline-horizontal.vue │ │ ├── timeline-vertical.vue │ │ ├── timeline.vue │ │ ├── toast.vue │ │ ├── toggle.vue │ │ ├── toolbar-hide-scroll.vue │ │ ├── toolbar-tabbar.vue │ │ ├── tooltip.vue │ │ ├── treeview.vue │ │ └── virtual-list.vue │ ├── static │ │ └── icon.png │ └── store │ │ └── index.js ├── routable-tabs │ ├── README.md │ ├── components │ │ ├── tab1.vue │ │ ├── tab2.vue │ │ └── tab3.vue │ ├── nuxt.config.js │ └── pages │ │ └── index.vue └── with-params │ ├── README.md │ ├── nuxt.config.js │ └── pages │ ├── blog │ └── _year │ │ └── _id.vue │ ├── index.vue │ └── users │ └── _name.vue ├── package.json ├── renovate.json ├── saofile.js ├── src ├── build-config.ts ├── defaults.ts ├── module.ts ├── options.ts ├── runtime │ ├── App.js │ ├── _templates.ts │ ├── components │ │ └── nuxt.js │ ├── fonts │ │ ├── MaterialIcons-Regular.eot │ │ ├── MaterialIcons-Regular.svg │ │ ├── MaterialIcons-Regular.ttf │ │ ├── MaterialIcons-Regular.woff │ │ ├── MaterialIcons-Regular.woff2 │ │ └── material-icons.css │ ├── framework7 │ │ ├── components.js │ │ ├── custom.less │ │ ├── plugin.js │ │ ├── routes.js │ │ └── styles.less │ ├── layouts │ │ └── default.vue │ └── router.js └── utils.ts ├── template ├── .editorconfig ├── README.md ├── assets │ └── app.css ├── gitignore ├── nuxt.config.js ├── package.json ├── pages │ ├── about.vue │ ├── default.vue │ └── index.vue └── static │ └── icon.png ├── tsconfig.json └── yarn.lock /.assets/nuxt7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/.assets/nuxt7.png -------------------------------------------------------------------------------- /.assets/nuxt7.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/.assets/nuxt7.sketch -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.js] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [{package.json,*.yml}] 14 | indent_style = space 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # kitchen-sink is from framework7-vue and it has standalone lint, so ignore it for now 2 | examples/kitchen-sink 3 | 4 | # templates and assets cannot be linted 5 | lib/templates 6 | lib/assets 7 | 8 | # from .gitignore 9 | vscode 10 | .idea 11 | node_modules 12 | .nuxt 13 | sw.* 14 | workbox-* 15 | dist -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nuxtjs/eslint-config-typescript" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/.github/ISSUE_TEMPLATE.md -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | ci: 13 | runs-on: ${{ matrix.os }} 14 | 15 | strategy: 16 | matrix: 17 | os: [ubuntu-latest] 18 | node: [12] 19 | 20 | steps: 21 | - uses: actions/setup-node@v2 22 | with: 23 | node-version: ${{ matrix.node }} 24 | 25 | - name: checkout 26 | uses: actions/checkout@master 27 | 28 | - name: cache node_modules 29 | uses: actions/cache@v2 30 | with: 31 | path: node_modules 32 | key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} 33 | 34 | - name: Install dependencies 35 | if: steps.cache.outputs.cache-hit != 'true' 36 | run: yarn 37 | 38 | - name: Lint 39 | run: yarn lint 40 | 41 | - name: Build 42 | run: yarn build 43 | 44 | - name: Build Kitchen Sink 45 | run: yarn ks:generate 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | vscode 3 | .idea 4 | *.iml 5 | node_modules 6 | .nuxt 7 | sw.* 8 | workbox-* 9 | dist 10 | *.log -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pooya@pi0.ir. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Nuxt Community 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/kitchen-sink/README.md: -------------------------------------------------------------------------------- 1 | # Kitchen Sink 2 | 3 | This demo shows usage of all Framework7-Vue components. 4 | -------------------------------------------------------------------------------- /examples/kitchen-sink/img/beach.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/img/beach.jpg -------------------------------------------------------------------------------- /examples/kitchen-sink/img/f7-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/img/f7-icon.png -------------------------------------------------------------------------------- /examples/kitchen-sink/img/lock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/img/lock.jpg -------------------------------------------------------------------------------- /examples/kitchen-sink/img/monkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/img/monkey.jpg -------------------------------------------------------------------------------- /examples/kitchen-sink/img/mountains.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/img/mountains.jpg -------------------------------------------------------------------------------- /examples/kitchen-sink/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /examples/kitchen-sink/nuxt.config.ts: -------------------------------------------------------------------------------- 1 | import type { NuxtConfig } from '@nuxt/types' 2 | import nuxt7 from '../../src/module' 3 | 4 | export default { 5 | buildModules: [ 6 | nuxt7, 7 | '@nuxtjs/pwa' 8 | ], 9 | loadingIndicator: false, 10 | build: { 11 | extractCSS: true 12 | }, 13 | manifest: { 14 | name: 'Nuxt7', 15 | description: 'Nuxt7 PWA Demo' 16 | }, 17 | framework7: { 18 | routes: { 19 | 'tabs-routable': { 20 | tabs: [ 21 | { path: '/', id: 'tab1', content: 'Tab Content 1' }, 22 | { path: '/tab2/', id: 'tab2', content: 'Tab Content 2' }, 23 | { path: '/tab3/', id: 'tab3', content: 'Tab Content 3' } 24 | ] 25 | } 26 | } 27 | }, 28 | css: ['css/app.css'], 29 | hooks: { 30 | 'generate:extendRoutes'(routes) { 31 | routes.splice(routes.findIndex(r => r.route === '/index.html'), 1) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/404.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/about.vue: -------------------------------------------------------------------------------- 1 | 13 | 25 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/accordion.vue: -------------------------------------------------------------------------------- 1 | 79 | 96 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/action-sheet.vue: -------------------------------------------------------------------------------- 1 | 78 | 142 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/appbar.vue: -------------------------------------------------------------------------------- 1 | 12 | 81 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/badge.vue: -------------------------------------------------------------------------------- 1 | 49 | 66 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/calendar-page.vue: -------------------------------------------------------------------------------- 1 | 23 | 140 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/calendar.vue: -------------------------------------------------------------------------------- 1 | 54 | 116 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/chips.vue: -------------------------------------------------------------------------------- 1 | 75 | 99 | 100 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/contacts-list.vue: -------------------------------------------------------------------------------- 1 | 42 | 55 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/content-block.vue: -------------------------------------------------------------------------------- 1 | 70 | 84 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/default.vue: -------------------------------------------------------------------------------- 1 | 404.vue -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/elevation.vue: -------------------------------------------------------------------------------- 1 | 107 | 121 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/fab-morph.vue: -------------------------------------------------------------------------------- 1 | 55 | 64 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/form-storage.vue: -------------------------------------------------------------------------------- 1 | 104 | 115 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/grid.vue: -------------------------------------------------------------------------------- 1 | 132 | 146 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/index.html.vue: -------------------------------------------------------------------------------- 1 | index.vue -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/index.vue: -------------------------------------------------------------------------------- 1 | home.vue -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/infinite-scroll.vue: -------------------------------------------------------------------------------- 1 | 10 | 52 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/login-screen-page.vue: -------------------------------------------------------------------------------- 1 | 26 | 57 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/login-screen.vue: -------------------------------------------------------------------------------- 1 | 47 | 84 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/master-detail-detail.vue: -------------------------------------------------------------------------------- 1 | 10 | 21 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/master-detail-master.vue: -------------------------------------------------------------------------------- 1 | 18 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/navbar.vue: -------------------------------------------------------------------------------- 1 | 17 | 32 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/notifications.vue: -------------------------------------------------------------------------------- 1 | 13 | 107 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/panel-left.vue: -------------------------------------------------------------------------------- 1 | 25 | 39 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/panel-right.vue: -------------------------------------------------------------------------------- 1 | 15 | 30 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/panel.vue: -------------------------------------------------------------------------------- 1 | 17 | 30 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/photo-browser.vue: -------------------------------------------------------------------------------- 1 | 49 | 84 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/popover.vue: -------------------------------------------------------------------------------- 1 | 26 | 43 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/preloader.vue: -------------------------------------------------------------------------------- 1 | 62 | 99 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/pull-to-refresh.vue: -------------------------------------------------------------------------------- 1 | 19 | 74 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/radio.vue: -------------------------------------------------------------------------------- 1 | 61 | 76 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/routable-actions.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/routable-modals.vue: -------------------------------------------------------------------------------- 1 | 13 | 22 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/routable-popup.vue: -------------------------------------------------------------------------------- 1 | 17 | 25 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/searchbar-expandable.vue: -------------------------------------------------------------------------------- 1 | 62 | 78 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/searchbar.vue: -------------------------------------------------------------------------------- 1 | 59 | 73 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/smart-select.vue: -------------------------------------------------------------------------------- 1 | 63 | 76 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/sortable.vue: -------------------------------------------------------------------------------- 1 | 77 | 93 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/statusbar.vue: -------------------------------------------------------------------------------- 1 | 13 | 34 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/subnavbar-title.vue: -------------------------------------------------------------------------------- 1 | 18 | 27 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/subnavbar.vue: -------------------------------------------------------------------------------- 1 | 20 | 29 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-3d-coverflow.vue: -------------------------------------------------------------------------------- 1 | 20 | 30 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-3d-cube.vue: -------------------------------------------------------------------------------- 1 | 19 | 29 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-3d-flip.vue: -------------------------------------------------------------------------------- 1 | 18 | 28 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-custom-controls.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-fade.vue: -------------------------------------------------------------------------------- 1 | 15 | 25 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-gallery.vue: -------------------------------------------------------------------------------- 1 | 40 | 80 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-horizontal.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-lazy.vue: -------------------------------------------------------------------------------- 1 | 31 | 41 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-loop.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-multiple.vue: -------------------------------------------------------------------------------- 1 | 97 | 108 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-nested.vue: -------------------------------------------------------------------------------- 1 | 24 | 34 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-pagination-fraction.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-pagination-progress.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-parallax.vue: -------------------------------------------------------------------------------- 1 | 35 | 45 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-scrollbar.vue: -------------------------------------------------------------------------------- 1 | 22 | 32 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-space-between.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-vertical.vue: -------------------------------------------------------------------------------- 1 | 21 | 31 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper-zoom.vue: -------------------------------------------------------------------------------- 1 | 31 | 41 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/swiper.vue: -------------------------------------------------------------------------------- 1 | 71 | 81 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/tabbar-scrollable.vue: -------------------------------------------------------------------------------- 1 | 36 | 56 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/tabs-routable.vue: -------------------------------------------------------------------------------- 1 | 16 | 25 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/tabs.vue: -------------------------------------------------------------------------------- 1 | 12 | 24 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/timeline-horizontal.vue: -------------------------------------------------------------------------------- 1 | 108 | 119 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/timeline.vue: -------------------------------------------------------------------------------- 1 | 11 | 20 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/toggle.vue: -------------------------------------------------------------------------------- 1 | 41 | 55 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/toolbar-tabbar.vue: -------------------------------------------------------------------------------- 1 | 23 | 42 | 43 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/tooltip.vue: -------------------------------------------------------------------------------- 1 | 25 | 60 | -------------------------------------------------------------------------------- /examples/kitchen-sink/pages/virtual-list.vue: -------------------------------------------------------------------------------- 1 | 41 | 77 | -------------------------------------------------------------------------------- /examples/kitchen-sink/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/static/icon.png -------------------------------------------------------------------------------- /examples/kitchen-sink/store/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/examples/kitchen-sink/store/index.js -------------------------------------------------------------------------------- /examples/routable-tabs/README.md: -------------------------------------------------------------------------------- 1 | # Routable Tabs 2 | -------------------------------------------------------------------------------- /examples/routable-tabs/components/tab1.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /examples/routable-tabs/components/tab2.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /examples/routable-tabs/components/tab3.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /examples/routable-tabs/nuxt.config.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('path') 2 | 3 | module.exports = { 4 | rootDir: resolve(__dirname, '../..'), 5 | srcDir: __dirname, 6 | modules: ['@@/lib/module'], 7 | build: { 8 | extractCSS: true 9 | }, 10 | 11 | framework7: { 12 | routes: { 13 | index: { 14 | tabs: [ 15 | { path: '', id: 'tab1' }, 16 | { path: '/tab2', id: 'tab2' }, 17 | { path: '/tab3', id: 'tab3' } 18 | ] 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/routable-tabs/pages/index.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 53 | -------------------------------------------------------------------------------- /examples/with-params/README.md: -------------------------------------------------------------------------------- 1 | # With Params 2 | 3 | Using routes with dynamic params. 4 | -------------------------------------------------------------------------------- /examples/with-params/nuxt.config.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('path') 2 | 3 | module.exports = { 4 | rootDir: resolve(__dirname, '../..'), 5 | srcDir: __dirname, 6 | modules: ['@@/lib/module'], 7 | build: { 8 | extractCSS: true 9 | }, 10 | framework7: { 11 | mode: 'history' 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/with-params/pages/blog/_year/_id.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 23 | -------------------------------------------------------------------------------- /examples/with-params/pages/index.vue: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /examples/with-params/pages/users/_name.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt7", 3 | "version": "4.2.0", 4 | "license": "MIT", 5 | "main": "dist/module.js", 6 | "files": [ 7 | "dist" 8 | ], 9 | "scripts": { 10 | "build": "siroc && mkdist --src src/runtime --dist dist/runtime", 11 | "dev": "yarn ks:dev", 12 | "ks:analyze": "nuxt build --analyze examples/kitchen-sink", 13 | "ks:build": "nuxt build examples/kitchen-sink", 14 | "ks:dev": "nuxt dev examples/kitchen-sink", 15 | "ks:generate": "nuxt generate examples/kitchen-sink", 16 | "ks:start": "nuxt start --spa examples/kitchen-sink", 17 | "lint": "eslint --ext .js,.vue,.ts", 18 | "release": "yarn test && yarn build && standard-version && git push --follow-tags && npm publish", 19 | "test": "yarn lint" 20 | }, 21 | "dependencies": { 22 | "defu": "3.2.2", 23 | "framework7": "^5.7.14", 24 | "framework7-icons": "^3.0.1", 25 | "framework7-vue": "^5.7.14", 26 | "less": "^4.1.0", 27 | "less-loader": "^6", 28 | "upath": "^2.0.1" 29 | }, 30 | "devDependencies": { 31 | "@nuxt/types": "^2.14.12", 32 | "@nuxtjs/eslint-config-typescript": "latest", 33 | "@nuxtjs/pwa": "latest", 34 | "eslint": "latest", 35 | "mkdist": "^0.1.0", 36 | "nuxt-edge": "latest", 37 | "siroc": "^0.6.2", 38 | "standard-version": "latest", 39 | "surge": "latest" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nuxtjs" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /saofile.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | prompts () { 3 | return [ 4 | { 5 | name: 'name', 6 | message: 'Project name', 7 | default: this.outFolder 8 | }, 9 | { 10 | name: 'description', 11 | message: 'Project description', 12 | default: `` 13 | } 14 | ] 15 | }, 16 | 17 | templateData () { 18 | return { 19 | name: this.answers.name, 20 | description: this.answers.description 21 | } 22 | }, 23 | 24 | actions: [ 25 | { 26 | type: 'add', 27 | files: '**' 28 | }, 29 | { type: 'move', 30 | patterns: { 31 | gitignore: '.gitignore' 32 | } 33 | } 34 | ], 35 | 36 | async completed () { 37 | this.gitInit() 38 | await this.npmInstall() 39 | this.showProjectTips() 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/build-config.ts: -------------------------------------------------------------------------------- 1 | // Source: https://github.com/framework7io/framework7/blob/master/scripts/build-config.js 2 | 3 | export const config = { 4 | rtl: false, 5 | components: [ 6 | // Appbar 7 | 'appbar', 8 | 9 | // Modals 10 | 'dialog', 11 | 'popup', 12 | 'login-screen', 13 | 'popover', 14 | 'actions', 15 | 'sheet', 16 | 'toast', 17 | 18 | // Loaders 19 | 'preloader', 20 | 'progressbar', 21 | 22 | // List Components 23 | 'sortable', 24 | 'swipeout', 25 | 'accordion', 26 | 'contacts-list', 27 | 'virtual-list', 28 | 'list-index', 29 | 30 | // Timeline 31 | 'timeline', 32 | 33 | // Tabs 34 | 'tabs', 35 | 36 | // Panel 37 | 'panel', 38 | 39 | // Card 40 | 'card', 41 | 42 | // Chip 43 | 'chip', 44 | 45 | // Form Components 46 | 'form', 47 | 'input', 48 | 'checkbox', 49 | 'radio', 50 | 'toggle', 51 | 'range', 52 | 'stepper', 53 | 'smart-select', 54 | 55 | // Grid 56 | 'grid', 57 | 58 | // Pickers 59 | 'calendar', 60 | 'picker', 61 | 62 | // Page Components 63 | 'infinite-scroll', 64 | 'pull-to-refresh', 65 | 'lazy', 66 | 67 | // Data table 68 | 'data-table', 69 | 70 | // FAB 71 | 'fab', 72 | 73 | // Searchbar 74 | 'searchbar', 75 | 76 | // Messages 77 | 'messages', 78 | 'messagebar', 79 | 80 | // Swiper 81 | 'swiper', 82 | 83 | // Photo Browser 84 | 'photo-browser', 85 | 86 | // Notifications 87 | 'notification', 88 | 89 | // Autocomplete 90 | 'autocomplete', 91 | 92 | // Tooltip 93 | 'tooltip', 94 | 95 | // Gauge 96 | 'gauge', 97 | 98 | // Skeleton 99 | 'skeleton', 100 | 101 | // Menu 102 | 'menu', 103 | 104 | // Color Picker 105 | 'color-picker', 106 | 107 | // Tree View 108 | 'treeview', 109 | 110 | // WYSIWYG Editor 111 | 'text-editor', 112 | 113 | // Elevation 114 | 'elevation', 115 | 116 | // Typography 117 | 'typography', 118 | 119 | // VI Video Ads 120 | 'vi' 121 | ], 122 | darkTheme: true, 123 | lightTheme: true, 124 | themes: [ 125 | 'ios', 126 | 'md', 127 | 'aurora' 128 | ], 129 | themeColor: '#007aff', 130 | colors: { 131 | red: '#ff3b30', 132 | green: '#4cd964', 133 | blue: '#2196f3', 134 | pink: '#ff2d55', 135 | yellow: '#ffcc00', 136 | orange: '#ff9500', 137 | purple: '#9c27b0', 138 | deeppurple: '#673ab7', 139 | lightblue: '#5ac8fa', 140 | teal: '#009688', 141 | lime: '#cddc39', 142 | deeporange: '#ff6b22', 143 | gray: '#8e8e93', 144 | white: '#ffffff', 145 | black: '#000000' 146 | } 147 | } 148 | 149 | -------------------------------------------------------------------------------- /src/defaults.ts: -------------------------------------------------------------------------------- 1 | import { config } from './build-config' 2 | 3 | const { themeColor, colors, themes, components } = config 4 | 5 | export const defaults = { 6 | app: { 7 | theme: 'auto' 8 | }, 9 | 10 | main: { 11 | main: true, 12 | pushState: true 13 | }, 14 | 15 | invertNav: true, 16 | disableContextMenu: true, 17 | disableSelect: true, 18 | 19 | rtl: false, 20 | 21 | themeColor, 22 | themes, 23 | lightTheme: true, 24 | darkTheme: true, 25 | colors, 26 | 27 | components, 28 | 29 | css: true, 30 | customCSS: true, 31 | 32 | f7Icons: true, 33 | 34 | mdIcons: true, 35 | mode: 'history', 36 | routes: {} 37 | } 38 | -------------------------------------------------------------------------------- /src/module.ts: -------------------------------------------------------------------------------- 1 | 2 | import type { Module } from '@nuxt/types' 3 | import { resolveRuntimePath } from './utils' 4 | import { templates } from'./runtime/_templates' 5 | import { getOptions } from './options' 6 | 7 | export default function nuxt7 (options) { 8 | this.nuxt.hook('build:before', () => { 9 | prepareBuild.call(this, options) 10 | }) 11 | } 12 | 13 | function prepareBuild (_options) { 14 | const options = getOptions.call(this, _options) 15 | 16 | // Force mode to SPA 17 | this.options.mode = 'spa' 18 | this.options.render.ssr = false 19 | this.options.build.ssr = false 20 | 21 | // Extend webpack config 22 | this.extendBuild((config) => { 23 | // Increase performance check limits to 2M (non-gzipped) 24 | const MAX_SIZE = 2 * 1024 * 1024 25 | Object.assign(config.performance, { 26 | maxEntrypointSize: MAX_SIZE, 27 | maxAssetSize: MAX_SIZE 28 | }) 29 | }) 30 | 31 | // Transpile framework7 32 | this.options.build.transpile.push( 33 | /framework7[\\/](?!less)(?!components\/swiper\/swiper-src\/less)/, 34 | 'framework7-vue', 35 | 'template7', 36 | 'dom7' 37 | ) 38 | 39 | // Global theme color 40 | if (options.themeColor) { 41 | if (!this.options.manifest) { 42 | this.options.manifest = {} 43 | } 44 | this.options.manifest.theme_color = options.themeColor 45 | } 46 | 47 | // Webpack 4 cacheGroup 48 | const { cacheGroups } = this.options.build.optimization.splitChunks 49 | cacheGroups.framework7 = { 50 | test: /node_modules[\\/](framework7|framework7-vue|dom7|template7|ssr-window|path-to-regexp)[\\/]/, 51 | chunks: 'all', 52 | priority: 10, 53 | name: 'framework7' 54 | } 55 | 56 | // Framework7 plugin 57 | this.addPlugin({ 58 | src: resolveRuntimePath('framework7/plugin.js'), 59 | fileName: 'framework7/plugin.js', 60 | options 61 | }) 62 | 63 | // Copy all templates 64 | for (const template of templates) { 65 | this.addTemplate({ 66 | src: resolveRuntimePath(template), 67 | fileName: template, 68 | options 69 | }) 70 | } 71 | 72 | // Enable nativeUI for a better Native experience 73 | if (!this.options.meta) { 74 | this.options.meta = {} 75 | } 76 | if (this.options.meta.nativeUI === undefined) { 77 | this.options.meta.nativeUI = true 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/options.ts: -------------------------------------------------------------------------------- 1 | import defu from 'defu' 2 | import { resolveRuntimePath } from './utils' 3 | import { defaults } from './defaults' 4 | import { normalize } from 'upath' 5 | 6 | export function getOptions (_options) { 7 | const options = defu({ ...this.options.framework7, ..._options }, defaults) 8 | 9 | // History mode 10 | if (options.mode === 'history') { 11 | options.main.pushStateSeparator = '' 12 | } 13 | 14 | // Disable context menu 15 | if (options.disableContextMenu) { 16 | if (!options.app.touch) { 17 | options.app.touch = {} 18 | } 19 | options.app.touch.disableContextMenu = true 20 | } 21 | 22 | // CamelCase component names 23 | options._components = normalizeComponents(options.components) 24 | 25 | // Icons 26 | if (options.f7Icons) { 27 | options.f7IconsSrc = normalize(require.resolve('framework7-icons/css/framework7-icons.css')) 28 | } 29 | 30 | if (options.mdIcons) { 31 | options.mdIconsSrc = resolveRuntimePath('fonts/material-icons.css') 32 | } 33 | 34 | return options 35 | } 36 | 37 | function normalizeComponents (components) { 38 | return components.map(name => ({ 39 | name, 40 | js: `framework7/components/${name}/${name}.js`, 41 | less: `~framework7/components/${name}/${name}.less` 42 | })) 43 | } 44 | -------------------------------------------------------------------------------- /src/runtime/App.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { f7App } from 'framework7-vue' 3 | 4 | // Framework7 Styles 5 | <% if (options.css) { %>import './framework7/styles.less'<% } %> 6 | <% if (options.customCSS) { %>import './framework7/custom.less'<% } %> 7 | <% if (options.f7IconsSrc) { %>import '<%= options.f7IconsSrc %>'<% } %> 8 | <% if (options.mdIconsSrc) { %>import '<%= options.mdIconsSrc %>'<% } %> 9 | 10 | // User provided styles 11 | <%= css.map(c=> `import '${relativeToBuild(resolvePath(c.src || c))}'`).join(';') %> 12 | 13 | // Default layout 14 | import defaultLayout from '<%= layouts['default'] %>' 15 | 16 | export default { 17 | functional: true, 18 | render(h) { 19 | const layout = h(defaultLayout, { 20 | class: 'framework7-root' 21 | }) 22 | 23 | const params = this.$options.framework7.app 24 | const routes = this.$options.framework7.routes 25 | 26 | return h(f7App, { 27 | props: { 28 | params, 29 | routes 30 | } 31 | }, [layout]) 32 | }, 33 | beforeCreate () { 34 | Vue.util.defineReactive(this, 'nuxt', this.$options.nuxt || this.$options._nuxt /* _nuxt for <= rc11 */) 35 | }, 36 | created () { 37 | // Add this.$nuxt in child instances 38 | this.$root.$options.$nuxt = this 39 | // Add to window so we can listen when ready 40 | if (typeof window !== 'undefined') { 41 | window.$nuxt = this 42 | } 43 | // Add $nuxt.error() 44 | this.error = this.nuxt.error 45 | // Add $nuxt.context 46 | this.context = this.$options.context 47 | }, 48 | methods: { 49 | setLayout (layout) { 50 | // STUB 51 | }, 52 | loadLayout (layout) { 53 | // STUB 54 | } 55 | }, 56 | head: <%= JSON.stringify(head) %>, 57 | } 58 | -------------------------------------------------------------------------------- /src/runtime/_templates.ts: -------------------------------------------------------------------------------- 1 | export const templates = [ 2 | // Framework 7 3 | 'framework7/routes.js', 4 | 'framework7/components.js', 5 | 'framework7/styles.less', 6 | 'framework7/custom.less', 7 | 8 | // Nuxt 9 | 'App.js', 10 | 'components/nuxt.js', 11 | 'layouts/default.vue', 12 | 'router.js' 13 | ] 14 | -------------------------------------------------------------------------------- /src/runtime/components/nuxt.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { f7View } from 'framework7-vue' 3 | 4 | export default { 5 | name: 'nuxt', 6 | functional: true, 7 | beforeCreate () { 8 | Vue.util.defineReactive(this, 'nuxt', this.$root.$options._nuxt) 9 | }, 10 | render(h, { parent: { $root }}) { 11 | return h(f7View, { 12 | props: $root.$options.framework7.main 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/runtime/fonts/MaterialIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/src/runtime/fonts/MaterialIcons-Regular.eot -------------------------------------------------------------------------------- /src/runtime/fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/src/runtime/fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /src/runtime/fonts/MaterialIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/src/runtime/fonts/MaterialIcons-Regular.woff -------------------------------------------------------------------------------- /src/runtime/fonts/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/src/runtime/fonts/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /src/runtime/fonts/material-icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-display: block; 5 | font-weight: 400; 6 | src: url(./MaterialIcons-Regular.eot); /* For IE6-8 */ 7 | src: local('Material Icons'), 8 | local('MaterialIcons-Regular'), 9 | url(./MaterialIcons-Regular.woff2) format('woff2'), 10 | url(./MaterialIcons-Regular.woff) format('woff'), 11 | url(./MaterialIcons-Regular.ttf) format('truetype'); 12 | } 13 | 14 | .material-icons { 15 | font-family: 'Material Icons'; 16 | font-weight: normal; 17 | font-style: normal; 18 | font-size: 24px; /* Preferred icon size */ 19 | display: inline-block; 20 | line-height: 1; 21 | text-transform: none; 22 | letter-spacing: normal; 23 | word-wrap: normal; 24 | white-space: nowrap; 25 | direction: ltr; 26 | 27 | /* Support for all WebKit browsers. */ 28 | -webkit-font-smoothing: antialiased; 29 | /* Support for Safari and Chrome. */ 30 | text-rendering: optimizeLegibility; 31 | 32 | /* Support for Firefox. */ 33 | -moz-osx-font-smoothing: grayscale; 34 | 35 | /* Support for IE. */ 36 | font-feature-settings: 'liga'; 37 | } 38 | -------------------------------------------------------------------------------- /src/runtime/framework7/components.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import * as components from 'framework7-vue' 4 | 5 | for (const componentName in components) { 6 | if (componentName === 'default') { 7 | continue 8 | } 9 | Vue.component(componentName, components[componentName]) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/runtime/framework7/custom.less: -------------------------------------------------------------------------------- 1 | <%if (options.invertNav) { %> 2 | /* Invert navigation bars to fill style */ 3 | body, 4 | :root, 5 | :root.theme-dark, 6 | :root .theme-dark { 7 | --f7-bars-bg-color: var(--f7-theme-color); 8 | --f7-bars-text-color: #fff; 9 | --f7-bars-link-color: #fff; 10 | --f7-navbar-subtitle-text-color: rgba(255,255,255,0.85); 11 | --f7-bars-border-color: transparent; 12 | --f7-tabbar-link-active-color: #fff; 13 | --f7-tabbar-link-inactive-color: rgba(255,255,255,0.54); 14 | --f7-searchbar-input-bg-color: #fff; 15 | --f7-sheet-border-color: transparent; 16 | --f7-tabbar-link-active-border-color: #fff; 17 | } 18 | 19 | .navbar, 20 | .toolbar, 21 | .subnavbar, 22 | .calendar-header, 23 | .calendar-footer { 24 | --f7-touch-ripple-color: var(--f7-touch-ripple-white); 25 | --f7-link-highlight-color: var(--f7-link-highlight-white); 26 | --f7-button-text-color: #fff; 27 | --f7-button-pressed-bg-color: rgba(255,255,255,0.1); 28 | } 29 | <% } %> 30 | 31 | <%if (options.disableSelect) { %> 32 | /* Disable selection/copy in UIWebView */ 33 | *:not(input):not(textarea) { 34 | user-select: none; 35 | -webkit-user-select: none; 36 | -khtml-user-select: none; 37 | -moz-user-select: none; 38 | -ms-user-select: none; 39 | } 40 | <% } %> 41 | -------------------------------------------------------------------------------- /src/runtime/framework7/plugin.js: -------------------------------------------------------------------------------- 1 | // import Vue from 'vue' 2 | import Framework7 from 'framework7/framework7.esm.bundle' 3 | import Framework7Vue from 'framework7-vue' 4 | import routes from './routes' 5 | import './components' 6 | 7 | // Register F7Vue plugin for F7 8 | Framework7.use(Framework7Vue); 9 | 10 | // Register plugin 11 | export default async function framework7({ app, route }, inject) { 12 | // Framework7 options 13 | app.framework7 = { 14 | routes, 15 | app: <%= JSON.stringify(options.app) %>, 16 | main: <%= JSON.stringify(options.main) %> 17 | } 18 | 19 | const { theme } = route.query 20 | if (['md', 'ios', 'aurora'].includes(theme)) { 21 | app.framework7.app.theme = theme 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/runtime/framework7/routes.js: -------------------------------------------------------------------------------- 1 | <% 2 | function recursiveRoutes(routes, tab, components) { 3 | let res = '' 4 | 5 | // Default route (404 page). MUST BE THE LAST 6 | const defaultRoute = routes.find(route => route.path === '/default') 7 | if (defaultRoute) { 8 | routes.push({ 9 | ...defaultRoute, 10 | name: '_default', 11 | path: '(.*)' 12 | }) 13 | } 14 | 15 | routes.forEach((route, i) => { 16 | // Customize route 17 | const cRoute = options.routes[route.name] 18 | if (cRoute) { 19 | Object.assign(route, cRoute) 20 | } 21 | 22 | // Fix path for F7 23 | if (route.name !== '_default') { 24 | route.path = route.path.replace(/[\*\?]/g, '') 25 | } 26 | 27 | // Fix tabs 28 | if (route.tabs) { 29 | route.path = (route.path + '/').replace(/\/\/$/, '/') 30 | } 31 | 32 | // add the router name 33 | route._name = '_' + hash(route.component) 34 | components.push({ _name: route._name, component: route.component, name: route.name, chunkName: route.chunkName }) 35 | res += tab + '{\n' 36 | res += tab + ' name: ' + JSON.stringify(route.name) + ',\n' 37 | res += tab + ' path: ' + JSON.stringify(route.path) + ',\n' 38 | res += tab + ' component: ' + route._name 39 | res += (route.children) ? ',\n ' + tab + 'routes: [\n' + recursiveRoutes(routes[i].children, tab + ' ', components) + '\n ' + tab + ']' : '' 40 | res += (route.tabs) ? ',\n ' + tab + 'tabs: ' + JSON.stringify(route.tabs) : '' 41 | res += '\n' + tab + '}' + (i + 1 === routes.length ? '' : ',\n') 42 | }) 43 | return res 44 | } 45 | const _components = [] 46 | 47 | const _routes = recursiveRoutes(router.routes, ' ', _components) 48 | 49 | %><%= uniqBy(_components, '_name').map(route => 50 | `import ${route._name} from '${route.component}'` 51 | ).join('\n') 52 | %> 53 | 54 | export default [ 55 | <%= _routes %> 56 | ] 57 | -------------------------------------------------------------------------------- /src/runtime/framework7/styles.less: -------------------------------------------------------------------------------- 1 | @import (reference) '~framework7/less/mixins.less'; 2 | @import (reference) '~framework7/less/vars.less'; 3 | 4 | @includeIosTheme: <%= options.themes.indexOf('ios') >= 0 %>; 5 | @includeMdTheme: <%= options.themes.indexOf('md') >= 0 %>; 6 | @includeAuroraTheme: <%= options.themes.indexOf('aurora') >= 0 %>; 7 | 8 | @includeLightTheme: <%= options.lightTheme %>; 9 | @includeDarkTheme: <%= options.darkTheme %>; 10 | 11 | @themeColor: <%= options.themeColor %>; 12 | 13 | @colors: { 14 | <%= Object.keys(options.colors).map(colorName => `${colorName}: ${options.colors[colorName]}`).join(';\n ') %>; 15 | } 16 | 17 | @rtl: <%= options.rtl || false %>; 18 | 19 | // Core 20 | @import url('~framework7/components/app/app.less'); 21 | @import url('~framework7/components/statusbar/statusbar.less'); 22 | @import url('~framework7/components/view/view.less'); 23 | @import url('~framework7/components/page/page.less'); 24 | @import url('~framework7/components/link/link.less'); 25 | @import url('~framework7/components/navbar/navbar.less'); 26 | @import url('~framework7/components/toolbar/toolbar.less'); 27 | @import url('~framework7/components/subnavbar/subnavbar.less'); 28 | @import url('~framework7/components/block/block.less'); 29 | @import url('~framework7/components/list/list.less'); 30 | @import url('~framework7/components/badge/badge.less'); 31 | @import url('~framework7/components/button/button.less'); 32 | @import url('~framework7/components/touch-ripple/touch-ripple.less'); 33 | @import url('~framework7/components/icon/icon.less'); 34 | @import url('~framework7/components/modal/modal.less'); 35 | 36 | // Components 37 | <%= options._components.filter(c => c.less).map(c => `@import url('${c.less}');`).join('\n') %> 38 | -------------------------------------------------------------------------------- /src/runtime/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /src/runtime/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import App from './App' 4 | 5 | Vue.use(Router) 6 | 7 | export function createRouter () { 8 | return new Router({ 9 | mode: 'history', 10 | base: '/', 11 | fallback: false, 12 | routes: [ 13 | { 14 | name: 'main', 15 | path: '/:route?', 16 | component: App 17 | } 18 | ] 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from 'upath' 2 | 3 | export function resolveRuntimePath (...args) { 4 | return resolve(__dirname, 'runtime', ...args) 5 | } 6 | 7 | -------------------------------------------------------------------------------- /template/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | # <%= name %> 2 | 3 | > <%= description %> 4 | 5 | ## Development 6 | 7 | ``` bash 8 | # Install dependencies 9 | <% if (context.npmClient === 'yarn') { %>yarn add<% } else { %>npm i<% } %> <%= name %> 10 | 11 | # Serve with hot-reload at localhost:3000 12 | <%= context.npmClient %> run dev 13 | 14 | # Build for production and launch server 15 | <%= context.npmClient %> run build 16 | <%= context.npmClient %> start 17 | 18 | # Generate static project 19 | <%= context.npmClient %> run generate 20 | ``` 21 | 22 | For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js). 23 | -------------------------------------------------------------------------------- /template/assets/app.css: -------------------------------------------------------------------------------- 1 | 2 | /* Add global app styles here */ 3 | 4 | -------------------------------------------------------------------------------- /template/gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | 13 | # IDE Configurations 14 | vscode 15 | .idea 16 | *.iml 17 | 18 | # OSX 19 | .DS_Store 20 | 21 | # Service worker generated files 22 | sw.* 23 | workbox-* 24 | -------------------------------------------------------------------------------- /template/nuxt.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Nuxt modules 3 | modules: [ 4 | 'nuxt7', 5 | '@nuxtjs/pwa' 6 | ], 7 | 8 | // PWA manifest 9 | // https://github.com/nuxt-community/pwa-module 10 | manifest: { 11 | name: '<%= name %>', 12 | description: '<%= description %>' 13 | }, 14 | 15 | // Framework7 Config 16 | framework7: { 17 | // ... 18 | }, 19 | 20 | // Build configuration 21 | build: { 22 | // Extract CSS in a separated file 23 | extractCSS: true, 24 | 25 | // You can extend webpack config here 26 | extend (config) { 27 | // ... 28 | } 29 | }, 30 | 31 | // Additional CSS configuration 32 | css: [ 33 | 'assets/app.css' 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= name %>", 3 | "version": "1.0.0", 4 | "description": "<%= description %>", 5 | "private": true, 6 | "scripts": { 7 | "dev": "nuxt", 8 | "build": "nuxt build", 9 | "start": "nuxt start", 10 | "generate": "nuxt generate" 11 | }, 12 | "dependencies": { 13 | "@nuxtjs/pwa": "latest", 14 | "nuxt7": "latest", 15 | "nuxt": "latest" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /template/pages/about.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 32 | -------------------------------------------------------------------------------- /template/pages/default.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /template/pages/index.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /template/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt7/90db84f853fc8e18d9fcb2d3b14abd32a0814b13/template/static/icon.png -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "moduleResolution": "Node", 5 | "esModuleInterop": true, 6 | "resolveJsonModule": true, 7 | "types": [ 8 | "@types/node" 9 | ] 10 | } 11 | } 12 | --------------------------------------------------------------------------------