Skip to content

Commit

Permalink
Bunch of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tristen committed May 10, 2012
1 parent ac22f4c commit 8c9024c
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_site
_site/*
57 changes: 34 additions & 23 deletions _includes/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ h2 {
margin: 0 0 5px;
font-weight: 600;
}
h4 {
line-height: 22px;
}
h5 {
font-size: 18px;
margin: 0 0 10px;
Expand Down Expand Up @@ -259,12 +262,18 @@ em.description {
}
ul.topics li {
float: left;
margin: 0 5px 10px;
}
body .result {
float: left;
border-color: #fff;
border-right: 1px solid #e0e0e0;
}
.result,
ul.topics li a {
background-color: #fff;
display: block;
width: 208px;
margin: 0 5px 10px;
padding: 10px;
border: 1px solid #f5f5f5;
height: 78px;
Expand All @@ -275,11 +284,9 @@ ul.topics li {
-webkit-transition: all 0.1s linear;
transition: all 0.1s linear;
opacity: 1;
color: #69AACA;
}
ul.topics li a:hover {
border-color: #B0B0B0;
color: #337A9D;
}

small.tags {
Expand Down Expand Up @@ -327,24 +334,15 @@ small.tags {
background: #0d1421;
}
.content-header {
background-image: url(images/dark-border.png);
background-repeat: repeat-y;
background-position: 250px 0;
color: #fff;
padding: 65px 10px 20px;
margin-top: -1px;
background: #fff;
margin: 20px 0 10px;
}
.content-header div {
float: left;
}
.content-header div.title {
margin-right: 10px;
padding-right: 10px;
width: 230px;
.content-header div.details {
padding-top: 20px;
}
.content-header div div {
float: left;
margin: 5px 5px 0 10px;
color: #fff;
}

.label {
Expand All @@ -364,33 +362,46 @@ small.tags {
}

.block {
background: #fff;
margin: 40px 0 10px;
padding: 10px 10px 20px;
padding: 10px 0 0;
}
.block h6 {
margin-bottom: 5px;
font-weight: normal;
font-size: 15px;
}

/*Table of contents*/
ul#toc {
height: 80px;
height: auto!important;
min-height: 80px;
border-left: 1px solid #ccc;
padding: 5px 0 10px;
}
ul#toc li {
border-top: 1px solid #f5f5f5;
margin-bottom: 3px;
}
ul#toc li:first-child {
border: none;
}
ul#toc li a {
display: block;
color: #0B202F;
padding: 5px;
color: #0D1421;
font-weight: 700;
padding: 8px 10px 8px 20px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-bottom: -8px;
position: relative;
left: -10px;
width: 220px;
}
ul#toc li.active,
ul#toc li a:hover {
background: #f5f5f5;
background: #fff;
background: rgba(255,255,255,0.9);
color: #337A9D;
}

/* -------------------------------------------------------
Expand Down
27 changes: 8 additions & 19 deletions _includes/js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function(context) {

var Docs = function() {};

Docs.prototype = {
Expand All @@ -21,7 +20,7 @@
})
.value();
_.delay(function () {tagList(tags)}, 10);
_.each(r, function(result){
_.each(data, function(result){
$('#results').append(tExamples(result));
tags.push(result.tags);
});
Expand All @@ -30,12 +29,11 @@

var tagList = function (tags) {
var tTags = _.template($('#tags').html());
var t = _(tags).chain()
.flatten(tags)
.uniq(tags)
.compact(tags)
.value();
_.each(t, function(tag) {

var f = _.flatten(tags);
var u = _.uniq(f);

_.each(u, function(tag) {
$('#tag-list').append(tTags({'tag': tag}));
});

Expand Down Expand Up @@ -78,28 +76,19 @@
};

$('input', search).keyup(_(function() {

$('#results').empty();
var phrase = $('input', search).val();

if (phrase.length >= 2) {
var matches = find(phrase.toLowerCase().match(/(\w+)/g));

$('#tag-list').find('a').removeClass('active');

_(matches).each(function(p) {
$('#results').append(tExamples(p));
});
if (matches.length) return;
} else {
$.ajax({
url: 'search.json',
dataType: 'json',
success: function(r) {
_.each(r, function(result){
$('#results').append(tExamples(result));
});
}
_.each(data, function(result){
$('#results').append(tExamples(result));
});
}

Expand Down
Loading

0 comments on commit 8c9024c

Please sign in to comment.