2.0,0初始版本
This commit is contained in:
1 parent
cdecded2a6
commit
538329fc1e
18 files changed
+263
-69
No files matched your search
@@ -146,6 +146,9 @@ def commands():
|
||||
@app.route('/python')
|
||||
def python():
|
||||
return render_template('python.html')
|
||||
@app.route('/python2')
|
||||
def python2():
|
||||
return render_template('python2.html')
|
||||
@app.route('/video')
|
||||
def video():
|
||||
return render_template('video.html')
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 MiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
@@ -0,0 +1,21 @@
|
||||
let currentIndex = 0;
|
||||
|
||||
function changeSlide(direction) {
|
||||
const images = document.querySelector('.carousel-images');
|
||||
const totalImages = images.querySelectorAll('img').length;
|
||||
currentIndex += direction;
|
||||
|
||||
if (currentIndex < 0) {
|
||||
currentIndex = totalImages - 1;
|
||||
} else if (currentIndex >= totalImages) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
|
||||
const translateX = -currentIndex * 100;
|
||||
images.style.transform = `translateX(${translateX}%)`;
|
||||
}
|
||||
|
||||
// 自动轮播
|
||||
setInterval(() => {
|
||||
changeSlide(1);
|
||||
}, 3000);
|
||||
+120
-17
@@ -1,6 +1,12 @@
|
||||
@font-face {
|
||||
font-family: 'CustomFont';
|
||||
src: url('static/fonts/ZQKfreefont.ttf') format('ZQKfreefont');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* 导航栏以及body样式 */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-family: 'CustomFont',Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
@@ -11,12 +17,18 @@ header {
|
||||
color: white;
|
||||
padding: 10px 0;
|
||||
text-align: right;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 1000; /* 确保导航栏在最上层 */
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
header nav ul li {
|
||||
@@ -28,19 +40,25 @@ header nav ul li a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* header nav ul li:first-child{
|
||||
float: left;
|
||||
font-size: x-large;
|
||||
} */
|
||||
|
||||
|
||||
main {
|
||||
padding: 20px;
|
||||
header nav ul li.logo {
|
||||
margin-right: auto; /* 将图标推到左边 */
|
||||
}
|
||||
|
||||
header nav ul li.logo img {
|
||||
height: 40px; /* 根据需要调整图标的高度 */
|
||||
}
|
||||
main {
|
||||
padding: 80px 20px 20px; /* 调整padding以确保内容不被固定导航栏遮挡 */
|
||||
}
|
||||
|
||||
|
||||
form {
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
form label {
|
||||
@@ -50,25 +68,28 @@ form label {
|
||||
|
||||
form input {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
padding: 10px;
|
||||
margin-top: 5px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
button.sign {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
button.sign:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
#content-list {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.content-item {
|
||||
@@ -82,6 +103,12 @@ button:hover {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
top: 0;
|
||||
}
|
||||
.content-item p {
|
||||
margin: 0;
|
||||
flex-grow: 1;
|
||||
white-space: pre-wrap; /* 保留换行和空白 */
|
||||
}
|
||||
|
||||
/* Footer 样式 */
|
||||
@@ -109,6 +136,7 @@ button:hover {
|
||||
}
|
||||
/* Dashboard 样式 */
|
||||
.dashboard {
|
||||
|
||||
max-width: 150%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
@@ -121,9 +149,12 @@ button:hover {
|
||||
text-align: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#content{
|
||||
height: auto;
|
||||
width: 300px;
|
||||
}
|
||||
.form-box {
|
||||
width: 1800px;
|
||||
width: 600px;
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
@@ -255,6 +286,10 @@ button:hover {
|
||||
.container {
|
||||
display: flex;
|
||||
}
|
||||
.container h1{
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
@@ -280,3 +315,71 @@ button:hover {
|
||||
text-align: left;
|
||||
margin-bottom: 10px; /* 增加底部间距 */
|
||||
}
|
||||
|
||||
/* 视频播放器样式 */
|
||||
video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.controls button {
|
||||
margin: 0 5px;
|
||||
padding: 10px 20px;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.controls button:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.controls input[type="range"] {
|
||||
margin: 0 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* 图片轮播样式 */
|
||||
.picturecontainer{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-content {
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
max-width: 400px;
|
||||
margin-left: 150px; /* 新添加的间距 */
|
||||
/* background-color: #ddd; */
|
||||
|
||||
}
|
||||
.text-content p{
|
||||
font-size: xx-large;
|
||||
}
|
||||
.carousel {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
max-width: 600px;
|
||||
overflow: hidden;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 10px;
|
||||
background-color: #fff;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.carousel-images {
|
||||
display: flex;
|
||||
transition: transform 0.5s ease;
|
||||
}
|
||||
|
||||
.carousel-images img {
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
+19
-8
@@ -5,17 +5,28 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='icon.png') }}"> <!--添加图标-->
|
||||
<title>about us</title>
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul><li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('index') }}">return Homepage</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1>ABOUT US</h1>
|
||||
<p>
|
||||
@author yilv<br>
|
||||
this website is based on flask
|
||||
</p>
|
||||
<footer><a href="{{ url_for('index')}}">return Homepage</a></footer>
|
||||
<h1>about author</h1>
|
||||
<p>壹缕不会修图</p>
|
||||
<h1>about scuec</h1>
|
||||
<p>中南民族大学是直属于国家民族事务委员会的综合性普通高等学校,国家民族事务委员会、
|
||||
教育部、湖北省、武汉市共建高校,坐落于白云黄鹤的故乡——武汉南湖之滨。学校创建于1951年,
|
||||
是新中国成立后最早建立的民族高校之一。建校以来,学校始终坚持社会主义办学方向,贯彻落实党的教育方针和民族政策,
|
||||
以铸牢中华民族共同体意识为主线,以立德树人为根本任务,各项事业获得了快速发展。学校占地1550余亩,校舍面积110万余平米。
|
||||
校园内绿树成荫、花香四季,具有浓郁民族特色的现代建筑鳞次栉比,湖光山色与人文景观交相辉映,构成了教学、
|
||||
科研和生活的优美环境。</p>
|
||||
<img src="{{ url_for('static', filename='sceuc.jpg') }}" alt="">
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,6 +12,7 @@
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('index') }}">HOMEpage</a></li>
|
||||
<li><a href="{{ url_for('user') }}">user-profile</a></li>
|
||||
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
|
||||
@@ -19,8 +20,8 @@
|
||||
</nav>
|
||||
</header>
|
||||
<main class="dashboard">
|
||||
<h1>Dashboard</h1>
|
||||
<form action="/publish" method="post" class="form-box">
|
||||
<h1 style="margin-top: 50px;">Dashboard</h1>
|
||||
<label for="content">Content:</label>
|
||||
<textarea id="content" name="content" required></textarea><br>
|
||||
<button type="submit">Publish</button>
|
||||
|
||||
+19
-1
@@ -12,6 +12,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<!-- <li>yilv blog</li> -->
|
||||
<li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('signin') }}">Sign In</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Sign Up</a></li>
|
||||
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
|
||||
@@ -23,6 +24,7 @@
|
||||
</header>
|
||||
<main>
|
||||
<div class="container">
|
||||
|
||||
<div class="sidebar">
|
||||
<h2 style="text-align: center;">实用工具及教程</h2>
|
||||
<ul>
|
||||
@@ -33,9 +35,25 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content-list">
|
||||
<h1 style="text-align: center;"><u><i>Latest picture</i></u></h1>
|
||||
<div class="picturecontainer">
|
||||
<div class="carousel">
|
||||
<div class="carousel-images">
|
||||
|
||||
<img src="{{ url_for('static', filename='sceuc.jpg') }}" alt="Image 1">
|
||||
<img src="{{ url_for('static', filename='1.jpg') }}" alt="Image 2">
|
||||
<img src="{{ url_for('static', filename='2.jpg') }}" alt="Image 3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-content">
|
||||
<p><strong>Hello Everyone<br>Welcome to my Website</strong></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h1 style="text-align: center;"><u><i>blog</i></u></h1>
|
||||
{% for post in posts %}
|
||||
<div class="content-item">
|
||||
<strong>{{ post.username }} </strong>
|
||||
<strong>{{ post.username }} </strong>
|
||||
<p>{{ post.content }}</p>
|
||||
<small>Posted on: {{ post.created_at }}</small>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<!-- <li>yilv blog</li> -->
|
||||
<li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('index') }}">HOMEpage</a></li>
|
||||
<li><a href="{{ url_for('signin') }}">Sign In</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Sign Up</a></li>
|
||||
@@ -28,8 +29,8 @@
|
||||
<div class="sidebar">
|
||||
<h2 style="text-align: center;">python教程</h2>
|
||||
<ul>
|
||||
<li><a href="#">python环境搭建</a></li>
|
||||
<li><a href="#">python基本语法</a></li>
|
||||
<li><a href="{{ url_for('python') }}">python环境搭建</a></li>
|
||||
<li><a href="{{ url_for('python2') }}">python基本语法</a></li>
|
||||
<li><a href="#">第一个python程序</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
<div id="content-list">
|
||||
<div class="content-item">
|
||||
<div>
|
||||
<h2>python环境搭建</h2>
|
||||
<ul>
|
||||
<li><h3>要在你的系统上搭建Python环境,你可以按照以下步骤操作。不同操作系统(Windows、macOS和Linux)可能略有不同。</h3></li>
|
||||
<li><strong><i>1.安装Python</i></strong></li>
|
||||
@@ -47,14 +49,14 @@
|
||||
按照提示完成安装。<br></li>
|
||||
<li>(2)linux环境<br>
|
||||
大多数Linux发行版自带Python,但你可以通过包管理器安装最新版本。</li>
|
||||
<li>ubuntu/debian:<br>
|
||||
<li class="">ubuntu/debian:<br>
|
||||
sudo apt update
|
||||
sudo apt install python3 python3-pip
|
||||
</li>
|
||||
<li>fedora:<br>
|
||||
sudo dnf install python3 python3-pip
|
||||
</li>
|
||||
<li>2.验证安装<br>
|
||||
<li><strong><i>2.验证安装</i></strong><br>
|
||||
python -V或者python3 -V</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='python_css.css') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='icon.png') }}"> <!--添加图标-->
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<!-- <li>yilv blog</li> -->
|
||||
<li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('index') }}">HOMEpage</a></li>
|
||||
<li><a href="{{ url_for('signin') }}">Sign In</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Sign Up</a></li>
|
||||
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
|
||||
{% if 'user' in session %}
|
||||
<li><a href="{{ url_for('user') }}">User Profile</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="sidebar">
|
||||
<h2 style="text-align: center;">python教程</h2>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('python') }}">python环境搭建</a></li>
|
||||
<li><a href="#">python基本语法</a></li>
|
||||
<li><a href="#">第一个python程序</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- 这里添加内容-->
|
||||
<div id="content-list">
|
||||
<div class="content-item">
|
||||
<div>
|
||||
<h2>python基本语法</h2>
|
||||
<ul>
|
||||
<li>本章我们来讲解python的基本语法</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="footer-container">
|
||||
<div class="footer-item"><a href="{{url_for('aboutus')}}"><strong>About Us</strong></a></div>
|
||||
<div class="footer-item"><a href="https://flask.palletsprojects.com"><strong>About Flask</strong></a></div>
|
||||
<div class="footer-item"><a href="http://www.scuec.edu.cn"><strong>About SCEUC</strong></a></div>
|
||||
</div>
|
||||
</footer>
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,7 @@
|
||||
<label for="captcha">Captcha:</label>
|
||||
<input type="text" id="captcha" name="captcha" required>
|
||||
<img id="captcha-image" src="{{ url_for('captcha') }}" alt="Captcha"><br>
|
||||
<button type="submit">Sign In</button>
|
||||
<button type="submit" class="sign">Sign In</button>
|
||||
</form>
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='validate.js') }}"></script>
|
||||
|
||||
@@ -23,11 +23,8 @@
|
||||
<label for="captcha">captcha:</label>
|
||||
<input type="text" id="captcha" name="captcha" required>
|
||||
<img id="captcha-image" src="{{ url_for('captcha') }}" alt="Captcha"><br>
|
||||
<button type="submit">sign up</button>
|
||||
<button type="submit" class="sign">sign up</button>
|
||||
</form>
|
||||
<!-- <footer>
|
||||
<a href="{{ url_for('') }}">index</a>
|
||||
</footer> -->
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='validate.js') }}"></script>
|
||||
</body>
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('signin') }}">Sign In</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Sign Up</a></li>
|
||||
<li class="logo"><a href="{{ url_for('index') }}"><img src="{{ url_for('static', filename='icon.png') }}" alt="Logo"></a></li>
|
||||
<li><a href="{{ url_for('index') }}">homepage</a></li>
|
||||
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
|
||||
{% if 'user' in session %}
|
||||
<li><a href="{{ url_for('user') }}">User Profile</a></li>
|
||||
|
||||
+7
-31
@@ -3,60 +3,36 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Simple Video Player</title>
|
||||
<title>科普视频</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
#videoPlayer {
|
||||
width: 600px;
|
||||
height: 400px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.controls {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('index') }}">homepage</a></li>
|
||||
<li><a href="{{ url_for('signin') }}">Sign In</a></li>
|
||||
<li><a href="{{ url_for('signup') }}">Sign Up</a></li>
|
||||
<li><a href="{{ url_for('dashboard') }}">Dashboard</a></li>
|
||||
{% if 'user' in session %}
|
||||
<li><a href="{{ url_for('user') }}">User Profile</a></li>
|
||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="sidebar">
|
||||
<h2 style="text-align: center;">实用工具及教程</h2>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('python') }}">python教程</a></li>
|
||||
<li><a href="#">css实用工具</a></li>
|
||||
<li><a href="#">文档在线工具</a></li>
|
||||
<li><a href="{{ url_for('video') }}">科普视频</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1>Simple Video Player</h1>
|
||||
<h1>科普视频</h1>
|
||||
<video id="videoPlayer" controls>
|
||||
<source src="{{ url_for('static', filename='1.mp4') }}" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
<div class="controls">
|
||||
<button title="Play video" onclick="playVideo()">Play</button>
|
||||
<button title="Pause video" onclick="pauseVideo()">Pause</button>
|
||||
<input type="range" id="volumeControl" min="0" max="1" step="0.1" value="1" title="Set volume" placeholder="Volume" onchange="setVolume(this.value)">
|
||||
<button title="Play video" onclick="playVideo()">播放</button>
|
||||
<button title="Pause video" onclick="pauseVideo()">暂停</button>
|
||||
<!-- <input type="range" id="volumeControl" min="0" max="1" step="0.1" value="1" title="Set volume" placeholder="Volume" onchange="setVolume(this.value)"> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user