update to the newest version

This commit is contained in:
2013-06-13 13:27:12 +08:00
parent 0ee15bfe27
commit 6b0bc540f0
11 changed files with 152 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
root = true
; Use 2 spaces for indentation in all Ruby files
[*.rb]
indent_style = space
indent_size = 2
[Rakefile]
indent_style = space
indent_size = 2
[Gemfile*]
indent_style = space
indent_size = 2
[config.ru]
indent_style = space
indent_size = 2
+1
View File
@@ -0,0 +1 @@
* text=auto
+44
View File
@@ -0,0 +1,44 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
; Use 2 spaces for indentation in SCSS, JavaScript, HTML, and XML
[*.scss]
indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_size = 2
[*.html]
indent_style = space
indent_size = 2
[*.xml]
indent_style = space
indent_size = 2
; Use 4 spaces for indentation in Markdown files
[*.md]
indent_style = space
indent_size = 4
[*.markdown]
indent_style = space
indent_size = 4
; Override default indentation for some library files
[jwplayer/glow/glow.xml]
indent_style = tab
[libs/jXHR.js]
indent_style = tab
[libs/swfobject-dynamic.js]
indent_style = tab
@@ -0,0 +1,6 @@
/*
Add plugin stylesheets to this directory and they will be automatically
Imported. Load order is alphabetical and styles can be overriden in
custom/_style.scss which is loaded after all plugin stylesheets.
*/
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
---
layout: nil
---
User-agent: *
Disallow:
Sitemap: {{ site.url }}/sitemap.xml
+5
View File
@@ -0,0 +1,5 @@
language: ruby
rvm:
- 1.9.3
- 1.9.2
script: bundle exec rake install; bundle exec rake generate
+44
View File
@@ -0,0 +1,44 @@
require 'json'
class ConfigTag < Liquid::Tag
def initialize(tag_name, options, tokens)
super
options = options.split(' ').map {|i| i.strip }
@key = options.slice!(0)
@tag = nil
@classname = nil
options.each do |option|
@tag = $1 if option =~ /tag:(\S+)/
@classname = $1 if option =~ /classname:(\S+)/
end
end
def render(context)
config_tag(context.registers[:site].config, @key, @tag, @classname)
end
end
def config_tag(config, key, tag=nil, classname=nil)
options = key.split('.').map { |k| config[k] }.last #reference objects with dot notation
tag ||= 'div'
classname ||= key.sub(/_/, '-').sub(/\./, '-')
output = "<#{tag} class='#{classname}'"
if options.respond_to? 'keys'
options.each do |k,v|
unless v.nil?
v = v.join ',' if v.respond_to? 'join'
v = v.to_json if v.respond_to? 'keys'
output += " data-#{k.sub'_','-'}='#{v}'"
end
end
elsif options.respond_to? 'join'
output += " data-value='#{config[key].join(',')}'"
else
output += " data-value='#{config[key]}'"
end
output += "></#{tag}>"
end
Liquid::Template.register_tag('config_tag', ConfigTag)
+6
View File
@@ -0,0 +1,6 @@
/*
Add plugin stylesheets to this directory and they will be automatically
Imported. Load order is alphabetical and styles can be overriden in
custom/_style.scss which is loaded after all plugin stylesheets.
*/
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
---
layout: nil
---
User-agent: *
Disallow:
Sitemap: {{ site.url }}/sitemap.xml