<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>FREE-OPEN-LAB</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
        integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="container" style="width: 100%;margin-top: 8px;">
        <%- partial('_partial/openlab_header') %>
        <h2>最新研究</h2>
        <hr>
        <ul class="list-unstyled">
            <!-- for 拿文章列表 -->
            <% let posts = site.posts.find({collection: 'freeopenlab'});%>
            <% posts.find({collection: 'freeopenlab'}).forEach(function(post, index){ %>
            <!-- 只有特殊分类才显示出来 -->
            <% if ((post.collection != undefined)&& (post.collection == 'freeopenlab')) {%>
            <li class="media">
                <div class="card" style="width: 100%;margin-top: 2px;">
                    <div class="card-body">
                        <h4 class="card-title">
                            <span class="badge badge-pill badge-secondary"><%= index %></span>
                            <span><a href="/<%- post.path %>" ><%= post.title %></a></span>
                            <span class="badge badge-info"><%= post.type %></span>
                        </h4>
                         <h5>研究团队</h5>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th scope="col">参与人员</th>
                                    <th scope="col">研究内容</th>
                                    <th scope="col">发表时间</th>
                                    <th scope="col">进度</th>
                                </tr>
                            </thead>
                            <tbody>
                                <% post.team.forEach(function(t, i){%>
                                <tr>
                                    <td><%- t[0]%></td>
                                    <td><%- t[1]%></td>
                                    <td><%- post.date%></td>
                                    <td>
                                        <div class="progress">
                                            <div class="progress-bar" role="progressbar" style="width: 25%"
                                                aria-valuenow="<%= post.progress%>" aria-valuemin="0"
                                                aria-valuemax="100"></div>
                                        </div>
                                    </td>
                                </tr>
                                <%}) %>

                            </tbody>
                        </table>
                        <hr>

                        <h5>资源</h5>
                        <div
                            style="border-color: rgb(199, 192, 184);border-style:solid;border-width: 1px;padding-top: 2px; padding-bottom: 2px;padding-left: 2px;">

                            <% post.resources.forEach(function(r, i){%>
                            <a href="<%= r[1] %>"><button type="button"
                                    class="btn btn-outline-info"><%= r[0] %></button>
                            </a>
                            <%}) %>

                        </div>

                        <hr>
                        <h5>内容概述</h5>
                        <div class="card">
                            <div class="card-body">
                                <p><%= post.abstract %> </p>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            <% } %>
            <!-- if结束 -->
            <% }); %>
            <!-- for 循环结束 -->
        </ul>

        <div class="alert alert-primary" role="alert">
            本站点所有文章除特别声明外，均采用 CC BY-SA 4.0 协议 ，转载请注明出处！
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
        integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
        integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
        crossorigin="anonymous"></script>
</body>

</html>