Link to post in the footer if logged in
This commit is contained in:
parent
8003a396bf
commit
09c3294aa7
|
@ -12,14 +12,16 @@ html {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 0;
|
|
||||||
margin: 0 3%;
|
margin: 0 3%;
|
||||||
|
|
||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
|
|
||||||
height: 100%;
|
min-height: calc(100% - 40px);
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
|
|
||||||
|
/*The height of the footer at the bottom*/
|
||||||
|
padding: 0 0 40px;
|
||||||
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
font-family: Helvetica, Arial, sans-serif;
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
@ -58,7 +60,7 @@ button.show-more:hover, button.show-more:focus {
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 4px;
|
bottom: 4px;
|
||||||
border-bottom: solid 1px var(--accent-color);
|
border-bottom: inset 1px var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr.thought-end {
|
hr.thought-end {
|
||||||
|
@ -82,3 +84,13 @@ header .text {
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
background: var(--accent-color);
|
||||||
|
color: var(--background-color);
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
|
@ -22,6 +22,10 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<footer>Copyright Matthias @2020{% if authenticated %}
|
||||||
|
<a href="/post" style="color: var(--text-color); margin-left: 100px; text-decoration: none">POST</a>
|
||||||
|
{% endif %}</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const els = document.querySelectorAll(".thought");
|
const els = document.querySelectorAll(".thought");
|
||||||
for (let el of els) {
|
for (let el of els) {
|
||||||
|
|
|
@ -4,7 +4,17 @@ from .models import Thought
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
return render(request, "whispermaphone/index.html", {"thoughts": Thought.objects.order_by("-posted")})
|
authenticated = False
|
||||||
|
try:
|
||||||
|
if request.COOKIES["password"] == "ChromaticWave":
|
||||||
|
authenticated = True
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return render(request, "whispermaphone/index.html", {
|
||||||
|
"thoughts": Thought.objects.order_by("-posted"),
|
||||||
|
"authenticated": authenticated
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
def post(request):
|
def post(request):
|
||||||
|
|
Loading…
Reference in New Issue