Skip to content

Instantly share code, notes, and snippets.

View M-Drummond's full-sized avatar
🦨

mackinley M-Drummond

🦨
  • 15:40 (UTC +10:00)
View GitHub Profile
@M-Drummond
M-Drummond / 0_reuse_code.js
Created June 13, 2014 03:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@M-Drummond
M-Drummond / new_gist_file_0
Last active August 29, 2015 14:16
WP Sub Menu Indicators
#nav-1 .sub-menu .sub-menu:after {
content: "" ;
display: block;
width: 0 ;
border: 5px solid transparent ;
border-right-color: orange;
position: absolute;
right : 100%;
top: 14px;
}
@M-Drummond
M-Drummond / responsive-menu-icon
Created April 23, 2015 02:00
Add icon to the menu of a responsive site.
select.nav-1-chosen-select {
background-image: url('/wp-content/themes/dynamik/css/images/menu-icon.png');
background-position: 10px 10px;
background-size: 20px;
background-repeat: no-repeat;
padding-left: 35px;
}
@M-Drummond
M-Drummond / responsive_menu.less
Created May 6, 2015 03:34
Centered, responsive-friendly menu
.top-menu {
@media all and (min-width: 979px) {
.ty-menu__items {
text-align: center;
}
<body id="{$runtime.controller}" class="{$runtime.mode}{if $runtime.controller=='categories'} category{$smarty.request.category_id}{/if}{if $runtime.controller=='pages'} page{$smarty.request.page_id}{/if}">
@M-Drummond
M-Drummond / new_gist_file_0
Created May 13, 2015 01:01
Homepage / Not Homepage body class - cs-cart 4.2.x
<body class=" {if $runtime.controller=='index'}home{else}not-home{/if}">
@M-Drummond
M-Drummond / dynamik.css
Created October 13, 2015 00:39
Catalyst Responsive Menu Icon
/* White Icon */
.nav-1-chosen-select {
background-image: url('images/menu-icon-white.png');
background-position: 10px center;
background-size: 20px;
background-repeat: no-repeat;
text-indent: 30px;
border-radius: 0;
}
@M-Drummond
M-Drummond / magicdust.less
Created October 16, 2015 01:53
Catalyst Starting Point In Less
/*------------------------------------*\
IMPORTS
\*------------------------------------*/
@import (less) "quickgrid.less" ;
/*------------------------------------*\
VARS
\*------------------------------------*/
@M-Drummond
M-Drummond / horizontal-gravity.less
Created November 1, 2015 22:51
Horizontal gravity form for subscription.
/*------------------------------------*\
#SUBSCRIBE
\*------------------------------------*/
.module--subscribe {
background: #222223;
padding: 15px 0 ;
color: #fff;
@M-Drummond
M-Drummond / sheep-counter.js
Created January 18, 2016 00:44
javascript loop
var numSheep = 4; // number of sheep
var monthNumber = 1; // counting month
var monthsToPrint = 12; // max length of loop
while (monthNumber <= monthsToPrint) { // while months is less than the max length
numSheep *=4; // multiply the number by 4
console.log("There will be " + numSheep + " sheep after " + monthNumber + " month(s)!" ) ; // output concat. string
monthNumber++ ; // increment the month - will only occur below the maximum amount.
}