Archived
1
0
Fork 0

Merge branch 'ziedelth' into 'master'

Ziedelth

See merge request p1905458/filmflix!2
This commit is contained in:
WATTEAU PIERRE p2111528 2022-03-22 16:53:45 +00:00
commit 94f0ec1e40
7 changed files with 118 additions and 30 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/.idea/
/target/
/src/main/resources/hibernate.cfg.xml

View file

@ -1,29 +0,0 @@
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name = "hibernate.dialect">
org.hibernate.dialect.MariaDBDialect
</property>
<property name = "hibernate.connection.driver_class">
org.mariadb.jdbc.Driver
</property>
<!-- Assume test is the database name -->
<property name = "hibernate.connection.url">
jdbc:mariadb://localhost:3306/filmflix
</property>
<property name = "hibernate.connection.username">
filmflix
</property>
<property name = "hibernate.connection.password">
filmflix
</property>
</session-factory>
</hibernate-configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,51 @@
:root {
--main-color: #E50914;
}
* {
color: white;
font-family: 'Montserrat', sans-serif;
}
body {
background-color: black;
}
main {
min-height: calc(100vh - 4rem);
}
.color-text {
color: var(--main-color);
}
.color-border {
border-color: var(--main-color) !important;
}
.title {
color: var(--main-color);
text-align: center;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.title:hover {
display: block;
overflow: unset;
}
.description-4 {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
}
.description-4:hover {
display: block;
overflow: unset;
}

BIN
src/main/webapp/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,5 +1,43 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<title>FilmFlix</title>
</head>
<body>
<h2>Hello World!</h2>
<main>
<div class="container-fluid">
<div class="w-100 text-center">
<img class="text-center img-fluid" src="assets/logo.png" alt="FilmFlix logo"/>
</div>
<div class="row row-cols-lg-4 g-3 d-flex justify-content-center text-center mb-3" id="films">
</div>
</div>
</main>
<footer>
<div class="bg-dark p-2 px-3">
<div class="d-flex align-items-center">
<div class="me-auto">
<p class="mt-0 mb-0">Projet de Archi Ntiers</p>
<p class="mt-0 mb-0">Florian - Pierre</p>
</div>
<div class="ms-auto">
2022
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>

View file

@ -0,0 +1,27 @@
$(document).ready(function () {
console.log("OK");
// $("#films").append(generateFilmCard("lorem", "lorem"));
$.get("http://localhost:8080/api/film", function (data) {
console.table(data);
for (let dataKey of data) {
$("#films").append(generateFilmCard(dataKey.name, dataKey.description));
}
});
});
function generateFilmCard(title, description) {
return `<div class="col">
<div class="border rounded color-border p-2">
<h5 class="title">${title}</h5>
<p class="description-4 mb-0">${description}</p>
<div class="d-flex">
<span class="me-auto text-muted">Il y a 20 minutes</span>
<span class="ms-auto text-muted">1h20min</span>
</div>
</div>
</div>`;
}