update layout of startpage, add social links

This commit is contained in:
2020-10-16 02:08:01 +00:00
parent 5ce37018fc
commit b9c1517be5
3 changed files with 64 additions and 33 deletions

View File

@@ -34,12 +34,12 @@ def index(request):
featured_meeting = FetMeeting.objects.get_meetings()
context = {
'posts': posts,
'posts': deque(list(posts)[:5]),
'events': Event.all_events.get_five_events(),
'featured_post': featured_post,
'featured_event': featured_event,
'featured_meeting': featured_meeting,
'tags_list': ", ".join(t)
'tags_list': " ".join(t)
}
return render(request, 'home.html', context)

View File

@@ -4,8 +4,7 @@
{% block content %}
<div class="grid-x">
<div class="grid-x small-padding-left-1">
<div class="medium-8 small cell" style="background: grey">
{% with post=featured_post %}
<a href="{{ post.url }}">
@@ -15,7 +14,6 @@
<div class="article-date">
<p>{{ post.public_date }}</p>
</div>
<div class="article-title">
<h1>{{ post.title|safe }}</h1>
<p>{{ post.subtitle|default_if_none:"&nbsp;"|safe }}</p>
@@ -26,9 +24,13 @@
{% endwith %}
</div>
<div class="medium-4 responsive-side-box cell">
<a href="{% url 'posts.index' %}"><h1>Neuigkeiten</h1></a>
<div class="cell medium-4 responsive-side-box">
<div class="article-row-section">
<div class="article-row-section-inner">
<h1 class="article-row-section-header"><a href="{% url 'posts.index' %}">Neuigkeiten</a></h1>
{% with post=featured_event %}
{% include 'posts/partials/_article_row.html' %}
{% endwith %}
@@ -38,26 +40,31 @@
</div>
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-padding-x padding-top-1">
<div class="grid-x grid-padding-x padding-top-1 padding-left-1 padding-right-1">
{{ tags_list|tags_to_url }}
</div>
<div class="grid-x grid-x-padding">
<div class="medium-8 small-12 small-order-2 medium-order-1"">
<div class="large-8 medium-7 small-12 small-order-2 medium-order-1">
{% for post in posts %}
{% include 'posts/partials/_posts_hero.html' %}
{% endfor %}
</div>
<div class="medium-4 small-12 small-order-1 medium-order-2 padding-1">
<div class="large-4 medium-5 small-12 small-order-1 medium-order-1 padding-top-1 large-padding-left-1 medium-padding-left-1">
{% for post in events %}
{% include 'posts/partials/_date_box.html' %}
{% endfor %}
<iframe src="https://discordapp.com/widget?id=691755025697079347&theme=dark" style="width: 100%;" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
</div>
</div>
</div>
<a class="button" href="{% url 'posts.index' %}" style="background: gray">Mehr anzeigen</a>
</div>
{% endblock %}

View File

@@ -8,9 +8,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FET</title>
<link rel="stylesheet" href="{% static 'app.css' %}">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
</head>
<body style="min-height:100%; position:relative">
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v8.0" nonce="WSEL84CK"></script>
<div class="header-title-bar" data-responsive-toggle="example-menu" data-hide-for="large">
<div class="title-bar" style="background: None">
@@ -39,11 +42,11 @@
<div class="top-bar-right">
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-animate-heigt="true">
{% if request.user.is_authenticated %}
Hallo {{request.user.username}}
<li class=""><a role="menuitem" style="color: black">Hallo {{request.user.username}}</a></li>
<li class=""><a href="/admin">Admin</a></li>
<li class=""><a href="{%url 'tasks'%}">Tasks</a></li>
{% endif %}
<li class=""><a href="{%url 'home'%}">Aktuelles</a></li>
<li class=""><a href="{% url 'posts.index' %}">Aktuelles</a></li>
<li class=""><a href="/fotos">Fotos</a></li>
<li class=""><a href="/blackboard">Blackboard</a></li>
<li class=""><a href="{%url 'members'%}">Mitarbeiter</a></li>
@@ -60,16 +63,37 @@
{% block content %}
{% endblock %}
<div class="grid-y footer" style="height:8em; bottom:-8em; position: absolute; right:0; left:0">
<div class="grid-x medium-padding-1 large-padding-left-2">
<div class="cell">
<ul class="no-bullet">
<div class="footer">
<li><a href="{% url 'posts.show' 'impressum'%}">Impressum</a></li>
<div class="grid-x medium-padding-1 padding-top-1 padding-left-1 padding-bottom-1 padding-right-1">
<div class="cell medium-6 large-9">
<div class="grid-y" style="height: 150px;">
<div class="cell small-6 medium-6 large-6">
<a href="{% url 'posts.show' 'impressum'%}">Impressum</a>
</div>
<div class="cell small-6 medium-6 large-6">
<a class="button" href="https://www.facebook.com/FachschaftET"><i class="fa fa-facebook" style="font-size:24px"></i></a>
<a class="button" href="https://www.instagram.com/fet_tuwien/"><i class="fa fa-instagram" style="font-size:24px"></i></a>
<a class="button" href="https://t.me/FETInfo"><i class="fa fa-telegram" style="font-size:24px"></i></a>
</div>
</div>
</div>
<div class="cell medium-6 large-3">
<div class="fb-page"
data-href="https://www.facebook.com/FachschaftET"
data-width="500"
data-height="150"
data-hide-cover="false"
data-show-facepile="false"></div>
</div>
</div>
</div>
<!-- App.js -->
<script src="{%static 'app.js' %}"></script>
</body>