Skip to content

Instantly share code, notes, and snippets.

View samediamba's full-sized avatar

Samedi S. Amba samediamba

View GitHub Profile
@samediamba
samediamba / Responsive Iframes
Created June 7, 2013 09:41
What I recently used to make responsive Iframes for my Google docs embed. This happened as I was doing the UEAB site.
/* RESPONSIVE IFRAME GIST
---------------------
Useful Links:
Responsive Embeds: http://amobil.se/2011/11/responsive-embeds/
Creating Intrinsic Ratios for Video: http://alistapart.com/article/creating-intrinsic-ratios-for-video */
/* STEP 1: Grab the Embed. Go to https://docs.google.com/viewer and paste in URL to the document. looks like below:*/
<iframe src="http://docs.google.com/viewer?url=ueab.ac.ke%2Fdownloads%2Ffinal-bulletin-2013.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>
/** To use a separate single post template for each category, you will need to add the following function in your functions.php: **/
/**
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');
/**
* Filter the single_template with our custom function
*/
@samediamba
samediamba / index.html
Created June 16, 2013 14:17
A CodePen by Samedi Amba.
<html>
<head>
</head>
<body class style=""height: 100%>
<div class="container"><!-- The Main Container -->
<div id="topbar" class="clearfix"><!-- The Topbar -->
<div id="search"><!-- Search Panel -->
Search Area -> Quick Links
@samediamba
samediamba / index.html
Created June 17, 2013 07:57
A CodePen by RobertKenner. Inset hover effects
<link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet">
<div>
<a class="button one"><i class="icon-facebook"></i>
<a class="button one"><i class="icon-twitter"></i>
<a class="button one"><i class="icon-linkedin"></i>
<a class="button one"><i class="icon-pinterest"></i>
<a class="button one"><i class="icon-google-plus"></i></a>
</div>
@samediamba
samediamba / index.html
Created June 17, 2013 07:57
A CodePen by RobertKenner. Inset hover effects for social icons. Very nice
<link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet">
<div>
<a class="button one"><i class="icon-facebook"></i>
<a class="button one"><i class="icon-twitter"></i>
<a class="button one"><i class="icon-linkedin"></i>
<a class="button one"><i class="icon-pinterest"></i>
<a class="button one"><i class="icon-google-plus"></i></a>
</div>
@samediamba
samediamba / index.html
Created June 17, 2013 08:33
Creates an effect like that of the LOC book showcase. A CodePen by Jdias. Responsive grid & background slide -
<link href='http://fonts.googleapis.com/css?family=Lato:400,300' rel='stylesheet' type='text/css'>
<div id="wrapper">
<div id="list">
<div class="item" id="primeiro" style="height: 14em;">
<p class="titulo">Winterfell</p>
</div>
<div class="item" id="segundo" style="height: 26em;">
<p class="titulo">Jon Snow</p>
</div>
@samediamba
samediamba / index.html
Created June 17, 2013 08:54
Responsive CSS Ribbon
<!-- RIBBON 1 -->
<div class="container one">
<div class="bk l">
<div class="arrow top"></div>
<div class="arrow bottom"></div>
</div>
<div class="skew l"></div>
@samediamba
samediamba / Customize Genesis Post Meta Data
Created June 30, 2013 11:11
How to customize the Post Meta data section of a Genesis Child Theme.
<?php /*Add the code below to the genesis_before_post_content Hook */
<div class="post-info">
<span class="time">
<?php /*Code courtesy of WP Beginner: http://goo.gl/3512D and Studiopress: http://goo.gl/72Qbx*/ ?>
<?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
echo "Last modified on ";
the_modified_time('F jS, Y');
<?php
/*** Change default comment text in StudioPress Genesis Courtesy of WP Snacks: http://goo.gl/Dp8Lv**/
function change_default_comment_text($args) {
$args['title_reply'] = 'Have your Say';
return $args;
}
add_filter( 'genesis_comment_form_args', 'change_default_comment_text' );
?>
/**Place in Functions.php
// move comment box above comments
remove_action('genesis_comment_form', 'genesis_do_comment_form');
add_action( 'genesis_before_comments', 'genesis_do_comment_form');