山东大学项目实训——5月21日

本周做前端,完成了如下工作:

将数据库题目显示到界面。

problem_base.html

{% extends "base.html" %}

{% block title %}{{ problem.title }}{% endblock %}

{% block navbar %}{% include "include/navbar-problem.html" %}{% endblock %}

{% block header %}
    <div class="text-center">
        <h1 class="text-success">{{ problem.title }}</h1>
        <ul class="list-inline">
            <li>Time Limit: {{ problem.timelimit }}s</li>
            <li>Memory Limit: {{problem.memorylimit}}</li>
        </ul>
    </div>

    <link rel="shortcut icon" href="/static/img/favicon.ico">
    <meta charset="UTF-8">
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
    <script src="/static/js/csrf.js"></script>
    <script src="/static/js/jquery.form.js"></script>
    <script type="text/javascript" src="/static/syntaxhighlighter/js/shCore.js"></script>
    <script type="text/javascript" src="/static/syntaxhighlighter/css/shBrushCpp.js"></script>
    <script type="text/javascript" src="/static/syntaxhighlighter/css/shBrushJava.js"></script>
    <link href="/static/syntaxhighlighter/css/shCore.css" rel="stylesheet" type="text/css"/>
    <link href="/static/syntaxhighlighter/css/shThemeDefault.css" rel="stylesheet" type="text/css"/>

{% endblock %}

{% block content %}
<div class="panel panel-default">
    {% include "problem/include/subnav.html" %}
</div>
{% block detail %}
{% endblock %}
{% endblock %}

subnav.html

    <a class="btn btn-link btn-sm" href="/problem/{{ problem.proid }}">Problem</a>
    <a class="btn btn-link btn-sm" href="/problem/{{ problem.proid }}/submit">Submit</a>
    <a class="btn btn-link btn-sm" href="/status/?pid={{problem.proid}}">Status</a>
    <a class="btn btn-link btn-sm" href="/problem/{{ problem.proid }}/rank">Rank</a>
    <a class="btn btn-link btn-sm" href="/problem/{{ problem.proid }}/discuss">Discuss</a>

problem.detial.html

{% extends "problem/problem_base.html" %}

{% block detail %}
    <style type="text/css">
	pre{
		word-break: normal;
		word-wrap: break-word;
		white-space: pre-wrap;
	} 
    </style>

    {% autoescape off %}

    <h3 class="text-info">Description</h3>
    <pre>{{ problem.description }}</pre> 


    <h3 class="text-info">Input</h3>
    <pre>{{ problem.input }}</pre>

    <h3 class="text-info">Output</h3>
    <pre>{{ problem.output }}</pre>

    {% endautoescape %}

    <h3 class="text-info">Sample Input</h3>
    <pre>{{ problem.sampleinput }}</pre>

    <h3 class="text-info">Sample Output</h3>
    <pre>{{ problem.sampleoutput }}</pre>

    {% autoescape off %}

    <h3 class="text-info" >Note</h3>
    <pre>{{ problem.note }}</pre>

    <h3 class="text-info">Source</h3>
    <pre>{{ problem.originoj }} {{ problem.problemid }}</pre>

    {% endautoescape %}

{% endblock %}

网页截图:

目录:


题目:


下次博客之前完成用户登录和代码提交

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值