└── movieapp ├── .editorconfig ├── .gitignore ├── .prettierrc ├── README.md ├── assets ├── defaults.scss └── imgs │ └── movieHero.jpg ├── components ├── Hero.vue └── Loading.vue ├── jsconfig.json ├── layouts └── default.vue ├── nuxt.config.js ├── package-lock.json ├── package.json ├── pages ├── index.vue └── movies │ └── _movieid.vue ├── static └── favicon.ico └── store └── README.md /movieapp/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 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 | -------------------------------------------------------------------------------- /movieapp/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | /logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # parcel-bundler cache (https://parceljs.org/) 63 | .cache 64 | 65 | # next.js build output 66 | .next 67 | 68 | # nuxt.js build output 69 | .nuxt 70 | 71 | # Nuxt generate 72 | dist 73 | 74 | # vuepress build output 75 | .vuepress/dist 76 | 77 | # Serverless directories 78 | .serverless 79 | 80 | # IDE / Editor 81 | .idea 82 | 83 | # Service worker 84 | sw.* 85 | 86 | # macOS 87 | .DS_Store 88 | 89 | # Vim swap files 90 | *.swp 91 | -------------------------------------------------------------------------------- /movieapp/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /movieapp/README.md: -------------------------------------------------------------------------------- 1 | # movieapp 2 | 3 | ## Build Setup 4 | 5 | ```bash 6 | # install dependencies 7 | $ npm install 8 | 9 | # serve with hot reload at localhost:3000 10 | $ npm run dev 11 | 12 | # build for production and launch server 13 | $ npm run build 14 | $ npm run start 15 | 16 | # generate static project 17 | $ npm run generate 18 | ``` 19 | 20 | For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org). 21 | 22 | ## Special Directories 23 | 24 | You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality. 25 | 26 | ### `assets` 27 | 28 | The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts. 29 | 30 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets). 31 | 32 | ### `components` 33 | 34 | The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components. 35 | 36 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components). 37 | 38 | ### `layouts` 39 | 40 | Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop. 41 | 42 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts). 43 | 44 | 45 | ### `pages` 46 | 47 | This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically. 48 | 49 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing). 50 | 51 | ### `plugins` 52 | 53 | The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`. 54 | 55 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins). 56 | 57 | ### `static` 58 | 59 | This directory contains your static files. Each file inside this directory is mapped to `/`. 60 | 61 | Example: `/static/robots.txt` is mapped as `/robots.txt`. 62 | 63 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static). 64 | 65 | ### `store` 66 | 67 | This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex. 68 | 69 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store). 70 | -------------------------------------------------------------------------------- /movieapp/assets/defaults.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Karla:wght@200;300;400;500;600&display=swap'); 2 | 3 | * { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | font-family: 'Karla', sans-serif; 8 | scroll-behavior: smooth; 9 | } 10 | 11 | // app transitions 12 | .page-enter-active, 13 | .page-leave-active { 14 | transition: opacity 0.5s; 15 | } 16 | .page-enter, 17 | .page-leave-to { 18 | opacity: 0; 19 | } 20 | 21 | .app { 22 | background-color: #211f1f; 23 | min-height: 100vh; 24 | } 25 | 26 | .button { 27 | display: inline-block; 28 | text-decoration: none; 29 | color: inherit; 30 | padding: 8px 16px; 31 | background-color: #c92502; 32 | border: none; 33 | color: #fff; 34 | border-radius: 4px; 35 | cursor: pointer; 36 | transition: 0.3s ease all; 37 | 38 | &:hover { 39 | background-color: #891b02; 40 | } 41 | } 42 | 43 | .button-light { 44 | background-color: transparent; 45 | border: 1px solid #c92502; 46 | 47 | &:hover { 48 | border-color: transparent; 49 | } 50 | } 51 | 52 | .container { 53 | max-width: 1400px; 54 | margin: 0 auto; 55 | } 56 | 57 | .loading { 58 | height: 100vh; 59 | width: 100%; 60 | display: flex; 61 | justify-content: center; 62 | align-items: center; 63 | 64 | @keyframes circle-loading { 65 | to { 66 | transform: rotateZ(360deg); 67 | } 68 | } 69 | 70 | span { 71 | display: block; 72 | width: 70px; 73 | height: 70px; 74 | border-radius: 50%; 75 | border: 2px solid transparent; 76 | border-top-color: #fff; 77 | animation: circle-loading 1200ms ease infinite; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /movieapp/assets/imgs/movieHero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkomarnicki/movies-app-nuxtjs/76382c9f00dbb10e22edc2346b6fd52fb9091cca/movieapp/assets/imgs/movieHero.jpg -------------------------------------------------------------------------------- /movieapp/components/Hero.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | 20 | 95 | -------------------------------------------------------------------------------- /movieapp/components/Loading.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 36 | -------------------------------------------------------------------------------- /movieapp/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "~/*": ["./*"], 6 | "@/*": ["./*"], 7 | "~~/*": ["./*"], 8 | "@@/*": ["./*"] 9 | } 10 | }, 11 | "exclude": ["node_modules", ".nuxt", "dist"] 12 | } 13 | -------------------------------------------------------------------------------- /movieapp/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /movieapp/nuxt.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // Target: https://go.nuxtjs.dev/config-target 3 | target: 'server', 4 | 5 | // Global page headers: https://go.nuxtjs.dev/config-head 6 | head: { 7 | title: 'movieapp', 8 | htmlAttrs: { 9 | lang: 'en', 10 | }, 11 | meta: [ 12 | { charset: 'utf-8' }, 13 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 14 | { hid: 'description', name: 'description', content: '' }, 15 | { name: 'format-detection', content: 'telephone=no' }, 16 | ], 17 | link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], 18 | }, 19 | 20 | // Global CSS: https://go.nuxtjs.dev/config-css 21 | css: ['@/assets/defaults.scss'], 22 | 23 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins 24 | plugins: [], 25 | 26 | // Auto import components: https://go.nuxtjs.dev/config-components 27 | components: true, 28 | 29 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules 30 | buildModules: [], 31 | 32 | // Modules: https://go.nuxtjs.dev/config-modules 33 | modules: [ 34 | // https://go.nuxtjs.dev/axios 35 | '@nuxtjs/axios', 36 | ], 37 | 38 | // Axios module configuration: https://go.nuxtjs.dev/config-axios 39 | axios: {}, 40 | 41 | // Build Configuration: https://go.nuxtjs.dev/config-build 42 | build: {}, 43 | } 44 | -------------------------------------------------------------------------------- /movieapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "movieapp", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "nuxt", 7 | "build": "nuxt build", 8 | "start": "nuxt start", 9 | "generate": "nuxt generate" 10 | }, 11 | "dependencies": { 12 | "@nuxtjs/axios": "^5.13.6", 13 | "core-js": "^3.15.1", 14 | "nuxt": "^2.15.7" 15 | }, 16 | "devDependencies": { 17 | "eslint-config-prettier": "^8.3.0", 18 | "fibers": "^5.0.0", 19 | "prettier": "^2.3.2", 20 | "pug": "^3.0.2", 21 | "pug-plain-loader": "^1.1.0", 22 | "sass": "^1.38.0", 23 | "sass-loader": "^10.2.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /movieapp/pages/index.vue: -------------------------------------------------------------------------------- 1 | 102 | 103 | 178 | 179 | 296 | -------------------------------------------------------------------------------- /movieapp/pages/movies/_movieid.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 83 | 84 | 147 | -------------------------------------------------------------------------------- /movieapp/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkomarnicki/movies-app-nuxtjs/76382c9f00dbb10e22edc2346b6fd52fb9091cca/movieapp/static/favicon.ico -------------------------------------------------------------------------------- /movieapp/store/README.md: -------------------------------------------------------------------------------- 1 | # STORE 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Vuex Store files. 6 | Vuex Store option is implemented in the Nuxt.js framework. 7 | 8 | Creating a file in this directory automatically activates the option in the framework. 9 | 10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store). 11 | --------------------------------------------------------------------------------