Skip to content

Commit

Permalink
css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoleNG18 committed Apr 18, 2024
1 parent d91897f commit 5565d4b
Show file tree
Hide file tree
Showing 18 changed files with 1,067 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

public class ClassAddBindingDto {

@NotEmpty(message = CLASS_NAME_REQUIRED)
@ValidClassName
private String className;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
package pmgkn.pescores.pescores.domain.dto.binding;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;

import static pmgkn.pescores.pescores.domain.entity.constants.ValidationErrorMessages.CLASS_NAME_REQUIRED;
import static pmgkn.pescores.pescores.domain.entity.constants.ValidationErrorMessages.CLASS_NUM_REQUIRED;

public class ClassEditBindingDto {

// @NotEmpty(message = CLASS_NAME_REQUIRED)
// private String className;
//
// @Positive
// @NotNull(message = CLASS_NUM_REQUIRED)
// private int classNum;

private String teacher;
public ClassEditBindingDto() {
}
Expand All @@ -28,22 +14,4 @@ public ClassEditBindingDto setTeacher(String teacher) {
this.teacher = teacher;
return this;
}
//
// public String getClassName() {
// return className;
// }
//
// public ClassEditBindingDto setClassName(String className) {
// this.className = className;
// return this;
// }
//
// public int getClassNum() {
// return classNum;
// }
//
// public ClassEditBindingDto setClassNum(int classNum) {
// this.classNum = classNum;
// return this;
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ public class ValidClassNameValidator implements ConstraintValidator<ValidClassNa
public boolean isValid(String value,
ConstraintValidatorContext context) {

if (value.length() < 2 || value.length() > 4) {
return false;
}

for (int i = 0; i < value.length(); i++) {
if (Character.isDigit(value.charAt(i))) {
return true;
Expand Down
10 changes: 0 additions & 10 deletions src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ navbar_logout=Logout
navbar_tasks=Tasks

home_welcome=Welcome to PE Scores
home_if_dont_have=If you don't have an account - here.
home_if_have=If you have an account - here.
home_login=log in
home_register=register

title_home=Home
title_login=Log in
Expand Down Expand Up @@ -125,12 +121,6 @@ current_class_submit=Submit
current_class_delete=Delete

edit_class=Edit class
edit_class_name=Class name
edit_class_name_placeholder=EX: 7A
edit_class_err_name=Class name is required and must be valid
edit_class_num=Grade number
edit_class_num_placeholder= EX: 8
edit_class_err_num=Grade number is required
edit_class_edit=Edit

grade=Grade
Expand Down
12 changes: 1 addition & 11 deletions src/main/resources/i18n/messages_bg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ navbar_logout=Изход
navbar_tasks=Задачи

home_welcome = Добре дошли!
home_if_dont_have = Ако нямате акаунт - тук
home_if_have = Ако имате акаунт - тук
home_login= влезте
home_register = регистрирайте се

title_home= Начална страница
title_login = Вход
Expand Down Expand Up @@ -99,7 +95,7 @@ add_class_teacher=Учител
add_class_submit=Добави
class_add_unique=Класът трябва да е уникален в училището

student_add=Добави студент
student_add=Добави ученик
student_add_name=Име и фамилия
student_add_name_placeholder=Пример: Александър Георгиев
student_add_err_name=Името трябва да е валидно
Expand All @@ -124,12 +120,6 @@ current_class_submit=Добави
current_class_delete=Изтрий

edit_class=Редактирай клас
edit_class_name=Клас
edit_class_name_placeholder=Пример: 7A
edit_class_err_name=Класът е задължителен и трябва да бъде валиден
edit_class_num=Номер на клас
edit_class_num_placeholder= Пример: 8
edit_class_err_num=Номерът на класа е задължителен
edit_class_edit=Редактирай

grade=Оценка
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/static/css/add-class.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
color: #362bb7;
}

.option-color {
color: #362bb7;
background-color: #d8d7fe;
}

.submit-btn {
margin-top: 1.5em;
width: 95%;
Expand Down
14 changes: 8 additions & 6 deletions src/main/resources/static/css/add-student.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
}

#studentClass {
background-color: #d8d7fe;
color: #5d54c3;
font-size: 16px;
font-weight: 500;
margin-top: 0.5em;
Expand All @@ -30,15 +28,17 @@
}

option {
background-color: #d8d7fe;
font-size: 16px;
font-weight: 500;
color: #5d54c3;
}

.option-color {
color: #362bb7;
background-color: #d8d7fe;
}

.form * {
font-family: 'Poppins', sans-serif;
color: #ffffff;
letter-spacing: 0.5px;
outline: none;
border: none;
Expand All @@ -49,13 +49,15 @@ option {
font-weight: 500;
line-height: 35px;
text-align: center;
color: #ffffff;
}

.label {
display: block;
margin-top: 20px;
font-size: 16px;
font-weight: 500;
color: #ffffff;
}

.input {
Expand All @@ -64,7 +66,7 @@ option {
width: 95%;
background-color: #d8d7fe;
/*color:#5d54c3;*/
color: black;
color: #362bb7;
border-radius: 3px;
padding: 0 10px;
margin-top: 8px;
Expand Down
16 changes: 5 additions & 11 deletions src/main/resources/static/css/edit-class.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.form {
height: 400px;
height: 300px;
width: 400px;
background-color: rgba(255, 255, 255, 0.13);
border-radius: 10px;
Expand Down Expand Up @@ -44,10 +44,10 @@
.input {
display: block;
height: 50px;
width: 95%;
width: 100%;
background-color: #d8d7fe;
/*color:#5d54c3;*/
color: black;
color: #362bb7;
border-radius: 3px;
padding: 0 10px;
margin-top: 8px;
Expand All @@ -56,15 +56,9 @@
margin-bottom: 10px;
}

.errors-class {
width: 250px;
border-radius: 4px;
text-align: center;
font-weight: 500;
font-size: 13px;
.option-color {
color: #362bb7;
background-color: #d8d7fe;
color: red;
margin: 1em auto;
}

::placeholder {
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/static/css/norm.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ table, th, td {
justify-content: space-between;
}

.row11 {
.row11-en {
display: flex;
flex-direction: row;
gap: 4em;
}

.row11-bg {
display: flex;
flex-direction: row;
gap: 7em;
}

.tables {
display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/static/css/school.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

.school h2 {
font-weight: 700;
margin-bottom: 1em;
margin-bottom: 2em;
margin-top: 1.5em;
color: #5d54c3;
}

.school {
width: 35%;
width: 60%;
background-color: #d8d7fe;
text-align: center;
border-radius: 1em;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/add-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h3 th:text="#{add_class}">Add class</h3>
th:field="*{teacher}"
th:errorclass="is-invalid"
class="input">
<option th:each="teach: ${teachers}"
<option class="option-color" th:each="teach: ${teachers}"
th:text="${teach.email}"
th:value="${teach.email}">nicole.georgieva
</option>
Expand Down
29 changes: 1 addition & 28 deletions src/main/resources/templates/classes-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,39 +73,12 @@

<h3 th:text="#{edit_class}">Edit class</h3>

<!-- <label for="clasName" class="label" th:text="#{edit_class_name}">Class name</label>-->
<!-- <input type="text"-->
<!-- name="className"-->
<!-- th:errorclass="is-invalid"-->
<!-- th:field="*{className}"-->
<!-- th:placeholder="#{edit_class_name_placeholder}"-->
<!-- id="clasName"-->
<!-- class="input">-->
<!-- <div class="invalid-feedback errors-class alert-danger"-->
<!-- th:each="err :${#fields.errors('className')}"-->
<!-- th:text="#{edit_class_err_name}"></div>-->

<!-- <label for="classNum" th:text="#{edit_class_num}">Class Number</label>-->
<!-- <input type="number"-->
<!-- id="classNum"-->
<!-- name="classNum"-->
<!-- class="input"-->
<!-- th:errorclass="is-invalid"-->
<!-- th:field="*{classNum}"-->
<!-- min="1"-->
<!-- max="12"-->
<!-- step="1"-->
<!-- th:placeholder="#{edit_class_num_placeholder}">-->
<!-- <div class="invalid-feedback errors-class alert-danger"-->
<!-- th:each="err :${#fields.errors('classNum')}"-->
<!-- th:text="#{edit_class_err_num}"></div>-->

<label for="teacher" class="label" th:text="#{add_class_teacher}">Teacher</label>
<select id="teacher"
th:field="*{teacher}"
th:errorclass="is-invalid"
class="input">
<option th:each="teach: ${teachers}"
<option class="option-color" th:each="teach: ${teachers}"
th:text="${teach.email}"
th:value="${teach.email}">nicole.georgieva
</option>
Expand Down
Loading

0 comments on commit 5565d4b

Please sign in to comment.