This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Allow to set draft page as a parent page | |
*/ | |
add_filter( 'page_attributes_dropdown_pages_args', 'enable_drafts_parents' ); | |
add_filter( 'quick_edit_dropdown_pages_args', 'enable_drafts_parents' ); | |
function enable_drafts_parents( $args ) { | |
$args['post_status'] = 'draft,publish,pending'; | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="dev-diagram"> | |
<% steps.each_with_index do |step, index| %> | |
<% if index.even? %> | |
<% step_class = 'dev-diagram__step dev-diagram__step_right' %> | |
<% else %> | |
<% step_class = 'dev-diagram__step dev-diagram__step_left' %> | |
<% end %> | |
<div class="#{step_class}"> | |
<div class="dev-diagram__ic"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# application_helper.rb | |
def b(block_name, options={}, &block) | |
options.merge!(:body => capture(&block)) if block_given? | |
render :partial => block_name, :locals => options | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="ru"><![endif]--> | |
<!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="ru"><![endif]--> | |
<!--[if IE 8]> <html class="lt-ie9" lang="ru"><![endif]--> | |
<!--[if gt IE 8]><!--><html class="" lang="ru"><!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<title><%= yield :title %></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<%= csrf_meta_tags %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults: &defaults | |
adapter: postgresql | |
encoding: unicode | |
# Don't forget to change project name! | |
database: project_name | |
pool: 20 | |
username: vagrant | |
password: 'vagrant' | |
template: template0 | |
host: localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Usage example: | |
// Image folder: | |
// ic-soc/ | |
// fb.png | |
// tw.png | |
// vk.png | |
// | |
// HTML: | |
// <i class="ic-soc ic-soc_fb"></i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mixin to layout blocks to justify parent width | |
// Works IE6+, Chrome, FF, Opera, Safari | |
// | |
// NOTE Don't forget to set font-size, line-height and text-align to child | |
// elements. | |
// NOTE that whitespace between list items is required. | |
// ISSUE: extra space at bottom. | |
// | |
// Usage example: | |
// HTML: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.list-group | |
- Dir.foreach('app/assets/images/ic-a') do |fname| | |
- next if fname == '.' || fname == '..' || !fname.include?('.') | |
- fname_without_ext = fname[/.*(?=\..+$)/] | |
li.list-group-item | |
p .ic-a.ic-a_#{fname_without_ext} | |
i( class="ic-a ic-a_#{fname_without_ext}" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html | |
head | |
meta( charset='utf-8' ) | |
meta( name='viewport' content='initial-scale=1' ) | |
<!--[if gt IE 8]><!--> | |
= stylesheet_link_tag 'fonts-woff', :media => 'screen' | |
<!--<![endif]--><!--[if lte IE 8]> | |
= stylesheet_link_tag 'fonts-eot', :media => 'screen' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blocks = ['nav', 'ul', 'editor-text', 'title', 'btn-lnk', 'ic-a', 'grid', 'form'] | |
get 'kitchen' => 'kitchen#index' | |
blocks.each do |bname| | |
fname = bname.gsub('-', '_') | |
get "kitchen/#{bname}" => "kitchen##{fname}" | |
end |
OlderNewer