Ignore:
Timestamp:
01/05/22 15:57:29 (3 years ago)
Author:
NikolaCenevski <cenevskinikola@…>
Branches:
master
Children:
6fa3d09
Parents:
881a233
Message:

part 2

File:
1 edited

Legend:

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

    r881a233 rb8dc761  
    11<!DOCTYPE html>
    2 <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
     2<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
    33<head>
    44    <meta charset="UTF-8"/>
     
    77    <!-- Bootstrap core CSS -->
    88    <link href="css/bootstrap.min.css" rel="stylesheet"/>
     9    <link rel="stylesheet" href="css/risk.css"/>
    910</head>
    1011<body>
     
    2627                        <option value="dateDue">Date due</option>
    2728                        <option value="fundsNeeded">Funds needed</option>
     29                        <option value="riskFactor">Chance to collect funds</option>
    2830                    </select>
    2931                </div>
     
    4749            <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
    4850                <div class="col" th:each="post : ${postList}">
    49                     <div class="card shadow-sm">
     51                    <div class="card shadow-sm" th:classappend="${post.riskFactor < 25 ? 'red' : (post.riskFactor < 50 ? 'orange' : (post.riskFactor < 75 ? 'yellow' : (post.riskFactor < 100 ? 'light-yellow' : (post.riskFactor == 100 ? 'green' : '') )))}">
    5052                        <img class="card-img" style="object-fit: contain" width="100%" height="225"
    5153                             th:src="${post.imagesPath[0]}">
     
    5355                            <h4 th:text="${post.title}" style="height: 60px"></h4>
    5456                            <p class="card-text text-truncate" style="height: 45px" th:text="${post.description}"></p>
     57                            <span th:if="${post.riskFactor < 101}" class="" style="color: black; margin-left: 62%;">Chance: <small th:text="${post.riskFactor}"></small></span>
     58                            <span th:unless="${post.riskFactor < 101}" style="color: black; margin-left: 62%;">Chance: unavailable</span>
    5559                            <div class="d-flex justify-content-between align-items-center">
    5660                                <div class="btn-group">
    57                                     <a class="btn btn-sm btn-outline-secondary" th:href="@{/post(postid=${post.id})}">Open</a>
     61                                    <a class="btn btn-sm btn-outline-secondary" style="color: black" th:href="@{/post(postid=${post.id})}">Open</a>
    5862                                </div>
    59                                 <span class="text-muted">Date due: <small th:text="${post.dateDue}"></small></span>
     63                                <span class="" style="color: black">Date due: <small th:text="${post.dateDue}"></small></span>
    6064                            </div>
    6165                        </div>
Note: See TracChangeset for help on using the changeset viewer.