adding the last refactored features on the pages section (wip) + clean code

This commit is contained in:
did 2011-11-16 01:39:16 +01:00
parent 80a9a11c7b
commit 2c18f401bb
78 changed files with 896 additions and 2298 deletions

View File

@ -27,6 +27,9 @@ gem 'uglifier', '~> 1.0.4'
gem 'jquery-rails', '~> 1.0.16'
gem 'rails-backbone', '0.5.4'
gem 'handlebars-rails', :git => 'git://github.com/yabawock/handlebars-rails.git'
gem 'codemirror-rails'
gem 'uploadify-rails', :git => 'git://github.com/nragaz/uploadify-rails.git'
gem 'flash_cookie_session', '~> 1.1.1'
gem 'locomotive_liquid', '2.2.2', :require => 'liquid'
gem 'formtastic', '~> 2.0.2'

View File

@ -17,6 +17,14 @@ GIT
carrierwave-mongoid (~> 0.1.3)
mongoid (~> 2.3.3)
GIT
remote: git://github.com/nragaz/uploadify-rails.git
revision: 18353ceb8a8ed1b9839cc642d5806bcffb62eb15
specs:
uploadify-rails (1.0.1)
railties (~> 3.0)
thor (~> 0.14)
GIT
remote: git://github.com/plataformatec/devise.git
revision: e8aabd465216bcb260448056c8ed4580d099a8c9
@ -106,6 +114,7 @@ GEM
childprocess (0.2.2)
ffi (~> 1.0.6)
chunky_png (1.2.5)
codemirror-rails (0.3.1)
coffee-script (2.2.0)
coffee-script-source
execjs
@ -143,6 +152,8 @@ GEM
factory_girl (~> 2.2.0)
railties (>= 3.0.0)
ffi (1.0.9)
flash_cookie_session (1.1.1)
rails (~> 3.0)
fog (1.0.0)
builder
excon (~> 0.7.3)
@ -327,6 +338,7 @@ DEPENDENCIES
capybara
carrierwave-mongoid (~> 0.1.3)
cells (~> 3.7.0)
codemirror-rails
coffee-script (~> 2.2.0)
compass!
cucumber-rails
@ -337,6 +349,7 @@ DEPENDENCIES
devise!
dragonfly (~> 0.9.8)
factory_girl_rails (~> 1.1)
flash_cookie_session (~> 1.1.1)
fog (~> 1.0.0)
formtastic (~> 2.0.2)
growl-glue
@ -370,5 +383,6 @@ DEPENDENCIES
spork (~> 0.9.0.rc)
uglifier (~> 1.0.4)
unicorn
uploadify-rails!
will_paginate (~> 3.0.2)
xpath (~> 0.1.4)

View File

@ -11,6 +11,13 @@
//= require handlebars
//= require backbone
//= require backbone_rails_sync
//= require uploadify
//= require codemirror
//= require codemirror/overlay
//= require codemirror/modes/css
//= require codemirror/modes/javascript
//= require codemirror/modes/xml
//= require codemirror/modes/htmlmixed
//= require_tree ../../../vendor/assets/javascripts
//= require ./locomotive/application

View File

@ -1,10 +1,12 @@
#= require_self
#= require_tree .
#= require_tree ./utils
#= require_tree ./models
#= require_tree ./views
#= require_tree ./routers
window.Locomotive =
mount_on: '/locomotive'
Models: {}
Collections: {}
Routers: {}

View File

@ -0,0 +1,8 @@
class Locomotive.Models.ThemeAsset extends Backbone.Model
class Locomotive.Models.ThemeAssetsCollection extends Backbone.Collection
url: "#{Locomotive.mount_on}/theme_assets"

View File

@ -0,0 +1,26 @@
(function() {
String.prototype.trim = function() {
return this.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
String.prototype.repeat = function(num) {
for (var i = 0, buf = ""; i < num; i++) buf += this;
return buf;
}
String.prototype.truncate = function(length) {
if (this.length > length) {
return this.slice(0, length - 3) + "...";
} else {
return this;
}
}
String.prototype.slugify = function(sep) {
if (typeof sep == 'undefined') sep = '_';
var alphaNumRegexp = new RegExp('[^a-zA-Z0-9\\' + sep + ']', 'g');
var avoidDuplicateRegexp = new RegExp('[\\' + sep + ']{2,}', 'g');
return this.replace(/\s/g, sep).replace(alphaNumRegexp, '').replace(avoidDuplicateRegexp, sep).toLowerCase()
}
})();

View File

@ -0,0 +1,31 @@
window.ImageUploadify =
build: (el, options) ->
multipart_params = @_get_default_multipart_params()
el.uploadify
script: options.url
multi: true
queueID: null
buttonText: 'edit'
buttonImg: null
width: options.width || 30
height: options.height || 30
hideButton: true
wmode: 'transparent'
auto: true
fileExt: '*.jpg;*.png;*.jpeg;*.gif'
fileDesc: 'Only .jpg, .png, .jpeg, .gif'
removeCompleted: true
fileDataName: options.data_name
scriptData: multipart_params
onComplete: (a, b, c, response, data) ->
model = JSON.parse(response)
options.success(model)
onError: (a, b, c, errorObj) ->
options.error(errorObj) if options.error
_get_default_multipart_params: ->
_.tap { _method: 'post', '_http_accept': 'application/json' }, (params) ->
params[$('meta[name=csrf-param]').attr('content')] = encodeURI(encodeURIComponent($('meta[name=csrf-token]').attr('content')));
params[$('meta[name=key-param]').attr('content')] = $('meta[name=key-token]').attr('content');

View File

@ -5,6 +5,8 @@ class Locomotive.Views.ApplicationView extends Backbone.View
render: ->
@render_flash_messages(@options.flash)
@center_ui_dialog()
if @options.view?
@view = new @options.view
@view.render()
@ -14,3 +16,7 @@ class Locomotive.Views.ApplicationView extends Backbone.View
render_flash_messages: (messages) ->
_.each messages, (couple) ->
$.growl couple[0], couple[1]
center_ui_dialog: ->
$(window).resize ->
$('.ui-dialog-content:visible').dialog('option', 'position', 'center')

View File

@ -0,0 +1,128 @@
Locomotive.Views.Pages ||= {}
class Locomotive.Views.Pages.FormView extends Backbone.View
el: '#content'
events:
'keypress #page_title': 'fill_default_slug'
'keypress #page_slug': 'mark_filled_slug'
'change #page_parent_id': 'change_page_url'
'click a#image-picker-link': 'open_image_picker'
'submit': 'save'
initialize: ->
_.bindAll(@, 'insert_image')
@filled_slug = @touched_url = false
@image_picker_view = new Locomotive.Views.ThemeAssets.ImagePickerView
collection: new Locomotive.Models.ThemeAssetsCollection()
on_select: @insert_image
render: ->
# make title editable (if possible)
@make_title_editable()
# the url gets modified by different ways so reflect the changes in the UI
@listen_for_url_changes()
# enable check boxes
@enable_templatized_checkbox()
@enable_redirect_checkbox()
@enable_other_checkboxes()
@_hide_last_separator()
# liquid code textarea
@enable_liquid_editing()
return @
save: (event) ->
# by default, follow the default behaviour
make_title_editable: ->
title = @$('h2 a.editable')
if title.size() > 0
target = @$("##{title.attr('rel')}")
target.parent().hide()
title.click (event) =>
event.stopPropagation() & event.preventDefault()
newValue = prompt(title.attr('title'), title.html());
if newValue && newValue != ''
title.html(newValue)
target.val(newValue)
open_image_picker: (event) ->
event.stopPropagation() & event.preventDefault()
@image_picker_view.editor = @editor
@image_picker_view.render()
insert_image: (path) ->
text = "{{ '#{path}' | theme_image_url }}"
@editor.replaceSelection(text)
@image_picker_view.close()
enable_liquid_editing: ->
@editor = CodeMirror.fromTextArea @$('#page_raw_template').get()[0],
mode: 'liquid'
autoMatchParens: false
lineNumbers: false
passDelay: 50
tabMode: 'shift'
theme: 'default'
fill_default_slug: (event) ->
unless @filled_slug
setTimeout (=> @$('#page_slug').val($(event.target).val().slugify('-')) & @touched_url = true), 30
mark_filled_slug: (event) ->
@filled_slug = true
listen_for_url_changes: ->
setInterval (=> (@change_page_url() & @touched_url = false) if @touched_url), 2000
change_page_url: ->
$.rails.ajax
url: @$('#page_slug').attr('data-url')
type: 'get'
dataType: 'json'
data: { parent_id: @$('#page_parent_id').val(), slug: @$('#page_slug').val() }
success: (data) =>
@$('#page_slug_input .inline-hints').html(data.url).effect('highlight')
enable_templatized_checkbox: ->
@_enable_checkbox 'templatized',
features: ['slug', 'redirect', 'listed']
on_callback: =>
@$('li#page_content_type_id_input').show()
off_callback: =>
@$('li#page_content_type_id_input').hide()
enable_redirect_checkbox: ->
@_enable_checkbox 'redirect',
features: ['templatized', 'cache_strategy']
enable_other_checkboxes: ->
_.each ['published', 'listed'], (exp) =>
@$('li#page_' + exp + '_input input[type=checkbox]').checkToggle()
_enable_checkbox: (name, options) ->
@$('li#page_' + name + '_input input[type=checkbox]').checkToggle
on_callback: =>
_.each options.features, (exp) -> @$('li#page_' + exp + '_input').hide()
options.on_callback() if options.on_callback?
@_hide_last_separator()
off_callback: =>
_.each options.features, (exp) -> @$('li#page_' + exp + '_input').show()
options.off_callback() if options.off_callback?
@_hide_last_separator()
_hide_last_separator: ->
_.each @$('fieldset'), (fieldset) =>
$(fieldset).find('li.last').removeClass('last')
$(_.last($(fieldset).find('li.input:visible'))).addClass('last')

View File

@ -0,0 +1,6 @@
Locomotive.Views.Pages ||= {}
class Locomotive.Views.Pages.EditView extends Locomotive.Views.Pages.FormView
save: (event) ->
console.log('saving')

View File

@ -1,41 +1,3 @@
Locomotive.Views.Pages ||= {}
class Locomotive.Views.Pages.NewView extends Backbone.View
el: '#content'
render: ->
@enable_templatized_checkbox()
@enable_redirect_checkbox()
@enable_other_checkboxes()
return @
enable_templatized_checkbox: ->
features = ['slug', 'redirect', 'listed']
@$('li#page_templatized_input input[type=checkbox]').checkToggle
on_callback: =>
_.each features, (exp) -> @$('li#page_' + exp + '_input').hide()
@$('li#page_content_type_id_input').show()
off_callback: =>
_.each features, (exp) -> @$('li#page_' + exp + '_input').show()
@$('li#page_content_type_id_input').hide()
enable_redirect_checkbox: ->
features = ['templatized', 'cache_strategy']
@$('li#page_redirect_input input[type=checkbox]').checkToggle
on_callback: =>
_.each features, (exp) -> @$('li#page_' + exp + '_input').hide()
off_callback: =>
_.each features, (exp) -> @$('li#page_' + exp + '_input').show()
enable_other_checkboxes: ->
_.each ['published', 'listed'], (exp) =>
@$('li#page_' + exp + '_input input[type=checkbox]').checkToggle()
_hide_last_seperator: ->
@$('fieldset').each (fieldset) =>
fieldset.find('li.last').removeClass('last')
fieldset.find('li.input:visible').addClass('last')
class Locomotive.Views.Pages.NewView extends Locomotive.Views.Pages.FormView

View File

@ -0,0 +1,74 @@
Locomotive.Views.ThemeAssets ||= {}
class Locomotive.Views.ThemeAssets.ImagePickerView extends Backbone.View
tag: 'div'
events:
'click ul.list a': 'select_asset'
initialize: ->
_.bindAll(@, 'add_assets', 'add_asset')
@collection.bind('reset', @add_assets)
render: ->
$(@el).html(ich.theme_image_picker())
@collection.fetch data: { content_type: 'image' }
return @
create_or_show_dialog: ->
@dialog ||= $(@el).dialog
modal: true
width: 600,
open: =>
$('.ui-widget-overlay').bind 'click', => @close()
link = @$('.actions a')
el = @$('.actions input[type=file]')
window.ImageUploadify.build el,
url: link.attr('href')
data_name: el.attr('name')
height: link.outerHeight()
width: link.outerWidth()
success: (model) => @add_asset(new Locomotive.Models.ThemeAsset(model))
error: (msg) => @shake()
@$('.button-wrapper').hover(
=> link.addClass('hover'),
=> link.removeClass('hover')
)
@open()
open: ->
$(@el).dialog('open')
close: ->
$(@el).dialog('close')
shake: ->
$(@el).parents('.ui-dialog').effect('shake', { times: 4 }, 100)
center: ->
$(@el).dialog('option', 'position', 'center')
select_asset: (event) ->
event.stopPropagation() & event.preventDefault()
if @options.on_select
@options.on_select($(event.target).html())
add_assets: (collection) ->
if collection.length == 0
@$('p.no-items').show()
else
@$('ul.list').show()
collection.each @add_asset
setTimeout (=> @create_or_show_dialog()), 30 # disable flickering
add_asset: (asset) ->
@$('ul.list').append(ich.theme_asset(asset.toJSON()))
@center() if @editor

View File

@ -4,9 +4,12 @@
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree ../../../vendor/assets/stylesheets/jquery
*= require ../../../vendor/assets/stylesheets/blueprint/screen.css
*= require ../../../vendor/assets/stylesheets/toggle.css
*= require_tree ../../../vendor/assets/stylesheets/jquery
*= require formtastic
*= require codemirror
*= require codemirror/themes/default
*= require ../../../vendor/assets/stylesheets/toggle.css
*= require ../../../vendor/assets/stylesheets/liquid_mode.css
*= require_tree ./locomotive
*/

View File

@ -64,3 +64,45 @@
top: 1px;
}
}
@mixin gray-button {
position: relative;
padding: 2px 10px 3px 31px;
background-color: #ebedf4;
@include border-radius(10px);
@include box-shadow(rgba(0, 0, 0, 0.4) 1px 1px 0px 0px);
color: #8b8d9a;
text-decoration: none;
font-size: 11px;
margin-left: 10px;
outline: none;
em {
position: absolute;
top: 5px;
left: 10px;
display: block;
height: 16px;
width: 16px;
background: transparent image-url("locomotive/icons/actions.png") no-repeat 0 0;
}
&.show em { background-position: 0 0; }
&.edit em { background-position: 0 -16px; top: 2px; left: 12px; }
&.download em { background-position: 0 -32px; }
&.new em { background-position: 0 -48px; top: 4px; left: 13px; }
&:hover, &.hover {
text-decoration: none;
color: #333;
}
&:active, &.active {
top: 1px;
}
}

View File

@ -16,3 +16,14 @@
color: #1F82BC;
}
}
@mixin default-input-style {
padding: 4px 5px;
color: #17171B;
font-size: 14px;
font-weight: bold;
border: 1px solid #b5b7c4;
@include background-image(linear-gradient(top, #f0f0f0, #f9f9f9 25%, #f9f9f9 25%, #ffffff 50%, #ffffff));
}

View File

@ -55,6 +55,7 @@ ul.list {
li {
position: relative;
height: 31px;
line-height: 31px;
background: #ebedf4;
@include border-radius(16px);
@ -63,6 +64,15 @@ ul.list {
margin-bottom: 10px;
clear: both;
a {
margin-left: 18px;
@include hover-link;
font-weight: bold;
font-size: 14px;
color: #1F82BC;
}
em {
display: block;
float: left;
@ -97,7 +107,7 @@ ul.list {
div.more {
position: absolute;
top: 3px;
top: 0px;
right: 15px;
font-size: 11px;

View File

@ -0,0 +1,10 @@
@import "helpers";
.CodeMirror {
@include default-input-style;
font-size: 12px;
font-weight: normal;
@include background-image(linear-gradient(top, #f0f0f0, #f9f9f9 4px, #f9f9f9 4px, #ffffff 12px, #ffffff));
}

View File

@ -0,0 +1,80 @@
@import "compass/css3";
@import "compass/css3/border-radius";
@import "compass/css3/images";
@import "compass/css3/text-shadow";
@import "buttons";
.ui-widget-overlay {
background: #000;
opacity: 0.4;
}
.ui-dialog {
font-family: Helvetica, Arial;
background: #fff;
@include box-shadow(rgba(0, 0, 0, 0.2) 0px 0px 10px 3px);
padding: 10px;
border: 1px solid #7c7e7f;
@include border-radius(6px);
.ui-dialog-titlebar {
display: none;
}
.ui-dialog-content {
position: relative;
text-align: left;
padding: 0px;
background: #fff;
h2 {
padding-bottom: 10px;
line-height: 18px;
border-bottom: 1px dotted #bbbbbd;
color: #1E1F26;
font-size: 18px;
font-weight: bold;
}
.actions {
position: absolute;
top: -2px;
right: 2px;
a {
@include gray-button;
}
&.button-wrapper {
#theme_asset_sourceUploader {
position: absolute;
top: 0px;
right: 0px;
}
#theme_asset_sourceUploader {
z-index: 1001;
}
a {
z-index: 1000;
}
} // .actions.button-wrapper
} // .actions
.list {
overflow: auto;
height: 350px;
}
}
}

View File

@ -4,17 +4,6 @@
@import "compass/css3/text-shadow";
@import "helpers";
@mixin default-input-style {
padding: 4px 5px;
color: #17171B;
font-size: 14px;
font-weight: bold;
border: 1px solid #b5b7c4;
@include background-image(linear-gradient(top, #f0f0f0, #f9f9f9 25%, #f9f9f9 25%, #ffffff 50%, #ffffff));
}
form.formtastic {
fieldset {
@ -47,21 +36,21 @@ form.formtastic {
padding: 0px;
border-top: 1px solid #ccced7;
// background: #ebedf4;
> li {
> li.input {
margin: 0;
padding: 10px 20px 16px 20px;
background: transparent image-url("locomotive/form/input-sep.png") repeat-x 0 bottom;
&:last-child {
&:last-child, &.last {
background: none;
// padding-bottom: 0px;
margin-bottom: 0px;
}
label {
label, .label {
float: left;
width: 160px;
padding: 0px 0 0 0px;
@ -116,11 +105,11 @@ form.formtastic {
&.highlighted {
label {
padding-top: 6px;
padding-top: 7px;
}
input[type=text] {
font-size: 18px;
font-size: 20px;
}
}
} // li.string

View File

@ -2,6 +2,6 @@
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require ../../../../vendor/assets/stylesheets/blueprint/screen.css
*= require_self
*= require ../../../../vendor/assets/stylesheets/blueprint/ie.css
*/

View File

@ -48,6 +48,8 @@ body {
position: relative;
padding-top: 20px;
z-index: 99;
h1 {
margin-bottom: 0px;
font-size: 100%;
@ -90,6 +92,8 @@ body {
margin: 0px 8px;
padding: 10px 15px 20px 15px;
z-index: 100;
background: #fff;
@include box-shadow(rgba(0, 0, 0, 0.6) 0px 1px 4px 3px);
@ -113,6 +117,7 @@ body {
outline: none;
&:hover {
text-decoration: none;
background: #fffbe5 image-url("locomotive/form/pen.png") no-repeat right 5px;
border-bottom: 1px dotted #efe4a5;
}
@ -144,49 +149,7 @@ body {
right: 15px;
a {
position: relative;
padding: 2px 10px 3px 31px;
background-color: #ebedf4;
// border: 1px solid #ebedf4;
@include border-radius(10px);
@include box-shadow(rgba(0, 0, 0, 0.4) 1px 1px 0px 0px);
color: #8b8d9a;
text-decoration: none;
font-size: 11px;
margin-left: 10px;
outline: none;
em {
position: absolute;
top: 5px;
left: 10px;
display: block;
height: 16px;
width: 16px;
background: transparent image-url("locomotive/icons/actions.png") no-repeat 0 0;
}
&.show em { background-position: 0 0; }
&.edit em { background-position: 0 -16px; top: 2px; left: 12px; }
&.download em { background-position: 0 -32px; }
&.new em { background-position: 0 -48px; top: 4px; left: 13px; }
&:hover {
text-decoration: none;
color: #333;
// border-color: rgba(0, 0, 0, 0.6);
// @include box-shadow(#fff 0 0 0 0);
}
&:active {
top: 1px;
}
@include gray-button;
} // #local-actions-bar a
} // #content #local-actions-bar

View File

@ -110,24 +110,29 @@
& > ul {
background: #23242b image-url("locomotive/menu/submenu/black-bg.png") repeat-x 0 0;
border-color: rgba(255, 255, 255, 0.2);
& > li > a {
border: 1px solid rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.6);
@include box-shadow-with-inset(rgba(255, 255, 255, 0.1));
@include background-image(linear-gradient(#303138, #1e1e24));
}
&.on, &:active {
border: 1px solid rgba(0, 0, 0, 0.4);
border-top: 1px solid rgba(0, 0, 0, 0.6);
@include background-image(linear-gradient(#1e1e24, #212229));
@include box-shadow-with-inset(rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.2));
}
& > ul > li > a, & > .action a {
border: 1px solid rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.6);
@include box-shadow-with-inset(rgba(255, 255, 255, 0.1));
@include background-image(linear-gradient(#303138, #1e1e24));
&.on, &:active {
border: 1px solid rgba(0, 0, 0, 0.4);
border-top: 1px solid rgba(0, 0, 0, 0.6);
@include background-image(linear-gradient(#1e1e24, #212229));
@include box-shadow-with-inset(rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.2));
}
}
& > .action {
background-image: image-url("locomotive/menu/submenu/black-action-border.png") !important;
a:hover {
border: 1px solid rgba(255, 255, 255, 0.5);
}
}
}

View File

@ -1,14 +1,75 @@
@import "helpers";
@mixin submenu_link {
display: inline-block;
@include border-radius(16px);
@include box-shadow(rgba(255, 255, 255, 0.2) 0 1px 0 0 inset, rgba(255, 255, 255, 0.1) 0 1px 0 0);
border: 1px solid rgba(0, 0, 0, 0.4);
border-top: 1px solid rgba(0, 0, 0, 0.3);
padding: 0px 16px 0px 16px;
height: 26px;
font-size: 16px;
line-height: 22px;
outline: none;
span {
color: #fff;
font-size: 13px;
font-weight: normal;
text-shadow: 1px 1px 1px #000;
}
&:hover {
border: 1px solid rgba(0, 0, 0, 0.9);
border-top: 1px solid rgba(0, 0, 0, 0.8);
}
&.on, &:active {
border: 1px solid rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.4);
border-bottom: 1px solid transparent !important;
@include box-shadow-with-inset(rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.2));
}
&.hover {
background: #fff !important;
border-color: transparent !important;
border-color-bottom: #fff;
padding-bottom: 0px;
@include border-left-radius(0px); // !important is missing here
position: relative;
z-index: 998;
span {
color: #8b8d9a;
text-shadow: none;
@include no-box-shadow(true);
}
span em {
background-position: -12px -16px;
}
& > em {
@include absolute-position(bottom, 0px, right, -11px);
width: 13px;
height: 13px;
background: transparent image-url("locomotive/menu/popup/bottom-right-corner.png") no-repeat 0 0;
}
}
}
#submenu {
clear: both;
position: relative;
top: -1px;
z-index: 998;
height: 60px;
margin: 0px;
padding: 0 8px;
background: transparent image-url("locomotive/menu/shadow.png") repeat-y 0 0;
margin: 0px 8px;
padding: 0 0px;
@include box-shadow(rgba(0, 0, 0, 0.2) 0px 4px 4px 3px);
/* ___ submenu items ___ */
@ -37,64 +98,7 @@
}
& > a {
display: inline-block;
@include border-radius(16px);
@include box-shadow(rgba(255, 255, 255, 0.2) 0 1px 0 0 inset, rgba(255, 255, 255, 0.1) 0 1px 0 0);
border: 1px solid rgba(0, 0, 0, 0.4);
border-top: 1px solid rgba(0, 0, 0, 0.3);
padding: 0px 16px 0px 16px;
height: 26px;
font-size: 16px;
line-height: 22px;
outline: none;
span {
color: #fff;
font-size: 13px;
font-weight: normal;
text-shadow: 1px 1px 1px #000;
}
&:hover {
border: 1px solid rgba(0, 0, 0, 0.9);
border-top: 1px solid rgba(0, 0, 0, 0.8);
}
&.on, &:active {
border: 1px solid rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.4);
border-bottom: 1px solid transparent !important;
@include box-shadow-with-inset(rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.2));
}
&.hover {
background: #fff !important;
border-color: transparent !important;
border-color-bottom: #fff;
padding-bottom: 0px;
@include border-left-radius(0px); // !important is missing here
position: relative;
z-index: 998;
span {
color: #8b8d9a;
text-shadow: none;
@include no-box-shadow(true);
}
span em {
background-position: -12px -16px;
}
& > em {
@include absolute-position(bottom, 0px, right, -11px);
width: 13px;
height: 13px;
background: transparent image-url("locomotive/menu/popup/bottom-right-corner.png") no-repeat 0 0;
}
}
@include submenu_link;
}
}
}
@ -102,28 +106,21 @@
/* ___ submenu: actions ___ */
& > .action {
@include absolute-position(top, 0px, right, 22px);
@include absolute-position(top, 0px, right, 12px);
height: 60px;
padding-left: 20px;
z-index: 1;
background: transparent image-url("locomotive/menu/submenu/action-border.png") repeat-y left 0;
a {
display: inline-block;
height: 22px;
@include submenu_link;
margin-top: 18px;
display: inline-block;
margin: 15px 0 0 0;
padding: 0px 10px 0 15px;
background: rgba(0, 0, 0, 0.4);
@include border-radius(16px);
border: 1px solid transparent;
outline: none;
line-height: 20px;
text-decoration: none;
font-size: 16px;
em {
display: inline-block;
@ -134,18 +131,6 @@
top: 1px;
left: -5px;
}
span {
position: relative;
top: -2px;
color: #fff;
font-size: 11px;
text-shadow: 1px 1px 1px #000;
}
&:hover {
border-color: rgba(0, 0, 0, 1);
}
}
}

View File

@ -56,10 +56,6 @@ module Locomotive
authenticate_locomotive_account!
end
def begin_of_association_chain
current_site
end
def self.sections(main, sub = nil)
before_filter do |c|
sub = sub.call(c) if sub.respond_to?(:call)

View File

@ -20,6 +20,11 @@ module Locomotive
respond_with @page, :location => edit_page_url(@page._id)
end
def edit
@page = current_site.pages.find(params[:id])
respond_with @page
end
def update
@page = current_site.pages.find(params[:id])
@page.update_attributes(params[:page])

View File

@ -1,53 +1,50 @@
module Locomotive
class ThemeAssetsController < BaseController
include ActionView::Helpers::SanitizeHelper
extend ActionView::Helpers::SanitizeHelper::ClassMethods
include ActionView::Helpers::TextHelper
include ActionView::Helpers::NumberHelper
sections 'settings', 'theme_assets'
respond_to :json, :only => [:create, :update]
before_filter :sanitize_params, :only => [:create, :update]
respond_to :json, :only => [:index, :create, :update]
def index
@assets = ThemeAsset.all_grouped_by_folder(current_site)
@js_and_css_assets = (@assets[:javascripts] || []) + (@assets[:stylesheets] || [])
if request.xhr?
@images = @assets[:images] || []
render :action => 'images', :layout => false and return
else
@snippets = current_site.snippets.order_by([[:name, :asc]]).all.to_a
respond_to do |format|
format.html {
@assets = ThemeAsset.all_grouped_by_folder(current_site)
@js_and_css_assets = (@assets[:javascripts] || []) + (@assets[:stylesheets] || [])
@snippets = current_site.snippets.order_by([[:name, :asc]]).all.to_a
render
}
format.json {
render :json => current_site.theme_assets.by_content_type(params[:content_type])
}
end
end
def edit
resource.performing_plain_text = true if resource.stylesheet_or_javascript?
edit!
def new
@asset = current_site.theme_assets.build(params[:id])
respond_with @asset
end
def create
create! do |success, failure|
success.json do
render :json => {
:status => 'success',
:url => @theme_asset.source.url,
:local_path => @theme_asset.local_path(true),
:size => number_to_human_size(@theme_asset.size),
:date => l(@theme_asset.updated_at, :format => :short)
}
end
failure.json { render :json => { :status => 'error' } }
end
@asset = current_site.theme_assets.create(params[:theme_asset])
respond_with @asset, :location => edit_theme_asset_url(@asset._id)
end
protected
def edit
@asset = current_site.theme_assets.find(params[:id])
resource.performing_plain_text = true if resource.stylesheet_or_javascript?
respond_with @asset
end
def sanitize_params
params[:theme_asset] = { :source => params[:file] } if params[:file]
def update
@asset = current_site.theme_assets.find(params[:id])
@asset.update_attributes(params[:theme_asset])
respond_with @asset, :location => edit_theme_asset_url(@asset._id)
end
def destroy
@asset = current_site.theme_assets.find(params[:id])
@asset.destroy
respond_with @asset
end
end

View File

@ -15,6 +15,16 @@ module Locomotive
end
end
module ClassMethods
def by_content_type(content_type)
return self.all if content_type.blank?
self.all.where(:content_type => content_type.to_s)
end
end
end
end
end

View File

@ -100,6 +100,10 @@ module Locomotive
{ :url => self.source.url }.merge(self.attributes).stringify_keys
end
def as_json(options = {})
Locomotive::ThemeAssetPresenter.new(self).as_json
end
def self.all_grouped_by_folder(site)
assets = site.theme_assets.order_by([[:slug, :asc]])
assets.group_by { |a| a.folder.split('/').first.to_sym }

View File

@ -0,0 +1,18 @@
class Locomotive::BasePresenter
include ActionView::Helpers::SanitizeHelper
extend ActionView::Helpers::SanitizeHelper::ClassMethods
include ActionView::Helpers::TextHelper
include ActionView::Helpers::NumberHelper
attr_reader :source
def initialize(object)
@source = object
end
# def as_json(options = {})
# @source.as_json(options)
# end
end

View File

@ -0,0 +1,29 @@
module Locomotive
class ThemeAssetPresenter < BasePresenter
def local_path
self.source.local_path(true)
end
def url
self.source.source.url
end
def size
number_to_human_size(self.source.size)
end
def updated_at
I18n.l(self.source.updated_at, :format => :short)
end
def as_json
{}.tap do |hash|
%w(local_path url size updated_at).map(&:to_sym).each do |meth|
hash[meth] = self.send(meth)
end
end
end
end
end

View File

@ -1,3 +1,6 @@
- content_for :head do
= render :partial => '/locomotive/theme_assets/picker'
- if can?(:manage, @page)
= f.inputs :name => :information do
@ -19,7 +22,7 @@
- if can?(:manage, @page)
= f.inputs :name => :advanced_options, :id => 'advanced-options', :class => 'foldable' do
= f.inputs :name => :advanced_options, :id => 'advanced-options', :class => 'inputs foldable' do
= f.input :content_type_id, :as => :select, :collection => current_site.content_types.all.to_a, :include_blank => false, :wrapper_html => { :style => "#{'display: none' unless @page.templatized?}" }
@ -35,6 +38,6 @@
= f.input :redirect_url, :required => true, :wrapper_html => { :style => "#{'display: none' unless @page.redirect?}" }
= f.inputs :name => :raw_template, :class => 'foldable' do
= f.inputs :name => :raw_template, :class => 'inputs foldable' do
= f.input :raw_template, :as => :'Locomotive::Code'

View File

@ -2,6 +2,11 @@
= csrf_meta_tag
- key = Rails.application.config.session_options[:key]
%meta{ :name => 'key-param', :content => Rails.application.config.session_options[:key] }
%meta{ :name => 'key-token', :content => cookies[key] }
= stylesheet_link_tag 'locomotive', :media => 'screen'
= javascript_include_tag 'locomotive'

View File

@ -0,0 +1,23 @@
%script{ :type => 'text/html', :id => 'theme_image_picker' }
%h2!= t('.title')
.actions.button-wrapper
= file_field_tag 'theme_asset[source]'
= local_action_button t('locomotive.theme_assets.index.new'), theme_assets_url(:json), :class => 'new', :id => 'upload-link'
%p.no-items{ :style => 'display: none' }!= t('.no_items')
%ul.list{ :style => 'display: none' }
%script{ :type => 'text/html', :id => 'theme_asset' }
%li
= link_to '{{local_path}}', '{{url}}'
.more
%span.size {{size}}
&mdash;
%span!= t('.updated_at')
%span.date {{updated_at}}

View File

@ -30,7 +30,7 @@ Gem::Specification.new do |s|
s.add_dependency 'sass', '3.1.2'
s.add_dependency 'locomotive_liquid', '2.2.2'
s.add_dependency 'formtastic', '~> 1.2.3'
s.add_dependency 'inherited_resources', '~> 1.1.2'
# s.add_dependency 'inherited_resources', '~> 1.1.2'
s.add_dependency 'cells'
s.add_dependency 'highline'
s.add_dependency 'sanitize'

View File

@ -0,0 +1,88 @@
/*!
ICanHandlebarz.js version 0.1 -- by @ehntoo, based on ICanHaz.js by @HenrikJoreteg
More info at: http://github.com/ehntoo/ICanHandlebarz.js
*/
(function ($) {
/*!
ICanHandlebarz.js -- by @ehntoo, based on ICanHaz.js by @HenrikJoreteg
*/
/*global jQuery */
function ICanHandlebarz() {
var self = this;
self.VERSION = "0.1";
self.templates = {};
// public function for adding templates
// We're enforcing uniqueness to avoid accidental template overwrites.
// If you want a different template, it should have a different name.
self.addTemplate = function (name, templateString) {
if (self[name]) throw "Invalid name: " + name + ".";
if (self.templates[name]) throw "Template \" + name + \" exists";
self.templates[name] = Handlebars.compile(templateString);
self[name] = function (data, title, raw) {
data = data || {};
var result = self.templates[name](data);
return raw? result: $(result);
};
};
// public function for adding partials
self.addPartial = function (name, templateString) {
if (Handlebars.partials[name]) throw "Partial \" + name + \" exists";
Handlebars.registerPartial(name, templateString);
};
self.addHelper = function (name, func, args) {
if (Handlebars.helpers[name]) throw "Helper \" + name + \" exists";
if (typeof func === 'function') {
Handlebars.registerHelper(name, func);
} else {
Handlebars.registerHelper(name, new Function(args, func));
}
}
// grabs templates from the DOM and caches them.
// Loop through and add templates.
// Whitespace at beginning and end of all templates inside <script> tags will
// be trimmed. If you want whitespace around a partial, add it in the parent,
// not the partial. Or do it explicitly using <br/> or &nbsp;
self.grabTemplates = function () {
$('script[type="text/html"]').each(function (a, b) {
var script = $((typeof a === 'number') ? b : a), // Zepto doesn't bind this
text = (''.trim) ? script.html().trim() : $.trim(script.html());
if (script.hasClass('partial')) {
self.addPartial(script.attr('id'), text);
} else if (script.hasClass('helper')) {
// Does this even work?
self.addHelper(script.attr('id'), text, script.attr('data-args'));
} else {
self.addTemplate(script.attr('id'), text);
}
script.remove();
});
};
// clears all retrieval functions and empties caches
self.clearAll = function () {
for (var key in self.templates) {
delete self[key];
}
self.templates = {};
Handlebars.partials = {};
};
self.refresh = function () {
self.clearAll();
self.grabTemplates();
};
}
window.ich = new ICanHandlebarz();
// init itself on document ready
$(function () {
ich.grabTemplates();
});
})(window.jQuery || window.Zepto);

View File

@ -0,0 +1,42 @@
/*
This overlay provides a 'liquid' mode to the excellent CodeMirror editor (http://codemirror.net/).
Add something like this to your CSS:
.cm-liquid-tag {
color: #32273f;
background: #ead9ff;
}
.cm-liquid-variable {
color: #29739b
background: #c2e0f0;
}
https://gist.github.com/1356686
*/
CodeMirror.defineMode("liquid", function(config, parserConfig) {
var liquidOverlay = {
token: function(stream, state) {
// Variables.
if (stream.match("{{")) {
while ((ch = stream.next()) != null)
if (ch == "}" && stream.next() == "}") break;
return "liquid-variable";
}
// Tags.
if(stream.match("{%")) {
while ((ch = stream.next()) != null)
if (ch == "%" && stream.next() == "}") break;
return "liquid-tag";
}
while (stream.next() != null && !stream.match("{{", false) && !stream.match("{%", false)) {}
return null;
}
};
return CodeMirror.overlayParser(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), liquidOverlay);
});

View File

@ -57,13 +57,13 @@
// if it's set to on
if(checked){
$(element).animate({marginLeft: '34px'}, 100,
$(element).animate({marginLeft: '15px'}, 100,
// callback function
function(){
$(element).parent().prev().css("color","#cccccc");
$(element).parent().next().css("color","#333333");
$(element).parent().css("background-color", settings.off_bg_color);
$(element).parent().css("background-color", settings.off_bg_color).removeClass('on');
$(element).parent().parent().prev().removeAttr("checked");
$(element).removeClass("left").addClass("right");
@ -75,13 +75,13 @@
}else{
$(element).animate({marginLeft: '0em'}, 100,
$(element).animate({marginLeft: '0px'}, 100,
// callback function
function(){
$(element).parent().prev().css("color","#333333");
$(element).parent().next().css("color","#cccccc");
$(element).parent().css("background-color", settings.on_bg_color);
$(element).parent().css("background-color", settings.on_bg_color).addClass('on');
$(element).parent().parent().prev().attr("checked","checked");
$(element).removeClass("right").addClass("left");
@ -103,10 +103,10 @@
$(this).css('display','none');
// insert the new toggle markup
if($(this).attr("checked") == true){
$(this).after('<div class="toggleSwitch"><span class="leftLabel">'+settings.on_label+'<\/span><div class="switchArea" style="background-color: '+settings.on_bg_color+'"><span class="switchHandle left" style="margin-left: 0em;"><\/span><\/div><span class="rightLabel" style="color:#cccccc">'+settings.off_label+'<\/span><\/div>');
if($(this).attr("checked") == "checked" || $(this).attr("checked") == true){
$(this).after('<div class="toggleSwitch"><span class="leftLabel">'+settings.on_label+'<\/span><div class="switchArea on" style="background-color: '+settings.on_bg_color+'"><span class="switchHandle left" style="margin-left: 0em;"><\/span><\/div><span class="rightLabel" style="color:#cccccc">'+settings.off_label+'<\/span><\/div>');
}else{
$(this).after('<div class="toggleSwitch"><span class="leftLabel" style="color:#cccccc;">'+settings.on_label+'<\/span><div class="switchArea" style="background-color: '+settings.off_bg_color+'"><span class="switchHandle right" style="margin-left:34px"><\/span><\/div><span class="rightLabel">'+settings.off_label+'<\/span><\/div>');
$(this).after('<div class="toggleSwitch"><span class="leftLabel" style="color:#cccccc;">'+settings.on_label+'<\/span><div class="switchArea" style="background-color: '+settings.off_bg_color+'"><span class="switchHandle right" style="margin-left:15px"><\/span><\/div><span class="rightLabel">'+settings.off_label+'<\/span><\/div>');
}
// Bind the switchHandle click events to the internal toggle function

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

View File

@ -1,32 +0,0 @@
Buttons
* Gives you great looking CSS buttons, for both <a> and <button>.
* Demo: particletree.com/features/rediscovering-the-button-element
Credits
----------------------------------------------------------------
* Created by Kevin Hale [particletree.com]
* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
Usage
----------------------------------------------------------------
1) Add this plugin to lib/settings.yml.
See compress.rb for instructions.
2) Use the following HTML code to place the buttons on your site:
<button type="submit" class="button positive">
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
</button>
<a class="button" href="/password/reset/">
<img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
</a>
<a href="#" class="button negative">
<img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
</a>

View File

@ -1,97 +0,0 @@
/* --------------------------------------------------------------
buttons.css
* Gives you some great CSS-only buttons.
Created by Kevin Hale [particletree.com]
* particletree.com/features/rediscovering-the-button-element
See Readme.txt in this folder for instructions.
-------------------------------------------------------------- */
a.button, button {
display:block;
float:left;
margin: 0.7em 0.5em 0.7em 0;
padding:5px 10px 5px 7px; /* Links */
border:1px solid #dedede;
border-top:1px solid #eee;
border-left:1px solid #eee;
background-color:#f5f5f5;
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size:100%;
line-height:130%;
text-decoration:none;
font-weight:bold;
color:#565656;
cursor:pointer;
}
button {
width:auto;
overflow:visible;
padding:4px 10px 3px 7px; /* IE6 */
}
button[type] {
padding:4px 10px 4px 7px; /* Firefox */
line-height:17px; /* Safari */
}
*:first-child+html button[type] {
padding:4px 10px 3px 7px; /* IE7 */
}
button img, a.button img{
margin:0 3px -3px 0 !important;
padding:0;
border:none;
width:16px;
height:16px;
float:none;
}
/* Button colors
-------------------------------------------------------------- */
/* Standard */
button:hover, a.button:hover{
background-color:#dff4ff;
border:1px solid #c2e1ef;
color:#336699;
}
a.button:active{
background-color:#6299c5;
border:1px solid #6299c5;
color:#fff;
}
/* Positive */
body .positive {
color:#529214;
}
a.positive:hover, button.positive:hover {
background-color:#E6EFC2;
border:1px solid #C6D880;
color:#529214;
}
a.positive:active {
background-color:#529214;
border:1px solid #529214;
color:#fff;
}
/* Negative */
body .negative {
color:#d12f19;
}
a.negative:hover, button.negative:hover {
background-color:#fbe3e4;
border:1px solid #fbc2c4;
color:#d12f19;
}
a.negative:active {
background-color:#d12f19;
border:1px solid #d12f19;
color:#fff;
}

View File

@ -1,14 +0,0 @@
Fancy Type
* Gives you classes to use if you'd like some
extra fancy typography.
Credits and instructions are specified above each class
in the fancy-type.css file in this directory.
Usage
----------------------------------------------------------------
1) Add this plugin to lib/settings.yml.
See compress.rb for instructions.

View File

@ -1,71 +0,0 @@
/* --------------------------------------------------------------
fancy-type.css
* Lots of pretty advanced classes for manipulating text.
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
/* Indentation instead of line shifts for sibling paragraphs. */
p + p { text-indent:2em; margin-top:-1.5em; }
form p + p { text-indent: 0; } /* Don't want this in forms. */
/* For great looking type, use this code instead of asdf:
<span class="alt">asdf</span>
Best used on prepositions and ampersands. */
.alt {
color: #666;
font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
font-style: italic;
font-weight: normal;
}
/* For great looking quote marks in titles, replace "asdf" with:
<span class="dquo">&#8220;</span>asdf&#8221;
(That is, when the title starts with a quote mark).
(You may have to change this value depending on your font size). */
.dquo { margin-left: -.5em; }
/* Reduced size type with incremental leading
(http://www.markboulton.co.uk/journal/comments/incremental_leading/)
This could be used for side notes. For smaller type, you don't necessarily want to
follow the 1.5x vertical rhythm -- the line-height is too much.
Using this class, it reduces your font size and line-height so that for
every four lines of normal sized type, there is five lines of the sidenote. eg:
New type size in em's:
10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)
New line-height value:
12px x 1.5 = 18px (old line-height)
18px x 4 = 72px
72px / 5 = 14.4px (new line height)
14.4px / 10px = 1.44 (new line height in em's) */
p.incr, .incr p {
font-size: 10px;
line-height: 1.44em;
margin-bottom: 1.5em;
}
/* Surround uppercase words and abbreviations with this class.
Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
.caps {
font-variant: small-caps;
letter-spacing: 1px;
text-transform: lowercase;
font-size:1.2em;
line-height:1%;
font-weight:bold;
padding:0 2px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

View File

@ -1,18 +0,0 @@
Link Icons
* Icons for links based on protocol or file type.
This is not supported in IE versions < 7.
Credits
----------------------------------------------------------------
* Marc Morgan
* Olav Bjorkoy [bjorkoy.com]
Usage
----------------------------------------------------------------
1) Add this line to your HTML:
<link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">

View File

@ -1,40 +0,0 @@
/* --------------------------------------------------------------
link-icons.css
* Icons for links based on protocol or file type.
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
/* Use this class if a link gets an icon when it shouldn't. */
body a.noicon {
background:transparent none !important;
padding:0 !important;
margin:0 !important;
}
/* Make sure the icons are not cut */
a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
a[href$=".rdf"], a[href^="aim:"] {
padding:2px 22px 2px 0;
margin:-2px 0;
background-repeat: no-repeat;
background-position: right center;
}
/* External links */
a[href^="http:"] { background-image: url(icons/external.png); }
a[href^="mailto:"] { background-image: url(icons/email.png); }
a[href^="http:"]:visited { background-image: url(icons/visited.png); }
/* Files */
a[href$=".pdf"] { background-image: url(icons/pdf.png); }
a[href$=".doc"] { background-image: url(icons/doc.png); }
a[href$=".xls"] { background-image: url(icons/xls.png); }
/* Misc */
a[href$=".rss"],
a[href$=".rdf"] { background-image: url(icons/feed.png); }
a[href^="aim:"] { background-image: url(icons/im.png); }

View File

@ -1,10 +0,0 @@
RTL
* Mirrors Blueprint, so it can be used with Right-to-Left languages.
By Ran Yaniv Hartstein, ranh.co.il
Usage
----------------------------------------------------------------
1) Add this line to your HTML:
<link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">

View File

@ -1,109 +0,0 @@
/* --------------------------------------------------------------
rtl.css
* Mirrors Blueprint for left-to-right languages
By Ran Yaniv Hartstein [ranh.co.il]
-------------------------------------------------------------- */
body .container { direction: rtl; }
body .column {
float: right;
margin-right: 0;
margin-left: 10px;
}
body div.last { margin-left: 0; }
body table .last { padding-left: 0; }
body .append-1 { padding-right: 0; padding-left: 40px; }
body .append-2 { padding-right: 0; padding-left: 80px; }
body .append-3 { padding-right: 0; padding-left: 120px; }
body .append-4 { padding-right: 0; padding-left: 160px; }
body .append-5 { padding-right: 0; padding-left: 200px; }
body .append-6 { padding-right: 0; padding-left: 240px; }
body .append-7 { padding-right: 0; padding-left: 280px; }
body .append-8 { padding-right: 0; padding-left: 320px; }
body .append-9 { padding-right: 0; padding-left: 360px; }
body .append-10 { padding-right: 0; padding-left: 400px; }
body .append-11 { padding-right: 0; padding-left: 440px; }
body .append-12 { padding-right: 0; padding-left: 480px; }
body .append-13 { padding-right: 0; padding-left: 520px; }
body .append-14 { padding-right: 0; padding-left: 560px; }
body .append-15 { padding-right: 0; padding-left: 600px; }
body .append-16 { padding-right: 0; padding-left: 640px; }
body .append-17 { padding-right: 0; padding-left: 680px; }
body .append-18 { padding-right: 0; padding-left: 720px; }
body .append-19 { padding-right: 0; padding-left: 760px; }
body .append-20 { padding-right: 0; padding-left: 800px; }
body .append-21 { padding-right: 0; padding-left: 840px; }
body .append-22 { padding-right: 0; padding-left: 880px; }
body .append-23 { padding-right: 0; padding-left: 920px; }
body .prepend-1 { padding-left: 0; padding-right: 40px; }
body .prepend-2 { padding-left: 0; padding-right: 80px; }
body .prepend-3 { padding-left: 0; padding-right: 120px; }
body .prepend-4 { padding-left: 0; padding-right: 160px; }
body .prepend-5 { padding-left: 0; padding-right: 200px; }
body .prepend-6 { padding-left: 0; padding-right: 240px; }
body .prepend-7 { padding-left: 0; padding-right: 280px; }
body .prepend-8 { padding-left: 0; padding-right: 320px; }
body .prepend-9 { padding-left: 0; padding-right: 360px; }
body .prepend-10 { padding-left: 0; padding-right: 400px; }
body .prepend-11 { padding-left: 0; padding-right: 440px; }
body .prepend-12 { padding-left: 0; padding-right: 480px; }
body .prepend-13 { padding-left: 0; padding-right: 520px; }
body .prepend-14 { padding-left: 0; padding-right: 560px; }
body .prepend-15 { padding-left: 0; padding-right: 600px; }
body .prepend-16 { padding-left: 0; padding-right: 640px; }
body .prepend-17 { padding-left: 0; padding-right: 680px; }
body .prepend-18 { padding-left: 0; padding-right: 720px; }
body .prepend-19 { padding-left: 0; padding-right: 760px; }
body .prepend-20 { padding-left: 0; padding-right: 800px; }
body .prepend-21 { padding-left: 0; padding-right: 840px; }
body .prepend-22 { padding-left: 0; padding-right: 880px; }
body .prepend-23 { padding-left: 0; padding-right: 920px; }
body .border {
padding-right: 0;
padding-left: 4px;
margin-right: 0;
margin-left: 5px;
border-right: none;
border-left: 1px solid #eee;
}
body .colborder {
padding-right: 0;
padding-left: 24px;
margin-right: 0;
margin-left: 25px;
border-right: none;
border-left: 1px solid #eee;
}
body .pull-1 { margin-left: 0; margin-right: -40px; }
body .pull-2 { margin-left: 0; margin-right: -80px; }
body .pull-3 { margin-left: 0; margin-right: -120px; }
body .pull-4 { margin-left: 0; margin-right: -160px; }
body .push-0 { margin: 0 18px 0 0; }
body .push-1 { margin: 0 18px 0 -40px; }
body .push-2 { margin: 0 18px 0 -80px; }
body .push-3 { margin: 0 18px 0 -120px; }
body .push-4 { margin: 0 18px 0 -160px; }
body .push-0, body .push-1, body .push-2,
body .push-3, body .push-4 { float: left; }
/* Typography with RTL support */
body h1,body h2,body h3,
body h4,body h5,body h6 { font-family: Arial, sans-serif; }
html body { font-family: Arial, sans-serif; }
body pre,body code,body tt { font-family: monospace; }
/* Mirror floats and margins on typographic elements */
body p img { float: right; margin: 1.5em 0 1.5em 1.5em; }
body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;}
body td, body th { text-align:right; }

View File

@ -1,49 +0,0 @@
/* --------------------------------------------------------------
forms.css
* Sets up some default styling for forms
* Gives you classes to enhance your forms
Usage:
* For text fields, use class .title or .text
-------------------------------------------------------------- */
label { font-weight: bold; }
fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; }
legend { font-weight: bold; font-size:1.2em; }
/* Form fields
-------------------------------------------------------------- */
input.text, input.title,
textarea, select {
margin:0.5em 0;
border:1px solid #bbb;
}
input.text:focus, input.title:focus,
textarea:focus, select:focus {
border:1px solid #666;
}
input.text,
input.title { width: 300px; padding:5px; }
input.title { font-size:1.5em; }
textarea { width: 390px; height: 250px; padding:5px; }
/* Success, notice and error boxes
-------------------------------------------------------------- */
.error,
.notice,
.success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; }
.error { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }
.notice { background: #FFF6BF; color: #514721; border-color: #FFD324; }
.success { background: #E6EFC2; color: #264409; border-color: #C6D880; }
.error a { color: #8a1f11; }
.notice a { color: #514721; }
.success a { color: #264409; }

View File

@ -1,213 +0,0 @@
/* --------------------------------------------------------------
grid.css
* Sets up an easy-to-use grid of 24 columns.
By default, the grid is 950px wide, with 24 columns
spanning 30px, and a 10px margin between columns.
If you need fewer or more columns, namespaces or semantic
element names, use the compressor script (lib/compress.rb)
Note: Changes made in this file will not be applied when
using the compressor: make changes in lib/blueprint/grid.css.rb
-------------------------------------------------------------- */
/* A container should group all your columns. */
.container {
width: 950px;
margin: 0 auto;
}
/* Use this class on any .span / container to see the grid. */
.showgrid { background: url(src/grid.png); }
/* Columns
-------------------------------------------------------------- */
/* Sets up basic grid floating and margin. */
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5,
div.span-6, div.span-7, div.span-8, div.span-9, div.span-10,
div.span-11, div.span-12, div.span-13, div.span-14, div.span-15,
div.span-16, div.span-17, div.span-18, div.span-19, div.span-20,
div.span-21, div.span-22, div.span-23, div.span-24 {
float: left;
margin-right: 10px;
}
/* The last column in a row needs this class. */
.last, div.last { margin-right: 0; }
/* Use these classes to set the width of a column. */
.span-1 { width: 30px; }
.span-2 { width: 70px; }
.span-3 { width: 110px; }
.span-4 { width: 150px; }
.span-5 { width: 190px; }
.span-6 { width: 230px; }
.span-7 { width: 270px; }
.span-8 { width: 310px; }
.span-9 { width: 350px; }
.span-10 { width: 390px; }
.span-11 { width: 430px; }
.span-12 { width: 470px; }
.span-13 { width: 510px; }
.span-14 { width: 550px; }
.span-15 { width: 590px; }
.span-16 { width: 630px; }
.span-17 { width: 670px; }
.span-18 { width: 710px; }
.span-19 { width: 750px; }
.span-20 { width: 790px; }
.span-21 { width: 830px; }
.span-22 { width: 870px; }
.span-23 { width: 910px; }
.span-24 { width: 950px; margin: 0; }
/* Add these to a column to append empty cols. */
.append-1 { padding-right: 40px; }
.append-2 { padding-right: 80px; }
.append-3 { padding-right: 120px; }
.append-4 { padding-right: 160px; }
.append-5 { padding-right: 200px; }
.append-6 { padding-right: 240px; }
.append-7 { padding-right: 280px; }
.append-8 { padding-right: 320px; }
.append-9 { padding-right: 360px; }
.append-10 { padding-right: 400px; }
.append-11 { padding-right: 440px; }
.append-12 { padding-right: 480px; }
.append-13 { padding-right: 520px; }
.append-14 { padding-right: 560px; }
.append-15 { padding-right: 600px; }
.append-16 { padding-right: 640px; }
.append-17 { padding-right: 680px; }
.append-18 { padding-right: 720px; }
.append-19 { padding-right: 760px; }
.append-20 { padding-right: 800px; }
.append-21 { padding-right: 840px; }
.append-22 { padding-right: 880px; }
.append-23 { padding-right: 920px; }
/* Add these to a column to prepend empty cols. */
.prepend-1 { padding-left: 40px; }
.prepend-2 { padding-left: 80px; }
.prepend-3 { padding-left: 120px; }
.prepend-4 { padding-left: 160px; }
.prepend-5 { padding-left: 200px; }
.prepend-6 { padding-left: 240px; }
.prepend-7 { padding-left: 280px; }
.prepend-8 { padding-left: 320px; }
.prepend-9 { padding-left: 360px; }
.prepend-10 { padding-left: 400px; }
.prepend-11 { padding-left: 440px; }
.prepend-12 { padding-left: 480px; }
.prepend-13 { padding-left: 520px; }
.prepend-14 { padding-left: 560px; }
.prepend-15 { padding-left: 600px; }
.prepend-16 { padding-left: 640px; }
.prepend-17 { padding-left: 680px; }
.prepend-18 { padding-left: 720px; }
.prepend-19 { padding-left: 760px; }
.prepend-20 { padding-left: 800px; }
.prepend-21 { padding-left: 840px; }
.prepend-22 { padding-left: 880px; }
.prepend-23 { padding-left: 920px; }
/* Border on right hand side of a column. */
div.border {
padding-right: 4px;
margin-right: 5px;
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
div.colborder {
padding-right: 24px;
margin-right: 25px;
border-right: 1px solid #eee;
}
/* Use these classes on an element to push it into the
next column, or to pull it into the previous column. */
.pull-1 { margin-left: -40px; }
.pull-2 { margin-left: -80px; }
.pull-3 { margin-left: -120px; }
.pull-4 { margin-left: -160px; }
.pull-5 { margin-left: -200px; }
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5 {
float:left;
position:relative;
}
.push-1 { margin: 0 -40px 1.5em 40px; }
.push-2 { margin: 0 -80px 1.5em 80px; }
.push-3 { margin: 0 -120px 1.5em 120px; }
.push-4 { margin: 0 -160px 1.5em 160px; }
.push-5 { margin: 0 -200px 1.5em 200px; }
.push-1, .push-2, .push-3, .push-4, .push-5 {
float: right;
position:relative;
}
/* Misc classes and elements
-------------------------------------------------------------- */
/* In case you need to add a gutter above/below an element */
.prepend-top {
margin-top:1.5em;
}
.append-bottom {
margin-bottom:1.5em;
}
/* Use a .box to create a padded box inside a column. */
.box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #E5ECF9;
}
/* Use this to create a horizontal ruler across a column. */
hr {
background: #ddd;
color: #ddd;
clear: both;
float: none;
width: 100%;
height: .1em;
margin: 0 0 1.45em;
border: none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Clearing floats without extra markup
Based on How To Clear Floats Without Structural Markup by PiE
[http://www.positioniseverything.net/easyclearing.html] */
.clearfix:after, .container:after {
content: "\0020";
display: block;
height: 0;
clear: both;
visibility: hidden;
overflow:hidden;
}
.clearfix, .container {display: block;}
/* Regular clearing
apply to column that should drop below previous ones. */
.clear { clear:both; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

View File

@ -1,59 +0,0 @@
/* --------------------------------------------------------------
ie.css
Contains every hack for Internet Explorer,
so that our core files stay sweet and nimble.
-------------------------------------------------------------- */
/* Make sure the layout is centered in IE5 */
body { text-align: center; }
.container { text-align: left; }
/* Fixes IE margin bugs */
* html .column, * html div.span-1, * html div.span-2,
* html div.span-3, * html div.span-4, * html div.span-5,
* html div.span-6, * html div.span-7, * html div.span-8,
* html div.span-9, * html div.span-10, * html div.span-11,
* html div.span-12, * html div.span-13, * html div.span-14,
* html div.span-15, * html div.span-16, * html div.span-17,
* html div.span-18, * html div.span-19, * html div.span-20,
* html div.span-21, * html div.span-22, * html div.span-23,
* html div.span-24 { overflow-x: hidden; }
/* Elements
-------------------------------------------------------------- */
/* Fixes incorrect styling of legend in IE6. */
* html legend { margin:0px -8px 16px 0; padding:0; }
/* Fixes incorrect placement of ol numbers in IE6/7. */
ol { margin-left:2em; }
/* Fixes wrong line-height on sup/sub in IE. */
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
/* Fixes IE7 missing wrapping of code elements. */
html>body p code { *white-space: normal; }
/* IE 6&7 has problems with setting proper <hr> margins. */
hr { margin: -8px auto 11px; }
/* Clearing
-------------------------------------------------------------- */
/* Makes clearfix actually work in IE */
.clearfix, .container {display: inline-block;}
* html .clearfix,
* html .container {height: 1%;}
/* Forms
-------------------------------------------------------------- */
/* Fixes padding on fieldset */
fieldset {padding-top: 0;}

View File

@ -1,85 +0,0 @@
/* --------------------------------------------------------------
print.css
* Gives you some sensible styles for printing pages.
* See Readme file in this directory for further instructions.
Some additions you'll want to make, customized to your markup:
#header, #footer, #navigation { display:none; }
-------------------------------------------------------------- */
body {
line-height: 1.5;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
color:#000;
background: none;
font-size: 10pt;
}
/* Layout
-------------------------------------------------------------- */
.container {
background: none;
}
hr {
background:#ccc;
color:#ccc;
width:100%;
height:2px;
margin:2em 0;
padding:0;
border:none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Text
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
code { font:.9em "Courier New", Monaco, Courier, monospace; }
img { float:left; margin:1.5em 1.5em 1.5em 0; }
a img { border:none; }
p img.top { margin-top: 0; }
blockquote {
margin:1.5em;
padding:1em;
font-style:italic;
font-size:.9em;
}
.small { font-size: .9em; }
.large { font-size: 1.1em; }
.quiet { color: #999; }
.hide { display:none; }
/* Links
-------------------------------------------------------------- */
a:link, a:visited {
background: transparent;
font-weight:700;
text-decoration: underline;
}
a:link:after, a:visited:after {
content: " (" attr(href) ")";
font-size: 90%;
}
/* If you're having trouble printing relative links, uncomment and customize this:
(note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */
/* a[href^="/"]:after {
content: " (http://www.yourdomain.com" attr(href) ") ";
} */

View File

@ -1,38 +0,0 @@
/* --------------------------------------------------------------
reset.css
* Resets default browser CSS.
-------------------------------------------------------------- */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
line-height: 1.5;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }
/* Remove annoying border on linked images. */
a img { border: none; }

View File

@ -1,105 +0,0 @@
/* --------------------------------------------------------------
typography.css
* Sets up some sensible default typography.
-------------------------------------------------------------- */
/* Default font settings.
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
body {
font-size: 75%;
color: #222;
background: #fff;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* Headings
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
h2 { font-size: 2em; margin-bottom: 0.75em; }
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
h6 { font-size: 1em; font-weight: bold; }
h1 img, h2 img, h3 img,
h4 img, h5 img, h6 img {
margin: 0;
}
/* Text elements
-------------------------------------------------------------- */
p { margin: 0 0 1.5em; }
p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
a:focus,
a:hover { color: #000; }
a { color: #009; text-decoration: underline; }
blockquote { margin: 1.5em; color: #666; font-style: italic; }
strong { font-weight: bold; }
em,dfn { font-style: italic; }
dfn { font-weight: bold; }
sup, sub { line-height: 0; }
abbr,
acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
pre { margin: 1.5em 0; white-space: pre; }
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
/* Lists
-------------------------------------------------------------- */
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dd { margin-left: 1.5em;}
/* Tables
-------------------------------------------------------------- */
table { margin-bottom: 1.4em; width:100%; }
th { font-weight: bold; }
thead th { background: #c3d9ff; }
th,td,caption { padding: 4px 10px 4px 5px; }
tr.even td { background: #e5ecf9; }
tfoot { font-style: italic; }
caption { background: #eee; }
/* Misc classes
-------------------------------------------------------------- */
.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
.hide { display: none; }
.quiet { color: #666; }
.loud { color: #000; }
.highlight { background:#ff0; }
.added { background:#060; color: #fff; }
.removed { background:#900; color: #fff; }
.first { margin-left:0; padding-left:0; }
.last { margin-right:0; padding-right:0; }
.top { margin-top:0; padding-top:0; }
.bottom { margin-bottom:0; padding-bottom:0; }

View File

@ -1,55 +0,0 @@
html {
cursor: text;
}
.editbox {
margin: .4em;
padding: 0;
font-family: monospace;
font-size: 10pt;
color: black;
}
pre.code, .editbox {
color: #666;
}
.editbox p {
margin: 0;
}
span.css-at {
color: #708;
}
span.css-unit {
color: #281;
}
span.css-value {
color: #708;
}
span.css-identifier {
color: black;
}
span.css-selector {
color: #11B;
}
span.css-important {
color: #00F;
}
span.css-colorcode {
color: #299;
}
span.css-comment {
color: #A70;
}
span.css-string {
color: #A22;
}

View File

@ -1,158 +0,0 @@
body {
font-family: Arial, sans-serif;
line-height: 1.5;
max-width: 64.3em;
margin: 3em auto;
padding: 0 1em;
}
body.droid {
font-family: Droid Sans, Arial, sans-serif;
}
h1 {
letter-spacing: -3px;
font-size: 3.23em;
font-weight: bold;
margin: 0;
}
h2 {
font-size: 1.23em;
font-weight: bold;
margin: .5em 0;
letter-spacing: -1px;
}
h3 {
font-size: 1em;
font-weight: bold;
margin: .4em 0;
}
pre {
font-family: Courier New, monospaced;
background-color: #eee;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
padding: 1em;
}
pre.code {
margin: 0 1em;
}
.grey {
font-size: 2em;
padding: .5em 1em;
line-height: 1.2em;
margin-top: .5em;
position: relative;
}
img.logo {
position: absolute;
right: -25px;
bottom: 4px;
}
a:link, a:visited, .quasilink {
color: #df0019;
cursor: pointer;
text-decoration: none;
}
a:hover, .quasilink:hover {
color: #800004;
}
h1 a:link, h1 a:visited, h1 a:hover {
color: black;
}
ul {
margin: 0;
padding-left: 1.2em;
}
a.download {
color: white;
background-color: #df0019;
width: 100%;
display: block;
text-align: center;
font-size: 1.23em;
font-weight: bold;
text-decoration: none;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
padding: .5em 0;
margin-bottom: 1em;
}
a.download:hover {
background-color: #bb0010;
}
.rel {
margin-bottom: 0;
}
.rel-note {
color: #777;
font-size: .9em;
margin-top: .1em;
}
.logo-braces {
color: #df0019;
position: relative;
top: -4px;
}
.blk {
float: left;
}
.left {
width: 37em;
padding-right: 6.53em;
padding-bottom: 1em;
}
.left1 {
width: 15.24em;
padding-right: 6.45em;
}
.left2 {
width: 15.24em;
}
.right {
width: 20.68em;
}
.leftbig {
width: 42.44em;
padding-right: 6.53em;
}
.rightsmall {
width: 15.24em;
}
.clear:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clear { display: inline-block; }
/* start commented backslash hack \*/
* html .clear { height: 1%; }
.clear { display: block; }
/* close commented backslash hack */

View File

@ -1,56 +0,0 @@
.editbox {
margin: .4em;
padding: 0;
font-family: monospace;
font-size: 10pt;
color: black;
background: white url(/assets/locomotive//form/field.png) repeat-x 0 0 !important;
}
pre.code, .editbox {
color: #666666;
}
.editbox p {
margin: 0;
}
span.js-punctuation {
color: #666666;
}
span.js-operator {
color: #666666;
}
span.js-keyword {
color: #770088;
}
span.js-atom {
color: #228811;
}
span.js-variable {
color: black;
}
span.js-variabledef {
color: #0000FF;
}
span.js-localvariable {
color: #004499;
}
span.js-property {
color: black;
}
span.js-comment {
color: #AA7700;
}
span.js-string {
color: #AA2222;
}

View File

@ -1,59 +0,0 @@
html {
cursor: text;
}
.editbox {
margin: .4em;
padding: 0;
font-family: monospace;
font-size: 10pt;
color: black;
}
pre.code, .editbox {
color: #666666;
}
.editbox p {
margin: 0;
}
span.js-punctuation {
color: #666666;
}
span.js-operator {
color: #666666;
}
span.js-keyword {
color: #770088;
}
span.js-atom {
color: #228811;
}
span.js-variable {
color: black;
}
span.js-variabledef {
color: #0000FF;
}
span.js-localvariable {
color: #004499;
}
span.js-property {
color: black;
}
span.js-comment {
color: #AA7700;
}
span.js-string {
color: #AA2222;
}

View File

@ -1,35 +0,0 @@
span.liquid-punctuation {
color: silver;
}
span.liquid-bad-punctuation {
color: red;
text-decoration: underline;
}
span.liquid-text {
color: black;
}
span.liquid-variable {
color: magenta;
}
span.liquid-string {
color: green;
}
span.liquid-tag-name {
color: green;
font-weight: bold;
}
span.liquid-keyword {
color: black;
font-weight: bold;
}
span.liquid-tag-name {
color: black;
font-weight: bold;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,43 +0,0 @@
html {
cursor: text;
}
.editbox {
margin: .4em;
padding: 0;
font-family: monospace;
font-size: 10pt;
color: black;
}
.editbox p {
margin: 0;
}
span.sp-keyword {
color: #708;
}
span.sp-prefixed {
color: #5d1;
}
span.sp-var {
color: #00c;
}
span.sp-comment {
color: #a70;
}
span.sp-literal {
color: #a22;
}
span.sp-uri {
color: #292;
}
span.sp-operator {
color: #088;
}

View File

@ -1,55 +0,0 @@
html {
cursor: text;
}
.editbox {
margin: .4em;
padding: 0;
font-family: monospace;
font-size: 10pt;
color: black;
}
.editbox p {
margin: 0;
}
span.xml-tagname {
color: #A0B;
}
span.xml-attribute {
color: #281;
}
span.xml-punctuation {
color: black;
}
span.xml-attname {
color: #00F;
}
span.xml-comment {
color: #A70;
}
span.xml-cdata {
color: #48A;
}
span.xml-processing {
color: #999;
}
span.xml-entity {
color: #A22;
}
span.xml-error {
color: #F00 !important;
}
span.xml-text {
color: black;
}

View File

@ -1,363 +0,0 @@
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
*
* Version: 1.3.1 (05/03/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
height: 40px;
width: 40px;
margin-top: -20px;
margin-left: -20px;
cursor: pointer;
overflow: hidden;
z-index: 1104;
display: none;
}
* html #fancybox-loading { /* IE6 */
position: absolute;
margin-top: 0;
}
#fancybox-loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
}
#fancybox-overlay {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: #000;
z-index: 1100;
display: none;
}
* html #fancybox-overlay { /* IE6 */
position: absolute;
width: 100%;
}
#fancybox-tmp {
padding: 0;
margin: 0;
border: 0;
overflow: auto;
display: none;
}
#fancybox-wrap {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 20px;
z-index: 1101;
display: none;
}
#fancybox-outer {
position: relative;
width: 100%;
height: 100%;
background: #FFF;
}
#fancybox-inner {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
padding: 0;
margin: 0;
outline: none;
overflow: hidden;
}
#fancybox-hide-sel-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
#fancybox-close {
position: absolute;
top: -15px;
right: -15px;
width: 30px;
height: 30px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px 0px;
cursor: pointer;
z-index: 1103;
display: none;
}
#fancybox_error {
color: #444;
font: normal 12px/20px Arial;
padding: 7px;
margin: 0;
}
#fancybox-content {
height: auto;
width: auto;
padding: 0;
margin: 0;
}
#fancybox-img {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: none;
outline: none;
line-height: 0;
vertical-align: top;
-ms-interpolation-mode: bicubic;
}
#fancybox-frame {
position: relative;
width: 100%;
height: 100%;
border: none;
display: block;
}
#fancybox-title {
position: absolute;
bottom: 0;
left: 0;
font-family: Arial;
font-size: 12px;
z-index: 1102;
}
.fancybox-title-inside {
padding: 10px 0;
text-align: center;
color: #333;
}
.fancybox-title-outside {
padding-top: 5px;
color: #FFF;
text-align: center;
font-weight: bold;
}
.fancybox-title-over {
color: #FFF;
text-align: left;
}
#fancybox-title-over {
padding: 10px;
background-image: url(/assets/locomotive//plugins/fancybox/fancy_title_over.png);
display: block;
}
#fancybox-title-wrap {
display: inline-block;
}
#fancybox-title-wrap span {
height: 32px;
float: left;
}
#fancybox-title-left {
padding-left: 15px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -90px;
background-repeat: no-repeat;
}
#fancybox-title-main {
font-weight: bold;
line-height: 29px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox-x.png);
background-position: 0px -40px;
color: #FFF;
}
#fancybox-title-right {
padding-left: 15px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -55px -90px;
background-repeat: no-repeat;
}
#fancybox-left, #fancybox-right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
outline: none;
background-image: url(/assets/locomotive//plugins/fancybox/blank.gif);
z-index: 1102;
display: none;
}
#fancybox-left {
left: 0px;
}
#fancybox-right {
right: 0px;
}
#fancybox-left-ico, #fancybox-right-ico {
position: absolute;
top: 50%;
left: -9999px;
width: 30px;
height: 30px;
margin-top: -15px;
cursor: pointer;
z-index: 1102;
display: block;
}
#fancybox-left-ico {
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -30px;
}
#fancybox-right-ico {
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -60px;
}
#fancybox-left:hover, #fancybox-right:hover {
visibility: visible; /* IE6 */
}
#fancybox-left:hover span {
left: 20px;
}
#fancybox-right:hover span {
left: auto;
right: 20px;
}
.fancy-bg {
position: absolute;
padding: 0;
margin: 0;
border: 0;
width: 20px;
height: 20px;
z-index: 1001;
}
#fancy-bg-n {
top: -20px;
left: 0;
width: 100%;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox-x.png);
}
#fancy-bg-ne {
top: -20px;
right: -20px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -162px;
}
#fancy-bg-e {
top: 0;
right: -20px;
height: 100%;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox-y.png);
background-position: -20px 0px;
}
#fancy-bg-se {
bottom: -20px;
right: -20px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -182px;
}
#fancy-bg-s {
bottom: -20px;
left: 0;
width: 100%;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox-x.png);
background-position: 0px -20px;
}
#fancy-bg-sw {
bottom: -20px;
left: -20px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -142px;
}
#fancy-bg-w {
top: 0;
left: -20px;
height: 100%;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox-y.png);
}
#fancy-bg-nw {
top: -20px;
left: -20px;
background-image: url(/assets/locomotive//plugins/fancybox/fancybox.png);
background-position: -40px -122px;
}
/* IE */
#fancybox-loading.fancybox-ie div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
.fancybox-ie #fancybox-title-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
.fancybox-ie .fancy-bg { background: transparent !important; }
.fancybox-ie #fancy-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }

View File

@ -1,137 +0,0 @@
/* -------------------------------------------------------------------------------------------------
It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
This will allow you to update formtastic.css with new releases without clobbering your own changes.
This stylesheet forms part of the Formtastic Rails Plugin
(c) 2008 Justin French
--------------------------------------------------------------------------------------------------*/
/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
--------------------------------------------------------------------------------------------------*/
form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
form.formtastic fieldset { border:0; }
form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
form.formtastic ol, form.formtastic ul { list-style:none; }
form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
form.formtastic legend { color:#000; }
/* FIELDSETS & LISTS
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset { }
form.formtastic fieldset.inputs { }
form.formtastic fieldset.buttons { padding-left:25%; }
form.formtastic fieldset ol { }
form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
/* clearfixing the fieldsets */
form.formtastic fieldset { display: inline-block; }
form.formtastic fieldset:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
html[xmlns] form.formtastic fieldset { display: block; }
* html form.formtastic fieldset { height: 1%; }
/* INPUT LIs
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li { margin-bottom:1.5em; }
/* clearfixing the li's */
form.formtastic fieldset ol li { display: inline-block; }
form.formtastic fieldset ol li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
html[xmlns] form.formtastic fieldset ol li { display: block; }
* html form.formtastic fieldset ol li { height: 1%; }
form.formtastic fieldset ol li.required { }
form.formtastic fieldset ol li.optional { }
form.formtastic fieldset ol li.error { }
/* LABELS
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li label { display:block; width:25%; float:left; padding-top:.2em; }
form.formtastic fieldset ol li li label { line-height:100%; padding-top:0; }
form.formtastic fieldset ol li li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li fieldset { position:relative; }
form.formtastic fieldset ol li fieldset legend { position:absolute; width:25%; padding-top:0.1em; }
form.formtastic fieldset ol li fieldset legend span { position:absolute; }
form.formtastic fieldset ol li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
form.formtastic fieldset ol li fieldset ol li { padding:0; border:0; }
/* INLINE HINTS
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
/* INLINE ERRORS
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
form.formtastic fieldset ol li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
form.formtastic fieldset ol li ul.errors li { padding:0; border:none; display:list-item; }
/* STRING & NUMERIC OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.string input { width:74%; }
form.formtastic fieldset ol li.password input { width:74%; }
form.formtastic fieldset ol li.numeric input { width:74%; }
/* TEXTAREA OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.text textarea { width:74%; }
/* HIDDEN OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.hidden { display:none; }
/* BOOLEAN OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.boolean label { padding-left:25%; width:auto; }
form.formtastic fieldset ol li.boolean label input { margin:0 0.5em 0 0.2em; }
/* RADIO OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.radio { }
form.formtastic fieldset ol li.radio fieldset ol { margin-bottom:-0.6em; }
form.formtastic fieldset ol li.radio fieldset ol li { margin:0.1em 0 0.5em 0; }
form.formtastic fieldset ol li.radio fieldset ol li label { float:none; width:100%; }
form.formtastic fieldset ol li.radio fieldset ol li label input { margin-right:0.2em; }
/* CHECK BOXES (COLLECTION) OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.check_boxes { }
form.formtastic fieldset ol li.check_boxes fieldset ol { margin-bottom:-0.6em; }
form.formtastic fieldset ol li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; }
form.formtastic fieldset ol li.check_boxes fieldset ol li label { float:none; width:100%; }
form.formtastic fieldset ol li.check_boxes fieldset ol li label input { margin-right:0.2em; }
/* DATE & TIME OVERRIDES
--------------------------------------------------------------------------------------------------*/
form.formtastic fieldset ol li.date fieldset ol li,
form.formtastic fieldset ol li.time fieldset ol li,
form.formtastic fieldset ol li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
form.formtastic fieldset ol li.date fieldset ol li label,
form.formtastic fieldset ol li.time fieldset ol li label,
form.formtastic fieldset ol li.datetime fieldset ol li label { display:none; }
form.formtastic fieldset ol li.date fieldset ol li label input,
form.formtastic fieldset ol li.time fieldset ol li label input,
form.formtastic fieldset ol li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }

View File

@ -0,0 +1,9 @@
.cm-liquid-tag {
color: #32273f;
background: #ead9ff;
}
.cm-liquid-variable {
color: #29739b;
background: #c2e0f0;
}

View File

@ -1,105 +0,0 @@
body {
/* body:url("/images/admin/form/field.png") repeat-x scroll 0 0 white*/
/* font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
scrollbar-3dlight-color: #F0F0EE;
scrollbar-arrow-color: #676662;
scrollbar-base-color: #F0F0EE;
scrollbar-darkshadow-color: #DDDDDD;
scrollbar-face-color: #E0E0DD;
scrollbar-highlight-color: #F0F0EE;
scrollbar-shadow-color: #F0F0EE;
scrollbar-track-color: #F5F5F5;
*/}
td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
pre {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.example1 {
font-weight: bold;
font-size: 14px
}
.example2 {
font-weight: bold;
font-size: 12px;
color: #FF0000
}
.tablerow1 {
background-color: #BBBBBB;
}
thead {
background-color: #FFBBBB;
}
tfoot {
background-color: #BBBBFF;
}
th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
}
/* Basic formats */
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
.underline {
text-decoration: underline;
}
/* Global align classes */
.left {
text-align: inherit;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
.full {
text-align: justify
}
/* Image and table specific aligns */
img.left, table.left {
float: left;
text-align: inherit;
}
img.center, table.center {
margin-left: auto;
margin-right: auto;
text-align: inherit;
}
img.center {
display: block;
}
img.right, table.right {
float: right;
text-align: inherit;
}

View File

@ -1,42 +0,0 @@
.toggleSwitch {
position: relative;
top: 3px;
}
div.toggleSwitch span.leftLabel{
float: left;
}
div.toggleSwitch span.leftLabel, div.toggleSwitch span.rightLabel{
line-height: 20px;
padding: 0 5px;
font-size: 0.8em;
font-weight: bold;
}
div.toggleSwitch div.switchArea {
float: left;
background: transparent url("./toggle/toggle_shadow-bg.png") top left no-repeat;
width: 64px;
height: 24px;
cursor: pointer;
}
div.toggleSwitch span.switchHandle {
display: block;
background: #aaa;
background: transparent url("./toggle/toggle_handle-bg.png") top left no-repeat;
width: 30px;
height: 100%;
cursor: pointer;
cursor: hand;
margin-left: 0;
}
div.toggleSwitch span.switchHandle.left {
background-image: url("./toggle/toggle_handle_left-bg.png");
}
div.toggleSwitch span.switchHandle.right {
background-image: url("./toggle/toggle_handle_right-bg.png");
}

52
vendor/assets/stylesheets/toggle.scss vendored Normal file
View File

@ -0,0 +1,52 @@
@import "compass/css3";
.toggleSwitch {
position: relative;
top: 3px;
line-height: 14px;
span.leftLabel {
float: left;
}
span.leftLabel, span.rightLabel {
line-height: 14px;
padding: 0 2px;
font-size: 11px;
font-weight: bold;
}
div.switchArea {
float: left;
width: 32px;
height: 12px;
cursor: pointer;
border: 1px solid #1971af;
@include border-radius(3px);
@include background-image(linear-gradient(#218bd9, #2abbf2));
@include box-shadow(rgba(255, 255, 255, 0.8) 0px 1px 0px 0px);
&.on {
border-color: #a3a3a3;
@include background-image(linear-gradient(top, #d2d1d1, #eeeeee 20%, #f1f1f1 25%, #f1f1f1));
}
}
span.switchHandle {
position: relative;
top: -1px;
display: block;
width: 16px;
height: 100%;
cursor: pointer;
cursor: hand;
margin-left: 0;
@include background-image(linear-gradient(#f4f4f4, #eeeeee));
border: 1px solid rgba(120, 120, 120, 1);
@include border-radius(3px);
@include box-shadow(rgba(255, 255, 255, 1) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.3) 0px 1px 1px 0px);
}
}