initial commit

This commit is contained in:
2020-11-09 23:51:28 +01:00
parent 13ffe47bfc
commit ab38911327
26 changed files with 909 additions and 0 deletions
@@ -0,0 +1,5 @@
spring.datasource.url=jdbc:mysql://localhost/VotingSystem
spring.datasource.username=root
spring.datasource.password=***REMOVED***
spring.jpa.hibernate.ddl-auto=update
+41
View File
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOGS" value="./logs" />
<appender name="Console"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
</Pattern>
</layout>
</appender>
<appender name="RollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOGS}/Voting.log</file>
<encoder
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>%d %p [%t] %m%n</Pattern>
</encoder>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily and when the file reaches 10 MegaBytes -->
<fileNamePattern>${LOGS}/archived/%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- LOG everything at INFO level -->
<root level="info">
<appender-ref ref="RollingFile" />
<appender-ref ref="Console" />
</root>
</configuration>
@@ -0,0 +1,6 @@
function Quadrat() {
var Eingabe = document.getElementsByName("name");
var Ergebnis = Eingabe.value;
alert("Das Quadrat von " + Eingabe.value + " = " + Ergebnis);
Eingabe.value = "Aaron";
}
@@ -0,0 +1,7 @@
td.voted {
background-color: #f05048;
}
td.notVoted {
background-color: #76ed6b;
}
@@ -0,0 +1,18 @@
body {
background-color: rgb(44, 49, 54);
font-family: Arial, Helvetica, sans-serif;
}
h2 {
color: whitesmoke;
font-size: 2em;
font-family: Georgia, 'Times New Roman', Times, serif;
border-bottom: 5px dotted #e3e7ec;
border-top: 5px dotted white;
width: 50%;
}
form {
color: #3cff00;
font-weight: bold;
}
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link th:href="@{/styles/dashboard.css}" rel="stylesheet" />
</head>
<body>
<h1>Wähler Liste</h1>
<div class="voterTable">
<table class="tableVoters" border="5">
<tr>
<th>Id</th>
<th>E-Mail</th>
<th>Vote status</th>
</tr>
<tr th:each="voter : ${voters}">
<!-- If voter has voted -->
<div th:if="${voter.vote_status}">
<td class="voted" th:text="${voter.id}"></td>
<td class="voted" th:text="${voter.email}"></td>
<td class="voted" th:text="${voter.vote_status}"></td>
</div>
<!-- ELSE -->
<div th:unless="${voter.vote_status}">
<td class="notVoted" th:text="${voter.id}"></td>
<td class="notVoted" th:text="${voter.email}"></td>
<td class="notVoted" th:text="${voter.vote_status}"></td>
</tr>
</table>
</div>
<h1>Kandidaten Liste</h1>
<div class="candidateTable">
<table class="tableCandidates" border="5">
<tr>
<th>Id</th>
<th>Name</th>
<th>Votes</th>
<th>Category</th>
</tr>
<tr th:each="candidate: ${candidates}">
<td th:text="${candidate.id}"></td>
<td th:text="${candidate.name}"></td>
<td th:text="${candidate.votes}"></td>
<td th:text="${candidate.category}"></td>
</tr>
</table>
</div>
</body>
</html>
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Abizeitung 2020/2021 Voting</title>
</head>
<body>
<h1 style="color: red;"> Jeder darf nur einmal abstimmen! </h1>
<a href="http://localhost:8080">Return to Login-Site</a>
</body>
</html>
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Abizeitung 2020/2021 Voting</title>
</head>
<body>
<h1> Überprüfe noch einmal die eingegebene E-Mail Adresse
Sollte der Fall eintreten, dass du deine E-Mail Adresse richtig eingegeben hast und du Schüler der Q2 bist,
schreibe eine Mail an simon.bussmann@adolfinum.de mit dem Betreff LoginFehler</h1>
<a href="http://localhost:8080">Try again</a>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="http://thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Abizeitung 2020/2021 Voting</title>
<link th:href="@{/styles/start.css}" rel="stylesheet" />
</head>
<body>
<h2>Gebe deine Adolfinum E-Mail Adresse ein</h2>
<form action="#" th:action="@{/vote}" method="post">
<input type="text" name="name" />
<input type="submit" value="submit" />
</form>
<h2>Admin-Console Passwort</h2>
<form action="#" th:action="@{/dashboard}" method="post">
<input type="text" name="name" />
<input type="password" name="password" />
<input type="submit" value="login" />
</form>
</body>
</html>
+66
View File
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="de-DE" xmlns:th="http://thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Abizeitung 2020/2021 Voting</title>
<link th:href="@{/styles/first.css}" rel="stylesheet" />
</head>
<body>
<h2>Paragraphes</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<h2>Links</h2>
<a href="https://www.w3schools.com">This is a link</a>
<h2>HTML Images</h2>
<p>HTML images are defined with the img tag:</p>
<img src="https://www.lifewire.com/thmb/-27LpEPPTgNRUORa_mIczKDkWh0=/1280x905/filters:fill(auto,1)/what-is-binary-and-how-does-it-work-4692749-1-1eaec2e636424e71bb35419ef8d5005b.png" alt="Binary example picture" width="400" height="400">
<h2>Line breaks</h2>
<p>This is a <br> paragraph with a line break.</p>
<h2>Styling</h2>
<p style="color:red;">This is a red paragraph.</p>
<h2>Title attribute</h2>
<p title="I'm a tooltip">This is a paragraph.</p>
<h2>Quotes in attributes</h2>
<p title='John "ShotGun" Nelson'>Example 1</p>
<p title="John 'ShotGun' Nelson">Example 2</p>
<h2>Bigger headings</h2>
<h1>Heading 1</h1>
<h2>HTML Display</h2>
<p>
This paragraph contains a lot of lines in the source code, but the browser ignores it.
</p>
<p>
This paragraph contains a lot of spaces in the source code, but the browser ignores it.
</p>
<h2>Poem Problem</h2>
<p>
My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me.
</p>
<h5>Solution:</h5>
<pre>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</pre>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link th:href="@{/styles/voting.css}" rel="stylesheet" />
</head>
<body>
<h1>Wähle deine Kandidaten:</h1>
<div th:each="candidate: ${candidates}">
<p th:text="${candidate.id}"></p>
<p th:text="${candidate.name}"></p>
<p th:text="${candidate.votes}"></p>
<p th:text="${candidate.category}"></p>
<!-- <input type="checkbox" id="${candidate.id}" name="${candidate.name}" unchecked>
<label for="${candidate.id}" th:text="${candidate.name}"></label> -->
</div>
</body>
</html>