├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets └── logo.png ├── components ├── About │ ├── about.vue │ ├── section1.vue │ └── section2.vue ├── Home │ └── home.vue └── Partials │ └── navbar.vue ├── main.js ├── router └── index.js └── views ├── About.vue └── Home.vue /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # company-dir 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Customize configuration 19 | See [Configuration Reference](https://cli.vuejs.org/config/). 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "company-dir", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "axios": "^0.19.2", 11 | "bootstrap": "^4.5.2", 12 | "core-js": "^3.6.5", 13 | "jquery": "^3.5.1", 14 | "popper.js": "^1.16.1", 15 | "vue": "^2.6.11", 16 | "vue-axios": "^2.1.5", 17 | "vue-clamp": "^0.3.1", 18 | "vue-router": "^3.2.0" 19 | }, 20 | "devDependencies": { 21 | "@vue/cli-plugin-babel": "~4.5.0", 22 | "@vue/cli-plugin-router": "~4.5.0", 23 | "@vue/cli-service": "~4.5.0", 24 | "vue-template-compiler": "^2.6.11" 25 | }, 26 | "browserslist": [ 27 | "> 1%", 28 | "last 2 versions", 29 | "not dead" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smashingmagazine/Tutorials/4e1b681650310e3fb0d5ed7c235beb4d68165792/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smashingmagazine/Tutorials/4e1b681650310e3fb0d5ed7c235beb4d68165792/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/About/about.vue: -------------------------------------------------------------------------------- 1 | 21 | 35 | 40 | > 41 | -------------------------------------------------------------------------------- /src/components/About/section1.vue: -------------------------------------------------------------------------------- 1 | 122 | 162 | 213 | -------------------------------------------------------------------------------- /src/components/About/section2.vue: -------------------------------------------------------------------------------- 1 | 20 | 55 | 78 | -------------------------------------------------------------------------------- /src/components/Home/home.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 58 | 95 | 96 | 144 | -------------------------------------------------------------------------------- /src/components/Partials/navbar.vue: -------------------------------------------------------------------------------- 1 | 12 | 46 | 47 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./App.vue"; 3 | import router from "./router"; 4 | import "bootstrap"; 5 | import "bootstrap/dist/css/bootstrap.min.css"; 6 | import axios from "axios"; 7 | import VueAxios from "vue-axios"; 8 | 9 | 10 | const base = axios.create({ 11 | baseURL: "https://api.jsonbin.io/b/5f20829bc58dc34bf5dca275", 12 | }); 13 | 14 | Vue.prototype.$http = base; 15 | Vue.use(VueAxios, axios); 16 | 17 | Vue.config.productionTip = false; 18 | new Vue({ 19 | router, 20 | render: (h) => h(App), 21 | }).$mount("#app"); -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import Home from '../views/Home.vue' 4 | 5 | 6 | Vue.use(VueRouter) 7 | 8 | const routes = [{ 9 | path: '/', 10 | name: 'Home', 11 | component: Home 12 | }, 13 | 14 | { 15 | path: '/about/:companyid', 16 | name: 'About', 17 | props: true, 18 | 19 | component: () => 20 | import ('../views/About.vue') 21 | }, 22 | 23 | ] 24 | 25 | const router = new VueRouter({ 26 | mode: 'history', 27 | base: process.env.BASE_URL, 28 | routes 29 | }) 30 | 31 | export default router -------------------------------------------------------------------------------- /src/views/About.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | --------------------------------------------------------------------------------