MOOOORE STUFF
parent
8d280d0a3e
commit
8b4086d52e
|
@ -0,0 +1,28 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
# vue-project
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Compile and Minify for Production
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="https://unpkg.com/mustard-ui@latest/dist/css/mustard-ui.min.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "vue-project",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.2.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.1.2",
|
||||
"vite": "^3.1.8"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,109 @@
|
|||
<template>
|
||||
<section id="assignment">
|
||||
<!-- 1) Output your name -->
|
||||
<the-name />
|
||||
<!-- 2) Output your age -->
|
||||
<age-display :el-age="myAge" />
|
||||
<!-- 3) Output your age + 5 -->
|
||||
|
||||
<age-display :el-age="agePlusFive()" />
|
||||
<!-- 4) Output a random number (0 to 1) -->
|
||||
<p>{{ randomNumber() }}</p>
|
||||
<div>
|
||||
<!-- 5) Display some image you found via Google -->
|
||||
<img :src="anImageUrl" height="300" />
|
||||
</div>
|
||||
<!-- 6) Prepopulate the input field with your name via the "value" attribute -->
|
||||
<input type="text" v-model="myInput" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TheName from "@/components/TheName.vue";
|
||||
import AgeDisplay from "./components/AgeDisplay.vue";
|
||||
export default {
|
||||
components: { TheName, AgeDisplay },
|
||||
data: () => ({
|
||||
myName: "Marc",
|
||||
myAge: 12,
|
||||
anImageUrl:
|
||||
"https://images.unsplash.com/photo-1444464666168-49d633b86797?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2338&q=80",
|
||||
myInput:
|
||||
"Deserunt cupidatat dolor ea ex excepteur ad Lorem culpa pariatur dolore.",
|
||||
}),
|
||||
methods: {
|
||||
agePlusFive() {
|
||||
return this.myAge + 5;
|
||||
},
|
||||
randomNumber() {
|
||||
return Math.random();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "Jost", sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
section {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
|
||||
margin: 3rem;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
border-bottom: 4px solid #ccc;
|
||||
color: #970076;
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
background-color: #970076;
|
||||
padding: 0.5rem;
|
||||
color: white;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
input {
|
||||
font: inherit;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: none;
|
||||
border-color: #1b995e;
|
||||
background-color: #d7fdeb;
|
||||
}
|
||||
|
||||
button {
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ff0077;
|
||||
background-color: #ff0077;
|
||||
color: white;
|
||||
padding: 0.05rem 1rem;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
|
||||
button:hover,
|
||||
button:active {
|
||||
background-color: #ec3169;
|
||||
border-color: #ec3169;
|
||||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<p>{{ elAge }}</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["elAge"],
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<h2>{{ myName }}</h2>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
myName: "Marc",
|
||||
}),
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,5 @@
|
|||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
const app = createApp(App);
|
||||
app.mount('#app');
|
|
@ -0,0 +1,14 @@
|
|||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
}
|
||||
})
|
|
@ -0,0 +1,28 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
# vue-project
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Compile and Minify for Production
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="https://unpkg.com/mustard-ui@latest/dist/css/mustard-ui.min.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "vue-project",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.2.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^3.1.2",
|
||||
"vite": "^3.1.8"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,112 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>Search.ch ordered from wish.com</h1>
|
||||
<section>
|
||||
<address-entry
|
||||
v-for="{ name, address, link, phone, pic } in restaurants"
|
||||
:key="name"
|
||||
:name="name"
|
||||
:address="address"
|
||||
:link="link"
|
||||
:phone="phone"
|
||||
:pic="pic"
|
||||
></address-entry>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddressEntry from "@/components/AddressEntry.vue";
|
||||
export default {
|
||||
components: {
|
||||
AddressEntry,
|
||||
},
|
||||
data: () => ({
|
||||
restaurants: [
|
||||
{
|
||||
name: "Restaurant Falken",
|
||||
address: "St. Martinsplatz 9, 7000 Chur",
|
||||
link: "https://tel.search.ch/chur/st-martinsplatz-9/restaurant-falken",
|
||||
phone: "081 250 47 05",
|
||||
pic: "https://tel.search.ch/media/b9405d0016a99e1b03793f0f330e3bd72632fd60.jpg/l/80x80/29.06.jpg",
|
||||
},
|
||||
{
|
||||
name: "dieci Pizza Kurier Chur",
|
||||
address: "Ringstrasse 37, 7000 Chur",
|
||||
link: "https://tel.search.ch/chur/ringstrasse-37/dieci-pizza-kurier-chur",
|
||||
phone: "081 286 66 66",
|
||||
pic: "https://tel.search.ch/media/5093f5e56b098c7fa956a48ac0f6392d4737e7ec.jpg/l/80x80/image-service.jpg",
|
||||
},
|
||||
],
|
||||
}),
|
||||
methods: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "Jost", sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
|
||||
margin: 3rem auto;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
background-color: #58004d;
|
||||
color: white;
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
max-width: 40rem;
|
||||
}
|
||||
|
||||
#app ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#app li {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
|
||||
margin: 1rem auto;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
max-width: 40rem;
|
||||
}
|
||||
|
||||
#app h2 {
|
||||
font-size: 2rem;
|
||||
border-bottom: 4px solid #ccc;
|
||||
color: #58004d;
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
#app button {
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ff0077;
|
||||
background-color: #ff0077;
|
||||
color: white;
|
||||
padding: 0.05rem 1rem;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
|
||||
#app button:hover,
|
||||
#app button:active {
|
||||
background-color: #ec3169;
|
||||
border-color: #ec3169;
|
||||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<section class="d-flex">
|
||||
<div class="pic-container">
|
||||
<img :src="pic" />
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<a :href="link" target="_blank">{{ name }}</a>
|
||||
</div>
|
||||
<div>
|
||||
{{ address }}
|
||||
</div>
|
||||
<button @click="call()">
|
||||
{{ phone }}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
address: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
link: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
pic: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
phone: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
call() {
|
||||
alert(`Calling ${this.phone}`);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
font-size: 200%;
|
||||
}
|
||||
img {
|
||||
height: 100%;
|
||||
}
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
.pic-container {
|
||||
margin-right: 1rem;
|
||||
width: 7rem;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,5 @@
|
|||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
const app = createApp(App);
|
||||
app.mount('#app');
|
|
@ -0,0 +1,14 @@
|
|||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue