mirror of
https://github.com/wahyd4/wahyd4.github.com.git
synced 2026-08-09 05:15:56 +10:00
update to the newest version
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
* text=auto
|
||||
@@ -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
@@ -0,0 +1,7 @@
|
||||
---
|
||||
layout: nil
|
||||
---
|
||||
User-agent: *
|
||||
Disallow:
|
||||
|
||||
Sitemap: {{ site.url }}/sitemap.xml
|
||||
@@ -0,0 +1,5 @@
|
||||
language: ruby
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 1.9.2
|
||||
script: bundle exec rake install; bundle exec rake generate
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
+5
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
---
|
||||
layout: nil
|
||||
---
|
||||
User-agent: *
|
||||
Disallow:
|
||||
|
||||
Sitemap: {{ site.url }}/sitemap.xml
|
||||
Reference in New Issue
Block a user