55 lines
No EOL
2.4 KiB
HTML
55 lines
No EOL
2.4 KiB
HTML
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ title }}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
|
</head>
|
|
<body>
|
|
<div class="navbar">
|
|
{% if session.username != Anonymous %}
|
|
<a>logged in as: <span style="color: yellow;">{{ session.username }}</span></a>
|
|
{% endif %}
|
|
<a href="{{ url_for('index') }}">home</a>
|
|
<a href="{{ url_for('login') }}">login</a>
|
|
<a href="{{ url_for('logout') }}">logout</a>
|
|
{% if admin %}
|
|
<a href="{{ url_for('admin') }}">admin</a>
|
|
{% endif %}
|
|
<a href="{{ url_for('board', board_name='b') }}">/b/</a>
|
|
<a href="{{ url_for('board', board_name='g') }}">/g/</a>
|
|
<a href="{{ url_for('board', board_name='a') }}">/a/</a>
|
|
<a href="{{ url_for('board', board_name='v') }}">/v/</a>
|
|
<a href="{{ url_for('board', board_name='w') }}">/w/</a>
|
|
<a href="{{ url_for('board', board_name='x') }}">/x/</a>
|
|
<a href="{{ url_for('board', board_name='t') }}">/t/</a>
|
|
<a href="{{ url_for('board', board_name='s') }}">/s/</a>
|
|
<a href="{{ url_for('board', board_name='pol') }}">/pol/</a>
|
|
</div>
|
|
{% block content %}
|
|
<div class="link-container">
|
|
<h1>{{ header }}</h1>
|
|
<div class="post_form">
|
|
<form action="{{ url_for('post') }}" method="post" enctype="multipart/form-data">
|
|
<textarea class="post_input" name="content" rows="4" cols="50" placeholder="write your post here..." required></textarea>
|
|
<input class="post_file_input" name="image" type="file">
|
|
<button class="post_submit" type="submit">post!</button>
|
|
<input type="hidden" name="board_name" value="{{ title }}">
|
|
</form>
|
|
</div>
|
|
<div class="posts">
|
|
{% for post in posts %}
|
|
<div class="post">
|
|
<p class="post_header">{{ post.username }} {{ post.timestamp }} <span style="color: violet;">{{ post._id }}</span></p>
|
|
{% if post.image %}
|
|
<img src="{{ url_for('image', post_id=post._id) }}" alt="Post Image">
|
|
{% endif %}
|
|
<p class="post_content">{{ post.content }}</p>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
</body>
|
|
</html> |