Skip to content

Instantly share code, notes, and snippets.

@jennifert
jennifert / bootstrapExample-create_doctypre_bodyTags
Created March 29, 2014 01:43
A emmet code sample to create the "sticky footer with nav bar" exapmple from the Bootstrap 3 example site. Please refer my blog post for items you will need to edit. http://t.co/CuL31P3XHh
html:5>(div.navbar.navbar-default.navbar-fixed-top>div.container>div.navbar-header>btn:r.navbar-toggle>span.sr-only{Toggle navigation}+span.icon-bar+span.icon+span.icon^a.navbar-brand{Welcome!}^div.collapse.navbar-collapse>ul.nav.navbar-nav>li*3>a^li.dropdown>a.dropdown-toggle{Dropdown }>b.caret^ul.dropdown-menu>li*3>a^li.divider+li.dropdown-header{Nav Header}+li*3>a^^^^^^^div.container>div.page-header>h1{Page Header Heer}^p.lead>lorem^^div#footer>div.container>p.text-muted{Copy Right Info}^^script:src{js/jquery-1.11.0.min.js}+script:src{js/bootstrap.min.js})
@jennifert
jennifert / bootstrapExample-Insert_other_headers
Created March 29, 2014 01:45
A Emmet code sample to inert items in header needed for bootstrap 3. Please refer to my blog for steps and items needed to edit after expanding this code. http://t.co/CuL31P3XHh
meta:vp+link:favicon+meta:compat+link:css{css/bootstrap.min.css}+link:css
@jennifert
jennifert / JekyllSeachjQueryFragment1
Last active August 29, 2015 14:21
This is the first custom function for our search. It just look sin the JSON file using jQuery getJson. The full javascript code is at: https://github.com/jennifert/jekyll-site/blob/master/js/main.js
/*start search function;*/
var getSearchResults = function(url) {
var count = 0;
var searchedFor = getParameterByName('searchbox'); /*get the query parameter from search box*/
var searchedForTest = searchedFor.toLowerCase();
$('#searchbox').val(searchedFor); /*update input field with what was searched for*/
$.getJSON('/search.json', function(data) {
$('div#results').append('<section class="col-xs-12 col-sm-6 col-md-12">');
@jennifert
jennifert / JekyllSearchForm
Last active August 29, 2015 14:21
This is the updated search form to use with the jquery search on my site.
<form role="search" method="get" class="navbar-form navbar-right form-inline" action="/search.html">
<div class="form-group" id="searchdiv">
<input type="search" id="searchbox" name="searchbox" class="form-control search" placeholder="Search ... ">
<label class="hide">Search for:</label>
</div>
<button type="submit" class="btn btn-success search"> <i class="fa fa-search"></i></button>
</form>
@jennifert
jennifert / JekyllSeachjQueryFragment2
Last active June 1, 2017 00:58
This is the second custom function for our search. It just look sin the JSON file using jQuery getJson.
var displyResult = function(blogTitle,blogCategory,blogTags,blogLink,blogDate,blogSummary) {
var results = '<article class="posts blogpage">'+
'<h2 class="entry-title">'+
'<a class="post-link" href="'+blogLink+'">'+blogTitle+'</a>'+
'</h2>'+
'<div class="entry-summary">'+
'<p>'+
blogSummary +
'<a href="'+blogLink+'">Continued</a>'+
@jennifert
jennifert / search.html
Created May 23, 2015 01:29
Grabbed from github to easily embed in site
---
layout: default
title: Search Results
---
<h1 id="searchHeader">Search results</h1>
<noscript><p>Sorry, the current site search is form Javascript. Please try this link to search from Google.</p></noscript>
@jennifert
jennifert / searchjson
Created May 23, 2015 01:31
Also grabbed form my github repor for easy embed to site.
---
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title }}",
"href" : "{{ post.url }}",
"summary" : "{{ post.content | strip_html | strip_newlines | truncatewords: 30 | escape }}",
"category" : [{% for category in post.categories %}"{{ category }}",{% endfor %} null],
"tags" : [{% for tag in post.tags %}"{{ tag }}",{% endfor %} null],
@jennifert
jennifert / basic-yql.js
Created February 4, 2016 17:53
Basic YQL Call
//declare vars
var blogLink = 'https://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select title,link,pubDate,category from rss where url ="http://rss.cbc.ca/lineup/technology.xml"')+'&format=json&diagnostics=false&callback=?';
//end variable declare
jQuery.noConflict();
jQuery(document).ready(function($){
//Call blog feed
$.getJSON(blogLink, function(data){
$.each(data.query.results.item, function(index, item){
$('.blog-post-container' ).append('<div class="row">');
$('.blog-post-container' ).append('<div class="col-md-12">');
@jennifert
jennifert / web.config
Created May 26, 2017 22:59
Jekyll Web.config sample
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
@jennifert
jennifert / .deployment
Created May 26, 2017 23:06
Sample Jekyl Azure deployfile
[config]
project = _site