update layout of startpage, add social links
This commit is contained in:
@@ -34,12 +34,12 @@ def index(request):
|
|||||||
featured_meeting = FetMeeting.objects.get_meetings()
|
featured_meeting = FetMeeting.objects.get_meetings()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'posts': posts,
|
'posts': deque(list(posts)[:5]),
|
||||||
'events': Event.all_events.get_five_events(),
|
'events': Event.all_events.get_five_events(),
|
||||||
'featured_post': featured_post,
|
'featured_post': featured_post,
|
||||||
'featured_event': featured_event,
|
'featured_event': featured_event,
|
||||||
'featured_meeting': featured_meeting,
|
'featured_meeting': featured_meeting,
|
||||||
'tags_list': ", ".join(t)
|
'tags_list': " ".join(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, 'home.html', context)
|
return render(request, 'home.html', context)
|
||||||
|
|||||||
@@ -4,60 +4,67 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
<div class="grid-x">
|
<div class="grid-x small-padding-left-1">
|
||||||
|
|
||||||
<div class="medium-8 small cell" style="background: grey">
|
<div class="medium-8 small cell" style="background: grey">
|
||||||
{% with post=featured_post %}
|
{% with post=featured_post %}
|
||||||
<a href="{{ post.url }}">
|
<a href="{{ post.url }}">
|
||||||
<div class="news-hero-large"style="background-image: url('{{ post.imageurl }}');)">
|
<div class="news-hero-large"style="background-image: url('{{ post.imageurl }}');)">
|
||||||
<div class="news-hero-text" >
|
<div class="news-hero-text">
|
||||||
<hr>
|
<hr>
|
||||||
<div class="article-date">
|
<div class="article-date">
|
||||||
<p>{{ post.public_date }}</p>
|
<p>{{ post.public_date }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="article-title">
|
||||||
<div class="article-title">
|
<h1>{{ post.title|safe }}</h1>
|
||||||
<h1>{{ post.title|safe }}</h1>
|
<p>{{ post.subtitle|default_if_none:" "|safe }}</p>
|
||||||
<p>{{ post.subtitle|default_if_none:" "|safe }}</p>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="medium-4 responsive-side-box cell">
|
<div class="cell medium-4 responsive-side-box">
|
||||||
<a href="{% url 'posts.index' %}"><h1>Neuigkeiten</h1></a>
|
|
||||||
<div class="article-row-section">
|
<div class="article-row-section">
|
||||||
{% with post=featured_event %}
|
<div class="article-row-section-inner">
|
||||||
{% include 'posts/partials/_article_row.html' %}
|
|
||||||
{% endwith %}
|
<h1 class="article-row-section-header"><a href="{% url 'posts.index' %}">Neuigkeiten</a></h1>
|
||||||
{% for post in featured_meeting %}
|
|
||||||
{% include 'posts/partials/_meeting_row.html' %}
|
{% with post=featured_event %}
|
||||||
{% endfor %}
|
{% include 'posts/partials/_article_row.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% for post in featured_meeting %}
|
||||||
|
{% include 'posts/partials/_meeting_row.html' %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-container">
|
<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 }}
|
{{ tags_list|tags_to_url }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-x-padding">
|
<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 %}
|
{% for post in posts %}
|
||||||
{% include 'posts/partials/_posts_hero.html' %}
|
{% include 'posts/partials/_posts_hero.html' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</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 %}
|
{% for post in events %}
|
||||||
{% include 'posts/partials/_date_box.html' %}
|
{% include 'posts/partials/_date_box.html' %}
|
||||||
{% endfor %}
|
{% 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>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
<a class="button" href="{% url 'posts.index' %}" style="background: gray">Mehr anzeigen</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -8,9 +8,12 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>FET</title>
|
<title>FET</title>
|
||||||
<link rel="stylesheet" href="{% static 'app.css' %}">
|
<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>
|
</head>
|
||||||
<body style="min-height:100%; position:relative">
|
<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="header-title-bar" data-responsive-toggle="example-menu" data-hide-for="large">
|
||||||
<div class="title-bar" style="background: None">
|
<div class="title-bar" style="background: None">
|
||||||
@@ -39,11 +42,11 @@
|
|||||||
<div class="top-bar-right">
|
<div class="top-bar-right">
|
||||||
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-animate-heigt="true">
|
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-animate-heigt="true">
|
||||||
{% if request.user.is_authenticated %}
|
{% 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="/admin">Admin</a></li>
|
||||||
<li class=""><a href="{%url 'tasks'%}">Tasks</a></li>
|
<li class=""><a href="{%url 'tasks'%}">Tasks</a></li>
|
||||||
{% endif %}
|
{% 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="/fotos">Fotos</a></li>
|
||||||
<li class=""><a href="/blackboard">Blackboard</a></li>
|
<li class=""><a href="/blackboard">Blackboard</a></li>
|
||||||
<li class=""><a href="{%url 'members'%}">Mitarbeiter</a></li>
|
<li class=""><a href="{%url 'members'%}">Mitarbeiter</a></li>
|
||||||
@@ -60,16 +63,37 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<div class="grid-y footer" style="height:8em; bottom:-8em; position: absolute; right:0; left:0">
|
<div class="footer">
|
||||||
<div class="grid-x medium-padding-1 large-padding-left-2">
|
|
||||||
<div class="cell">
|
|
||||||
<ul class="no-bullet">
|
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- App.js -->
|
<!-- App.js -->
|
||||||
<script src="{%static 'app.js' %}"></script>
|
<script src="{%static 'app.js' %}"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user