refactor: Update file structure

pull/1/head
Piotr Jakubiak 2024-11-08 12:01:37 +01:00
parent 6e01b147b3
commit 6bf5189734
20 changed files with 64 additions and 76 deletions

7
.gitignore vendored
View File

@ -31,3 +31,10 @@ build/
### VS Code ### ### VS Code ###
.vscode/ .vscode/
.history/
### macOS ###
*.DS_Store
### Database files ###
*.db

View File

@ -0,0 +1,18 @@
document.getElementById("primarySkill").addEventListener("change", function () {
var primarySkillId = this.value;
fetch("/skills/secondary-skills?primarySkillId=" + primarySkillId)
.then((response) => response.json())
.then((data) => {
console.log("Fetch response data:", data);
var secondarySkillSelect = document.getElementById("secondarySkill");
secondarySkillSelect.innerHTML =
'<option value="" disabled selected>Select a secondary skill</option>';
data.forEach(function (secondarySkill) {
var option = document.createElement("option");
option.value = secondarySkill.ssid;
option.text = secondarySkill.description;
secondarySkillSelect.add(option);
});
})
.catch((error) => console.error("Error fetching secondary skills:", error));
});

View File

@ -1 +0,0 @@
/* Placeholder */

View File

@ -5,26 +5,9 @@
<img src="/assets/inter-brand.svg" alt="INTER Logo" class="svg-logo" /> <img src="/assets/inter-brand.svg" alt="INTER Logo" class="svg-logo" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<nav> <div
<ul class="nav justify-content-end"> th:replace="~{/core/_navigation :: navigation(activePage=${activePage})}"
<li class="nav-item"> ></div>
<a
class="nav-link"
th:href="@{/projects}"
th:classappend="${activePage == 'projects' ? 'active' : ''}"
>Projekte</a
>
</li>
<li class="nav-item">
<a
class="nav-link"
th:href="@{/skills}"
th:classappend="${activePage == 'profile' ? 'active' : ''}"
>Skills</a
>
</li>
</ul>
</nav>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,20 @@
<nav>
<ul class="nav justify-content-end">
<li class="nav-item">
<a
class="nav-link"
th:href="@{/projects}"
th:classappend="${activePage == 'projects' ? 'active' : ''}"
>Projekte</a
>
</li>
<li class="nav-item">
<a
class="nav-link"
th:href="@{/skills}"
th:classappend="${activePage == 'profile' ? 'active' : ''}"
>Skills</a
>
</li>
</ul>
</nav>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<div th:replace="~{/core/_metadata :: metadata}"></div>
<title>My Skill Management System</title>
<link rel="stylesheet" href="style/notes/notes.css" />
</head>
<body>
<div class="wrapper">
<div th:replace="~{/core/_header :: header(activePage=${notes})}"></div>
<div class="content container mt-4"></div>
<div th:replace="~{/core/_footer :: footer}"></div>
</div>
</body>
</html>

View File

@ -3,10 +3,10 @@
<head> <head>
<div th:replace="~{/core/_metadata :: metadata}"></div> <div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Create Project</title> <title>Create Project</title>
<link rel="stylesheet" href="/style/projects/projects.css" /> <link rel="stylesheet" href="/css/projects/projects.css" />
<link rel="stylesheet" href="/style/core/style.css" /> <link rel="stylesheet" href="/css/core/style.css" />
<link rel="stylesheet" href="/style/core/header.css" /> <link rel="stylesheet" href="/css/core/header.css" />
<link rel="stylesheet" href="/style/core/footer.css" /> <link rel="stylesheet" href="/css/core/footer.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">

View File

@ -3,7 +3,7 @@
<head> <head>
<div th:replace="~{/core/_metadata :: metadata}"></div> <div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Projects</title> <title>Projects</title>
<link rel="stylesheet" href="/style/projects/projects.css" /> <link rel="stylesheet" href="/css/projects/projects.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">

View File

@ -3,10 +3,10 @@
<head> <head>
<div th:replace="~{/core/_metadata :: metadata}"></div> <div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Add Skill</title> <title>Add Skill</title>
<link rel="stylesheet" href="/style/skills/skills.css" /> <link rel="stylesheet" href="/css/skills/skills.css" />
<link rel="stylesheet" href="/style/core/style.css" /> <link rel="stylesheet" href="/css/core/style.css" />
<link rel="stylesheet" href="/style/core/header.css" /> <link rel="stylesheet" href="/css/core/header.css" />
<link rel="stylesheet" href="/style/core/footer.css" /> <link rel="stylesheet" href="/css/core/footer.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">
@ -69,30 +69,6 @@
</div> </div>
<div th:replace="~{/core/_footer :: footer}"></div> <div th:replace="~{/core/_footer :: footer}"></div>
</div> </div>
<script> <script src="/js/skills/skills.js"></script>
document
.getElementById("primarySkill")
.addEventListener("change", function () {
var primarySkillId = this.value;
fetch("/skills/secondary-skills?primarySkillId=" + primarySkillId)
.then((response) => response.json())
.then((data) => {
console.log("Fetch response data:", data);
var secondarySkillSelect =
document.getElementById("secondarySkill");
secondarySkillSelect.innerHTML =
'<option value="" disabled selected>Select a secondary skill</option>';
data.forEach(function (secondarySkill) {
var option = document.createElement("option");
option.value = secondarySkill.ssid;
option.text = secondarySkill.description;
secondarySkillSelect.add(option);
});
})
.catch((error) =>
console.error("Error fetching secondary skills:", error)
);
});
</script>
</body> </body>
</html> </html>

View File

@ -3,10 +3,10 @@
<head> <head>
<div th:replace="~{/core/_metadata :: metadata}"></div> <div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Create Skill</title> <title>Create Skill</title>
<link rel="stylesheet" href="/style/skills/skills.css" /> <link rel="stylesheet" href="/css/skills/skills.css" />
<link rel="stylesheet" href="/style/core/style.css" /> <link rel="stylesheet" href="/css/core/style.css" />
<link rel="stylesheet" href="/style/core/header.css" /> <link rel="stylesheet" href="/css/core/header.css" />
<link rel="stylesheet" href="/style/core/footer.css" /> <link rel="stylesheet" href="/css/core/footer.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">

View File

@ -3,8 +3,8 @@
<head> <head>
<div th:replace="~{/core/_metadata :: metadata}"></div> <div th:replace="~{/core/_metadata :: metadata}"></div>
<title>Skills</title> <title>Skills</title>
<link rel="stylesheet" href="/style/skills/skills.css" /> <link rel="stylesheet" href="/css/skills/skills.css" />
<link rel="stylesheet" href="/style/core/style.css" /> <link rel="stylesheet" href="/css/core/style.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">