Skip to content

Instantly share code, notes, and snippets.

View wvuwebgist's full-sized avatar

wvuwebgist

View GitHub Profile
@wvuwebgist
wvuwebgist / quicklinks.rhtml
Last active September 28, 2015 19:38
Quicklinks V2 for West Virginia University
@wvuwebgist
wvuwebgist / flexslider.rhtml
Last active September 28, 2015 19:48
FlexSlider for West Virginia University (The old skool way)
<!-- Stylesheet for flexslider -->
<link rel="stylesheet" href="/themes/shared/flexslider/stylesheets/flexslider.2.1.css" /> <!-- being sure to reference the shared folder, you may copy and paste these into your stylesheets to tweak -->
<!--======================================================
Markup for Flexslider, .flexslider and .slides are required classes:
==========================================================-->
<div class="flexslider">
<ul class="slides">
</ul> <!-- close slides -->
@wvuwebgist
wvuwebgist / google_search.rhtml
Created December 26, 2011 20:54
Google Search for SlateCMS
<% # This is the template where search results will display.
# It must be called google_search.rhtml and should be placed in the same location as your index.rhtml and backpage.rhtml
# You'll likely want to copy the contents of your backpage.rhtml and paste the helper (below) in place of the main column
%>
<div id="main">
<h2>Google Search Results</h2>
<%= @search_results -%>
</div>
@wvuwebgist
wvuwebgist / jquery_slate.rhtml
Last active September 29, 2015 01:47
Attaching jQuery for Slate CMS Themes
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/themes/shared/javascripts/jquery-1.10.2.min.js"><\/script>')</script>
@wvuwebgist
wvuwebgist / more.textile
Created February 9, 2012 19:15
Blog Article Excerpt

{{ MORE }}

@wvuwebgist
wvuwebgist / partial_include.txt
Last active October 3, 2015 18:27
Include a partial in your theme via an editable region
{{ Theme.include_partial template="/navigation" }}
@wvuwebgist
wvuwebgist / show_helper_syntax.rhtml
Created May 1, 2012 14:42
Show content before, after, or during a certain date & time
<%# Show something before May 2nd at 8:30am %>
<% show_before 'May 2, 2012 8:30 AM' do %>
<p>Your content here<p>
<% end %>
<%# Show something between May 2nd and May 3rd %>
<% show_between('May 2, 2012 8:30 AM', 'May 3, 2012 8:30 AM') do %>
<p>Your content here</p>
<% end %>
@wvuwebgist
wvuwebgist / Editable region snippet
Last active October 4, 2015 04:48
Flexslider for SlateCMS, v2
{{ Collection.gallery collection_id=5579, template="gallery" }}
comment. Change the collection id to your set id/number in Slate. template="gallery" is required in order to reference your customized _gallery.rhtml file.
@wvuwebgist
wvuwebgist / youtube_playlist_player.rhtml
Last active October 4, 2015 05:48
YouTube Playlist Player
<!-- YouTube Playlist Player Styles -->
<link href="/themes/shared/youtube_playlist_player/stylesheets/youtube_playlist.1.0.4.css" rel="stylesheet" />
<!-- Required Playlist Player Markup -->
<div class="ytcontainer">
<div id="ytplayer"></div>
<div id="video-info">
<noscript><p>Oops, you should <a href="https://support.google.com/bin/answer.py?hl=en&answer=23852">enable Javascript</a> to be able to see these videos. You can also <a href="http://www.youtube.com/user/WestVirginiaU">watch the videos on YouTube.</a></p></noscript>
</div> <!-- /#video-info -->
@wvuwebgist
wvuwebgist / _render_images.rhtml
Created May 10, 2012 18:35
Customize & Embed an Image Set on your Site
<% for r in @resources -%>
<img src="<%= resource_url(r, r.managed_filename) %>" alt="<%=h r.description %>" title="<%=h r.name %>" />
<% end -%>