From ac1618327da1dfd606cf969fd8d8d15ddf9ece44 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 26 May 2019 14:56:11 +0200 Subject: Add search powered by Qwant.com Why? Implementing our own search is quite involved if we want it to be any good. So outsourcing makes sense. Qwant is hosted in Europe (France,) and takes privacy seriously and doesn't track you. See https://help.qwant.com/help/overview/our-philosophy/ And https://help.qwant.com/help/overview/how-does-qwant-make-money/ For more information. --- app/assets/stylesheets/hmno_main.scss | 12 ++++++++++++ app/views/common/_search.html.erb | 33 +++++++++++++++++++++++++++++++++ app/views/refinery/_header.html.erb | 1 + 3 files changed, 46 insertions(+) create mode 100644 app/views/common/_search.html.erb diff --git a/app/assets/stylesheets/hmno_main.scss b/app/assets/stylesheets/hmno_main.scss index 26a0a29..92e5274 100644 --- a/app/assets/stylesheets/hmno_main.scss +++ b/app/assets/stylesheets/hmno_main.scss @@ -91,3 +91,15 @@ img { visibility:hidden; } } + +.search { + text-align: center; + padding-bottom: 3mm; + + #query { + background-color: $body-bg; + color: $fg; + border: 1px solid $fg; + padding: 1mm; + } +} diff --git a/app/views/common/_search.html.erb b/app/views/common/_search.html.erb new file mode 100644 index 0000000..5625935 --- /dev/null +++ b/app/views/common/_search.html.erb @@ -0,0 +1,33 @@ +<%# + This file is part of hmnoweb, a RefineryCMS based Webapp for heavymetal.no + Copyright (C) 2018 Harald Eilertsen + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License version 3 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +%> + +
+ +
+ + diff --git a/app/views/refinery/_header.html.erb b/app/views/refinery/_header.html.erb index 4dbdfc2..ef0253a 100644 --- a/app/views/refinery/_header.html.erb +++ b/app/views/refinery/_header.html.erb @@ -18,6 +18,7 @@ <%= link_to image_tag("logo.png", :alt => "Heavymetal.no"), refinery.root_path %>