Ignore:
Timestamp:
02/06/22 20:01:15 (2 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
42d565b
Parents:
f25e8dd
Message:

Improved Front-End, added card view of movies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/templates/moviesList.html

    rf25e8dd r2efe93e  
    1111
    1212    <div class="container mb-4">
     13        <div class="row" th:each="row: ${movie_rows}" >
     14            <div class="col-md-3" th:each="movie: ${row}" >
     15                    <div class="card-body card bg-image" th:style="'background:url(' + ${movie.getImageUrl()} + ') no-repeat center #eee;'">
     16                        <a class="card-text-center" style="color: white" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}" >
     17                        <h3 class="card-title title" th:text="${movie.getTitle()}"></h3>
     18                        </a>
     19                        <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3>
     20                        <th:block sec:authorize="isAuthenticated()">
     21                            <a class="bottom-heart btn btn-success button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">❤</a>
     22                            <a class="bottom-heart btn btn-danger button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">💔</a>
     23                        </th:block>
     24                    </div>
     25            </div>
     26        </div>
     27    </div>
     28    <!--<div class="container mb-4">
    1329        <div class="row">
    1430            <div class="col-12" th:if="${movies.size() > 0}">
     
    1834                        <tr>
    1935                            <th scope="col">Наслов</th>
    20                             <!--<th scope="col">Опис</th>-->
     36                            <th scope="col">Опис</th>
    2137                            <th scope="col">Датум издавање</th>
    2238                            <th scope="col">Допаѓања</th>
     
    4056                        <tr th:each="movie : ${movies}" class="elements">
    4157                            <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
    42                             <!--<td th:text="${movie.getDescription()}"></td>-->
     58                            <td th:text="${movie.getDescription()}"></td>
    4359                            <td th:text="${movie.getAiringDate()}"></td>
    4460                            <td th:text="${movie.getLikes() != null  ? movie.getLikes().size() : 0}">
     
    6682                                <a class="btn btn-success button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">Додади во омилена листа</a>
    6783                                <a class="btn btn-warning button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">Избриши од омилена листа</a>
    68 
    6984                            </td>
    7085                            <td>
     
    8499            </div>
    85100        </div>
    86     </div>
     101    </div>-->
    87102
    88103</div>
Note: See TracChangeset for help on using the changeset viewer.