diff --git a/package-lock.json b/package-lock.json index 99c4c5f..857fc7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", + "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/vue-fontawesome": "^2.0.2", "bootstrap": "^5.0.2", @@ -1661,6 +1662,18 @@ "node": ">=6" } }, + "node_modules/@fortawesome/free-regular-svg-icons": { + "version": "5.15.4", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz", + "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==", + "hasInstallScript": true, + "dependencies": { + "@fortawesome/fontawesome-common-types": "^0.2.36" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@fortawesome/free-solid-svg-icons": { "version": "5.15.4", "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", @@ -19045,6 +19058,14 @@ "@fortawesome/fontawesome-common-types": "^0.2.36" } }, + "@fortawesome/free-regular-svg-icons": { + "version": "5.15.4", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz", + "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.36" + } + }, "@fortawesome/free-solid-svg-icons": { "version": "5.15.4", "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", diff --git a/package.json b/package.json index 3eca575..aff5007 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", + "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/vue-fontawesome": "^2.0.2", "bootstrap": "^5.0.2", diff --git a/public/api/projects.json b/public/api/projects.json new file mode 100644 index 0000000..9c99599 --- /dev/null +++ b/public/api/projects.json @@ -0,0 +1,48 @@ +[ + { + "id": 1, + "title": "Test 1", + "category": "prywatne", + "author": "Kamil Niemczycki", + "image": "assets/img/projects/kamilcraft.jpg", + "release_data": "30 sierpnia 2021", + "version": "v1.0.0", + "short_description": "abcdefghijklmnoprestuwxyz" + }, + { + "id": 2, + "title": "Test 1", + "category": "wordpress", + "image": "assets/me.jpg", + "release_data": "30 sierpnia 2021", + "version": "v1.0.0", + "short_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\nsed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." + }, + { + "id": 3, + "title": "Test 1", + "category": "prywatne", + "image": "assets/me.jpg", + "release_data": "30 sierpnia 2021", + "version": "v1.0.0", + "short_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\nsed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." + }, + { + "id": 4, + "title": "Test 1", + "category": "zlecenia", + "image": "assets/me.jpg", + "release_data": "30 sierpnia 2021", + "version": "v1.0.0", + "short_description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\nsed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." + }, + { + "id": 5, + "title": "Test 1", + "category": "zlecenia", + "image": "assets/me.jpg", + "release_data": "30 sierpnia 2021", + "version": "v1.0.0", + "short_description": "abcdefghijklmnoprestuwxyz" + } +] diff --git a/public/assets/img/projects/kamilcraft.jpg b/public/assets/img/projects/kamilcraft.jpg new file mode 100644 index 0000000..9d06118 Binary files /dev/null and b/public/assets/img/projects/kamilcraft.jpg differ diff --git a/src/components/SelectedProjects.vue b/src/components/SelectedProjects.vue index 98e889a..6e7d1e2 100644 --- a/src/components/SelectedProjects.vue +++ b/src/components/SelectedProjects.vue @@ -17,6 +17,7 @@ O projekcie @@ -31,6 +32,7 @@ .container { display: grid; + align-items: flex-start; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(80px, auto); column-gap: 25px; @@ -40,6 +42,7 @@ display: grid; position: relative; grid-template-areas: 'image content'; + grid-template-columns: 200px 1fr; background-color: #fafafa; border: 1px solid rgba(0, 0, 0, .025); border-radius: 5px; @@ -121,7 +124,7 @@ @media screen and (max-width: 900px) { .project { - grid-template-areas: 'image' 'content'; + display: block; .project-image { width: 100%; diff --git a/src/main.js b/src/main.js index 68f60e1..c69c674 100644 --- a/src/main.js +++ b/src/main.js @@ -7,10 +7,12 @@ import '../scss/default.scss' import { library } from '@fortawesome/fontawesome-svg-core' import { fas } from '@fortawesome/free-solid-svg-icons' import { fab } from '@fortawesome/free-brands-svg-icons' +import { far } from '@fortawesome/free-regular-svg-icons' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' library.add(fas) library.add(fab) +library.add(far) Vue.component('font-awesome-icon', FontAwesomeIcon) Vue.config.productionTip = false diff --git a/src/router/index.js b/src/router/index.js index b084476..09af9dc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,6 +3,7 @@ import VueRouter from 'vue-router' import Home from '../views/Home' import About from '../views/About' import Projects from '../views/Projects' +import Project from '../views/Project' import Contact from '../views/Contact' import NotFound from '../views/NotFound' @@ -27,6 +28,14 @@ const routes = [ }, component: Projects }, + { + path: '/projects/:id', + name: 'Project', + meta: { + title: 'Projekt' + }, + component: Project + }, { path: '/about', name: 'About', diff --git a/src/store/index.js b/src/store/index.js index 0c0417b..5d08842 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,18 +8,42 @@ const moduleSettings = { header: { title: null, description: null - } + }, + categories: [], + projects: [] }, getters: { getHeader (state) { return state.header + }, + getCategories (state) { + return state.categories + }, + getProjects (state) { + return state.projects + } + }, + actions: { + fetchProjects (store) { + return fetch('/api/projects.json') + .then(response => response.json()) + .then(data => { + store.commit('setProjects', data) + return store.getters.getProjects + }) } }, mutations: { - setHeader: (state, payload) => { + setCategories: (state, array = []) => { + state.categories = array + }, + setProjects: (state, array = []) => { + state.projects = array + }, + setHeader: (state, text) => { state.header = { - title: payload.title ?? null, - description: payload.description ?? null + title: text.title ?? null, + description: text.description ?? null } }, resetHeaderTitle (state) { diff --git a/src/views/Project.vue b/src/views/Project.vue new file mode 100644 index 0000000..ff9b53c --- /dev/null +++ b/src/views/Project.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/views/Projects.vue b/src/views/Projects.vue index a426563..9735916 100644 --- a/src/views/Projects.vue +++ b/src/views/Projects.vue @@ -3,7 +3,7 @@
- -
+ +
@@ -21,6 +21,7 @@