parent
dfdb61c3d1
commit
e53d6e4eec
@ -0,0 +1,26 @@ |
||||
# Generated by Django 3.2.9 on 2022-05-06 16:12 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('App', '0017_auto_20220505_2143'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.CreateModel( |
||||
name='videoUpload', |
||||
fields=[ |
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('username', models.CharField(max_length=100)), |
||||
('video_time', models.DateField(auto_now_add=True)), |
||||
('video_title', models.CharField(max_length=200)), |
||||
('video_desc', models.CharField(max_length=2000)), |
||||
('video_path', models.FileField(upload_to='')), |
||||
('views', models.IntegerField(default=0)), |
||||
('video_image', models.URLField(default='', max_length=10000)), |
||||
], |
||||
), |
||||
] |
@ -0,0 +1,22 @@ |
||||
# Generated by Django 3.2.9 on 2022-05-06 16:21 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('App', '0018_videoupload'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='videoupload', |
||||
name='video_desc', |
||||
), |
||||
migrations.AddField( |
||||
model_name='videoupload', |
||||
name='video_size', |
||||
field=models.IntegerField(default=0), |
||||
), |
||||
] |
@ -0,0 +1,18 @@ |
||||
# Generated by Django 3.2.9 on 2022-05-08 06:01 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('App', '0019_auto_20220507_0021'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='videoupload', |
||||
name='video_desc', |
||||
field=models.TextField(default=''), |
||||
), |
||||
] |
Before Width: | Height: | Size: 457 B |
@ -1,131 +1,164 @@ |
||||
{% extends 'template.html' %} |
||||
{% block title %} |
||||
<title>主页</title> |
||||
<title>主页</title> |
||||
{% endblock %} |
||||
{% block link %} |
||||
{% load static %} |
||||
<link rel="stylesheet" href="{% static 'css/station/carousel.css' %}"> |
||||
{% endblock %} |
||||
{% block login %} |
||||
<header style="padding-top: 70px"> |
||||
<header style="padding-top: 70px"> |
||||
<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"> |
||||
<input type="search" class="form-control" placeholder="Search..." aria-label="Search"> |
||||
</form> |
||||
{% if not name %} |
||||
<div class="text-end"> |
||||
<a href="{% url 'App:login' %}"><button type="button" class="btn btn-light text-dark me-2">登录</button></a> |
||||
<a href="{% url 'App:register' %}"><button type="button" class="btn btn-primary">注册</button></a> |
||||
</div> |
||||
{% else %} |
||||
<div class="text-end"> |
||||
<a href="{% url 'App:logout' %}"><button type="button" class="btn btn-light text-dark me-2">退出登录</button></a> |
||||
</div> |
||||
{% endif %} |
||||
{% if not name %} |
||||
<div class="text-end"> |
||||
<a href="{% url 'App:login' %}"> |
||||
<button type="button" class="btn btn-light text-dark me-2">登录</button> |
||||
</a> |
||||
<a href="{% url 'App:register' %}"> |
||||
<button type="button" class="btn btn-primary">注册</button> |
||||
</a> |
||||
</div> |
||||
{% else %} |
||||
<div class="text-end"> |
||||
<a href="{% url 'App:logout' %}"> |
||||
<button type="button" class="btn btn-light text-dark me-2">退出登录</button> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</header> |
||||
{% endblock %} |
||||
{% block content %} |
||||
<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> |
||||
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button> |
||||
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button> |
||||
</div> |
||||
<div class="carousel-inner"> |
||||
<div class="carousel-item active"> |
||||
<img src="{% static 'images/index/index1.jpg' %}" alt="First slide"> %}" alt=""> |
||||
|
||||
<div class="container"> |
||||
<div class="carousel-caption text-start"> |
||||
<h1>NewRain 个人网盘</h1> |
||||
<p>教学资料,随堂视频,各种资料开源下载</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://www.beyourself.org.cn" target="_blank">点击访问</a></p> |
||||
</div> |
||||
<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> |
||||
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button> |
||||
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button> |
||||
</div> |
||||
</div> |
||||
<div class="carousel-item"> |
||||
<img src="{% static 'images/index/index2.jpg' %}" alt="First slide"> %}" alt=""> |
||||
<div class="carousel-inner"> |
||||
<div class="carousel-item active"> |
||||
<img src="{% static 'images/index/index1.jpg' %}" alt="First slide"> %}" alt=""> |
||||
|
||||
<div class="container"> |
||||
<div class="carousel-caption"> |
||||
<h1>NewRain 代码仓库</h1> |
||||
<p>教学代码实例,多看多敲,开卷!</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://gitee.com/newrain001" target="_blank">点击跳转</a></p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="carousel-item"> |
||||
<img src="{% static 'images/index/index3.jpg' %}" alt="First slide"> %}" alt=""> |
||||
<div class="container"> |
||||
<div class="carousel-caption text-start"> |
||||
<h1>NewRain 个人网盘</h1> |
||||
<p>教学资料,随堂视频,各种资料开源下载</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://www.beyourself.org.cn" |
||||
target="_blank">点击访问</a></p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="carousel-item"> |
||||
<img src="{% static 'images/index/index2.jpg' %}" alt="First slide"> %}" alt=""> |
||||
|
||||
<div class="container"> |
||||
<div class="carousel-caption text-end"> |
||||
<h1>面试内容整理</h1> |
||||
<p>美好生活,来源于自我努力</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://interview.beyourself.org.cn" target="_blank">点击查看</a></p> |
||||
</div> |
||||
<div class="container"> |
||||
<div class="carousel-caption"> |
||||
<h1>NewRain 代码仓库</h1> |
||||
<p>教学代码实例,多看多敲,开卷!</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://gitee.com/newrain001" |
||||
target="_blank">点击跳转</a></p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="carousel-item"> |
||||
<img src="{% static 'images/index/index3.jpg' %}" alt="First slide"> %}" alt=""> |
||||
|
||||
<div class="container"> |
||||
<div class="carousel-caption text-end"> |
||||
<h1>面试内容整理</h1> |
||||
<p>美好生活,来源于自我努力</p> |
||||
<p><a class="btn btn-lg btn-primary" href="https://interview.beyourself.org.cn" target="_blank">点击查看</a> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev"> |
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span> |
||||
<span class="visually-hidden">Previous</span> |
||||
</button> |
||||
<button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next"> |
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span> |
||||
<span class="visually-hidden">Next</span> |
||||
</button> |
||||
</div> |
||||
<button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev"> |
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span> |
||||
<span class="visually-hidden">Previous</span> |
||||
</button> |
||||
<button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next"> |
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span> |
||||
<span class="visually-hidden">Next</span> |
||||
</button> |
||||
</div> |
||||
|
||||
|
||||
<!-- Marketing messaging and featurettes |
||||
================================================== --> |
||||
<!-- Wrap the rest of the page in another container to center all the content. --> |
||||
<!-- Marketing messaging and featurettes |
||||
================================================== --> |
||||
<!-- Wrap the rest of the page in another container to center all the content. --> |
||||
|
||||
<div class="container marketing"> |
||||
<div class="container marketing"> |
||||
|
||||
<!-- Three columns of text below the carousel --> |
||||
<div class="row"> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" src="{% static 'images/tuchuang.jpg' %}" role="img" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#777"/></img> |
||||
<!-- Three columns of text below the carousel --> |
||||
<div class="row"> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" |
||||
src="{% static 'images/tuchuang.jpg' %}" role="img" aria-label="Placeholder: 140x140" |
||||
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title> |
||||
<rect width="100%" height="100%" fill="#777"/> |
||||
</img> |
||||
|
||||
<h2>便捷图床</h2> |
||||
<p>将图片上传到云端对象存储,并获取便捷的链接方式,请放心,您的图片会被永久保存,也可以随时下载,您的图片可以再<a href="{% url 'App:image' %}">我的相册</a>中查看</p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:upload' %}">点击跳转</a></p> |
||||
</div> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" src="{% static 'images/work.jpg' %}" role="img" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#777"/></img> |
||||
<h2>便捷图床</h2> |
||||
<p>将图片上传到云端对象存储,并获取便捷的链接方式,请放心,您的图片会被永久保存,也可以随时下载,您的图片可以再<a href="{% url 'App:image' %}">我的相册</a>中查看</p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:upload' %}">点击跳转</a></p> |
||||
</div> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" |
||||
src="{% static 'images/work.jpg' %}" role="img" aria-label="Placeholder: 140x140" |
||||
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title> |
||||
<rect width="100%" height="100%" fill="#777"/> |
||||
</img> |
||||
|
||||
<h2>事件处理</h2> |
||||
<p>请在规定时间内完成规定任务,此功能仅支持内部使用,任务下达会在课堂中提醒,任务完成过程中请截图保留。未完成将得到奖励、</p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:listTask' %}">点击查看</a></p> |
||||
</div><!-- /.col-lg-4 --> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" src="{% static 'images/paper.jpg' %}" role="img" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice" focusable="false"></img> |
||||
<h2>事件处理</h2> |
||||
<p>请在规定时间内完成规定任务,此功能仅支持内部使用,任务下达会在课堂中提醒,任务完成过程中请截图保留。未完成将得到奖励、</p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:listTask' %}">点击查看</a></p> |
||||
</div><!-- /.col-lg-4 --> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" |
||||
src="{% static 'images/paper.jpg' %}" role="img" aria-label="Placeholder: 140x140" |
||||
preserveAspectRatio="xMidYMid slice" focusable="false"></img> |
||||
|
||||
<h2>文章发表</h2> |
||||
<p>发表文章,如果你有好的文章,又愿意共享,请点击此处,注意:文章格式采用markdown格式编写,markdown格式编写,请自行学习。点击查看<a href="{% url 'App:paperList' %}">博文列表</a></p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:editMD' 'new' %}">立即开始</a></p> |
||||
</div><!-- /.col-lg-4 --> |
||||
</div><!-- /.row --> |
||||
<h2>文章发表</h2> |
||||
<p>发表文章,如果你有好的文章,又愿意共享,请点击此处,注意:文章格式采用markdown格式编写,markdown格式编写,请自行学习。点击查看<a |
||||
href="{% url 'App:paperList' %}">博文列表</a></p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:editMD' 'new' %}">立即开始</a></p> |
||||
</div><!-- /.col-lg-4 --> |
||||
<div class="col-lg-4"> |
||||
<img class="bd-placeholder-img rounded-circle" width="140" height="140" |
||||
src="{% static 'images/paper.jpg' %}" role="img" aria-label="Placeholder: 140x140" |
||||
preserveAspectRatio="xMidYMid slice" focusable="false"></img> |
||||
|
||||
<hr class="featurette-divider"> |
||||
{% for k,v in data.items %} |
||||
<div class="row featurette"> |
||||
<div class="col-md-7"> |
||||
<h2 class="featurette-heading"><a href="{{ k }}" target="_blank" style="text-decoration: none;">{{ v.title }}</a></h2> |
||||
<hr> |
||||
<p class="lead">{{ v.text }}</p> |
||||
</div> |
||||
<div class="col-md-5"> |
||||
<img class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" src="{{ v.image }}" role="img" aria-label="Placeholder: 500x500" preserveAspectRatio="xMidYMid slice" focusable="false"></img> |
||||
</div> |
||||
</div> |
||||
<hr> |
||||
{% endfor %} |
||||
<!-- /END THE FEATURETTES --> |
||||
<h2>视频上传</h2> |
||||
<p>随堂视频播放<a |
||||
href="{% url 'App:videoList' %}">视频库</a></p> |
||||
<p><a class="btn btn-secondary" href="{% url 'App:upload' %}?type=videos">立即上传</a></p> |
||||
</div><!-- /.col-lg-4 --> |
||||
</div><!-- /.row --> |
||||
<hr> |
||||
{% for k,v in data.items %} |
||||
<div class="row featurette"> |
||||
<div class="col-md-7"> |
||||
<h2 class="featurette-heading"><a href="{{ k }}" target="_blank" |
||||
style="text-decoration: none;">{{ v.title }}</a></h2> |
||||
<hr> |
||||
<p class="lead">{{ v.text | truncatechars:100 }}</p> |
||||
</div> |
||||
<div class="col-md-5"> |
||||
<img class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" |
||||
height="500" src="{{ v.image }}" role="img" aria-label="Placeholder: 500x500" |
||||
preserveAspectRatio="xMidYMid slice" focusable="false"></img> |
||||
</div> |
||||
</div> |
||||
<hr> |
||||
{% endfor %} |
||||
<!-- /END THE FEATURETTES --> |
||||
|
||||
</div><!-- /.container --> |
||||
</div><!-- /.container --> |
||||
{% endblock %} |
Loading…
Reference in new issue