Files
website_design/templates/index.html
T
2024-07-03 22:18:56 +08:00

75 lines
3.3 KiB
HTML

<!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='style.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('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;">实用工具及教程</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 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 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<p>{{ post.content }}</p>
<small>Posted on: {{ post.created_at }}</small>
</div>
{% endfor %}
</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='script.js') }}"></script>
</body>
</html>