First Templates added

This commit is contained in:
2020-06-17 08:50:59 +00:00
parent ab86c556f0
commit 78124a42ac
4 changed files with 198 additions and 0 deletions

100
fet2020/templates/home.html Normal file
View File

@@ -0,0 +1,100 @@
{% extends 'layout.html' %}
{% load post_helpers %}
{% load static %}
{% block content %}
<div class="grid-x">
<div class="medium-8 small cell" style="background: grey">
{% with post=featured_post %}
<a href="{{post.url}}">
<div class="news-hero-large"style="background-image: url('{{post.imageurl}}');)">
<div class="news-hero-text" >
<hr>
<div class="article-date">
<p>Published on Jan 12, 2020 Just added now</p>
</div>
<div class="article-title">
<h1>{{post.title| safe}}</h1>
<p>{{post.subtitle | safe}}</p>
</div>
</div>
</div>
</a>
{% endwith %}
</div>
<div class="medium-4 responsive-side-box cell">
<a href="{% url 'posts.index' %}"><h1>Neuigkeiten</h1>
</a>
<div class="article-row-section">
{% with post=featured_post %}
<a href="{{post.url}}">
<article class="article-row">
<div class="article-row-content">
<h1 class="article-row-content-header">{{post.title}}</h1>
<p class="article-row-content-description">{{post.subtitle}}</p>
<p class="article-row-content-author">{{post.author}}</p>
<time class="article-row-content-time" datetime="2008-02-14 20:00">{{post.public_date}}</time>
</div>
</article>
</a>
{% endwith %}
<a href="#">
<article class="article-row">
<div class="article-row-content">
<h1 class="article-row-content-header">Nächste Fachschaftssitzung</h1>
<p class="article-row-content-description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore accusamus sint quas, odit, enim architecto officiis culpa!</p>
<p class="article-row-content-author">By Yeti</p>
<time class="article-row-content-time" datetime="2008-02-14 20:00">July 14th 2021</time>
</div>
</article>
</a>
</div>
</div>
</div>
<div class="grid-container">
<div class="grid-x grid-padding-x padding-top-1">
{{ tags_list|tags_to_url }}
</div>
<div class="grid-x grid-x-padding">
<div class="medium-8 cell">
{% for post in posts %}
{% include 'posts/_posts_hero.html' %}
{% endfor %}
</div>
<div class="medium-4 cell">
<div class="date-box">
<span class="date-badge badge primary" style="">
<span class="date-badge-day">16</span>
<span class="date-badge-month">Apr</span>
</span>
<span class="date-text"><strong>Title</strong></span>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,38 @@
{% load static %}
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FET DjangoLayout</title>
<link rel="stylesheet" href="{% static 'app.css' %}">
{% csrf_token %}
{% block header %}
{% endblock %}
</head>
<body>
<div class="top-bar" id="main-menu">
<div class="top-bar-left"><a href="{% url 'home' %}">
<img style="height:40px; width:40px" src="/assets/img/logo2014_64.png"/></a>
</div>
<div class="top-bar-right">
<ul class="menu vertical medium-horizontal expanded medium-text-center">
<li class=""><a href="{%url 'home'%}">Aktuelles</a> </li>
<li class=""><a href="{%url 'members.index'%}">Mitarbeiter</a>
</li>
</ul>
</div>
</div>
{% block content %}
{% endblock %}
<!-- App.js -->
<script src="{%static 'app.js' %}"></script>
</body>
</html>

View File

@@ -0,0 +1,16 @@
{% extends 'layout.html' %}
{% load post_helpers %}
{% block content %}
<div class="grid-container">
<div class="grid-x">
<div class="medium-8 cell">
{% for post in posts %}
{% include 'posts/_posts_hero.html' %}
{% endfor %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "layout.html" %}
{% load post_helpers %}
{% block content %}
<div class="large-article-header" style="background-image:url('{{post.imageurl}}')">
<div class="large-article-header-content">
<div class="center-container">
<div class="article-date">
<p>{{post.public_date}}</p>
</div>
<div class="article-title">
<h1>{{post.title | tags_to_url }}</h1>
</div>
<div class="article-details">
{{post.subtitle | tags_to_url }}
<div class="article-author">
<img src="https://unsplash.it/50/50?image=1005" alt="" />
<a href="#">Jane Austen</a>
</div>
<div class="article-comments">
<a href="#"><i class="fa fa-comment" aria-hidden="true"></i> 3 Comments</a>
</div>
</div>
</div>
</div></div>
<div class="grid-container">
<h1>{{post.title | tags_to_url }}</h1><br>
<a href="{% url 'posts.show' next %}">Nächster Artikel</a>
{{post.event_start}}
{{post.event_end}}
<strong>{{post.subtitle | tags_to_url }}</strong>
<hr>
{{post.body | safe}}
<hr>
tags:{{ post.get_tags }}
<hr>
{{related_posts}}
</div>
{% endblock %}