introduce search interface
This commit is contained in:
43
templates/gallery.html
Normal file
43
templates/gallery.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{# -*-jinja2-*- #}
|
||||
{% extends "layout.html" %}
|
||||
{% block head %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{post.title}}</h1>
|
||||
<small> von {{post.author}} </small>
|
||||
{{post.html | safe}}
|
||||
|
||||
{% if post.links.images |length > 0 %}
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<!-- The Gallery as lightbox dialog, should be a document body child element -->
|
||||
<div id="blueimp-gallery" class="blueimp-gallery">
|
||||
<div class="slides"></div>
|
||||
<h3 class="title"></h3>
|
||||
<a class="prev">‹</a>
|
||||
<a class="next">›</a>
|
||||
<a class="close">×</a>
|
||||
<a class="play-pause"></a>
|
||||
<ol class="indicator"></ol>
|
||||
</div>
|
||||
|
||||
<div id="links" class="grid-x">
|
||||
{% for d in post.links.images %}
|
||||
|
||||
<a id="{{d.url | slug}}" href="{{d.url}}" title="{{d.title}}" class="cell medium-3 small-12 large-2">
|
||||
<img src="{{d.thumb_url}}" alt="{{d.title}}" class="img-thumbnail" />
|
||||
</a>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
33
templates/gallery_index.html
Normal file
33
templates/gallery_index.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{# -*-jinja2-*- #}
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
|
||||
{{ post.html|safe }}
|
||||
|
||||
|
||||
|
||||
{% if post.links.subindexpages | length > 0 %}
|
||||
|
||||
<div class= "grid-container" >
|
||||
<div class="grid-x">
|
||||
|
||||
{% for d in post.links.subindexpages %}
|
||||
<div class="cell small-12 medium-4 large-3">
|
||||
<a href="{{d.url}}" class="gallery-block media">
|
||||
<img src="{{d.thumb_url }}" alt="{{d.title}}" class="img-thumbnail pull-left" />
|
||||
<div class="media-body">
|
||||
<small class="pull-right">{{d.date}} </small>
|
||||
<h2> {{d.title}} </h2>
|
||||
<div >{{d.desc}} </div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{# loop.cycle('','','</div><div class="row">')| safe #}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
49
templates/layout.html
Normal file
49
templates/layout.html
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
|
||||
<!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 Search</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * https://*.2020.fet.at *.2020.fet.at; style-src 'self' 'unsafe-inline'; script-src 'self'">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='extra.css') }}">
|
||||
<script src="{{ url_for('static', filename='jquery-3.5.1.min.js') }}"></script>
|
||||
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="top-bar" id="main-menu">
|
||||
<div class="top-bar-left">
|
||||
<a href="/">
|
||||
<img src="{{ url_for('static', filename='logo2014_64.png')}}" style="height:40px; width:40px;" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="top-bar-right">
|
||||
<ul class="menu vertical medium-horizontal expanded medium-text-center">
|
||||
<li class=""><a href="/">Home</a> </li>
|
||||
<li class=""><a href="/">Aktuelles</a> </li>
|
||||
<li class=""><a href="#">Info</a> </li>
|
||||
<li class=""><a href="#">Team</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<!-- App.js -->
|
||||
<script src="{{ url_for('static', filename='app.js')}}"></script>
|
||||
{% block scr %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
129
templates/layoutfetbs3.html
Normal file
129
templates/layoutfetbs3.html
Normal file
@@ -0,0 +1,129 @@
|
||||
{# -*-jinja2-*- #}
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="galleries/logo2014_64.png">
|
||||
|
||||
<link rel="alternate" hreflang="de" href="/de/home/search" />
|
||||
<link rel="alternate" hreflang="en" href="/en/home/search" />
|
||||
|
||||
<link rel="stylesheet" href="/galleries/blue2fetat.css" />
|
||||
<link rel="stylesheet" href="/galleries/css/blueimp-gallery.min.css" />
|
||||
|
||||
|
||||
<script src="https://2020.fet.at/galleries/application-7cbec5b180d121b587cfe58e2d4517d1.js" type="text/javascript"></script>
|
||||
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
|
||||
<title>Fetsite</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="maincontainer" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1 header_span">
|
||||
<div class="header_wrap">
|
||||
<div class="header hidden-print">
|
||||
<a href="/home">
|
||||
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
||||
<img alt="/galleries/Logo2014_64" height="50" src="/galleries/logo2014_64.png" style="float:left;height:50px" />
|
||||
</a> </div>
|
||||
<div class="header visible-print">
|
||||
<img alt="Logo2014_64" height="50" src="/galleries/logo2014_64.png" style="float:left;height:50px" />
|
||||
</div>
|
||||
<div class="visible-print">
|
||||
Fachschaft Elektrotechnik
|
||||
<hr/>
|
||||
</div>
|
||||
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="/home">Startseite</a>
|
||||
</li>
|
||||
<li><a href="/rubriken">Neuigkeiten</a></li>
|
||||
|
||||
<li><a href="/themengruppen">Information</a></li>
|
||||
<li><a href="/members">Mitarbeiter</a></li>
|
||||
<li><a href="/galleries">Fotos</a></li>
|
||||
<li><a href="/studien">Studien/Beispielsammlung</a></li>
|
||||
<li> <a href="/home/search">Suche</a></li>
|
||||
<li> <a href="/home/kontakt">Kontakt</a></li>
|
||||
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked pull-right">
|
||||
<li>
|
||||
<!--<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" > <img alt="De" src="/flaggen/png/de.png" /> Deutsch<b class="caret"></b></a>-->
|
||||
<!-- Split button -->
|
||||
<div class="btn-group navbar-btn">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" aria-expanded="false">
|
||||
<img alt="De" src="/flaggen/png/de.png" /> Deutsch
|
||||
</button>
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" data-toggle="dropdown" >
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="/de"><img alt="At" src="/flaggen/png/at.png" /> Deutsch</a> </li>
|
||||
|
||||
<li><a href="/en"><img alt="Gb" src="/flaggen/png/gb.png" /> English</a> </li>
|
||||
|
||||
</ul></div>
|
||||
</li><li>
|
||||
<a href="/users/auth/ldap"><i class="ficon ffi1-academic"></i>FET Login</a>
|
||||
</li></ul>
|
||||
|
||||
<!--<span class="pull-right"> <a href="/en"><img alt="Gb" src="/flaggen/png/gb.png" /> English</a>
|
||||
</span>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.dropdown-toggle').click(function(e) {
|
||||
e.preventDefault();
|
||||
setTimeout($.proxy(function() {
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(this).siblings('.dropdown-backdrop').off().remove();
|
||||
}
|
||||
}, this), 0);
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1 header_span">
|
||||
<nav class="breadcrumb" style="background-color: #FFF">
|
||||
{% for b in post.links.breadcrumbs %}
|
||||
<a href="{#url_for('page',name=b.path)#}{{b.url}}" class="breadcrumb-item">{{b.title}} </a> /
|
||||
{% endfor %}
|
||||
|
||||
</nav>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
54
templates/page.html
Normal file
54
templates/page.html
Normal file
@@ -0,0 +1,54 @@
|
||||
{# -*-jinja2-*- #}
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
|
||||
<h1>{{post.title}}</h1>
|
||||
{{post.date}}
|
||||
{% if post.links.subindexpages | length > 0 %}
|
||||
<hr/>
|
||||
<b id="up_head"> Unterseiten: </b>
|
||||
<ul class="nav flex-column flex-sm-row " labeledby="up_head">
|
||||
{% for d in post.links.subindexpages %}
|
||||
<li class="nav-item">
|
||||
<a href="{{d.url}}" class="nav-link"> <img src="{{d.thumb_url}}" alt="{{d.title}}" class="img-thumbnail" />
|
||||
<h6> {{d.title}} ({{d.date}} <small class="text-muted">{{d.desc}} </small> </h6>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{{ post.html|safe }}
|
||||
|
||||
|
||||
{% if post.links["subpages"] |length > 0 %}
|
||||
<ul class="nav flex-column flex-sm-row" labeledby="inf_head">
|
||||
{% for d in post.links.subpages %}
|
||||
<li class="nav-item">
|
||||
<a href="{{d.url}}" class="nav-link text-info">
|
||||
<h6> <img src="{{d.thumb_url}}" alt="{{d.title}}" class="img-thumbnail" />
|
||||
{{d.title}} <small class="text-muted">{{d.desc}} </small>
|
||||
</h6>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if post.links.files |length > 0 %}
|
||||
|
||||
<hr/>
|
||||
|
||||
<b id="inf_head">Files:</b>
|
||||
<ul>
|
||||
{% for d in post.list_files %}
|
||||
<li>
|
||||
<a href="{{d.url}}">{{d}} </a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
38
templates/search.html
Normal file
38
templates/search.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{# -*-jinja2-*- #}
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
<h1>Suche</h1>
|
||||
<form action="/" method="GET">
|
||||
<div class="input-group input-group-rounded">
|
||||
<!---<span class="input-group-label">$</span>-->
|
||||
<input class="input-group-field " name="query" type="text" placeholder="search">
|
||||
<div class="input-group-button">
|
||||
<input type="submit" class="button" value="Submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if query %}
|
||||
Ergebnisse für: {{query}}
|
||||
{% for post in results %}
|
||||
<a href="{{post['url']}}">
|
||||
<div class="media-object">
|
||||
{% if post["image"]%}
|
||||
<div class="media-object-section">
|
||||
<div class="thumbnail small-thumb">
|
||||
<img src="{{post['image']}}">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="media-object-section">
|
||||
<h1><b>{{post["title"]}}</b></h1>
|
||||
<p>{{post["highlights"] | safe}}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user