mirror of
https://github.com/sigmasternchen/Diary
synced 2025-03-15 15:18:57 +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>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Diary – {{ diary.name }}</title>
|
<title>Diary – {{ diary.name }}</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>{{ diary.name }}:</p>
|
<div class="dot centered">
|
||||||
<form action="{{ url_for('addentry',name=diary.name) }}" method="POST">
|
<div id="mainContainer">
|
||||||
<input type="textarea" name="text" autofocus>
|
<div id="header">
|
||||||
<button type="submit">Submit</button>
|
<h1>Diary {{ diary.name }}</h1>
|
||||||
</form>
|
<div id="logout">
|
||||||
<div>
|
<a href="{{ url_for('logout') }}">Logout</a><br />
|
||||||
{% for e in entries %}
|
<a href="{{ url_for('index') }}">Diary-List</a>
|
||||||
<p>
|
</div>
|
||||||
{{ e.date }}:
|
</div>
|
||||||
<p>
|
<div id="contentContainer">
|
||||||
{{ e.text }}
|
<form action="{{ url_for('addentry',name=diary.name) }}" method="POST">
|
||||||
</p>
|
Add new entry:<br />
|
||||||
</p>
|
<textarea name="text"></textarea><br />
|
||||||
{% endfor %}
|
<input type="submit">
|
||||||
</div>
|
</form>
|
||||||
|
<div id="listing">
|
||||||
|
{% for e in entries %}
|
||||||
|
<div>
|
||||||
|
<div>{{ e.date }}</div>
|
||||||
|
<p>
|
||||||
|
{{ e.text }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,27 +1,38 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Diary</title>
|
<title>Diary</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}"/>
|
||||||
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
<script src="{{ url_for('static',filename='script.js') }}"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% if error != '' %}
|
<div class="dot centered">
|
||||||
<div style="border: red 1px solid; color: red;">{{ error }}</div>
|
<div id="mainContainer">
|
||||||
{% endif %}
|
<div id="header">
|
||||||
<p>
|
<h1>Diarys</h1>
|
||||||
<a href="{{ url_for('logout') }}">Logout</a>
|
<div id="logout">
|
||||||
<form method="post" action="{{ url_for('newdiary')}}">
|
<a href="{{ url_for('logout') }}">Logout</a>
|
||||||
New diary: <input type="text" name="name" placeholder="name of diary"><input type="submit">
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</p>
|
<div id="contentContainer">
|
||||||
<ul>
|
{% if error != '' %}
|
||||||
{% for d in diaries %}
|
<div class="error">{{ error }}</div>
|
||||||
<li>
|
{% endif %}
|
||||||
<a href="{{ url_for('diary',name=d.name) }}">{{ d.name }}</a>
|
<div id="listing">
|
||||||
</li>
|
{% for d in diaries %}
|
||||||
{% endfor %}
|
<a href="{{ url_for('diary',name=d.name) }}">
|
||||||
</ul>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue