mirror of
https://github.com/sigmasternchen/Diary
synced 2025-03-15 07:08:56 +00:00
commit
715742edfd
6 changed files with 166 additions and 39 deletions
BIN
static/gothic.ttf
Normal file
BIN
static/gothic.ttf
Normal file
Binary file not shown.
BIN
static/gothicb.ttf
Normal file
BIN
static/gothicb.ttf
Normal file
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
window.onload = function() {
|
||||
resetStyle();
|
||||
}
|
||||
|
||||
window.onresize = function() {
|
||||
resetStyle();
|
||||
}
|
||||
|
||||
var resetStyle = function() {
|
||||
document.getElementById("mainContainer").style.minHeight = window.innerHeight + "px";
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
@font-face {
|
||||
font-family: gothic;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src:url('gothic.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: gothic;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src:url('gothicb.ttf') format('truetype');
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #0DF4FF;
|
||||
}
|
||||
|
||||
* {
|
||||
color: #000;
|
||||
font-family: gothic;
|
||||
}
|
||||
a, a:active, a:visited {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.centered {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#mainContainer {
|
||||
width: 900px;
|
||||
position: absolute;
|
||||
left: -450px;
|
||||
top: 0px;
|
||||
background-color: #00FF9F;
|
||||
}
|
||||
|
||||
#contentContainer {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#header h1 {
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#header #logout {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#listing {
|
||||
background-color: #0CE838;
|
||||
width: 100%;
|
||||
padding: 1px 0px;
|
||||
}
|
||||
|
||||
#listing div {
|
||||
margin: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
background-color: #C3F500;
|
||||
}
|
||||
|
||||
#listing div.link:hover {
|
||||
color: #222;
|
||||
background-color: #0CE838;
|
||||
}
|
||||
|
||||
#listing div div {
|
||||
font-size: 11px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.error {
|
||||
padding: 5px;
|
||||
color: red;
|
||||
border: red 1px solid;
|
||||
}
|
|
@ -1,26 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Diary – {{ diary.name }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>Diary – {{ diary.name }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>{{ diary.name }}:</p>
|
||||
<form action="{{ url_for('addentry',name=diary.name) }}" method="POST">
|
||||
<input type="textarea" name="text" autofocus>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
<div>
|
||||
{% for e in entries %}
|
||||
<p>
|
||||
{{ e.date }}:
|
||||
<p>
|
||||
{{ e.text }}
|
||||
</p>
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="dot centered">
|
||||
<div id="mainContainer">
|
||||
<div id="header">
|
||||
<h1>Diary {{ diary.name }}</h1>
|
||||
<div id="logout">
|
||||
<a href="{{ url_for('logout') }}">Logout</a><br />
|
||||
<a href="{{ url_for('index') }}">Diary-List</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentContainer">
|
||||
<form action="{{ url_for('addentry',name=diary.name) }}" method="POST">
|
||||
Add new entry:<br />
|
||||
<textarea name="text"></textarea><br />
|
||||
<input type="submit">
|
||||
</form>
|
||||
<div id="listing">
|
||||
{% for e in entries %}
|
||||
<div>
|
||||
<div>{{ e.date }}</div>
|
||||
<p>
|
||||
{{ e.text }}
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,27 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Diary</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>Diary</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
{% if error != '' %}
|
||||
<div style="border: red 1px solid; color: red;">{{ error }}</div>
|
||||
{% endif %}
|
||||
<p>
|
||||
<a href="{{ url_for('logout') }}">Logout</a>
|
||||
<form method="post" action="{{ url_for('newdiary')}}">
|
||||
New diary: <input type="text" name="name" placeholder="name of diary"><input type="submit">
|
||||
</form>
|
||||
</p>
|
||||
<ul>
|
||||
{% for d in diaries %}
|
||||
<li>
|
||||
<a href="{{ url_for('diary',name=d.name) }}">{{ d.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="dot centered">
|
||||
<div id="mainContainer">
|
||||
<div id="header">
|
||||
<h1>Diarys</h1>
|
||||
<div id="logout">
|
||||
<a href="{{ url_for('logout') }}">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentContainer">
|
||||
{% if error != '' %}
|
||||
<div class="error">{{ error }}</div>
|
||||
{% endif %}
|
||||
<div id="listing">
|
||||
{% for d in diaries %}
|
||||
<a href="{{ url_for('diary',name=d.name) }}">
|
||||
<div class="link">
|
||||
{{ d.name }}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<form method="post" action="{{ url_for('newdiary')}}">
|
||||
You can add a new diary, if you want: <input type="text" name="name" placeholder="name of diary"><input type="submit">
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue