1

refine index page + outsource styling

This commit is contained in:
Christoph
2020-04-10 01:36:53 +02:00
parent 990306406a
commit 2cda0f05a9
2 changed files with 86 additions and 33 deletions

View File

@ -0,0 +1,72 @@
/*Content Container*/
.con-div {
border-radius: 3px;
background: #e6f4ff;
transition: 100ms;
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}
.con-div:hover {
background: #d4ecff;
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .125);
}
/*Content Heading*/
.con-h {
color: dodgerblue;
font-weight: bold;
font-optical-sizing: auto;
overflow-wrap: break-word;
margin-bottom: 5px;
transition: 100ms;
}
.con-div:hover .con-h {
margin-left: 5px;
}
.con-h a {
transition: 100ms;
}
.con-h a:hover {
color: #4fa4ff;
}
/*Content Paragraph*/
.con-p {
background: #fbfbfb;
border-radius: 3px;
margin-top: 5px;
margin-right: 10px;
cursor: default;
transition: 100ms;
box-shadow: inset 0 .125rem .25rem rgba(0, 0, 0, .075);
}
.con-div:hover .con-p {
margin-top: 10px;
margin-right: 0;
box-shadow: inset 0 .125rem .25rem rgba(0, 0, 0, .125);
}
.con-p span {
text-align: center;
overflow-wrap: break-word;
font-optical-sizing: auto;
}
/*Badges*/
.badge-ver {
background: lightseagreen;
}
/*Positioning*/
.float-r {
float: right;
}
/*Miscellanous*/
.def-cursor {
cursor: default;
}

View File

@ -3,9 +3,10 @@
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}"> th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Eigene Gruppen</title> <title>Meine Gruppen</title>
<th:block th:fragment="headcontent"> <th:block th:fragment="headcontent">
<!-- Links, Skripts, Styles hier einfügen! --> <!-- Links, Skripts, Styles hier einfügen! -->
<link th:href="@{/style.css}" href="../static/style.css" rel="stylesheet"/>
</th:block> </th:block>
</head> </head>
<body> <body>
@ -26,39 +27,19 @@
</header> </header>
<main th:fragment="bodycontent"> <main th:fragment="bodycontent">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <h1 class="def-cursor">Meine Gruppen</h1>
<div class="col-10"> <div class="mt-3" th:each="gruppe: ${gruppen}">
<h1>Meine Gruppen</h1> <div class="con-div p-2">
<form method="get" th:action="@{/}"> <span class="con-h">
<h3 style="color: dodgerblue; font-weight: bold; font-optical-sizing: auto;">
<small style="font-weight: normal; color: black;">Mitglied in </small>
<small style="font-weight: bold; color: black;"
th:text="${gruppen.size()}"></small>
<small style="font-weight: normal; color: black;"
th:if='${gruppen.size()==1}'> Gruppe.</small>
<small style="font-weight: normal; color: black;"
th:if='${gruppen.size()!=1}'> Gruppen.</small>
</h3>
<br>
<div th:each="gruppe: ${gruppen}">
<div class="shadow-sm p-4"
style="border: none; border-radius: 5px; background: aliceblue;">
<h3 style="color: dodgerblue; font-weight: bold; font-optical-sizing: auto; overflow-wrap: break-word;">
<span class="badge badge-pill badge-success"
style="background: lightseagreen; margin-right: 25px; float: right;"
th:if='${gruppe.getType() == lecture}'>Veranstaltung</span>
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}" <a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}"
th:text="${gruppe.getTitle()}"></a> th:text="${gruppe.getTitle()}"></a>
</h3> <span class="badge badge-pill badge-success badge-ver float-r"
<div class="shadow-sm p-4" style="background: white;"> th:if='${gruppe.getType() == lecture}'>Veranstaltung</span>
<p style="overflow-wrap: break-word; font-optical-sizing: auto;" </span>
th:text="${#strings.abbreviate(gruppe.getDescription(),300)}"></p> <div class="con-p p-2">
<span th:text="${#strings.abbreviate(gruppe.getDescription(),300)}"></span>
</div> </div>
</div> </div>
<br>
</div>
</form>
</div>
</div> </div>
</div> </div>
</main> </main>