-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Tipue Search to v5.0 #99
Conversation
humitos
commented
Aug 4, 2015
- New JS and CSS files for Tipue Search v5.0.
- LateTask to create "search.html" page to use for search entries
- New JS and CSS files for Tipue Search v5.0. - LateTask to create "search.html" page to use for search entries
This is a first approach. I'm having some issues that I don't know how to fix them:
Doing this in this way, doesn't need nothing from the final user after installing the plugin and also it will look much better than a simple input in the navbar that breaks all the style of the page (even when it shows the results). Does it make sense for you guys? |
How does this break layout? http://ralsina.me/tr/es/weblog/index.html (search for london) |
A more serious bug in the old version is that it only works with one language. In my site there's only data for the english versions of posts. |
Last comment for a while: "didn't work" how? |
Regarding the layout: I'm trying to render all the results in the same way that the posts are rendered in the index, for example. I mean, inside the "content" part of the webpage. This way will keep the style of the whole page (navbar on the top, results in the content part, footer after the results). Does it make sense for you? Regarding the languages: (looking at the code) I think it is handling that case now, isn't? Regarding the "didn't work" comment: the data is rendered but it seems the context I'm using is not the same as the used for other |
@humitos I don't understand what you mean by "bootstrap magic" ... I'll take a look at it now. |
I have localsearch set up on https://irclogs.getnikola.com/ (src) that works this way and that looks good. Here’s how I did it:
PS. conf.pySEARCH_FORM = """
<form class="navbar-form navbar-left" action="/search/" role="search">
<div class="form-group">
<input type="text" class="form-control" id="tipue_search_input" name="q" placeholder="Search" autocomplete="off">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
"""
EXTRA_HEAD_DATA = """
<link rel="stylesheet" type="text/css" href="/assets/css/tipuesearch.css">
""" search.tmpl## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">
<h1>Search</h1>
<noscript>Search requires JavaScript, sorry for the inconvenience.</noscript>
<div id="tipue_search_content">Use the search box in the navigation bar to search.</div>
</%block>
<%block name="extra_js">
${parent.extra_js()}
<script src="/assets/js/tipuesearch_set.js"></script>
<script src="/assets/js/tipuesearch.js"></script>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
'mode': 'json',
'contentLocation': '/assets/js/tipuesearch_content.json',
'showUrl': false
});
});
</script>
</%block> css diff--- /home/kwpolska/git/nikola-plugins/v7/localsearch/localsearch/files/assets/css/tipuesearch.css 2015-01-29 13:45:57.082000000 +0100
+++ plugins/localsearch/localsearch/files/assets/css/tipuesearch.css 2015-07-20 16:45:07.335161074 +0200
@@ -7,6 +7,7 @@
*/
+/* bootstrap has better styles
#tipue_search_input
{
font: 12px/1.7 'open sans', sans-serif;
@@ -24,7 +25,7 @@
#tipue_search_input:focus
{
border: 1px solid #ccc;
-}
+} */
#tipue_search_button
{
width: 70px;
@@ -54,12 +55,12 @@
#tipue_search_warning_head
{
- font: 300 16px/1.6 'open sans', sans-serif;
+ /*font: 300 16px/1.6 'open sans', sans-serif;*/
color: #333;
}
#tipue_search_warning
{
- font: 12px/1.6 'open sans', sans-serif;
+ /*font: 12px/1.6 'open sans', sans-serif;*/
color: #333;
margin: 7px 0;
}
@@ -75,12 +76,14 @@
}
#tipue_search_results_count
{
- font: 13px/1.6 'open sans', sans-serif;
+ /*font: 13px/1.6 'open sans', sans-serif;*/
+ font-size: 13px;
color: #333;
}
.tipue_search_content_title
{
- font: 300 23px/1.6 'open sans', sans-serif;
+ /*font: 300 23px/1.6 'open sans', sans-serif;*/
+ font-size: 23px;
margin-top: 31px;
}
.tipue_search_content_title a
@@ -95,13 +98,15 @@
}
.tipue_search_content_text
{
- font: 12px/1.7 'open sans', sans-serif;
+ /*font: 12px/1.7 'open sans', sans-serif;*/
color: #333;
padding: 13px 0;
}
.tipue_search_content_loc
{
- font: 300 13px/1.7 'open sans', sans-serif;
+ font-weight: 300;
+ font-size: 13px;
+ /*font: 300 13px/1.7 'open sans', sans-serif;*/
overflow: auto;
}
.tipue_search_content_loc a
@@ -122,7 +127,7 @@
{
padding: 0;
margin: 0;
- font: 12px/1 'open sans', sans-serif;
+ /*font: 12px/1 'open sans', sans-serif;*/
}
#tipue_search_foot_boxes li
{ |
What’s the status of this? |
@humitos do you mind if I steal this one? |
El 8 de septiembre de 2015 12:36:13 GMT-04:00, Roberto Alsina notifications@github.com escribió:
Not at all. Sorry, Im not having time right now. I will check again un a couple of days to see if its not solved. ThanksManuel Kaufmann |
Superseded by #111 |