Cristiano Magro
2025-01-06 4f1007a220ad55da91012edba0cfa14f006615ca
step lezione 09
150 files added
2886 ■■■■■ changed files
09 - deeper into components/cmp-adv-02-scoped-styles/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/App.vue 45 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/BadgeList.vue 38 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/UserInfo.vue 31 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/src/main.js 10 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/App.vue 45 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BadgeList.vue 38 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BaseCard.vue 20 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/UserInfo.vue 25 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-03-introducing-slots/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/App.vue 45 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/components/BadgeList.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/components/BaseCard.vue 27 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-04-named-slots/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/App.vue 45 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-05-more-on-slots/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue 51 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/CourseGoals.vue 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-06-scoped-slots/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/App.vue 55 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/ActiveGoals.vue 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/CourseGoals.vue 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/ManageGoals.vue 6 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/App.vue 55 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ActiveGoals.vue 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/CourseGoals.vue 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ErrorAlert.vue 18 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ManageGoals.vue 40 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-08-teleporting-elements/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/App.vue 55 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ActiveGoals.vue 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/CourseGoals.vue 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ErrorAlert.vue 18 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ManageGoals.vue 38 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-09-working-with-fragments/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.browserslistrc 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.eslintrc.js 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.gitignore 22 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/HOW-TO-USE.pdf patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/babel.config.js 5 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/package.json 23 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/public/favicon.ico patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/public/index.html 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/App.vue 55 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ActiveGoals.vue 3 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/BadgeList.vue 34 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/CourseGoals.vue 17 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ErrorAlert.vue 18 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ManageGoals.vue 38 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UI/BaseBadge.vue 37 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UI/BaseCard.vue 33 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UserInfo.vue 19 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/layout/TheHeader.vue 21 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/main.js 12 ●●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-02-scoped-styles/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-02-scoped-styles/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-02-scoped-styles/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-02-scoped-styles/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-02-scoped-styles/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-02-scoped-styles/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-02-scoped-styles/public/favicon.ico
09 - deeper into components/cmp-adv-02-scoped-styles/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-02-scoped-styles/src/App.vue
New file
@@ -0,0 +1,45 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <badge-list></badge-list>
    <user-info
      :full-name="activeUser.name"
      :info-text="activeUser.description"
      :role="activeUser.role"
    ></user-info>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
import BadgeList from './components/BadgeList.vue';
import UserInfo from './components/UserInfo.vue';
export default {
  components: {
    TheHeader,
    BadgeList,
    UserInfo
  },
  data() {
    return {
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/BadgeList.vue
New file
@@ -0,0 +1,38 @@
<template>
  <section>
    <h2>Available Badges</h2>
    <ul>
      <li>
        <base-badge type="admin" caption="ADMIN"></base-badge>
      </li>
      <li>
        <base-badge type="author" caption="AUTHOR"></base-badge>
      </li>
    </ul>
  </section>
</template>
<style scoped>
section {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  },
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-02-scoped-styles/src/components/UserInfo.vue
New file
@@ -0,0 +1,31 @@
<template>
  <section>
    <header>
      <h3>{{ fullName }}</h3>
      <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
    </header>
    <p>{{ infoText }}</p>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
<style scoped>
section {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
09 - deeper into components/cmp-adv-02-scoped-styles/src/main.js
New file
@@ -0,0 +1,10 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.mount('#app');
09 - deeper into components/cmp-adv-03-introducing-slots/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-03-introducing-slots/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-03-introducing-slots/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-03-introducing-slots/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-03-introducing-slots/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-03-introducing-slots/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-03-introducing-slots/public/favicon.ico
09 - deeper into components/cmp-adv-03-introducing-slots/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-03-introducing-slots/src/App.vue
New file
@@ -0,0 +1,45 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <badge-list></badge-list>
    <user-info
      :full-name="activeUser.name"
      :info-text="activeUser.description"
      :role="activeUser.role"
    ></user-info>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
import BadgeList from './components/BadgeList.vue';
import UserInfo from './components/UserInfo.vue';
export default {
  components: {
    TheHeader,
    BadgeList,
    UserInfo
  },
  data() {
    return {
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BadgeList.vue
New file
@@ -0,0 +1,38 @@
<template>
  <section>
    <h2>Available Badges</h2>
    <ul>
      <li>
        <base-badge type="admin" caption="ADMIN"></base-badge>
      </li>
      <li>
        <base-badge type="author" caption="AUTHOR"></base-badge>
      </li>
    </ul>
  </section>
</template>
<style scoped>
section {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  },
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/BaseCard.vue
New file
@@ -0,0 +1,20 @@
<template>
  <div>
    <slot></slot>
  </div>
</template>
<script>
export default {
}
</script>
<style scoped>
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/components/UserInfo.vue
New file
@@ -0,0 +1,25 @@
<template>
  <section>
    <base-card>
      <header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </header>
      <p>{{ infoText }}</p>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
<style scoped>
section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
09 - deeper into components/cmp-adv-03-introducing-slots/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-04-named-slots/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-04-named-slots/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-04-named-slots/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-04-named-slots/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-04-named-slots/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-04-named-slots/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-04-named-slots/public/favicon.ico
09 - deeper into components/cmp-adv-04-named-slots/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-04-named-slots/src/App.vue
New file
@@ -0,0 +1,45 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <badge-list></badge-list>
    <user-info
      :full-name="activeUser.name"
      :info-text="activeUser.description"
      :role="activeUser.role"
    ></user-info>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
import BadgeList from './components/BadgeList.vue';
import UserInfo from './components/UserInfo.vue';
export default {
  components: {
    TheHeader,
    BadgeList,
    UserInfo
  },
  data() {
    return {
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-04-named-slots/src/components/BadgeList.vue
New file
@@ -0,0 +1,37 @@
<template>
  <section>
    <base-card>
      <template v-slot:header>
        <h2>Available Badges</h2>
      </template>
      <template v-slot:default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-04-named-slots/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  },
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-04-named-slots/src/components/BaseCard.vue
New file
@@ -0,0 +1,27 @@
<template>
  <div>
    <header>
      <slot name="header"></slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-04-named-slots/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-04-named-slots/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template v-slot:header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template v-slot:default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-04-named-slots/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-05-more-on-slots/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-05-more-on-slots/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-05-more-on-slots/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-05-more-on-slots/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-05-more-on-slots/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-05-more-on-slots/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-05-more-on-slots/public/favicon.ico
09 - deeper into components/cmp-adv-05-more-on-slots/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-05-more-on-slots/src/App.vue
New file
@@ -0,0 +1,45 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <badge-list></badge-list>
    <user-info
      :full-name="activeUser.name"
      :info-text="activeUser.description"
      :role="activeUser.role"
    ></user-info>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
import BadgeList from './components/BadgeList.vue';
import UserInfo from './components/UserInfo.vue';
export default {
  components: {
    TheHeader,
    BadgeList,
    UserInfo
  },
  data() {
    return {
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-05-more-on-slots/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-05-more-on-slots/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-06-scoped-slots/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-06-scoped-slots/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-06-scoped-slots/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-06-scoped-slots/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-06-scoped-slots/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-06-scoped-slots/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-06-scoped-slots/public/favicon.ico
09 - deeper into components/cmp-adv-06-scoped-slots/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue
New file
@@ -0,0 +1,51 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <badge-list></badge-list>
    <user-info
      :full-name="activeUser.name"
      :info-text="activeUser.description"
      :role="activeUser.role"
    ></user-info>
    <course-goals #default="slotProps">
      <h2>{{ slotProps.item }}</h2>
      <p>{{ slotProps['another-prop'] }}</p>
    </course-goals>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
import BadgeList from './components/BadgeList.vue';
import UserInfo from './components/UserInfo.vue';
import CourseGoals from './components/CourseGoals.vue';
export default {
  components: {
    TheHeader,
    BadgeList,
    UserInfo,
    CourseGoals,
  },
  data() {
    return {
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/CourseGoals.vue
New file
@@ -0,0 +1,17 @@
<template>
  <ul>
    <li v-for="goal in goals" :key="goal">
      <slot :item="goal" another-prop="..."></slot>
    </li>
  </ul>
</template>
<script>
export default {
  data() {
    return {
      goals: ['Finish the course', 'Learn Vue'],
    };
  },
};
</script>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-06-scoped-slots/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-06-scoped-slots/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/public/favicon.ico
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/App.vue
New file
@@ -0,0 +1,55 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <button @click="setSelectedComponent('active-goals')">Active Goals</button>
    <button @click="setSelectedComponent('manage-goals')">Manage Goals</button>
    <!-- <active-goals v-if="selectedComponent === 'active-goals'"></active-goals>
    <manage-goals v-if="selectedComponent === 'manage-goals'"></manage-goals>-->
    <keep-alive>
      <component :is="selectedComponent"></component>
    </keep-alive>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
// import BadgeList from './components/BadgeList.vue';
// import UserInfo from './components/UserInfo.vue';
// import CourseGoals from './components/CourseGoals.vue';
import ActiveGoals from './components/ActiveGoals.vue';
import ManageGoals from './components/ManageGoals.vue';
export default {
  components: {
    TheHeader,
    ActiveGoals,
    ManageGoals,
  },
  data() {
    return {
      selectedComponent: 'active-goals',
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
  methods: {
    setSelectedComponent(cmp) {
      this.selectedComponent = cmp;
    },
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/ActiveGoals.vue
New file
@@ -0,0 +1,3 @@
<template>
  <h2>Active Goals</h2>
</template>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/CourseGoals.vue
New file
@@ -0,0 +1,17 @@
<template>
  <ul>
    <li v-for="goal in goals" :key="goal">
      <slot :item="goal" another-prop="..."></slot>
    </li>
  </ul>
</template>
<script>
export default {
  data() {
    return {
      goals: ['Finish the course', 'Learn Vue'],
    };
  },
};
</script>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/ManageGoals.vue
New file
@@ -0,0 +1,6 @@
<template>
  <div>
    <h2>Manage Goals</h2>
    <input type="text" />
  </div>
</template>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-07-keeping-dynamic-components-alive/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-08-teleporting-elements/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-08-teleporting-elements/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-08-teleporting-elements/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-08-teleporting-elements/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-08-teleporting-elements/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-08-teleporting-elements/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-08-teleporting-elements/public/favicon.ico
09 - deeper into components/cmp-adv-08-teleporting-elements/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/App.vue
New file
@@ -0,0 +1,55 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <button @click="setSelectedComponent('active-goals')">Active Goals</button>
    <button @click="setSelectedComponent('manage-goals')">Manage Goals</button>
    <!-- <active-goals v-if="selectedComponent === 'active-goals'"></active-goals>
    <manage-goals v-if="selectedComponent === 'manage-goals'"></manage-goals>-->
    <keep-alive>
      <component :is="selectedComponent"></component>
    </keep-alive>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
// import BadgeList from './components/BadgeList.vue';
// import UserInfo from './components/UserInfo.vue';
// import CourseGoals from './components/CourseGoals.vue';
import ActiveGoals from './components/ActiveGoals.vue';
import ManageGoals from './components/ManageGoals.vue';
export default {
  components: {
    TheHeader,
    ActiveGoals,
    ManageGoals,
  },
  data() {
    return {
      selectedComponent: 'active-goals',
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
  methods: {
    setSelectedComponent(cmp) {
      this.selectedComponent = cmp;
    },
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ActiveGoals.vue
New file
@@ -0,0 +1,3 @@
<template>
  <h2>Active Goals</h2>
</template>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/CourseGoals.vue
New file
@@ -0,0 +1,17 @@
<template>
  <ul>
    <li v-for="goal in goals" :key="goal">
      <slot :item="goal" another-prop="..."></slot>
    </li>
  </ul>
</template>
<script>
export default {
  data() {
    return {
      goals: ['Finish the course', 'Learn Vue'],
    };
  },
};
</script>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ErrorAlert.vue
New file
@@ -0,0 +1,18 @@
<template>
  <dialog open>
    <slot></slot>
  </dialog>
</template>
<style scoped>
dialog {
  margin: 0;
  position: fixed;
  top: 20vh;
  left: 30%;
  width: 40%;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/ManageGoals.vue
New file
@@ -0,0 +1,40 @@
<template>
  <div>
    <h2>Manage Goals</h2>
    <input type="text" ref="goal" />
    <button @click="setGoal">Set Goal</button>
    <teleport to="body">
      <error-alert v-if="inputIsInvalid">
        <h2>Input is invalid!</h2>
        <p>Please enter at least a few characters...</p>
        <button @click="confirmError">Okay</button>
      </error-alert>
    </teleport>
  </div>
</template>
<script>
import ErrorAlert from './ErrorAlert.vue';
export default {
  components: {
    ErrorAlert
  },
  data() {
    return {
      inputIsInvalid: false
    };
  },
  methods: {
    setGoal() {
      const enteredValue = this.$refs.goal.value;
      if (enteredValue === '') {
        this.inputIsInvalid = true;
      }
    },
    confirmError() {
      this.inputIsInvalid = false;
    }
  }
}
</script>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-08-teleporting-elements/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-09-working-with-fragments/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-09-working-with-fragments/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-09-working-with-fragments/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-09-working-with-fragments/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-09-working-with-fragments/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-09-working-with-fragments/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-09-working-with-fragments/public/favicon.ico
09 - deeper into components/cmp-adv-09-working-with-fragments/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/App.vue
New file
@@ -0,0 +1,55 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <button @click="setSelectedComponent('active-goals')">Active Goals</button>
    <button @click="setSelectedComponent('manage-goals')">Manage Goals</button>
    <!-- <active-goals v-if="selectedComponent === 'active-goals'"></active-goals>
    <manage-goals v-if="selectedComponent === 'manage-goals'"></manage-goals>-->
    <keep-alive>
      <component :is="selectedComponent"></component>
    </keep-alive>
  </div>
</template>
<script>
import TheHeader from './components/TheHeader.vue';
// import BadgeList from './components/BadgeList.vue';
// import UserInfo from './components/UserInfo.vue';
// import CourseGoals from './components/CourseGoals.vue';
import ActiveGoals from './components/ActiveGoals.vue';
import ManageGoals from './components/ManageGoals.vue';
export default {
  components: {
    TheHeader,
    ActiveGoals,
    ManageGoals,
  },
  data() {
    return {
      selectedComponent: 'active-goals',
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
  methods: {
    setSelectedComponent(cmp) {
      this.selectedComponent = cmp;
    },
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ActiveGoals.vue
New file
@@ -0,0 +1,3 @@
<template>
  <h2>Active Goals</h2>
</template>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/CourseGoals.vue
New file
@@ -0,0 +1,17 @@
<template>
  <ul>
    <li v-for="goal in goals" :key="goal">
      <slot :item="goal" another-prop="..."></slot>
    </li>
  </ul>
</template>
<script>
export default {
  data() {
    return {
      goals: ['Finish the course', 'Learn Vue'],
    };
  },
};
</script>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ErrorAlert.vue
New file
@@ -0,0 +1,18 @@
<template>
  <dialog open>
    <slot></slot>
  </dialog>
</template>
<style scoped>
dialog {
  margin: 0;
  position: fixed;
  top: 20vh;
  left: 30%;
  width: 40%;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/ManageGoals.vue
New file
@@ -0,0 +1,38 @@
<template>
  <h2>Manage Goals</h2>
  <input type="text" ref="goal" />
  <button @click="setGoal">Set Goal</button>
  <teleport to="body">
    <error-alert v-if="inputIsInvalid">
      <h2>Input is invalid!</h2>
      <p>Please enter at least a few characters...</p>
      <button @click="confirmError">Okay</button>
    </error-alert>
  </teleport>
</template>
<script>
import ErrorAlert from './ErrorAlert.vue';
export default {
  components: {
    ErrorAlert,
  },
  data() {
    return {
      inputIsInvalid: false,
    };
  },
  methods: {
    setGoal() {
      const enteredValue = this.$refs.goal.value;
      if (enteredValue === '') {
        this.inputIsInvalid = true;
      }
    },
    confirmError() {
      this.inputIsInvalid = false;
    },
  },
};
</script>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-09-working-with-fragments/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/BaseBadge.vue';
import BaseCard from './components/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.browserslistrc
New file
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.eslintrc.js
New file
@@ -0,0 +1,17 @@
module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/.gitignore
New file
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/HOW-TO-USE.pdf
Binary files differ
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/babel.config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ]
}
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/package.json
New file
@@ -0,0 +1,23 @@
{
  "name": "vue-first-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0-0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0"
  }
}
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/public/favicon.ico
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/public/index.html
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/App.vue
New file
@@ -0,0 +1,55 @@
<template>
  <div>
    <the-header></the-header>
    <!-- <TheHeader /> -->
    <button @click="setSelectedComponent('active-goals')">Active Goals</button>
    <button @click="setSelectedComponent('manage-goals')">Manage Goals</button>
    <!-- <active-goals v-if="selectedComponent === 'active-goals'"></active-goals>
    <manage-goals v-if="selectedComponent === 'manage-goals'"></manage-goals>-->
    <keep-alive>
      <component :is="selectedComponent"></component>
    </keep-alive>
  </div>
</template>
<script>
import TheHeader from './components/layout/TheHeader.vue';
// import BadgeList from './components/BadgeList.vue';
// import UserInfo from './components/UserInfo.vue';
// import CourseGoals from './components/CourseGoals.vue';
import ActiveGoals from './components/ActiveGoals.vue';
import ManageGoals from './components/ManageGoals.vue';
export default {
  components: {
    TheHeader,
    ActiveGoals,
    ManageGoals,
  },
  data() {
    return {
      selectedComponent: 'active-goals',
      activeUser: {
        name: 'Maximilian Schwarzmüller',
        description: 'Site owner and admin',
        role: 'admin',
      },
    };
  },
  methods: {
    setSelectedComponent(cmp) {
      this.selectedComponent = cmp;
    },
  },
};
</script>
<style>
html {
  font-family: sans-serif;
}
body {
  margin: 0;
}
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ActiveGoals.vue
New file
@@ -0,0 +1,3 @@
<template>
  <h2>Active Goals</h2>
</template>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/BadgeList.vue
New file
@@ -0,0 +1,34 @@
<template>
  <section>
    <base-card>
      <template #default>
        <ul>
          <li>
            <base-badge type="admin" caption="ADMIN"></base-badge>
          </li>
          <li>
            <base-badge type="author" caption="AUTHOR"></base-badge>
          </li>
        </ul>
      </template>
    </base-card>
  </section>
</template>
<style scoped>
section h2 {
  margin: 0.5rem 0;
  color: #3a3a3a;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}
li {
  margin-right: 1rem;
}
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/CourseGoals.vue
New file
@@ -0,0 +1,17 @@
<template>
  <ul>
    <li v-for="goal in goals" :key="goal">
      <slot :item="goal" another-prop="..."></slot>
    </li>
  </ul>
</template>
<script>
export default {
  data() {
    return {
      goals: ['Finish the course', 'Learn Vue'],
    };
  },
};
</script>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ErrorAlert.vue
New file
@@ -0,0 +1,18 @@
<template>
  <dialog open>
    <slot></slot>
  </dialog>
</template>
<style scoped>
dialog {
  margin: 0;
  position: fixed;
  top: 20vh;
  left: 30%;
  width: 40%;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/ManageGoals.vue
New file
@@ -0,0 +1,38 @@
<template>
  <h2>Manage Goals</h2>
  <input type="text" ref="goal" />
  <button @click="setGoal">Set Goal</button>
  <teleport to="body">
    <error-alert v-if="inputIsInvalid">
      <h2>Input is invalid!</h2>
      <p>Please enter at least a few characters...</p>
      <button @click="confirmError">Okay</button>
    </error-alert>
  </teleport>
</template>
<script>
import ErrorAlert from './ErrorAlert.vue';
export default {
  components: {
    ErrorAlert,
  },
  data() {
    return {
      inputIsInvalid: false,
    };
  },
  methods: {
    setGoal() {
      const enteredValue = this.$refs.goal.value;
      if (enteredValue === '') {
        this.inputIsInvalid = true;
      }
    },
    confirmError() {
      this.inputIsInvalid = false;
    },
  },
};
</script>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UI/BaseBadge.vue
New file
@@ -0,0 +1,37 @@
<template>
  <span class="badge" :class="classes">{{ caption }}</span>
</template>
<script>
export default {
  props: ['type', 'caption'],
  computed: {
    classes() {
      return {
        'badge--admin': this.type === 'admin',
        'badge--author': this.type === 'author',
      };
    },
  }
};
</script>
<style scoped>
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  background-color: #ccc;
  color: #2e2e2e;
}
.badge--admin {
  background-color: #810036;
  color: white;
}
.badge--author {
  background-color: #002c8a;
  color: white;
}
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UI/BaseCard.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <header v-if="$slots.header">
      <slot name="header">
        <!-- <h2>The Default</h2> -->
      </slot>
    </header>
    <slot></slot>
  </div>
</template>
<script>
export default {
  mounted() {
    console.log(this.$slots.header);
  }
};
</script>
<style scoped>
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
div {
  margin: 2rem auto;
  max-width: 30rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  padding: 1rem;
}
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/UserInfo.vue
New file
@@ -0,0 +1,19 @@
<template>
  <section>
    <base-card>
      <template #header>
        <h3>{{ fullName }}</h3>
        <base-badge :type="role" :caption="role.toUpperCase()"></base-badge>
      </template>
      <template #default>
        <p>{{ infoText }}</p>
      </template>
    </base-card>
  </section>
</template>
<script>
export default {
  props: ['fullName', 'infoText', 'role'],
};
</script>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/components/layout/TheHeader.vue
New file
@@ -0,0 +1,21 @@
<template>
  <header>
    <h1>More on Vue Components</h1>
  </header>
</template>
<style scoped>
  header {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #14005e;
  }
  header h1 {
    color: white;
    margin: 0;
  }
</style>
09 - deeper into components/cmp-adv-10-moving-to-a-different-folder-structure/src/main.js
New file
@@ -0,0 +1,12 @@
import { createApp } from 'vue';
import App from './App.vue';
import BaseBadge from './components/UI/BaseBadge.vue';
import BaseCard from './components/UI/BaseCard.vue';
const app = createApp(App);
app.component('base-badge', BaseBadge);
app.component('base-card', BaseCard);
app.mount('#app');