Merge pull request #70 from ZeusWPI/searchpage

Searchpage
This commit is contained in:
Miaoulo 2016-10-04 23:24:26 +02:00 committed by GitHub
commit ba5f6d15c6
13 changed files with 70 additions and 18 deletions

2
Rules
View file

@ -14,6 +14,8 @@ require 'socket'
#
preprocess do
`npm install`
@items.find_all('/posts/**/*').each do |i|
year_str = %r{/(\d\d)-\d\d/}.match(i.identifier).captures[0]
academic_year = year_str.to_i

View file

@ -8,9 +8,19 @@
margin-bottom:10px;
}
.bolder a{
.bolder {
> * {
color:#565C5E;
font-weight: bold;
font-size: 20pt;
font-family: 'Avenir';
border-left: 3px solid $zeus-orange;
padding-left: 10px;
}
a {
border-left: none;
}
}

View file

@ -19,3 +19,7 @@
height: 256px;
}
}
.event-attributes {
font-size: 1.3em;
}

View file

@ -58,7 +58,6 @@
.description {
font-size: 1.7em;
font-weight: 200;
color: #FF7F00;
}
.time {

View file

@ -72,6 +72,39 @@ footer.footer {
background-color: #1E64C8;
}
.lana-tile {
background-color: $tile-orange;
}
.project-tile {
background-color: $turquoise;
}
#tipue_search_input {
background: none;
padding: 12px;
font: inherit;
color: inherit;
display: flex;
flex-direction: row;
input {
background: none;
border: none;
-moz-appearance: none;
-webkit-appearance: none;
box-shadow: none;
outline: 0;
margin: 0;
color: inherit;
}
&::before {
font: normal normal normal 14px/1 FontAwesome;
content: "\f002 ";
color: inherit;
padding-right: 5px;
}
}

View file

@ -13,6 +13,7 @@ a.box {
.centering {
display: flex;
justify-content: center;
align-items: center;
}
.highlighted{
background: $tile-orange;

View file

@ -4,7 +4,7 @@ banner: https://emergingtechblog.emc.com/wp-content/uploads/2015/10/AdobeStock_8
description: Zeus bezoekt het datacenter en de supercomputer in S10!
created_at: 3-10-2016
time: 10-10-2016
location: hpc gent
location: Datacenter UGent, S10, Sterre
locationlink: 51.023650, 3.712018
---

View file

@ -14,10 +14,9 @@
<%= render '/partials/_tile.*', article: all_events[1], small_text: "Upcoming event" %>
</div>
<div class="tile is-parent is-4">
<div class="tile is-child box ">
<div class="content has-text-centered ">
<div class="tile is-child box centering">
<div class="content has-text-centered">
<div id="quote" >
<!--<img src="//thecatapi.com/api/images/get?format=src&type=gif&size=small"> -->
<!-- INTENTIONALLY LEFT BLANK -->
</div>
</div>

View file

@ -18,13 +18,13 @@ title: Search
</div>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
$('#tipue_search_input_field').tipuesearch({
'mode': 'json',
'showTitleCount': false,
'tipue_search_content': '#blog_results',
'contentLocation': '../blog_search.json'
});
$('#tipue_search_input').tipuesearch({
$('#tipue_search_input_field').tipuesearch({
'mode': 'json',
'showTitleCount': false,
'tipue_search_content': '#event_results',

View file

@ -6,8 +6,8 @@
<article class="media">
<div class="media-content">
<div class="content">
<h2><%= post[:title] %></h2>
<%= excerptize(post.reps[:text].compiled_content, length: 200) %>
<h2><%= post[:title] %> <small> <%= post[:created_at] %></small></h2>
<%= post[:description] %>
</div>
</div>
</article>
@ -19,7 +19,7 @@
<ul class = "archive_list">
<% academic_years_items.each do |year, item| %>
<li class="bolder">
<%= link_to pretty_year(year), item %>
<%= link_to_unless_current pretty_year(year), item %>
</li>
<% end %>
</ul>

View file

@ -15,7 +15,6 @@
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css">
<%= asset :css, :main %>
<link rel="icon" href="/assets/images/favicon32.png" type="image/x-icon" />
@ -35,6 +34,8 @@
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<%= asset :css, :main %>
<%= content_for(@item, :head) %>
</head>
<body class="site">

View file

@ -16,13 +16,14 @@
<p class="title is-1">
<b>
<%= item[:title] %>
<%= fa :search %>
</b>
</p>
<p class="subtitle is-3">
<%= item[:description] %>
</p>
<p class="subtitle is-3">
<ul class="fa-ul">
<ul class="fa-ul event-attributes">
<li><%= fa 'clock-o', li: true %><%= item[:time].strftime '%A %d %B %Y' %></li>
<li><%= fa 'map-marker', li: true %><%= item[:location] %></li>
</ul>

View file

@ -18,7 +18,9 @@
<% end %>
</div>
<form action="/search/?" method="get">
<input type="text" name="q" id="tipue_search_input" autocomplete="off">
<div id="tipue_search_input">
<input type="text" name="q" id="tipue_search_input_field" autocomplete="off">
</div>
</form>