search page

This commit is contained in:
Lorin Werthen 2016-07-20 18:23:38 +02:00
parent a9374438f9
commit 13733d4088
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
5 changed files with 40 additions and 12 deletions

2
Rules
View file

@ -74,7 +74,7 @@ postprocess do
{ {
title: e[:title], title: e[:title],
url: url_for(e), url: url_for(e),
text: e.reps[:text].compiled_content, text: excerptize(e.reps[:text].compiled_content, length: 200),
tags: '' tags: ''
} }
end end

View file

@ -3,7 +3,9 @@
<div id="container" class="pure-u-xl-3-5 pure-u-lg-2-3 pure-u-md-3-4 pure-u-sm-5-6 pure-u-11-12"> <div id="container" class="pure-u-xl-3-5 pure-u-lg-2-3 pure-u-md-3-4 pure-u-sm-5-6 pure-u-11-12">
<header> <header>
<div class="header-top"> <div class="header-top">
<a href="/">
<img id="logo" src="https://zeus.ugent.be/wp-content/uploads/2009/05/logo-new.png" alt="" /> <img id="logo" src="https://zeus.ugent.be/wp-content/uploads/2009/05/logo-new.png" alt="" />
</a>
<div id="logos"> <div id="logos">
<a href="https://github.com/ZeusWPI" target="_blank"> <a href="https://github.com/ZeusWPI" target="_blank">
<i class="logo-link fa fa-github fa-3x"></i> <i class="logo-link fa fa-github fa-3x"></i>
@ -20,15 +22,6 @@
<%= render '/partials/_navbar.*' %> <%= render '/partials/_navbar.*' %>
</header> </header>
<main> <main>
<form action="?">
<input type="text" name="q" id="tipue_search_input" autocomplete="off" required>
</form>
<div id="tipue_search_content"></div>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch();
});
</script>
<div id="all-events"> <div id="all-events">
<%= render '/partials/_tile.*', article: sorted_articles[0] %> <%= render '/partials/_tile.*', article: sorted_articles[0] %>
<div class="pure-g"> <div class="pure-g">

31
content/search.erb Normal file
View file

@ -0,0 +1,31 @@
<div class="header-top">
<a href="/">
<img id="logo" src="https://zeus.ugent.be/wp-content/uploads/2009/05/logo-new.png" alt="" />
</a>
<div id="logos">
<a href="https://github.com/ZeusWPI" target="_blank">
<i class="logo-link fa fa-github fa-3x"></i>
</a>
<a href="https://www.facebook.com/zeus.wpi/" target="_blank">
<i class="logo-link fa fa-facebook fa-3x"></i>
</a>
<a href="#" target="_blank">
<i class="logo-link fa fa-rss fa-3x"></i>
</a>
</div>
</div>
<%= render '/partials/_navbar.*' %>
<div class="pure-g">
<div class="pure-u-1-24"></div>
<div class="pure-u-11-12">
<form action="" method="get">
<input type="text" name="q" id="tipue_search_input" autocomplete="off" required>
</form>
<div id="tipue_search_content"></div>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch();
});
</script>
</div>
</div>

View file

@ -8,6 +8,9 @@
<a href="#"> <a href="#">
Contact Contact
</a> </a>
<a href="/search">
Search
</a>
<a href="/cammie"> <a href="/cammie">
Cammie Cammie
</a> </a>

View file

@ -1,4 +1,5 @@
base_url: https://zeus.ugent.be/beta #base_url: https://zeus.ugent.be/beta
base_url: http://localhost:3000
# The syntax to use for patterns in the Rules file. Can be either `"glob"` # The syntax to use for patterns in the Rules file. Can be either `"glob"`
# (default) or `"legacy"`. The former will enable glob patterns, which behave # (default) or `"legacy"`. The former will enable glob patterns, which behave