Skip to content

Instantly share code, notes, and snippets.

View justrjlewis's full-sized avatar

RJ Lewis justrjlewis

View GitHub Profile
@justrjlewis
justrjlewis / index.html
Created October 6, 2012 00:13
This is an old module that I coded in vanilla JS for Westwood College Tutoring Center back when I was a student.
<div class="tips">
<ul>
<li>
<a id="l0" onclick="settab(0);changeit('pic',0);return false;"><h6 class="regular">tutoring</h6></a>
</li>
<li>
<a id="l1" onclick="settab(1);changeit('pic',1);return false;"><h6 class="regular">discussions</h6></a>
</li>
<li>
<a id="l2" onclick="settab(2);changeit('pic',2);return false;"><h6 class="regular">workshops</h6></a>
@justrjlewis
justrjlewis / index.html
Created October 11, 2012 00:28
2009 Module Rework in jQuery
<div class="tip_box">
<ul class="tabs">
<li>
<a href="#tab1"><h6>tutoring</h6></a>
</li>
<li>
<a href="#tab2"><h6>discussions</h6></a>
</li>
<li>
<a href="#tab3"><h6>workshops</h6></a>
@justrjlewis
justrjlewis / Sparse Checkout
Last active December 26, 2015 00:09
shell commands to sparse checkout a file.
git init
git remote add -f <name> <url>
git config core.sparsecheckout true
echo in/repo/path/to/sub_directory/*> .git/info/sparse-checkout
git pull origin master
@justrjlewis
justrjlewis / Concrete5 Reverse Sort Stack Contents
Last active December 30, 2015 12:08
Sorting Concrete5 stack contents in reverse order.
<?php
$a = new GlobalArea('Your Area Name'); //since I normally do this within a block, I append something unique to these such as a blockID, or custom user input instead of( 'Your Area Name') it's ($variable.' Your Area Name')
if ($page->isEditMode()) {
$a->display($c); //show regular while we're editing — we're changing what is shown on the page
} else {
$stacks = Stack::getByName('Your Area Name');
$blocks = $stacks->getBlocks();
krsort($blocks); //reverse sort the blocks in the stack
foreach($blocks as $block) {
$block->display(); //display the newly sorted blocks
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
//a-o concrete5 v5.6.2.1::copy the tags folder from concrete/blocks/tags to the root blocks folder and replace the view.php code with this code.
<div class="ccm-tags-display">
<?php if(strlen($title)) {
?><h4><?php echo $title ?></h4><?php
}
if($options instanceof SelectAttributeTypeOptionList && $options->count() > 0) {
?><ul class="ccm-tag-list">
@justrjlewis
justrjlewis / SassMeister-input-HTML.html
Created July 8, 2014 14:58
Generated by SassMeister.com.
<div class="viewport" id="viewport"><!-- viewport(outter wrapper) -->
<div class="canvas" id="canvas"><!-- begin cavas (inner wrapper) -->
<header class="page-header"><!-- begin header -->
<div class="page" data-ui-component="header-top">
<div class="media of1-2" data-ui-component="logo">
<img src="assets/images/logo.png" alt="Zeta Phi Beta Sorority, Inc. – Oklahoma State" width="265px" height="auto">
</div>
<div class="media__body of2-2" data-ui-component="tagline">
<p>Building on the Principles of Zeta<br>by Reconnecting, Retraining & Retaining</p>
</div>
@justrjlewis
justrjlewis / members.php
Created July 11, 2014 18:22
Concrete5 User List Filter
<h1><?php echo t('Filter');?></h1>
<ul class="reg-user-list-filter">
<?php
Loader::model('attribute/type');
Loader::model('attribute/categories/user');
$ak = UserAttributeKey::getByHandle('location');
$sa = new SelectAttributeTypeController(AttributeType::getByHandle('select'));
$sa->setAttributeKey($ak);
$values = $sa->getOptions();
@mixin inline-block {
display: -moz-inline-stack; // ff 2
display: inline-block;
zoom:1; *display: inline; _height: 15px; // ie 6-7
}
@justrjlewis
justrjlewis / _modules.scss
Created July 23, 2014 01:00
modules boilerplate
//////////////////////////////
//@group global styling
//////////////////////////////
.canvas {
background-color: $blue;
header { //background information
background-image: url(../assets/images/header-bg.svg);
background-position: center -123px;
background-repeat: no-repeat;
background-size: auto;
<?php
defined('C5_EXECUTE') or die(_('Access Denied'));
class BasePackage extends Package {
/***************************************************************
* The following variables can be defined by child classes.
*
* Only define the ones you need.