53 lines
2.2 KiB
HTML
53 lines
2.2 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') }}">
|
|
<title>User Profile</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') }}">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>
|
|
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
<main class="user-profile">
|
|
<h1>User Profile</h1>
|
|
<div class="user-info">
|
|
<p><strong>Username:</strong> {{ user_info.username }}</p>
|
|
<p><strong>Age:</strong> {{ user_info.age }}</p>
|
|
<p><strong>Registered At:</strong> {{ user_info.created_at }}</p>
|
|
</div>
|
|
<div class="user-posts">
|
|
<h2>Posts</h2>
|
|
{% for post in user_posts %}
|
|
<div class="content-item">
|
|
<p>{{ post.content }}</p>
|
|
<small>Posted on: {{ post.created_at }}</small>
|
|
<form action="{{ url_for('delete_post', post_id=post.id) }}" method="post" class="delete-form">
|
|
<button type="submit" class="delete-button">Delete</button>
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<a href="{{ url_for('logout') }}" class="logout-button">Logout</a>
|
|
<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>
|
|
</body>
|
|
</html>
|