|
|
- <!DOCTYPE html>
- <html lang="zh-CN">
-
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="icon" type="image/png" href="static/img/icon-128.png" />
- <link href="https://fonts.yecdn.com/css2?family=Noto+Serif+SC:wght@300;700&display=swap" rel="stylesheet">
- <link href="https://fonts.yecdn.com/css2?family=Noto+Sans+SC&display=swap" rel="stylesheet">
- <meta property="og:title" content="华清大学特普通奖学金 {{story.title}}" />
- <meta property="og:description" content="华清大学特普通奖学金" />
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
- <link href="static/css/ordinary.css" rel="stylesheet">
- <title>第二届 华清大学特普通奖 {{story.title}}</title>
- <script>
- if(navigator.userAgent.search('MicroMessenger') !== -1)
- location.href = `https://closed.social/tools/safe_jump/?go=${encodeURIComponent(location.href)}&t=${encodeURIComponent('华清大学特普通奖')}`;
- </script>
- </head>
-
- <body>
- <div class="container">
- <a href=".">
- <div style='padding:15px'>
- <img src="static/img/logo.png" width="200px" />
- </div>
- </a>
-
- <div class="user-info">
- <div class="btn-group">
- <button type="button" class="btn btn-dark rounded-0 p-1 pl-2">
- <img class="rounded-circle" src="{{avatar}}" width="24">
- <span class="username ml-2">{{username or '未登录'}}</span>
- </button>
- </div>
- </div>
-
- <div class="part1 col-md-6">
- <div class="story-box qbox part-box">
- <h1>{{story.title}}</h1>
- <img src="{{story.avatar}}" style="width: 80%">
- <hr>
- {% for p in paragraph_part %}
- <p class="story-text" title="{{p.author}}, {{p.create_at}}, {{p.like_num}}">
- {{p.text}}
- {% if is_tree and p.id != tail %}
- <small><a href="?tail={{p.id}}"> ← 回到这里</a></small>
- {% endif %}
- </p>
- {% endfor %}
- </div>
-
- <div style="font-size:90%;">
- <ul>
- <li>点击“续!”进行创作。</li>
- {% if not is_tree %}
- <li>请注意是对现有候选人故事的续写,不是对其他续写的续写。</li>
- {% endif %}
- </li>
- {% if is_tree %}
- <li>从第二天开始,在每天的10:00/16:00/22:00,对应故事线赞数总和最高且自身赞数不小于{{min_like_num}}的续写将入选,成为这个角色默认展示故事的一部分。</li>
- {% else %}
- <li>在每天的10:00/16:00/22:00,赞数最高且不小于{{min_like_num}}的续写将入选,成为这个角色最终故事的一部分。如果没有,所有都会被保留进入下一时段。</li>
- {% endif %}
- <li>参与创作需要回答几个简单的问题以验证学生身份,或者通过<a href="https://thu.closed.social/">闭社清华站</a>账号登录。</li>
- <li>联系邮箱:<a href="mailto:{{email}}">{{email}}</a></li>
- </ul>
- </div>
- </div>
-
- <div class="part2" id="part2">
- <div class="paragraph-list twin front part-box">
- <h1 style="margin: -8px -5px 20px">备选后续</h1>
- <span style="margin:8px" class="sort-by">
- {% if sort_by == 'like' %}
- <a href="?sort_by=time#part2">按时间</a> | <b>按赞数</b>
- {% else %}
- <b>按时间</b> | <a href="?sort_by=like#part2">按赞数</a>
- {% endif %}
- </span>
-
- {% for p in pagination.items %}
- <div class="qbox">
- <small>No. {{p.id}}</small>
- {% if is_tree %}
- <small><a href="?tail={{p.id}}"> ← 查看后续</a></small>
- {% endif %}
- <p class="story-text">{{p.text}}</p>
- <div class="text-end" title="{{p.create_at}}">
- {% for emoji, num, reacted, kind in p.reaction_status() %}
- <button class="btn {{'btn-secondary' if reacted else 'btn-outline-secondary can-react'}}
- btn-sm" data-kind="{{kind}}" data-pid="{{p.id}}">{{emoji}} <span>{{num or ''}}</span></button>
- {% endfor %}
- <br>
- <time class="timeago" datetime="{{p.time}}"></time>
- </div>
- </div>
- {% endfor %}
-
- <nav>
- <ul class="pagination">
- {%- for page in pagination.iter_pages(left_edge=2, left_current=1, right_current=3, right_edge=2) %}
- {% if page %}
- {% if page != pagination.page %}
- <li class="page-item"><a class="page-link" href="{{ url_for('main_bp.story', story_id=story_id, page=page, per_page=pagination.per_page, key=key, sort_by=sort_by) }}">{{ page }}</a></li>
- {% else %}
- <li class="page-item active">
- <a class="page-link" href="#">{{ page }}<span class="visually-hidden">(current)</span></a>
- </li>
- {% endif %}
- {% else %}
- <li class="page-item"><span class=ellipsis>...</span></li>
- {% endif %}
- {%- endfor %}
- </ul>
- </nav>
- </div>
-
- <div class="create-paragraph twin behind qbox part-box">
- <h1 style="text-align:right;margin:-8px -8px 16px">续!</h1>
- <form action="create" method="post">
- <input type="hidden" name="story-id" value={{story_id}}>
- <input type="hidden" name="tail" value={{tail}}>
- <div class="form-group">
- <textarea class="form-control" name="text" rows="11"
- placeholder="来续写{{story.title}}的故事吧!(不超过 140 字)" required maxLength="140">{{draft}}</textarea>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-link btn-lg">续!</button>
- </div>
- </form>
- </div>
- </div>
- </div>
-
- <div class="footer">
- <p>
- 由<a href="//closed.social" target="_blank">闭社</a>提供技术支持,本创作系统开源于<a href="//git.closed.social/">碧茶</a>。
- </p>
- <p> 🄯 2021 Copyleft: closed.social</p>
- </div>
-
- <div class="modal fade" id="loginModal" tabindex="-1">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h3 class="modal-title">登录</h3>
- </div>
- <div class="modal-body">
-
- <div class="text-center mb-4">
- <a href="{{cs_login_url}}" target="_blank" class="btn btn-link">闭社帐号登录</a>
- </div>
-
- <div class="text-center mb-4">
- <a href="#answerLogin" data-bs-toggle="collapse" class="btn btn-link" role="button">答题验证登录</a>
- <div class="collapse" id="answerLogin">
- <form action="{{guest_login_url}}" method="post">
- {% for id, question, hint, answer in verify_questions %}
- <div class="form-group row">
- <label for="{{id}}" class="col-sm-8 col-form-label">{{question}}</label>
- <div class="col-sm-4">
- <input type="text" class="form-control" name="{{id}}" id="{{id}}" placeholder="{{hint}}" required="required">
- </div>
- </div>
- {% endfor %}
- <button type="submit" class="btn btn-link btn-lg mb-3">提交</button>
- </form>
- </div>
- <p>
- </div>
-
- </div>
- </div>
- </div>
- </div>
-
- </body>
-
- <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
- <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/jquery.timeago.min.js"></script>
- <script src="https://cdn.bootcdn.net/ajax/libs/jquery-timeago/1.6.7/locales/jquery.timeago.zh-CN.js"></script>
-
- <script>
- $('.can-react').click(function (e) {
- if (check_login())
- return;
- $this = $(this);
- $.post(
- 'react',
- {
- 'pid': $this.data('pid'),
- 'kind': $this.data('kind')
- },
- (n) => {
- $this.addClass('btn-secondary').removeClass('btn-outline-secondary can-react');
- console.log(n);
- if (n) {
- $this.find('span').text(n);
- }
- }
- ).fail(function(xhr, status, error) {
- console.log(xhr, status, error);
- alert(error);
- });;
- });
-
- function check_login() {
- if (! "{{username}}") {
- new bootstrap.Modal(document.getElementById('loginModal')).show();
- return true;
- }
- }
-
- $('.timeago').timeago();
-
- $('.twin').click((e) => {
- if($(e.currentTarget).hasClass('front'))
- return;
- let behind_box = $('.behind');
- let front_box = $('.front');
- behind_box.toggleClass('behind front');
- front_box.toggleClass('front behind');
- });
-
- $('.user-info .btn').click(check_login);
- $('textarea').focus(check_login);
- </script>
-
- </html>
|