Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Commit 4de8868

Browse files
vLuckyyyRollcziJakubk15
authored
GH-86 Setup type safe script, use routing, add eslint (#86)
* setup type safe script and use routing * Update README.md Co-authored-by: Jakubk15 <[email protected]> * follow rollczi's suggestions * Remove projects i about href * Thank you frontaś * Update Navbar.vue * Update router.ts --------- Co-authored-by: Norbert Dejlich <[email protected]> Co-authored-by: Jakubk15 <[email protected]>
1 parent 4481aa7 commit 4de8868

File tree

19 files changed

+262
-92
lines changed

19 files changed

+262
-92
lines changed

.eslintrc.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
extends:
2+
- eslint:recommended
3+
- plugin:@typescript-eslint/recommended
4+
- plugin:vue/vue3-recommended
5+
parser: vue-eslint-parser
6+
plugins:
7+
- "@typescript-eslint"
8+
rules:
9+
no-shadow: off
10+
"@typescript-eslint/no-shadow":
11+
- error
12+
no-use-before-define: off
13+
"@typescript-eslint/no-use-before-define":
14+
- error
15+
env:
16+
browser: true
17+
parserOptions:
18+
parser: "@babel/eslint-parser"
19+
sourceType: module

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ npm run dev
1111

1212
## Recommended IDE Setup
1313

14-
- [WebStrom or else JetBrains IDE](https://jetbrains.com)
14+
- [WebStorm or else JetBrains IDE](https://jetbrains.com)
1515
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)

index.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!DOCTYPE html>
21
<html>
32
<head>
43
<meta charset="UTF-8"/>
@@ -7,24 +6,19 @@
76
<meta content="eternalcode.pl" name="title">
87
<meta content="EternalCode is a fantastic community of developers!" name="description">
98
<link href="/assets/img/logo/infinity-transparent.webp" rel="icon" type="image/x-icon"/>
10-
119
<meta content="website" property="og:type">
1210
<meta content="https://eternalcode.pl" property="og:url">
1311
<meta content="EternalCode.pl - Strona główna!" property="og:title">
1412
<meta content="EternalCode is a fantastic community of developers!" property="og:description">
1513
<meta content="/assets/img/logo/eternalcode.webp" property="og:image">
1614
<meta content="ZHfKFsEbMzZA_z2X_93U_g-dW2frNGAlaXcgR2DEgUc" name="google-site-verification"/>
17-
1815
<meta content="summary" name="twitter:card">
1916
<meta content="EternalCode.pl" name="twitter:title">
2017
<meta content="EternalCode is a fantastic community of developers!" name="twitter:description">
2118
<meta content="https://www.eternalcode.pl" name="twitter:image:src">
22-
23-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
2419
</head>
2520
<body>
2621
<div id="app"></div>
27-
<script src="/src/main.js" type="module"></script>
28-
<script src="https://unpkg.com/magic-snowflakes/dist/snowflakes.min.js"></script>
22+
<script src="/src/main.ts" type="module"></script>
2923
</body>
30-
</html>
24+
</html>

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,21 @@
1717
"@fortawesome/vue-fontawesome": "3.0.3",
1818
"@popperjs/core": "2.11.7",
1919
"bootstrap": "5.2.3",
20+
"typescript": "^5.0.4",
2021
"vue": "3.2.47",
21-
"vue-i18n": "9.2.2"
22+
"vue-i18n": "9.2.2",
23+
"vue-router": "^4.1.6",
24+
"vue-tsc": "^1.4.2"
2225
},
2326
"devDependencies": {
24-
"@vitejs/plugin-vue": "4.1.0",
2527
"@intlify/unplugin-vue-i18n": "0.10.0",
28+
"@vitejs/plugin-vue": "4.1.0",
29+
"eslint": "^8.39.0",
30+
"eslint-config-semistandard": "^17.0.0",
31+
"eslint-config-standard": "^17.0.0",
32+
"eslint-plugin-import": "^2.27.5",
33+
"eslint-plugin-n": "^15.7.0",
34+
"eslint-plugin-promise": "^6.1.1",
2635
"vite": "4.3.1"
2736
}
2837
}

public/assets/img/header/floating-icons.svg

Lines changed: 21 additions & 1 deletion
Loading

src/App.vue

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
<script setup>
2-
import Navbar from "./components/header/Navbar.vue";
3-
import Flex from "./components/header/Flex.vue";
4-
import About from "./components/about/About.vue";
5-
import Skills from "./components/skills/Skills.vue";
6-
import Projects from "./components/projects/Projects.vue";
7-
import Footer from "./components/footer/Footer.vue";
8-
import Team from "./components/team/Team.vue";
2+
import { RouterView } from "vue-router";
3+
4+
import Navbar from "@/components/header/Navbar.vue";
5+
import Footer from "@/components/footer/Footer.vue";
96
</script>
107

118
<template>
12-
<div>
13-
14-
<header>
15-
<Navbar/>
16-
<Flex/>
17-
</header>
18-
19-
<About/>
20-
<Skills/>
21-
<Projects/>
22-
<Team/>
23-
24-
<Footer/>
25-
26-
</div>
9+
<Navbar/>
10+
<router-view></router-view>
11+
<Footer/>
2712
</template>
2813

14+
2915
<style>
3016
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700;800;900&display=swap');
31-
3217
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap');
3318
3419
::-webkit-scrollbar {
@@ -64,12 +49,11 @@ body {
6449
font-weight: 500;
6550
height: 100%;
6651
overflow-x: hidden;
67-
background: rgb(30,31,31);
68-
background: -moz-linear-gradient(146deg, rgba(30,31,31,1) 45%, rgba(2,2,2,1) 100%);
52+
background: rgb(30, 31, 31);
53+
background: -moz-linear-gradient(146deg, rgba(30, 31, 31, 1) 45%, rgba(2, 2, 2, 1) 100%);
6954
background: -webkit-linear-gradient(right, rgb(30, 31, 31), #020202);
7055
background: linear-gradient(to right, #1e1f1f, #020202);
71-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#1e1f1f",endColorstr="#020202",GradientType=1);
72-
56+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#1e1f1f", endColorstr="#020202", GradientType=1);
7357
}
7458
7559
a:link {

src/components/header/Navbar.vue

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<nav class="navbar navbar-expand-lg">
33
<div class="container">
44

5-
<a class="navbar-brand" href="#">EternalCode.pl</a>
5+
<router-link class="navbar-brand" to="/">EternalCode.pl</router-link>
66

77
<button aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler"
88
data-bs-target="#navbarNav" data-bs-toggle="collapse" type="button">
@@ -14,10 +14,13 @@
1414
<div id="navbarNav" class="collapse navbar-collapse">
1515
<ul class="navbar-nav ms-auto">
1616
<li class="nav-item">
17-
<a class="nav-link" href="#about">{{ $t("message.navbar.about") }}</a>
17+
<router-link class="nav-link" to="/#about">{{ $t("message.navbar.about") }}</router-link>
1818
</li>
1919
<li class="nav-item">
20-
<a class="nav-link" href="#projects">{{ $t("message.navbar.projects") }}</a>
20+
<router-link class="nav-link" to="/#projects">{{ $t("message.navbar.projects") }}</router-link>
21+
</li>
22+
<li class="nav-item">
23+
<router-link class="nav-link" to="/team">{{ $t("message.navbar.team") }}</router-link>
2124
</li>
2225
<li class="nav-item">
2326
<a class="nav-link" href="https://status.eternalcode.pl/">{{ $t("message.navbar.status") }}</a>
@@ -43,6 +46,12 @@
4346
</nav>
4447
</template>
4548

49+
<script>
50+
export default {
51+
name: "Navbar",
52+
};
53+
</script>
54+
4655
<style>
4756
4857
.navbar-nav-lang {
@@ -126,10 +135,4 @@
126135
.navbar {
127136
z-index: 100 !important;
128137
}
129-
</style>
130-
131-
<script>
132-
export default {
133-
name: "Navbar",
134-
};
135-
</script>
138+
</style>

src/components/projects/Projects.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
:githubUrl="project.link"
1111
:hrefText="$t('message.projects.more')"
1212
:imageUrl="'/assets/img/projects/logo/' + project.repo + '_icon.webp'"
13-
:spigotUrl="projectLinks[project.repo]?.spigotmc"
1413
:modrinthUrl="projectLinks[project.repo]?.modrinth"
1514
:name="project.repo"
15+
:spigotUrl="projectLinks[project.repo]?.spigotmc"
1616
/>
1717
</div>
1818
</section>
1919
</template>
2020

2121
<script>
2222
import Project from "./components/Project.vue";
23-
import projectLinks from "@/info/project_links.json"
23+
import projectLinks from "@/info/project_links.json";
2424
2525
export default {
2626
name: "Projects",
@@ -30,7 +30,7 @@ export default {
3030
data() {
3131
return {
3232
projects: [],
33-
projectLinks: projectLinks
33+
projectLinks: projectLinks,
3434
};
3535
},
3636
mounted() {

src/components/projects/components/Project.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export default {
104104
.src-buttons li:first-child {
105105
margin-left: -10px;
106106
}
107+
107108
.button-link {
108109
border: none;
109110
background-color: transparent;

src/lang/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"about": "About",
66
"status": "Status",
77
"repository": "Repository",
8-
"docs": "Documentations"
8+
"docs": "Documentations",
9+
"team": "Team"
910
},
1011
"heading": {
1112
"hello": "Hello there! 👋",

0 commit comments

Comments
 (0)