<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="ch">
<head th:replace="model/head :: commonHead('游戏库')">
</head>
<body>
<div th:replace="model/banner :: banner"></div>

<div class="content" style="margin-top: 20px;">
    <div class="container">
        <!--信息-->
        <div class="col-md-3 content-left" role="alert" th:if="${session.user}">
            <span class="label label-success" th:text="${session.user.messages.peekFirst()}"></span>
        </div>
        <div class="clearfix"></div>
        <!--游戏信息-->
        <div class="col-md-4 content-left">
            <a href="">
                <button class="btn1 btn-1 btn-1b" onclick="window.history.back()">返回</button>
            </a>

            <h2 class="h2">按类型分类</h2>
            <div class="list-group list-group-alternate" style="margin: 20px auto;">
                <a th:each="category:${categories}" href="" th:href="'/library?cid='+${category.id}"
                   class="list-group-item" th:text="${category.name}">
                    <span class="badge badge-success"></span>
                    <i class="ti ti-eye"></i>
                </a>
            </div>
            <div class="clearfix"></div>
            <h2 class="h2">按平台分类</h2>
            <div class="list-group list-group-alternate" style="margin: 20px auto;">
                <a th:each="platform:${platforms}" href="" th:href="'/library?pid='+${platform.id}"
                   th:text="${platform.name}" class="list-group-item">
                    <span class="badge badge-success"></span>
                    <i class="ti ti-eye"></i>
                </a>
            </div>
        </div>

        <!--<游戏列表-->
        <div id="gameList" class="col-md-8 colcontent-right">
            <th:block th:each="game,i:${games}">
                <div class="col-md-4 gallery-grid">
                    <a class="example-image-link" href="" th:href="'/library/game/'+${game.id}"
                       data-lightbox="example-set">
                        <img class="example-image" src="/public/images/g2.jpg" alt=""/>
                    </a>
                    <a href="" th:href="'/library/game/'+${game.id}" th:text="${game.name}" class="list-group-item">
                        <span class="badge badge-primary" th:text="${game.category.name}"></span>
                        <span class="badge badge-warning" th:text="${game.platform.name}"></span>
                        <span class="badge badge-success" th:text="${game.price}">$</span>
                        <i class="ti ti-headphone-alt"></i>
                    </a>
                </div>
                <div th:if="${i.count%3 == 0}" class="clearfix"></div>
            </th:block>

        </div>
        <div class="clearfix"></div>
    </div>
    <div class="clearfix"></div>
</div>


<div th:replace="model/footer :: footer"></div>
</body>
</html>