Browse Source

Refactor stylesheets in html & eruby, IE if blocks

master
jimi 15 years ago
parent
commit
3ecf4882e3
  1. 25
      ftplugin/html/html.xpt.vim
  2. 4
      ftplugin/ruby/ruby.xpt.vim

25
ftplugin/html/html.xpt.vim

@ -5,8 +5,8 @@ XPTemplate priority=personal
let s:f = g:XPTfuncs() let s:f = g:XPTfuncs()
XPTvar $blank ' ' XPTvar $blank ' '
XPTvar $js_dir 'scripts'
XPTvar $css_dir 'styles'
XPTvar $js_dir 'javascripts'
XPTvar $css_dir 'stylesheets'
XPTvar $jq_ver '1.4.2.min' XPTvar $jq_ver '1.4.2.min'
XPTvar $empty '' XPTvar $empty ''
@ -55,7 +55,8 @@ XPT skel abbr synonym=html|xhtml " xhtml skeleton
XPT link " <link rel='stylesheet'... XPT link " <link rel='stylesheet'...
XSET dir=$css_dir/ XSET dir=$css_dir/
XSET src=base.css XSET src=base.css
<link rel="stylesheet" type="text/css" href="`dir^`src^" />
XSET media=screen
<link rel="stylesheet" type="text/css" href="`dir^`src^"` media="`media`"^ />
XPT alternate " <link rel='alternate'... XPT alternate " <link rel='alternate'...
XSET type=application/rss+xml XSET type=application/rss+xml
@ -66,10 +67,14 @@ XPT icon " <link rel='shortcut icon'...
XSET url=/favicon.ico XSET url=/favicon.ico
<link rel="shortcut icon" href="`url^" /> <link rel="shortcut icon" href="`url^" />
XPT reset synonym=fonts|base|grids|layout
XPT reset synonym=fonts|base|grids|layout|screen
XSET name=$_xSnipName.css XSET name=$_xSnipName.css
`:link( { 'src' : 'name' } ):^ `:link( { 'src' : 'name' } ):^
XPT print alias=link
XSET src=print.css
XSET media=print
XPT jquery abbr synonym=jq " <script... src="jquery... XPT jquery abbr synonym=jq " <script... src="jquery...
XSET dir=$js_dir/ XSET dir=$js_dir/
XSET ver=$jq_ver XSET ver=$jq_ver
@ -126,3 +131,15 @@ XPT a wrap=content " <a href...
XSET href=# XSET href=#
XSET content=Echo('') XSET content=Echo('')
<a href="`href^">`content^</a> <a href="`href^">`content^</a>
XPT lie8 wrap=content " <!--[if lt IE 8]>...
XSET content=Echo('')
<!--[if lt IE 8]>
`content^
<![endif]-->
XPT lie9 wrap=content " <!--[if lt IE 9]>...
XSET content=Echo('')
<!--[if lt IE 9]>
`content^
<![endif]-->

4
ftplugin/ruby/ruby.xpt.vim

@ -31,6 +31,9 @@ XSET bool=true`^
XPT :html alias=key XPT :html alias=key
XSET val={ `html^ } XSET val={ `html^ }
XPT :media alias=key
XSET val='`screen^'
" RSpec snippets " RSpec snippets
XPT loop " loop do .. end XPT loop " loop do .. end
@ -47,5 +50,4 @@ XSET name=it
`:loop({ 'loop' : 'name' }):^ `:loop({ 'loop' : 'name' }):^
XPT :content " $_xSnipName => "val" XPT :content " $_xSnipName => "val"
XSET val="`str^"
`:key:^ `:key:^