tagine ait attribute tanımlamları için 'es' adında nesne
7 | es: {
8 | title: "Resume sayfama ulaşmak için tıklayınız.",
9 | target: "_blank",
10 | url: "https://fatihes1.github.io/",
11 | alt: "Resume website"
12 | },
13 | owner: "Fatih Es",
14 | // mousemove durumu için koordinantları tutacak değerler ve nesne
15 | coords: {
16 | x: 0,
17 | y:0
18 | },
19 | };
20 | },
21 | methods: {
22 | // başlık değiştirme işlevi
23 | changeTitle(paramTitle){
24 | this.title = paramTitle
25 | },
26 | // koordinantları alma işlevi
27 | updateCoords(message, event){
28 | // console.log(message, event.x, event.y)
29 | this.changeTitle(`${event.x},${event.y}`);
30 | this.coords = {
31 | x: event.x,
32 | y: event.y
33 | };
34 | },
35 | },
36 | }).mount('#app') // app id değerine sahip div ile vue app'ini bağlama.
--------------------------------------------------------------------------------
/Section #01/01_Vue_Instance/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
{{ title }}
18 |
{{ content }}
19 |
20 |
21 |
{{ es.title }}
22 |
23 |
24 |
25 |
Title Değiştir
26 |
Title_2 Değiştir
27 |
28 |
29 | {{ coords.x }}, {{ coords.y }}
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Section #01/01_Vue_Instance/style.css:
--------------------------------------------------------------------------------
1 | .box
2 | {
3 | margin-top: 10px;
4 | border: 2px dashed #666;
5 | width: 300px;
6 | height: 300px;
7 | background-color: beige;
8 | }
--------------------------------------------------------------------------------
/Section #01/02_Events/app.js:
--------------------------------------------------------------------------------
1 | // vue app tanımlaması
2 | const app = Vue.createApp({
3 | data() {
4 | // input alanından gelecek değeri tutacak fullName verisinin tanımlanması
5 | return {
6 | fullName: "Es"
7 | };
8 | },
9 | methods: {
10 | // v-model kullanılmadan alınan değerin her harfe basılması ile tetiklenen update methodu
11 | updateValue(param) {
12 | this.fullName = param.targer.value
13 | }
14 | },
15 | });
16 | app.mount('#app'); // vue app'in etki edeceği div'in id değeri
--------------------------------------------------------------------------------
/Section #01/02_Events/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
Event
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 | {{ fullName }}
27 |
28 | Ekle
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Section #01/03_Counter_App/app.js:
--------------------------------------------------------------------------------
1 | // Vue app oluşturuldu
2 | const app = Vue.createApp({
3 | data() {
4 | return {
5 | //Sayaçlar tanımlandı ve ilk değerleri atandı
6 | counter: 0,
7 | counter2: 0,
8 | };
9 | },
10 | //! İşlevler method alanında tanımlı iken birinin arttırılması bile diğeriinin tetiklenmesine neden olur
11 | //! Bunun sebebi DOM üzerindeki verilerden bir tanesi bile değişirse DOM'un tekrardan render edilmesidir.
12 | //! (watch & update)
13 | // methods: {
14 | // getCounterResult() {
15 | // console.log("Counter 1 Çalıştı");
16 | // return this.counter > 5 ? "BÜYÜK" : "KÜÇÜK";
17 | // },
18 | // getCounter2Result() {
19 | // console.log("Counter 2 Çalıştı");
20 | // return this.counter2 > 5 ? "BÜYÜK" : "KÜÇÜK";
21 | // },
22 | // },
23 | //! Ancak computed içerisinde tanımlanması ile reactivity kullanılır ve sadece değeri değişen syaaç tekrar render edilir
24 | computed: {
25 | // Sayaç değerinin 5'i geçtiği anda alert alanındaki değer değişir
26 | getCounterResult() {
27 | console.log("Counter 1 Çalıştı");
28 | return this.counter > 5 ? "BÜYÜK" : "KÜÇÜK";
29 | },
30 | getCounter2Result() {
31 | console.log("Counter 2 Çalıştı");
32 | return this.counter2 > 5 ? "BÜYÜK" : "KÜÇÜK";
33 | },
34 | },
35 | // diğer bir reactivity yapısı olan watch sayesinde spesifik olarak bir verinin izlenmesi sağlar. Yeni değeri ve bir önceki değerini saklar!
36 | watch: {
37 | counter(newValue, oldValue) {
38 | console.log("Counter", oldValue, "=>", newValue);
39 | },
40 | getCounterResult(newValue, oldValue) {
41 | console.log("RESULT", oldValue, "=>", newValue);
42 | },
43 | },
44 | // methods: {
45 | // inc() {
46 | // this.counter++;
47 | // },
48 | // dec() {
49 | // this.counter--;
50 | // },
51 | // },
52 | }).mount("#app");
--------------------------------------------------------------------------------
/Section #01/03_Counter_App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
{{ counter }}
22 |
23 |
25 | +
26 | -
27 |
28 |
29 |
{{ getCounterResult }}
30 |
31 |
32 |
33 |
34 |
35 |
{{ counter2 }}
36 |
37 |
39 | +
40 | -
41 |
42 |
43 |
44 |
{{ getCounter2Result }}
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Section #01/04_Reactivity_Example/app.js:
--------------------------------------------------------------------------------
1 | const app = Vue.createApp({
2 | data() {
3 | return {
4 | search: "",
5 | itemList: ["elma", "armut", "kiraz", "çilek"],
6 | // filteredList: [],
7 | };
8 | },
9 | methods: {
10 | searchList() {
11 | // this.filteredList = this.itemList.filter((i) => i.includes(this.search));
12 | },
13 | },
14 | computed: {
15 | filteredList() {
16 | return this.itemList.filter((i) => i.includes(this.search));
17 | },
18 | },
19 | });
20 | app.mount("#app");
--------------------------------------------------------------------------------
/Section #01/04_Reactivity_Example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Ara
21 |
22 |
23 | Tüm kelimeler:
24 | {{ itemList }}
25 |
26 |
27 | Filtrelenmiş Kelimeler:
28 | {{ filteredList }}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Section #01/05_Life_Cycle_Hooks/app.js:
--------------------------------------------------------------------------------
1 | const app = Vue.createApp({
2 | data() {
3 | return {
4 | title: "Test Başlığı",
5 | itemList: [],
6 | };
7 | },
8 | beforeCreate() {
9 | console.log("beforeCreate Çalıştı..");
10 | },
11 | created() {
12 | console.log("created Çalıştı..");
13 | setTimeout(() => {
14 | this.itemList = [1, 2, 3, 4, 5, 56, 7, 8];
15 | }, 3000);
16 |
17 | setTimeout(() => {
18 | this.title = "Bu yeni başlık.";
19 | }, 4000);
20 | },
21 | beforeMount() {
22 | console.log("beforeMount Çalıştı..");
23 | },
24 | mounted() {
25 | console.log("mounted Çalıştı..");
26 | },
27 | beforeUpdate() {
28 | console.log("beforeUpdate Çalıştı..");
29 | },
30 | updated() {
31 | console.log("updated Çalıştı..");
32 | },
33 | beforeUnmount() {
34 | console.log("beforeUnmount Çalıştı..");
35 | },
36 | unmounted() {
37 | console.log("unmounted Çalıştı..");
38 | },
39 | });
40 |
41 | app.mount("#app");
42 |
43 | setTimeout(() => {
44 | app.unmount();
45 | }, 6000);
--------------------------------------------------------------------------------
/Section #01/05_Life_Cycle_Hooks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{ title }}
16 |
17 | {{ itemList }}
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Section #01/06_Class_and_Style_Binding/app.js:
--------------------------------------------------------------------------------
1 | const app = Vue.createApp({
2 | data() {
3 | return {
4 | //* Buton ve input alanı alanı için gerekli verilerin tanımlanması
5 | showBorder: false,
6 | redBG: false,
7 | boxClass: "border red",
8 | bgColor: "",
9 | };
10 | },
11 | computed: {
12 | // Div alanının class tagleri
13 | boxClasses() {
14 | return { border: this.showBorder, red: this.redBG };
15 | },
16 | }
17 |
18 | }).mount('#app');
19 |
--------------------------------------------------------------------------------
/Section #01/06_Class_and_Style_Binding/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Border Ekle/Ekleme
20 | Tıklandığında box alanında bg color olarak red atayacak işlevi çağıran buton
21 |
Kırmızı BG Yap.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Section #01/06_Class_and_Style_Binding/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | font-family: "Courier New", Courier, monospace;
5 | }
6 |
7 | body {
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | padding: 10px;
12 | }
13 |
14 | .box {
15 | width: 100px;
16 | height: 100px;
17 | background-color: #dedede;
18 | }
19 |
20 | .border {
21 | border: 3px dashed #666;
22 | }
23 |
24 | .red {
25 | background-color: red;
26 | }
27 |
28 | .green {
29 | background-color: green;
30 | }
31 |
32 | .blue {
33 | background-color: blue;
34 | }
--------------------------------------------------------------------------------
/Section #01/07_Conditions/app.js:
--------------------------------------------------------------------------------
1 | const app = Vue.createApp({
2 | data() {
3 | return {
4 | showContainer: false,
5 | counter: 0
6 | };
7 | },
8 | computed: {
9 | // Counter değerinin değişimine göre arka planı değiştirecek computed ifadesi
10 | // HTML üzerinde sayaçın bulundupu h3 tagine class binding ile bağlandı.
11 | counterBoxClass() {
12 | return {
13 | "bg-success text-white": this.counter > 0,
14 | "bg-danger text-white": this.counter < 0
15 | };
16 | }
17 | }
18 | }).mount('#app');
--------------------------------------------------------------------------------
/Section #01/07_Conditions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #1
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Aç / Kapat
22 |
23 |
BAŞLANGIÇTA GÖZÜKECEK
24 |
25 |
SONRA GÖZÜKECEK
26 |
27 |
28 |
{{ counter }}
29 |
Artır
30 |
Azalt
31 |
32 |
Counter Negatif
33 |
Counter Pozitif
34 |
Counter 0
35 |
36 |
37 |
40 |
Counter Negatif
41 |
Counter Pozitif
42 |
Counter 0
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Section #01/08_Loops_and_ToDo/app.js:
--------------------------------------------------------------------------------
1 | const app = Vue.createApp({
2 | data() {
3 | return {
4 | // Yapılacakları tutacak olan liste ve örnek veriler
5 | // Her bir todo bir nesne olarak atandı
6 | todoList: [
7 | { id: 1, text: "Vue Bootcamp Hafta 1", completed: false },
8 | { id: 2, text: "Vue Bootcamp Hafta 2", completed: false },
9 | { id: 3, text: "Vue Bootcamp Hafta 3", completed: false },
10 | { id: 4, text: "Vue Bootcamp Hafta 4", completed: false },
11 | { id: 5, text: "Vue Bootcamp Hafta 5", completed: false },
12 | { id: 6, text: "Vue Bootcamp Hafta 6", completed: false },
13 | { id: 7, text: "Vue Bootcamp Hafta 7", completed: false },
14 | ],
15 | };
16 | },
17 | methods: {
18 | // butona girilen değeri todo olarak listeye ekler
19 | // Benzersiz bir id değeri için data modülünü kullanır
20 | // Başlangıçta tamamlanmamış olacak yani checkbox için checked durumu olmadan
21 | addTodo(event) {
22 | this.todoList.push({
23 | id: new Date().getTime(),
24 | text: event.target.value,
25 | completed: false,
26 | });
27 | // Girdi alanını tekrar sıfırlar
28 | event.target.value = "";
29 | },
30 | // Silinmesi istenen değere göre filtreleme yapıp yeni 'todoList' ataması
31 | removeItem(todoItem) {
32 | this.todoList = this.todoList.filter((todo) => todo !== todoItem);
33 | },
34 | },
35 | // Tamamlanmış ve tamamlanmamış görevlerin değerini filtreleme ile verecek olan değişkenler
36 | computed: {
37 | completedItemCount() {
38 | return this.todoList.filter((t) => t.completed).length;
39 | },
40 | unCompletedItemCount() {
41 | return this.todoList.filter((t) => !t.completed).length;
42 | },
43 | },
44 | }).mount("#app");
--------------------------------------------------------------------------------
/Section #02/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 150
3 | }
--------------------------------------------------------------------------------
/Section #02/00_Component/app.js:
--------------------------------------------------------------------------------
1 | // 'app' adında bir vue uygulaması oluşturulması
2 | const app = Vue.createApp({
3 | data() {
4 | return {};
5 | },
6 | });
7 |
8 | // bu uygulama için 'counter-item' adında component oluşturulması
9 | app.component("counter-item", {
10 | data() {
11 | return {
12 | counter: 0,
13 | };
14 | },
15 | // Component'in HTML dosyalası template alanına yazılır
16 | template: `
17 |
18 |
{{ counter }}
19 | -
20 | +
21 |
22 | `,
23 |
24 | });
25 | // app isimli Vue uygulamasının #app id değerine sahip element'e bağlanması
26 | app.mount("#app");
--------------------------------------------------------------------------------
/Section #02/00_Component/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vue.js Bootcamp #2
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/README.md:
--------------------------------------------------------------------------------
1 | # 01-vue-cli
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "01-vue-cli",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "~4.5.0",
16 | "@vue/cli-plugin-eslint": "~4.5.0",
17 | "@vue/cli-service": "~4.5.0",
18 | "@vue/compiler-sfc": "^3.0.0",
19 | "babel-eslint": "^10.1.0",
20 | "eslint": "^6.7.2",
21 | "eslint-plugin-vue": "^7.0.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parserOptions": {
33 | "parser": "babel-eslint"
34 | },
35 | "rules": {}
36 | },
37 | "browserslist": [
38 | "> 1%",
39 | "last 2 versions",
40 | "not dead"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #02/01-vue-cli/public/favicon.ico
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #2
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/src/App.vue:
--------------------------------------------------------------------------------
1 | // Ana parent
2 |
3 | // Child componentin çağrılması
4 |
5 |
6 |
Bu bir Vue CLI Uygulaması
7 |
Bugün component ve Vue CLI Konuları ele alındı
8 | // Child componentin çağrılması
9 |
10 |
11 |
12 |
13 |
14 |
23 |
24 |
34 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #02/01-vue-cli/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/src/components/CounterItem.vue:
--------------------------------------------------------------------------------
1 | // Daha önceki derslerdeki gibi syaaç uygulaması
2 |
3 |
4 |
{{ counter }}
5 | -
6 | +
7 |
8 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/src/components/appHeader.vue:
--------------------------------------------------------------------------------
1 | // Header için component
2 |
3 |
4 | KoblosuzKedi Vue Bootcamp Hafta #2
5 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Section #02/01-vue-cli/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import "@/assets/style.css";
5 | // Header componenti burada tanımladıktan sonra her yerde kullanılabilir.
6 | // App.vue componenti içerisinde components: alanında tanımlamaya gerek duyulmaz
7 | import appHeader from "@/components/appHeader";
8 |
9 | // Uygulama oluşturulması
10 | const app = createApp(App);
11 |
12 | // Componentin uygulamaya eklenmesi
13 | app.component("app-header", appHeader);
14 |
15 | // id değeri app olan alana uygulamanın bağlanması
16 | app.mount('#app')
17 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/README.md:
--------------------------------------------------------------------------------
1 | # 02-todo-app
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "02-todo-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "~4.5.0",
16 | "@vue/cli-plugin-eslint": "~4.5.0",
17 | "@vue/cli-service": "~4.5.0",
18 | "@vue/compiler-sfc": "^3.0.0",
19 | "babel-eslint": "^10.1.0",
20 | "eslint": "^6.7.2",
21 | "eslint-plugin-vue": "^7.0.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parserOptions": {
33 | "parser": "babel-eslint"
34 | },
35 | "rules": {}
36 | },
37 | "browserslist": [
38 | "> 1%",
39 | "last 2 versions",
40 | "not dead"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #02/02-todo-app/public/favicon.ico
--------------------------------------------------------------------------------
/Section #02/02-todo-app/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue.js Bootcamp #2
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #02/02-todo-app/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/components/AddSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | // todo alan input alanı, inpu değeri v-model ile kaydediliyor ve enter tuşuna basıldığında props olarak parent component'ten alınan işlev çağrılıyor
5 |
6 |
7 |
8 |
9 |
31 |
32 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/components/ListSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | // TodoList ve ResultBar componentleri
4 |
5 | // itemCount için binding işlemi ile inject olarak alınan provideData'ya bağlanıyor
6 |
7 |
8 |
9 |
10 |
32 |
33 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/components/ResultBar.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ itemCount }} adet todo bulunuyor.
3 |
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/components/TodoList.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/components/TodoListItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ item.text }}
4 | Sil
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Section #02/02-todo-app/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının import edilmesi
4 | import "@/assets/style.css";
5 |
6 | createApp(App).mount('#app')
7 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/README.md:
--------------------------------------------------------------------------------
1 | # 00_components_communications
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "00_components_communications",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "~4.5.0",
16 | "@vue/cli-plugin-eslint": "~4.5.0",
17 | "@vue/cli-service": "~4.5.0",
18 | "@vue/compiler-sfc": "^3.0.0",
19 | "babel-eslint": "^10.1.0",
20 | "eslint": "^6.7.2",
21 | "eslint-plugin-vue": "^7.0.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parserOptions": {
33 | "parser": "babel-eslint"
34 | },
35 | "rules": {}
36 | },
37 | "browserslist": [
38 | "> 1%",
39 | "last 2 versions",
40 | "not dead"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/00_components_communications/public/favicon.ico
--------------------------------------------------------------------------------
/Section #03/00_components_communications/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/00_components_communications/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/components/AddSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Set Data
4 |
5 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/components/ListSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/components/UserSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Section #03/00_components_communications/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import '@/assets/style.css';
5 |
6 | createApp(App).mount('#app')
7 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/README.md:
--------------------------------------------------------------------------------
1 | # 01_component-slots
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "01_component-slots",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "~4.5.0",
16 | "@vue/cli-plugin-eslint": "~4.5.0",
17 | "@vue/cli-service": "~4.5.0",
18 | "@vue/compiler-sfc": "^3.0.0",
19 | "babel-eslint": "^10.1.0",
20 | "eslint": "^6.7.2",
21 | "eslint-plugin-vue": "^7.0.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parserOptions": {
33 | "parser": "babel-eslint"
34 | },
35 | "rules": {}
36 | },
37 | "browserslist": [
38 | "> 1%",
39 | "last 2 versions",
40 | "not dead"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/01_component-slots/public/favicon.ico
--------------------------------------------------------------------------------
/Section #03/01_component-slots/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Slot ile gelen title bilgisi
6 |
7 |
8 |
9 |
10 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet doloribus tempora cum necessitatibus quaerat
11 | fuga eos quo quas facere. Similique quibusdam quos alias assumenda. Enim sit accusamus corrupti ut quis!
12 |
13 |
14 |
15 |
16 | Bu alan default olarak görünür.
17 |
18 |
19 |
20 |
21 |
37 |
38 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/01_component-slots/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #03/01_component-slots/src/components/Modal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
26 |
27 |
--------------------------------------------------------------------------------
/Section #03/01_component-slots/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import '@/assets/style.css';
5 |
6 | createApp(App).mount('#app')
7 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/README.md:
--------------------------------------------------------------------------------
1 | # 02_dynamic_components
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "02_dynamic_components",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0"
13 | },
14 | "devDependencies": {
15 | "@vue/cli-plugin-babel": "~4.5.0",
16 | "@vue/cli-plugin-eslint": "~4.5.0",
17 | "@vue/cli-service": "~4.5.0",
18 | "@vue/compiler-sfc": "^3.0.0",
19 | "babel-eslint": "^10.1.0",
20 | "eslint": "^6.7.2",
21 | "eslint-plugin-vue": "^7.0.0"
22 | },
23 | "eslintConfig": {
24 | "root": true,
25 | "env": {
26 | "node": true
27 | },
28 | "extends": [
29 | "plugin:vue/vue3-essential",
30 | "eslint:recommended"
31 | ],
32 | "parserOptions": {
33 | "parser": "babel-eslint"
34 | },
35 | "rules": {}
36 | },
37 | "browserslist": [
38 | "> 1%",
39 | "last 2 versions",
40 | "not dead"
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/02_dynamic_components/public/favicon.ico
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Red
6 | Green
7 | Blue
8 |
9 |
12 | {{ activeComponent }}
13 |
14 |
15 |
16 | Green Component
17 |
18 |
19 |
20 |
21 |
22 |
43 |
44 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/02_dynamic_components/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/components/Blue.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Blue Component
5 |
6 |
7 |
8 |
9 |
10 |
24 |
25 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/components/Green.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
14 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/components/Red.vue:
--------------------------------------------------------------------------------
1 |
2 | {{msg}}
3 |
4 |
5 |
14 |
15 |
--------------------------------------------------------------------------------
/Section #03/02_dynamic_components/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import '@/assets/style.css';
5 |
6 | createApp(App).mount('#app')
7 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/README.md:
--------------------------------------------------------------------------------
1 | # 03_http_request
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/db.json:
--------------------------------------------------------------------------------
1 | {
2 | "items": [
3 | {
4 | "title": "Bu alana",
5 | "created_at": "2021-09-22T14:21:42.753Z",
6 | "completed": false,
7 | "id": 1
8 | },
9 | {
10 | "title": "Database gibi",
11 | "created_at": "2021-09-22T14:21:50.049Z",
12 | "completed": false,
13 | "id": 2
14 | },
15 | {
16 | "title": "Kaydedilir",
17 | "created_at": "2021-09-22T14:21:52.369Z",
18 | "completed": false,
19 | "id": 3
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/Section #03/03_http_request/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "03_http_request",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^0.21.4",
12 | "core-js": "^3.6.5",
13 | "vue": "^3.0.0"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.0",
17 | "@vue/cli-plugin-eslint": "~4.5.0",
18 | "@vue/cli-service": "~4.5.0",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-vue": "^7.0.0"
23 | },
24 | "eslintConfig": {
25 | "root": true,
26 | "env": {
27 | "node": true
28 | },
29 | "extends": [
30 | "plugin:vue/vue3-essential",
31 | "eslint:recommended"
32 | ],
33 | "parserOptions": {
34 | "parser": "babel-eslint"
35 | },
36 | "rules": {}
37 | },
38 | "browserslist": [
39 | "> 1%",
40 | "last 2 versions",
41 | "not dead"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/03_http_request/public/favicon.ico
--------------------------------------------------------------------------------
/Section #03/03_http_request/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #03/03_http_request/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #03/03_http_request/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #03/03_http_request/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import '@/assets/style.css';
5 |
6 | createApp(App).mount('#app')
7 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/README.md:
--------------------------------------------------------------------------------
1 | # 00_vuex_intro
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "00_vuex_intro",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0",
13 | "vuex": "^4.0.2"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.0",
17 | "@vue/cli-plugin-eslint": "~4.5.0",
18 | "@vue/cli-service": "~4.5.0",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-vue": "^7.0.0"
23 | },
24 | "eslintConfig": {
25 | "root": true,
26 | "env": {
27 | "node": true
28 | },
29 | "extends": [
30 | "plugin:vue/vue3-essential",
31 | "eslint:recommended"
32 | ],
33 | "parserOptions": {
34 | "parser": "babel-eslint"
35 | },
36 | "rules": {}
37 | },
38 | "browserslist": [
39 | "> 1%",
40 | "last 2 versions",
41 | "not dead"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #04/00_vuex_intro/public/favicon.ico
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
20 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #04/00_vuex_intro/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/components/NewUser.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Yeni Item Ekle
4 |
5 |
6 |
24 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/components/UserList.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{item.title}}
6 |
7 |
8 |
9 |
10 |
23 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Stil dosyalasının içeri aktarılması
4 | import "@/assets/style.css";
5 | import store from "./store";
6 |
7 | const app = createApp(App)
8 | // Store dosyasını uygulama ile bağlanması (vuex)
9 | app.use(store);
10 | app.mount('#app')
11 |
--------------------------------------------------------------------------------
/Section #04/00_vuex_intro/src/store.js:
--------------------------------------------------------------------------------
1 | import {createStore} from "vuex";
2 |
3 | const store = createStore({
4 | // store içindeki state verileri
5 | state: {
6 | user: {
7 | name: "Fatih",
8 | lname: "Es",
9 | age: 22,
10 | address: {},
11 | password: 123213213,
12 | tc: 123213
13 | },
14 | theme: "dark",
15 | fullName: "Fatih Es",
16 | permisson: [1, 2, 3, 4, 5],
17 | userList: ["Fatih", "Yılmaz", "Yiğit", "Refik"],
18 | itemList: [
19 | {id:1, title: "Masa", type: "mobilya"},
20 | {id:2, title: "Sandalye", type: "mobilya"},
21 | {id:3, title: "Bilgisayar", type: "elektronik"},
22 | {id:4, title: "Klavye", type: "elektronik"},
23 | {id:5, title: "Bardak", type: "plastik"},
24 | ]
25 | },
26 | // senkron olarak çalışan mutation
27 | mutations: {
28 | newItem(state, item) {
29 | state.itemList.push(item);
30 | }
31 | },
32 | // asenkron olarak çalışan actions
33 | actions: {
34 | newItem({ commit }, item) {
35 | console.log("item :>> ", item);
36 | setTimeout(() => {
37 | commit("newItem", item);
38 | // 1 sn. bekledikten sonra mutation içerisinde tanınmlı işlev çağrılır.
39 | }, 1000);
40 | }
41 | },
42 | // store içerisinde getter'ların çağrılması.
43 | // getterlar state içerisindeki veriyi döndürmek için kullanılabilir
44 | // aynı zamanda filtreleyerek de dönderilebilir.
45 | getters: {
46 | _woodItems: state => state.itemList.filter(i => i.type === "mobilya"),
47 | _activeUser(state) {
48 | const user = {
49 | ...state.user
50 | };
51 | delete user.password;
52 | return user;
53 | }
54 | }
55 | });
56 |
57 | export default store;
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/README.md:
--------------------------------------------------------------------------------
1 | # 01_vuex_modules
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "01_vuex_modules",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0",
13 | "vuex": "^4.0.2"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.0",
17 | "@vue/cli-plugin-eslint": "~4.5.0",
18 | "@vue/cli-service": "~4.5.0",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-vue": "^7.0.0"
23 | },
24 | "eslintConfig": {
25 | "root": true,
26 | "env": {
27 | "node": true
28 | },
29 | "extends": [
30 | "plugin:vue/vue3-essential",
31 | "eslint:recommended"
32 | ],
33 | "parserOptions": {
34 | "parser": "babel-eslint"
35 | },
36 | "rules": {}
37 | },
38 | "browserslist": [
39 | "> 1%",
40 | "last 2 versions",
41 | "not dead"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #04/01_vuex_modules/public/favicon.ico
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ $store.state.mainName }}
6 |
7 |
8 |
9 | {{ $store.state.musteri.contactName }}
10 |
11 |
12 |
13 | {{ musteriADI }}
14 |
15 |
16 |
17 |
18 |
35 |
36 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #04/01_vuex_modules/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #04/01_vuex_modules/src/components/HelloWorld.vue
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | // Style dosyasının içeri aktarılması
4 | import "@/assets/style.css";
5 | // store dosyasının import edilmesi
6 | import store from "./store";
7 |
8 | // Store dosyasının vue app ile bağlanması
9 | const app = createApp(App)
10 |
11 | app.use(store);
12 | app.mount('#app')
13 |
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore } from "vuex";
2 | import contact from "./modules/contact";
3 | import taskmanager from "./modules/taskmanager";
4 |
5 | const store = createStore({
6 | state: {
7 | mainName: "FatihTech"
8 | },
9 | mutations: {
10 |
11 | },
12 | modules: {
13 | musteri: contact,
14 | taskmanager // bu satır = taskmanager: taskmanager
15 | }
16 | });
17 |
18 | export default store;
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/store/modules/contact.js:
--------------------------------------------------------------------------------
1 | export default {
2 | namespaced: true,
3 | // Modülün state alanı
4 | state: {
5 | contactName: "Fatih",
6 | contactAddress: "Mersin",
7 | propertyList: []
8 | },
9 | // modülün mutation alanı
10 | mutations: {
11 | setItem(state, name){
12 | state.contactName = name;
13 | }
14 | },
15 | // modülün getters alanı
16 | getters: {
17 | _contactName: state => state.contactName
18 | }
19 | }
--------------------------------------------------------------------------------
/Section #04/01_vuex_modules/src/store/modules/taskmanager.js:
--------------------------------------------------------------------------------
1 | export default {
2 | namespaced: true,
3 | // Modülün state alanı
4 | state: {
5 | itemList: [],
6 | userList: []
7 | },
8 | // modülün mutation alanı
9 | mutations: {
10 | setItem(state, item) {
11 | state.itemList.push(item);
12 | }
13 | },
14 | // modülün getters alanı
15 | getters: {
16 | _itemList: state => state.itemList
17 | }
18 | }
--------------------------------------------------------------------------------
/Section #05/00_vue_router/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/README.md:
--------------------------------------------------------------------------------
1 | # 00_vue_router
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "00_vue_router",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^3.0.0",
13 | "vue-router": "^4.0.11"
14 | },
15 | "devDependencies": {
16 | "@vue/cli-plugin-babel": "~4.5.0",
17 | "@vue/cli-plugin-eslint": "~4.5.0",
18 | "@vue/cli-service": "~4.5.0",
19 | "@vue/compiler-sfc": "^3.0.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-vue": "^7.0.0"
23 | },
24 | "eslintConfig": {
25 | "root": true,
26 | "env": {
27 | "node": true
28 | },
29 | "extends": [
30 | "plugin:vue/vue3-essential",
31 | "eslint:recommended"
32 | ],
33 | "parserOptions": {
34 | "parser": "babel-eslint"
35 | },
36 | "rules": {}
37 | },
38 | "browserslist": [
39 | "> 1%",
40 | "last 2 versions",
41 | "not dead"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #05/00_vue_router/public/favicon.ico
--------------------------------------------------------------------------------
/Section #05/00_vue_router/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Anasayfa
6 | Hakkımda
7 | Detay
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #05/00_vue_router/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation .
8 |
9 |
Installed CLI Plugins
10 |
14 |
Essential Links
15 |
22 |
Ecosystem
23 |
30 |
31 |
32 |
33 |
41 |
42 |
43 |
59 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 |
4 | // Oluşturulan router dosyasının 'router' olarak içeri aktarılması
5 | import router from "./router";
6 | // Stil dosyasının içeri aktarılması
7 | import "@/assets/style.css";
8 |
9 | const app =createApp(App)
10 | // Uygulamaya 'use' keyword'ü ile router'ın eklenmesi
11 | app.use(router);
12 | app.mount('#app')
13 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/router.js:
--------------------------------------------------------------------------------
1 | // createRouter ve createWebHashHistory paketlerinin 'vue-router'dan içeri aktarılması
2 | import { createRouter, createWebHashHistory } from "vue-router";
3 |
4 | // route'ların (yönlendirmelerin) tanımlanması
5 | const routes = [
6 | {
7 | name: "HomePage",
8 | path: "/",
9 | // HomePage olarak tanımlanan route için Home.vue view dosyasının içeri aktarılması
10 | component: () => import("@/views/Home")
11 | },
12 | {
13 | name: "AboutPage",
14 | path: "/hakkimda",
15 | // AboutPage olarak tanımlanan route için About.vue view dosyasının içeri aktarılması
16 | component: () => import("@/views/About")
17 | },
18 | {
19 | name: "DetailPage",
20 | path: "/detay/:userID",
21 | // DetailPage olarak tanımlanan route için Details.vue view dosyasının içeri aktarılması
22 | component: () => import("@/views/Details")
23 | }
24 | ];
25 |
26 | // tanımlanan route'lar ve history değeri için değişkenin belirlenmesi ile router'ın oluşturulması
27 | const router = createRouter({
28 | routes,
29 | history: createWebHashHistory()
30 | });
31 |
32 | // export keyword'ü ile dışarı aktarılması
33 | export default router;
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/views/About.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | About
4 |
5 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis, quas. Unde labore assumenda praesentium molestiae perferendis non nisi animi? Quis odio voluptate quia officiis doloremque explicabo recusandae, sit minima hic.
6 |
7 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/views/Details.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ $route.params.userID }}
4 |
5 | Açıklamalar burada yer alacaktır...
6 |
7 |
8 | {{ $route.query.klan }}
9 |
10 | Geri Dön
11 |
12 |
13 |
30 |
--------------------------------------------------------------------------------
/Section #05/00_vue_router/src/views/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Home
4 |
5 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro assumenda labore in dicta accusamus hic nostrum distinctio excepturi nobis quod veritatis, unde obcaecati quibusdam iste facilis doloribus laudantium eaque sed.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
35 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/README.md:
--------------------------------------------------------------------------------
1 | # 01_vue_router_app
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/db.json:
--------------------------------------------------------------------------------
1 | {
2 | "bookmarks": [
3 | {
4 | "title": "Fatih Es",
5 | "url": "https://fatihes1.github.io",
6 | "description": "resume website\n",
7 | "id": 1
8 | }
9 | ]
10 | }
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "01_vue_router_app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^0.21.4",
12 | "core-js": "^3.6.5",
13 | "vue": "^3.0.0",
14 | "vue-router": "^4.0.11"
15 | },
16 | "devDependencies": {
17 | "@vue/cli-plugin-babel": "~4.5.0",
18 | "@vue/cli-plugin-eslint": "~4.5.0",
19 | "@vue/cli-service": "~4.5.0",
20 | "@vue/compiler-sfc": "^3.0.0",
21 | "babel-eslint": "^10.1.0",
22 | "eslint": "^6.7.2",
23 | "eslint-plugin-vue": "^7.0.0"
24 | },
25 | "eslintConfig": {
26 | "root": true,
27 | "env": {
28 | "node": true
29 | },
30 | "extends": [
31 | "plugin:vue/vue3-essential",
32 | "eslint:recommended"
33 | ],
34 | "parserOptions": {
35 | "parser": "babel-eslint"
36 | },
37 | "rules": {}
38 | },
39 | "browserslist": [
40 | "> 1%",
41 | "last 2 versions",
42 | "not dead"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #05/01_vue_router_app/public/favicon.ico
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 |
13 |
14 |
15 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Bookmarks List
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #05/01_vue_router_app/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation .
8 |
9 |
Installed CLI Plugins
10 |
14 |
Essential Links
15 |
22 |
Ecosystem
23 |
30 |
31 |
32 |
33 |
41 |
42 |
43 |
59 |
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from "vue";
2 | import App from "./App.vue";
3 | // router'iç içeri aktarılması
4 | import router from "./router";
5 | // import axios from "axios";
6 |
7 | // axios'tan oluşturduğumuz appAxios'u içeri aktarıyoruz
8 | import { appAxios } from "./utils/appAxios";
9 | const app = createApp(App);
10 |
11 | // router ile app'in bağlanması (use keyword'ü ile)
12 | app.use(router);
13 | // app.config.globalProperties.$axios = axios;
14 | // Oluşturulan appAxios'un plugin gibi uygulamaya dahil edilmesi
15 | app.config.globalProperties.$appAxios = appAxios;
16 | app.mount("#app");
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/router.js:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHashHistory } from "vue-router";
2 |
3 | const routes = [
4 | { // Route'ların tanımlanması ve gerekli componentlerin importu
5 | name: "HomePage",
6 | path: "/",
7 | component: () => import("@/views/HomePage.vue")
8 | },
9 | {
10 | name: "NewBookmark",
11 | path: "/new",
12 | component: () => import("@/views/NewBookmark.vue")
13 | }
14 | ];
15 |
16 | // tanımlanan route'lar ile router oluşturulması
17 | const router = createRouter({
18 | routes,
19 | history: createWebHashHistory()
20 | });
21 |
22 | // Router'ın yayınlanması (Kullanıma açık hale getirilmesi)
23 | export default router;
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/utils/appAxios.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | // axios ile istek atarken her seferinde uzun link girmek yerine appAxios oluşturuyoruz.
3 | export const appAxios = axios.create({
4 | baseURL: "http://localhost:3000",
5 | withCredentials: false,
6 | headers: {
7 | tokenX: "myToken",
8 | "Content-Type": "application/json"
9 | }
10 | });
--------------------------------------------------------------------------------
/Section #05/01_vue_router_app/src/views/NewBookmark.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/Section #06/social-like/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/Section #06/social-like/README.md:
--------------------------------------------------------------------------------
1 | # social-like
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/Section #06/social-like/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/Section #06/social-like/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "social-like",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "axios": "^0.22.0",
12 | "core-js": "^3.6.5",
13 | "crypto-js": "^4.1.1",
14 | "secure-ls": "^1.2.6",
15 | "socket.io-client": "^4.2.0",
16 | "vue": "^3.0.0",
17 | "vue-router": "^4.0.11",
18 | "vuex": "^4.0.2",
19 | "vuex-persistedstate": "^4.1.0"
20 | },
21 | "devDependencies": {
22 | "@vue/cli-plugin-babel": "~4.5.0",
23 | "@vue/cli-plugin-eslint": "~4.5.0",
24 | "@vue/cli-service": "~4.5.0",
25 | "@vue/compiler-sfc": "^3.0.0",
26 | "babel-eslint": "^10.1.0",
27 | "eslint": "^6.7.2",
28 | "eslint-plugin-vue": "^7.0.0"
29 | },
30 | "eslintConfig": {
31 | "root": true,
32 | "env": {
33 | "node": true
34 | },
35 | "extends": [
36 | "plugin:vue/vue3-essential",
37 | "eslint:recommended"
38 | ],
39 | "parserOptions": {
40 | "parser": "babel-eslint"
41 | },
42 | "rules": {}
43 | },
44 | "browserslist": [
45 | "> 1%",
46 | "last 2 versions",
47 | "not dead"
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/Section #06/social-like/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #06/social-like/public/favicon.ico
--------------------------------------------------------------------------------
/Section #06/social-like/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #06/social-like/server/app.js:
--------------------------------------------------------------------------------
1 | const socketio = require("socket.io");
2 | const express = require("express");
3 | const http = require("http");
4 | const app = express();
5 |
6 | const PORT = process.env.PORT || 2018;
7 |
8 | const server = http.createServer(app)
9 |
10 | const io = socketio(server, {
11 | // single page app -> localhost 8080'dan istek geliyor. Bu yüzden cors kullanılır. Sunucu da sorun çıkarabilir.
12 | cors : {
13 | origin : "*",
14 | methods : ["GET", "POST", "OPTIONS"],
15 | }
16 | });
17 |
18 | server.listen(PORT, () => { //call-bakc ile çalışacak
19 | // console.log(`Sunucu ${PORT} üzerinden sunulmaktadır..`);
20 | io.on("connection", socket => { //io üzerinden event gelirse, ismi connection olursa client geliyor bu client'a socket adını atalım ve bunu yazdıralım
21 | console.log("New Event is here: ")
22 | console.log(socket);
23 |
24 | socket.on("NEW_BOOKMARK_EVENT", bookmark => {
25 | console.log("New Bookmark event is here : ", bookmark);
26 | //! Gönderen hariç herkese bookmark bilgisini gönder
27 | socket.broadcast.emit("NEW_BOOKMARK_ADDED", bookmark);
28 | })
29 | })
30 | })
--------------------------------------------------------------------------------
/Section #06/social-like/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon app.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "cors": "^2.8.5",
15 | "express": "^4.17.1",
16 | "nodemon": "^2.0.13",
17 | "socket.io": "^4.2.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #06/social-like/src/assets/logo.png
--------------------------------------------------------------------------------
/Section #06/social-like/src/components/Account/sideBar.vue:
--------------------------------------------------------------------------------
1 |
2 |
27 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation .
8 |
9 |
Installed CLI Plugins
10 |
14 |
Essential Links
15 |
22 |
Ecosystem
23 |
30 |
31 |
32 |
33 |
41 |
42 |
43 |
59 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/components/Home/Sidebar.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/components/Shared/appBookmarkList/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
24 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 | import "@/assets/style.css"
5 |
6 | import appHeader from "@/components/Shared/appHeader";
7 | import appBookmarkList from "@/components/Shared/appBookmarkList";
8 | import { appAxios } from './utils/appAxios';
9 | import store from './store';
10 |
11 | import io from "socket.io-client";
12 | const socket = io("http://localhost:2018");
13 |
14 | const app =createApp(App)
15 |
16 | app.component("appHeader", appHeader)
17 | app.component("appBookmarkList", appBookmarkList)
18 |
19 | app.use(router)
20 | app.use(store)
21 |
22 | app.config.globalProperties.$socket = socket;
23 | app.config.globalProperties.$appAxios = appAxios;
24 | app.mount('#app')
25 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/router/index.js:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHashHistory } from "vue-router";
2 | import store from "../store";
3 |
4 | const routes = [
5 | {
6 | name : "HomePage",
7 | path : "/",
8 | component: () => import("@/views/Home")
9 | },
10 | {
11 | name : "LoginPage",
12 | path : "/login",
13 | component: () => import("@/views/Login")
14 | },
15 | {
16 | name : "RegisterPage",
17 | path : "/register",
18 | component: () => import("@/views/Register")
19 | },
20 | {
21 | name : "NewBookmarkPage",
22 | path : "/new",
23 | component: () => import("@/views/NewBookmark")
24 | },
25 | {
26 | name : "Favorites",
27 | path : "/favorites",
28 | meta: {
29 | componentName : "appBookmarkList"
30 | },
31 | component: () => import("@/views/Account")
32 | },
33 | {
34 | name : "Likes",
35 | path : "/likes",
36 | meta: {
37 | componentName : "appBookmarkList"
38 | },
39 | component: () => import("@/views/Account")
40 | },
41 | {
42 | name : "Settings",
43 | path : "/settings",
44 | meta: {
45 | componentName : "userSettings"
46 | },
47 | component: () => import("@/views/Account")
48 | },
49 | ]
50 |
51 | const router = createRouter({
52 | routes,
53 | history : createWebHashHistory()
54 | });
55 |
56 | router.beforeEach((to,_, next) => {
57 | const authRequiredRoutes = ["HomePage"];
58 | const authNotRequiredRoutes = ["LoginPage", "RegisterPage"];
59 | const _isAuthenticated = store.getters._isAuthenticated;
60 | if(authNotRequiredRoutes.indexOf(to.name) > -1 && _isAuthenticated) next(false);
61 | if (authRequiredRoutes.indexOf(to.name) > -1) {
62 | if (_isAuthenticated) next();
63 | else next({ name : "LoginPage" });
64 | } else {
65 | next();
66 | }
67 | });
68 |
69 | export default router;
--------------------------------------------------------------------------------
/Section #06/social-like/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore } from "vuex";
2 | import createPersistedState from "vuex-persistedstate";
3 |
4 | import SecureLS from "secure-ls";
5 | var ls = new SecureLS({ isCompression: false });
6 |
7 | export default createStore({
8 | state : {
9 | user : null,
10 | saltKey :"booklike123!456?"
11 | },
12 | mutations : {
13 | setUser(state, user) {
14 | state.user = user;
15 | },
16 | logoutUser(state) {
17 | state.user = null
18 | },
19 | setLikes(state, bookmarkIds) {
20 | state.user.likes = bookmarkIds;
21 | },
22 | setBookmarks(state, bookmarkIds) {
23 | state.user.bookmarks = bookmarkIds;
24 | }
25 | },
26 | getters : {
27 | _isAuthenticated: state => state.user !== null,
28 | _getCurrentUser(state) {
29 | const user = state.user;
30 | delete user?.password;
31 | return user;
32 | },
33 | _userLikes: state => state.user?.likes || [],
34 | _userBookmarks: state => state.user?.bookmarks || [],
35 | _currentUserId: state => state?.user?.id,
36 | _saltKey : state => state.saltKey
37 | },
38 | plugins: [
39 | createPersistedState({
40 | storage: {
41 | getItem: (key) => ls.get(key),
42 | setItem: (key, value) => ls.set(key, value),
43 | removeItem: (key) => ls.remove(key),
44 | }
45 | })
46 | ]
47 | });
--------------------------------------------------------------------------------
/Section #06/social-like/src/utils/appAxios.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export const appAxios = axios.create({
4 | baseURL : "http://localhost:3000"
5 | });
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/Account.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
27 |
28 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/Favorites.vue:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fatihes1/Vue.js-bootcamp/e65539e293dc0b42c492ef2a5c6921cb8f96afa7/Section #06/social-like/src/views/Favorites.vue
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/Login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Giriş Yap
4 |
5 |
6 | Giriş yap
7 |
8 | Üye değilim,
9 |
10 | Üye olmak istiyorum!
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/NewBookmark.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Yeni Ekle
4 |
5 |
6 |
7 | Kategori
8 | {{ category.name }}
9 |
10 |
11 |
12 | İptal
13 | Kaydet
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Section #06/social-like/src/views/Register.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Kayıt Ol
4 |
5 |
6 |
7 | Kayıt ol
8 |
9 | Zaten Üyeyim,
10 |
11 | Giriş yap!
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Section #07/00-composition-api/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/Section #07/00-composition-api/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["johnsoncodehk.volar"]
3 | }
4 |
--------------------------------------------------------------------------------
/Section #07/00-composition-api/README.md:
--------------------------------------------------------------------------------
1 | # Vue 3 + Vite
2 |
3 | This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `
12 |