Fix bug in layout, parser and change lib/fraisier

This commit is contained in:
chris2tof 2011-09-07 11:53:16 +08:00
parent 4ce0bda00b
commit 0956e9784a
6 changed files with 10 additions and 8 deletions

View File

@ -185,18 +185,18 @@ body{
clear: both; clear: both;
visibility: hidden; visibility: hidden;
} }
#panel_header #nav{ #panel_header #panel_nav{
margin:0; margin:0;
padding:0; padding:0;
width:100%; width:100%;
} }
#panel_header #nav li{ #panel_header #panel_nav li{
float: left; float: left;
list-style: none outside none; list-style: none outside none;
} }
#panel_header #nav li a{ #panel_header #panel_nav li a{
background: none repeat scroll 0 0 #fff; background: none repeat scroll 0 0 #fff;
border-radius: 13px 13px 13px 13px; border-radius: 13px 13px 13px 13px;
border: 1px solid #D6D6D6; border: 1px solid #D6D6D6;
@ -208,7 +208,7 @@ body{
text-decoration: none; text-decoration: none;
} }
#panel_header #nav li a:hover{ #panel_header #panel_nav li a:hover{
background: none repeat scroll 0 0 #818181; background: none repeat scroll 0 0 #818181;
border-radius: 13px 13px 13px 13px; border-radius: 13px 13px 13px 13px;
color: #fff; color: #fff;

View File

@ -26,7 +26,7 @@
<div id="panel_header"> <div id="panel_header">
<h1>Orbit <%= t('admin.admin') %></h1> <h1>Orbit <%= t('admin.admin') %></h1>
<ul id="nav"> <ul id="panel_nav">
<li><%= link_to t('homepage'), root_path %></li> <li><%= link_to t('homepage'), root_path %></li>
<li><%= link_to t('admin.item'), admin_items_path %></li> <li><%= link_to t('admin.item'), admin_items_path %></li>
<li><%= link_to t('admin.design'), admin_designs_path %></li> <li><%= link_to t('admin.design'), admin_designs_path %></li>

View File

@ -34,7 +34,7 @@
<div id="panel_header"> <div id="panel_header">
<h1>Orbit <%= t('admin.item') %></h1> <h1>Orbit <%= t('admin.item') %></h1>
<ul id="nav"> <ul id="panel_nav">
<li><%= link_to t('homepage'), root_path %></li> <li><%= link_to t('homepage'), root_path %></li>
<li><%= link_to t('admin.item'), admin_items_path %></li> <li><%= link_to t('admin.item'), admin_items_path %></li>
<li><%= link_to t('admin.design'), admin_designs_path %></li> <li><%= link_to t('admin.design'), admin_designs_path %></li>

View File

@ -69,6 +69,7 @@ module Parser
res << "<link href='#{page.design.default_css.url}' rel='stylesheet' type='text/css' /> " res << "<link href='#{page.design.default_css.url}' rel='stylesheet' type='text/css' /> "
theme = page.design.themes.detect{ |d| d.id == page.theme_id } theme = page.design.themes.detect{ |d| d.id == page.theme_id }
res << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />" if theme res << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />" if theme
res
end end
c.define_tag 'javascripts' do |tag| c.define_tag 'javascripts' do |tag|
res = '' res = ''
@ -178,6 +179,7 @@ module Parser
res << "<link href='#{page.design.default_css.url}' rel='stylesheet' type='text/css' />" res << "<link href='#{page.design.default_css.url}' rel='stylesheet' type='text/css' />"
theme = page.design.themes.detect{ |d| d.id == page.theme_id } theme = page.design.themes.detect{ |d| d.id == page.theme_id }
res << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />" if theme res << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />" if theme
res
end end
c.define_tag 'javascripts' do |tag| c.define_tag 'javascripts' do |tag|
res = '' res = ''

View File

@ -69,7 +69,7 @@ namespace :dev do
design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake") design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake")
design.structure_css = File.open("#{Rails.root}/lib/fraisier/structure.css") design.default_css = File.open("#{Rails.root}/lib/fraisier/default.css")
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
# #
@ -93,7 +93,7 @@ namespace :dev do
design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran") design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran")
design_1.structure_css = File.open("#{Rails.root}/lib/fraisier/structure.css") design_1.default_css = File.open("#{Rails.root}/lib/fraisier/default.css")
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif")) # image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
# #