master
newrain001 2 years ago
parent 1958674c31
commit ff2e981743
  1. 2
      App/csdn.py
  2. 3
      templates/function/user.html
  3. 12
      templates/index.html
  4. 4
      templates/nav/dashboard.html
  5. 64
      templates/nav/image.html
  6. 4
      templates/nav/paperlist.html
  7. 73
      templates/task/tasklist.html
  8. 136
      templates/template.html

@ -15,7 +15,7 @@ def get_image(resolving='500x500'):
else:
return 'https://images.unsplash.com/photo-1567168539593-59673ababaae?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=500&ixid=MnwxfDB8MXxyYW5kb218MHx8Ym9vayxsaWJyYXJ5fHx8fHx8MTY1MTU1NDcyNA&ixlib=rb-1.2.1&q=80&utm_campaign=api-credit&utm_medium=referral&utm_source=unsplash_source&w=500'
@register_job(scheduler, 'interval', minutes=1, replace_existing=True)
@register_job(scheduler, 'interval', minutes=60*24, replace_existing=True)
def csdn_get():
blog = requests.get('https://blog.csdn.net/NewRain_wang', headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'})

@ -5,6 +5,7 @@
<style>
.container {
margin: auto 50px;
padding-top: 10px;
}
</style>
{% endblock %}
@ -48,7 +49,7 @@
<ul class="icon-list">
{% for i in blog_data %}
<li>
<a href="{% url 'App:editMD' i.id %}">文章链接</a>&nbsp;&nbsp;上传时间:{{ i.paper_time }}&nbsp;&nbsp;文章标题:{{ i.paper_title }}
<a href="{% url 'App:editMD' i.id %}">文章链接</a>&nbsp;&nbsp;{{ i.paper_time }}&nbsp;&nbsp;文章标题:{{ i.paper_title }}
</li>
{% endfor %}
</ul>

@ -7,7 +7,7 @@
<link rel="stylesheet" href="{% static 'css/station/carousel.css' %}">
{% endblock %}
{% block login %}
<header>
<header style="padding-top: 80px">
<div class="px-3 py-2 border-bottom mb-3">
<div class="container d-flex flex-wrap justify-content-center">
<form class="col-12 col-lg-auto mb-2 mb-lg-0 me-lg-auto">
@ -28,8 +28,6 @@
</header>
{% endblock %}
{% block content %}
<main>
<div id="myCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
@ -134,12 +132,4 @@
<!-- /END THE FEATURETTES -->
</div><!-- /.container -->
<!-- FOOTER -->
<footer class="container">
<p class="float-end"><a href="#">回到顶部</a></p>
<p>&copy; 2017–2021 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
</main>
{% endblock %}

@ -5,9 +5,9 @@
<link href="{% static 'css/dashboard/dashboard.css' %}" rel="stylesheet">
{% endblock %}
{% block content %}
<div class="container-fluid">
<div style="padding-top: 80px">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<nav id="sidebarMenu" style="padding-top: 80px" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3">
<ul class="nav flex-column">
<li class="nav-item">

@ -11,37 +11,41 @@
</style>
{% endblock %}
{% block content %}
<div class="container px-4 py-5" id="custom-cards">
<h2 class="pb-2 border-bottom">我的相册</h2>
<div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5">
{% for i in image %}
<div class="col">
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg"
style="background-image: url({{ i.url_path }});">
<div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1">
<h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold"><a href="{{ i.url_path }}" target="_blank">点击预览图片</a></h2>
<ul class="d-flex list-unstyled mt-auto">
<li class="me-auto">
<img src="{% static 'images/bootstrap-logo.svg' %}" alt="Bootstrap" width="32" height="32"
class="rounded-circle border border-white">
</li>
<li class="d-flex align-items-center me-3">
<svg class="bi me-2" width="1em" height="1em">
<use xlink:href="#geo-fill"/>
</svg>
<small>{{ i.file_name }}</small>
</li>
<li class="d-flex align-items-center">
<svg class="bi me-2" width="1em" height="1em">
<use xlink:href="#calendar3"/>
</svg>
<small>{{ i.upload_time }}</small>
</li>
</ul>
<div style="padding-top: 80px">
<div class="container px-4 py-5">
<h2 class="pb-2 border-bottom">我的相册</h2>
<div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5">
{% for i in image %}
<div class="col">
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg"
style="background-image: url({{ i.url_path }});">
<div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1">
<h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold"><a href="{{ i.url_path }}"
target="_blank">点击预览图片</a></h2>
<ul class="d-flex list-unstyled mt-auto">
<li class="me-auto">
<img src="{% static 'images/bootstrap-logo.svg' %}" alt="Bootstrap" width="32"
height="32"
class="rounded-circle border border-white">
</li>
<li class="d-flex align-items-center me-3">
<svg class="bi me-2" width="1em" height="1em">
<use xlink:href="#geo-fill"/>
</svg>
<small>{{ i.file_name }}</small>
</li>
<li class="d-flex align-items-center">
<svg class="bi me-2" width="1em" height="1em">
<use xlink:href="#calendar3"/>
</svg>
<small>{{ i.upload_time }}</small>
</li>
</ul>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}

@ -5,7 +5,7 @@
<link rel="stylesheet" href="{% static 'css/station/bootstrap.min.css' %}">
{% endblock %}
{% block content %}
<main class="container">
<div class="container" style="padding-top: 80px">
<div class="p-4 p-md-5 mb-4 text-white rounded bg-dark">
<div class="col-md-6 px-0">
<h1 class="display-4 fst-italic">文章列表</h1>
@ -43,5 +43,5 @@
</div>
{% endfor %}
</div>
</main>
</div>
{% endblock %}

@ -7,48 +7,51 @@
{% endblock %}
{% block content %}
{% load static %}
<section class="py-5 text-center container">
<div class="row py-lg-5">
<div class="col-lg-6 col-md-8 mx-auto">
<h1 class="fw-light">作业平台</h1>
<p class="lead text-muted">作业平台仅供内部成员使用,目前依旧在测试阶段,功能正不断更新</p>
<p>
<a href="{% url 'App:addTask' %}" class="btn btn-primary my-2">创建任务</a>
<a href="#" class="btn btn-secondary my-2">BUG提交</a>
</p>
{% if messages %}
<div class="alert alert-danger" role="alert">
{{ messages }}
</div>
{% endif %}
<div style="padding-top: 80px">
<section class="py-5 text-center container">
<div class="row py-lg-2">
<div class="col-lg-6 col-md-8 mx-auto">
<h1 class="fw-light">作业平台</h1>
<p class="lead text-muted">作业平台仅供内部成员使用,目前依旧在测试阶段,功能正不断更新</p>
<p>
<a href="{% url 'App:addTask' %}" class="btn btn-primary my-2">创建任务</a>
<a href="#" class="btn btn-secondary my-2">BUG提交</a>
</p>
</div>
</div>
</div>
</section>
</section>
<div class="album py-5 bg-light">
<div class="container">
<div class="album py-5 bg-light">
<div class="container">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
{% for i in task %}
<div class="col">
<div class="card shadow-sm">
<img class="bd-placeholder-img card-img-top" width="100%" height="225"
src="{{ i.task_content | setjson:"backend_image" }}" role="img" aria-label="Placeholder: Thumbnail"
preserveAspectRatio="xMidYMid slice" focusable="false"><text x="50%" y="50%" fill="#eceeef" dy=".3em">{{ i.task_title }}</text>
<rect width="100%" height="100%" fill="#55595c"/>
<div class="card-body">
<p class="card-text">{{ i.task_content | setjson:"desc" }}</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<a href="{% url 'App:checkTask' i.id %}"><button type="button" class="btn btn-sm btn-outline-secondary">查看</button></a>
<button type="button" class="btn btn-sm btn-outline-secondary">{{ i.task_content | checkover:'未完成' }}</button>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
{% for i in task %}
<div class="col">
<div class="card shadow-sm">
<img class="bd-placeholder-img card-img-top" width="100%" height="225"
src="{{ i.task_content | setjson:"backend_image" }}" role="img"
aria-label="Placeholder: Thumbnail"
preserveAspectRatio="xMidYMid slice" focusable="false">
<text x="50%" y="50%" fill="#eceeef" dy=".3em">{{ i.task_title }}</text>
<rect width="100%" height="100%" fill="#55595c"/>
<div class="card-body">
<p class="card-text">{{ i.task_content | setjson:"desc" }}</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<a href="{% url 'App:checkTask' i.id %}">
<button type="button" class="btn btn-sm btn-outline-secondary">查看
</button>
</a>
<button type="button"
class="btn btn-sm btn-outline-secondary">{{ i.task_content | checkover:'未完成' }}</button>
</div>
<small class="text-muted">{{ i.task_time }}</small>
</div>
</div>
<small class="text-muted">{{ i.task_time }}</small>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>

@ -1,6 +1,6 @@
{% block head %}
<!doctype html>
<html lang="en">
<html lang="zh">
<head>
{% load static %}
<meta charset="utf-8">
@ -34,6 +34,12 @@
font-size: 3.5rem;
}
}
#top {
width: 100%;
position: fixed;
z-index: 9999;
}
</style>
@ -72,70 +78,70 @@
</svg>
<main>
<header>
<div class="px-3 py-2 bg-dark text-white">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<a href="/"
class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none">
<svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap">
<use xlink:href="#bootstrap"/>
</svg>
</a>
<ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small">
<li>
<a href="{% url 'App:index' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#home"/>
</svg>
主页
</a>
</li>
<li>
<a href="{% url 'App:dashboard' 'login' %}?time=week" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#speedometer2"/>
<header>
<div class="container">
<div class="navbar fixed-top navbar-light" style="background-color: #5c636a">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start container-md">
<a href="/"
class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none">
<svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap">
<use xlink:href="#bootstrap"/>
</svg>
仪表盘
</a>
</li>
<li>
<a href="{% url 'App:listTask' %}" class="nav-link text-white">
<img class="bi d-block mx-auto mb-1" width="24" height="24"
src="{% static 'images/archive.png' %}">
任务列表
</a>
</li>
<li>
<a href="{% url 'App:image' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#table"/>
</svg>
相册
</a>
</li>
<li>
<a href="{% url 'App:paperList' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#grid"/>
</svg>
文章列表
</a>
</li>
<li>
<a href="{% url 'App:userinfo' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#people-circle"/>
</svg>
用户
</a>
</li>
</ul>
<ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small">
<li>
<a href="{% url 'App:index' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#home"/>
</svg>
主页
</a>
</li>
<li>
<a href="{% url 'App:dashboard' 'login' %}?time=week" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#speedometer2"/>
</svg>
仪表盘
</a>
</li>
<li>
<a href="{% url 'App:listTask' %}" class="nav-link text-white">
<img class="bi d-block mx-auto mb-1" width="24" height="24"
src="{% static 'images/archive.png' %}">
任务列表
</a>
</li>
<li>
<a href="{% url 'App:image' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#table"/>
</svg>
相册
</a>
</li>
<li>
<a href="{% url 'App:paperList' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#grid"/>
</svg>
文章列表
</a>
</li>
<li>
<a href="{% url 'App:userinfo' %}" class="nav-link text-white">
<svg class="bi d-block mx-auto mb-1" width="24" height="24">
<use xlink:href="#people-circle"/>
</svg>
用户
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</header>
</header>
</main>
{% endblock %}
@ -143,9 +149,11 @@
{% endblock %}
{% block content %}
{% endblock %}
{% block foot %}
<footer class="container">
<p class="float-end"><a href="#">回到顶部</a></p>
<p>&copy; 2017–2021 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
<div class="container">
<footer class="py-5">
<div class="row">

Loading…
Cancel
Save