Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Formatted the result view a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto Kekäläinen committed Mar 20, 2012
1 parent 8110087 commit e23b333
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
26 changes: 12 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,25 @@

<div class="container">

<!-- Main hero unit for a primary marketing message or call to action -->
<div class="row-fluid">
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="row-fluid">
<div class="span3">[logo?]</div>
<div class="span9">
<h1>Find your library!</h1>
<p>Enter the name of the library or the service you need. Enter city name or zip-code to find the closest libraries.</p>
<h1>Find your library!</h1>
<p>Enter the name of the library or the service you need. Enter city name or zip-code to find the closest libraries.</p>
</div>
</div>

<!-- consult README.rst from Facetview on how to configure -->
<div class="facet-view-simple"></div>

</div>
</div>

<hr>
<!-- consult README.rst from Facetview on how to configure -->
<div class="facet-view-simple"></div>

<footer>
<p>&copy; Seravo Oy 2012. <a href="http://opendefinition.org/">Openly Licensed</a>. Get the <a href="https://github.com/Seravo/Library-Directory">source</a>.</p>
</footer>
<hr>
<footer>
<p>&copy; Seravo Oy 2012. <a href="http://opendefinition.org/">Openly Licensed</a>. Get the <a href="https://github.com/Seravo/Library-Directory">source</a>.</p>
</footer>

</div> <!-- /container -->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>

Expand Down
4 changes: 3 additions & 1 deletion js/libs/facetview.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@
text-decoration:none;
margin:0 5px 0 5px;
}

.result-data {
margin-left: 122px;
}
15 changes: 11 additions & 4 deletions js/libs/jquery.facetview.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,15 @@

// library-directory search result display-template
var search_results = [
[ { "field": "contact.homepage_fi", "format": "<i class='icon-home'></i><a href='{{data}}'>" }, { "field": "name_fi", "format": "{{data}}</a>" } ],
[ { "field": "description_fi" } ],
[ { "field": "contact.email", "format": "Email: <a href='mailto:{{data}}'>{{data}}</a>" } ]
[ { "field": "name_fi", "format": "<big>{{data}}</big>" } ],
[ { "field": "contact.street_address.street_fi", "format": "{{data}}," }, { "field": "contact.street_address.post_code", "format": "{{data}}" }, { "field": "contact.street_address.muncipality_fi", "format": "{{data}}" } ],
[ { "field": "contact.telephones.0.telephone_number", "format": "Puhelin: {{data}}" }, { "field": "contact.telephones.0.telephone_name_fi", "format": " ({{data}})" } ],
[ { "field": "contact.homepage_fi", "format": "<i class='icon-home'></i><a href='{{data}}'>{{data}}</a>" } ],
[ { "field": "contact.email", "format": "Email: <a href='mailto:{{data}}'>{{data}}</a>" } ],
[ { "field": "description_fi" } ]
]
/* [ { "field": "period", "format": "Aukioloaika: {{data}}" } ], */
/* [ { "field": "services" } ], */

// library-directory default settings
var settings = {
Expand Down Expand Up @@ -603,6 +608,8 @@
'<ul style="margin-left:-100px;" class="dropdown-menu">' +
'<li><a class="facetview_viewrecord" href="' + index + '">view full record</a></li>' +
'</ul>' + '</div>'
// container for data
result += '<div class="result-data">'
// add the record based on display template if available
var display = options.result_display
var lines = ''
Expand Down Expand Up @@ -641,7 +648,7 @@
}
}
lines ? result += lines : result += JSON.stringify(record,""," ")
result += '</td></tr>'
result += '</div></td></tr>'
return result;
}

Expand Down
12 changes: 8 additions & 4 deletions less/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

body {
padding-top: 60px;
padding-bottom: 40px;
padding-bottom: 10px;
}

footer {
margin: 12px auto 0px;
}

@import "bootstrap/responsive.less";



/* ===== Primary Styles ========================================================
Author:
Author: Otto Kekäläinen (Seravo Oy)
========================================================================== */


Expand All @@ -21,4 +25,4 @@ body {





0 comments on commit e23b333

Please sign in to comment.