Skip to content

Instantly share code, notes, and snippets.

pages = Page.create([
{ :name => 'Test Page One', :permalink => 'test-page-one', :body => 'Lorem ipsum dolor sit amet.', :active => true },
{ :name => 'Test Page Two', :permalink => 'test-page-two', :body => 'Lorem ipsum dolor sit amet.', :active => true },
{ :name => 'Test Page Three', :permalink => 'test-page-three', :body => 'Lorem ipsum dolor sit amet.', :active => true }
{ :name => 'Test Page Four', :permalink => 'test-page-four', :body => 'Lorem ipsum dolor sit amet.', :active => true }
{ :name => 'Child Test Page', :permalink => 'test-page-five', :body => 'Lorem ipsum dolor sit amet.', :active => true, :parent => }
{ :name => 'Child Test Page Two', :permalink => 'test-page-six', :body => 'Lorem ipsum dolor sit amet.', :active => true, :parent => }
{ :name => 'Child Test Page Three', :permalink => 'test-page-seven', :body => 'Lorem ipsum dolor sit amet.', :active => true, :parent => }
{ :name => 'Child Test Page Four', :permalink => 'test-page-eight', :body => 'Lorem ipsum dolor sit a
// Public SCSS file which is included in my public.html.erb layout
@import 'base';
@import 'global';
@import 'public/**/*';
// Header Styles
// *************************************
.header-search {
.thumbnail-header {
min-height: 200px
.item & {
min-height: 305px;
}
}
//Results in
.thumbnail-header {
min-height: 200px
$('.carousel-item').each ->
pattern = /url\(|\)|"|'/g;
background = $(this).css('backgroundImage').replace(pattern,"");
console.log background
$(this).anystretch background
positionX: 'right'
# call jRespond and add breakpoints
jRes = jRespond([
label: "handheld"
enter: 0
exit: 768
,
label: "tablet"
enter: 768
exit: 939
,
@procload
procload / modified-dnn.css
Created August 16, 2012 19:17
Modified DNN Admin Stylesheet
.dnn-admin h1, .dnn-admin h2{ font-size:20px;font-weight:normal;}
.dnn-admin h3, .dnn-admin h4{ font-size:12px;font-weight:normal;}
.dnn-admin h5, .dnn-admin h6, .dnn-admin dt{ font-size:11px;font-weight:bold;}
.dnn-admin tfoot, .dnn-admin thead{font-size:12px;color:#036;}
.dnn-admin th{vertical-align:baseline;font-size:12px;font-weight:bold;}
.dnn-admin img{border: none;}
.dnn-admin a:link,
.dnn-admin a:visited,
.dnn-admin a:active{text-decoration:none;color:#036;}
.dnn-admin a:hover{text-decoration:underline;color:#f00;}
@procload
procload / default.css
Created August 16, 2012 19:12
Default DNN CSS
/* GENERIC */
h1, h2{ font-size:20px;font-weight:normal;}
h3, h4{ font-size:12px;font-weight:normal;}
h5, h6, dt{ font-size:11px;font-weight:bold;}
tfoot, thead{font-size:12px;color:#036;}
th{vertical-align:baseline;font-size:12px;font-weight:bold;}
img{border: none;}
a:link, a:visited, a:active{text-decoration:none;color:#036;}
a:hover{text-decoration:underline;color:#f00;}
class window.Multiselect extends CoffeeCup
default_options:
debug: true
init: ->
@create()
@events()
create: ->
$('.marker').bind 'click', (e) ->
e.preventDefault
$('.marker .testimonial').fadeOut 100, ->
$(this).parent('.marker').css
"z-index": 1
$(this).children('.testimonial').fadeIn 100, ->
$(this).parent('.marker').css
"z-index": 5
$('.testimonial .close').bind 'click', (e) ->
#From Application Controller
unless Rails.env.development? || Rails.env.test?
rescue_from Exception, :with => :error_message
rescue_from ActiveRecord::RecordNotFound, :with => :file_not_found
rescue_from ActionController::RoutingError, :with => :file_not_found
rescue_from ActionController::UnknownController, :with => :file_not_found
rescue_from ActionController::UnknownAction, :with => :file_not_found
end
def error_message(e)