refactor: Update frontend works with backend

pull/1/head
Piotr Jakubiak 2024-11-08 13:58:23 +01:00
parent 3f16503ff4
commit ae6a88e590
8 changed files with 41 additions and 22 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@ build/
### Database files ### ### Database files ###
*.db *.db
*.mv.db

Binary file not shown.

View File

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

View File

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

View File

@ -15,11 +15,12 @@
<h2 class="mb-4">Add Skill</h2> <h2 class="mb-4">Add Skill</h2>
<form <form
th:action="@{/skills/add}" th:action="@{/skills/add}"
th:object="${skillForm}" th:object="${skillProtoype}"
method="post" method="post"
class="project-card" class="project-card"
> >
<div class="card-body"> <div class="card-body">
<!-- Primary Skill Dropdown -->
<div class="form-group"> <div class="form-group">
<label for="primarySkill">Primary Skill</label> <label for="primarySkill">Primary Skill</label>
<select <select
@ -28,6 +29,9 @@
class="form-control" class="form-control"
th:field="*{primarySkillId}" th:field="*{primarySkillId}"
> >
<option value="" disabled selected>
Select a primary skill
</option>
<option <option
th:each="primarySkill : ${primarySkills}" th:each="primarySkill : ${primarySkills}"
th:value="${primarySkill.psid}" th:value="${primarySkill.psid}"
@ -35,6 +39,8 @@
></option> ></option>
</select> </select>
</div> </div>
<!-- Secondary Skill Dropdown -->
<div class="form-group"> <div class="form-group">
<label for="secondarySkill">Secondary Skill</label> <label for="secondarySkill">Secondary Skill</label>
<select <select
@ -48,6 +54,8 @@
</option> </option>
</select> </select>
</div> </div>
<!-- Skill Level Dropdown -->
<div class="form-group"> <div class="form-group">
<label for="level">Level</label> <label for="level">Level</label>
<select <select
@ -56,6 +64,7 @@
class="form-control" class="form-control"
th:field="*{level}" th:field="*{level}"
> >
<option value="" disabled selected>Select skill level</option>
<option <option
th:each="level : ${#numbers.sequence(1, 5)}" th:each="level : ${#numbers.sequence(1, 5)}"
th:value="${level}" th:value="${level}"
@ -63,12 +72,14 @@
></option> ></option>
</select> </select>
</div> </div>
<!-- Submit Button -->
<button type="submit" class="btn-create-project">Add Skill</button> <button type="submit" class="btn-create-project">Add Skill</button>
</div> </div>
</form> </form>
</div> </div>
<div th:replace="~{/core/_footer :: footer}"></div> <div th:replace="~{/core/_footer :: footer}"></div>
</div> </div>
<script src="/js/skills/skills.js"></script> <script src="/js/skills/fetchSecondarySkills.js"></script>
</body> </body>
</html> </html>

View File

@ -5,6 +5,8 @@
<title>Skills</title> <title>Skills</title>
<link rel="stylesheet" href="/css/skills/skills.css" /> <link rel="stylesheet" href="/css/skills/skills.css" />
<link rel="stylesheet" href="/css/core/style.css" /> <link rel="stylesheet" href="/css/core/style.css" />
<link rel="stylesheet" href="/css/core/header.css" />
<link rel="stylesheet" href="/css/core/footer.css" />
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">