Skip to content

Instantly share code, notes, and snippets.

View ryanschuhler's full-sized avatar

Ryan Schuhler ryanschuhler

View GitHub Profile
@ryanschuhler
ryanschuhler / gist:5936861
Created July 5, 2013 19:59
Pop-click example
Pop click examples:
<div class="pop-click">
<span class="pop-click-content"\>popped!\</span\>
</div>
or
<ul>
<li class="pop-click">
@ryanschuhler
ryanschuhler / gist:5937017
Last active December 19, 2015 09:59
Lazy load example
<div class="section">
<img datasrc="http://www.liferay.com/image/image_gallery?uuid=a9d9003c-017f-487e-9b2b-db7c15a2d4e0&groupId=14&t=1355426234988" class="lazy-load" alt="an image with lazy load" />
<div class="lazy-load">A div with Lazy Load</div>
</div>
@ryanschuhler
ryanschuhler / gist:6040684
Created July 19, 2013 16:57
Script version of Social Bookmarks
<!-- Facebook -->
<script src='http://connect.facebook.net/en_US/all.js'></script>
<script>
FB.init({appId: "XXXXXXXXXXXXXXX", status: true, cookie: true});
function postToFeed(redirectUri, link, name, caption, description) {
// calling the API ...
var obj = {
@ryanschuhler
ryanschuhler / gist:6040690
Last active December 20, 2015 00:19
Anchor version of Social Bookmarks
<!-- Facebook -->
<a href="https://www.facebook.com/dialog/feed?app_id=XXXXXXXXXXXXXXX&link=https://developers.facebook.com/docs/reference/dialogs/&picture=http://cdn.www.liferay.com/osb-community-theme/images/custom/facebook_link.png&name=Title%20Name&caption=Caption%20phrase&description=This%20is%20the%20description.&redirect_uri=http://www.liferay.com/about-us/careers" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');return false;">Facebook</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http://www.liferay.com/careers/north-america" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');return false;">Share on Facebook</a><br />
<!-- Twitter -->
<a href="http://www.twitter.com/share?url=http://www.liferay.com/careers/north-america&text=Here%20is%20some%20text" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=y
@ryanschuhler
ryanschuhler / gist:6242014
Created August 15, 2013 15:57
Skinny Web implementation
<script>
var searchUrl = "http://www.liferay.com/skinny-web/api/jsonws/skinny/get-skinny-journal-articles?inst=welcomeContent&companyId=1&groupName=Guest&journalStructureId=27308142&locale=en_US%22";
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = searchUrl;
head.appendChild(script);
var A = AUI();
A.on(
@ryanschuhler
ryanschuhler / animate-scroll.js
Last active December 21, 2015 04:49
Easy scroll navigation
AUI().use(
'anim',
function(A) {
A.all('.animate-scroll').on(
'click',
function(event) {
event.preventDefault();
var section = A.one(event.currentTarget.get('hash'));
var scrollTo = section.getY();
#!/bin/zsh
# uses imagemagick to stich together all images in a folder and
# then writes a css file with the correct offsets along with a
# test html page for verification that its all good
# Original script is from jaymz
# https://gist.github.com/jaymzcd/342399
#
# Modifications :
@ryanschuhler
ryanschuhler / translations.jsp
Created November 23, 2013 02:15
An asset publisher view for translations
<%--
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
@ryanschuhler
ryanschuhler / gist:8223383
Last active January 2, 2016 00:29
class-toggle-carousel
AUI().use(
'anim',
'transition',
function(A) {
A.all('.animate-scroll').on(
'click',
function(event) {
event.preventDefault();
var node = event.currentTarget;
@import "compass";
@import "mixins";
$primary-color: #478ECC;
$secondary-color: #E7E8E9;
.primary-background-color {
background: $primary-color;
}