add feature

This commit is contained in:
baoliang 2020-09-10 01:21:45 +08:00
parent 3ae594d743
commit 70ede8d96f
26 changed files with 112 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -0,0 +1,16 @@
.title {
line-height: 1.42857;
}
.source {
color: rgba(0, 0, 0, 0.35)
}
.content {
margin-top: 20px;
}
.content p {
text-indent: 2em;
line-height: 1.4;
}

View File

@ -0,0 +1,29 @@
{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<link rel="icon" href="{% static 'favicon.ico' %}">
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{% static 'css/ie10-viewport-bug-workaround.css' %}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{% static 'polls/css/news_detail.css' %}" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="flex-container">
{% block content %}{% endblock %}
</div>
<script src="{% static 'js/jquery-1.11.2.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
</body>
</html>

View File

@ -0,0 +1,24 @@
{% extends 'polls/base.html' %}
{% block content%}
<div class="col-xs-12">
<h4 class="title">如何理解伟大抗疫精神,听习近平总书记这样阐释</h4>
<div class="source">
来源:中瓣网
<span class="pull-right date">时间2020-09-20 14:25:53</span>
</div>
</div>
<div class="col-xs-12">
<div class="content">
<p>
同困难作斗争,是物质的角力,也是精神的对垒。在抗击新冠肺炎疫情的斗争中,是什么精神力量支撑着我们,创造了人类同疾病斗争史上的英勇壮举?
</p>
<img src="http://cms-bucket.ws.126.net/2020/0909/2dcc71f3p00qge4xk008zc000go00toc.png" style="width:100%;height:400px;">
<p>
生命至上、举国同心、舍生忘死、尊重科学、命运与共——今日,在全国抗击新冠肺炎疫情表彰大会上,习近平总书记生动论述伟大抗疫精神。
</p>
<p>
人无精神则不立,国无精神则不强。唯有精神上站得住、站得稳,一个民族才能在历史洪流中屹立不倒、挺立潮头。什么是伟大抗疫精神?中华民族能够经历无数灾厄仍不断发展壮大的原因是什么?
</p>
</div>
</div>
{% endblock%}

View File

@ -15,5 +15,6 @@ urlpatterns = [
path('notices/list/', views.notices, name='polls_notices'),
path('notices/read/', views.read_notice, name='polls_read_notice'),
path('medias/create/', views.create_media, name='polls_add_media'),
path('medias/list/', views.medias, name='polls_medias')
path('medias/list/', views.medias, name='polls_medias'),
path('news/detail/', views.news_detail, name='polls_news_detail'),
]

View File

@ -24,7 +24,6 @@ def sent_sms_code(phone, code):
request.add_query_param('SignName', "短信验证")
request.add_query_param('TemplateCode', "SMS_12330409")
request.add_query_param('TemplateParam', '{"number":"%s"}' % (code,))
response = client.do_action(request)
return response

View File

@ -1,3 +1,4 @@
from .user import index, status_500, status_401, polls_login, send_code, register_step_one, register_step_two, password_recover_step_one, password_recover_step_two
from .notice import notices, read_notice
from .media import medias, create_media
from .news import news_detail

Binary file not shown.

4
polls/views/news.py Normal file
View File

@ -0,0 +1,4 @@
from django.shortcuts import render
def news_detail(request):
return render(request, 'polls/news_detail.html')

View File

@ -75,6 +75,7 @@ def send_code(request):
after_1min = now + datetime.timedelta(minutes=1)
response = sent_sms_code(phone, code)
result = response.decode('utf8')
print(result)
if "OK" in result:
VerifyCode.objects.create(
code=code, phone=phone, category=category, timeouted=after_1min)

BIN
static/.DS_Store vendored

Binary file not shown.

View File

@ -0,0 +1,13 @@
/*!
* IE10 viewport hack for Surface/desktop Windows 8 bug
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*
* See the Getting Started docs for more information:
* http://getbootstrap.com/getting-started/#support-ie10-width
*/
@-ms-viewport { width: device-width; }
@-o-viewport { width: device-width; }
@viewport { width: device-width; }

BIN
static/image/.DS_Store vendored

Binary file not shown.

BIN
static/image/icon/c1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

BIN
static/image/icon/g1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/image/icon/g2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/image/icon/g3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/image/icon/g4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/image/icon/g5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/image/icon/g6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/image/icon/g7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/image/icon/g8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/image/icon/g9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

22
static/js/echarts.min.js vendored Normal file

File diff suppressed because one or more lines are too long