From d4c470f76fc5abd645390521e75c5be5d3a29d68 Mon Sep 17 00:00:00 2001 From: nccu Date: Fri, 4 Jan 2013 11:43:03 +0800 Subject: [PATCH] Ika's changes for css default widgets --- app/assets/stylesheets/default_widget.css | 279 +++++++++++----------- app/helpers/application_helper.rb | 1 + 2 files changed, 143 insertions(+), 137 deletions(-) diff --git a/app/assets/stylesheets/default_widget.css b/app/assets/stylesheets/default_widget.css index 96e490c4..4f1a7566 100644 --- a/app/assets/stylesheets/default_widget.css +++ b/app/assets/stylesheets/default_widget.css @@ -1,195 +1,200 @@ -body{ - margin:10px; - padding:0; -} -a{ - color:#333; - text-decoration: none; -} -a:hover{ - color:#888; - text-decoration: none; -} -h2{ - margin:0 0 10px; -} -ul{ - margin:0; - padding:0; -} - -li{ - list-style:none; -} -.eletb{ - border-collapse:collapse; - width:600px; -} -.eletb td{ - border: 1px solid #EEEEEE; - padding: 5px; - vertical-align: middle; - text-align: center; -} -.news{ - font-size:12px; - margin:0 0 20px; - position:relative; - width:600px; -} -.news ul{ - margin:0 0 10px; -} -.news li{ - padding:5px 0; -} -.more{ - background:#eee; - border-radius: 5px; - clear:both; - display:inline; - padding:3px; - text-align: center; -} -.top{ - color:#e21f1f; -} - -.elements{ - background: none repeat scroll 0 0 #f2f2f2; - border-radius: 5px 5px 5px 5px; - display: inline-block; - height: 50px; - padding: 10px; - text-align: center; - vertical-align: top; - width: 50px; - word-wrap: break-word; -} -.elementlist{ - margin:0 0 20px; -} /* 1 */ - -.newstb{ +.defulat_widget_typeA{ + font: 12px/100% 'open sans',sans-serif; + margin:0 0 20px; + width:720px; +} +.defulat_widget_tb{ border-collapse:collapse; - width:600px; + width:100%; } -.newstb th{ - background: none repeat scroll 0 0 #eee; - padding: 5px; +.defulat_widget_tb th{ + background: none repeat scroll 0 0 #333333; + color: #FFFFFF; + padding: 10px; text-align: left; } -.newstb td{ - border: 1px solid #EEEEEE; - padding: 5px; +.defulat_widget_tb td{ + border-bottom: 1px solid #AAAAAA; + padding: 10px; + white-space: normal; + word-wrap: break-word; } /* 2 */ -.news2{} - -.news2 li{ - border-bottom:1px solid #eee; +.defulat_widget_typeB_style2{ + font: 12px/100% 'open sans',sans-serif; + margin:0 0 20px; + width:720px; } -.news2 .newsimg{ - display: inline-block; - margin: 0 10px 0 0; - vertical-align: top; +.defulat_widget_typeB_style2 ul{ + margin: 0; + padding: 0; +} +.defulat_widget_typeB_style2 li{ + border-bottom: 1px solid #AAAAAA; + clear: both; + margin: 0 0 10px; + overflow: hidden; + padding: 0 0 10px; } -.news2 .app-pic{ + +.defulat_widget_typeB_style2 .app-pic{ + background: none repeat scroll 0 0 #AAAAAA; + border-radius: 3px; + float:left; + height: 50px; + margin: 0 10px 5px 0; + overflow: hidden; + width: 50px; +} +.defulat_widget_typeB_style2 img{ height:50px; width:50px; - display: inline-block; -} -.news2 ul{ - display: inline-block; - width:570px; } +.defulat_widget_typeB_style2 span{ + display: inline; + margin: 0 10px 0 0; +} /* 3 */ -.news3{} - -.news3 li{ - border-bottom:1px solid #eee; - overflow: hidden; +.defulat_widget_typeB_style3{ + font: 12px/100% 'open sans',sans-serif; + margin:0 0 20px; + width:720px; +} +.defulat_widget_typeB_style3 ul{ + margin: 0; + padding: 0; +} +.defulat_widget_typeB_style3 li{ + border-bottom: 1px solid #AAAAAA; + clear: both; + margin: 0 0 10px; + overflow: hidden; + padding: 0 0 10px; } -.news3 .img{ - float:left; - margin:0 10px 0 0; +.defulat_widget_typeB_style3 .app-pic{ + background: none repeat scroll 0 0 #AAAAAA; + border-radius: 3px; + float: left; + height: 50px; + margin: 0 10px 0 0; + overflow: hidden; + width: 50px; } -.news3 .hot, .news3 .title, .news3 .date, .news3 .tags, .news3 .text{ +.defulat_widget_typeB_style3 span{ display:block; margin:0 0 5px; text-align: left; } -.news3 .wrap{ +.defulat_widget_typeB_style3 .wrap{ overflow: hidden; } - +.defulat_widget_typeB_style3 img{ + height:50px; + width:50px; +} /* 4 */ -.news4{} - -.news4 li{ - border-bottom:1px solid #eee; - overflow: hidden; +.defulat_widget_typeB_style4{ + font: 12px/100% 'open sans',sans-serif; + margin:0 0 20px; + width:720px; +} +.defulat_widget_typeB_style4 ul{ + margin: 0; + padding: 0; +} +.defulat_widget_typeB_style4 li{ + border-bottom: 1px solid #AAAAAA; + clear: both; + margin: 0 0 10px; + overflow: hidden; + padding: 0 0 10px; } -.news4 .img{ - float:right; - margin:0 0 0 10px; +.defulat_widget_typeB_style4 .app-pic{ + background: none repeat scroll 0 0 #AAAAAA; + border-radius: 3px; + float: right; + height: 50px; + margin: 0 0 0 10px; + overflow: hidden; + width: 50px; } -.news4 .hot, .news4 .title, .news4 .date, .news4 .tags, .news4 .text{ +.defulat_widget_typeB_style4 span{ display:block; margin:0 0 5px; text-align: left; } -.news4 .wrap{ +.defulat_widget_typeB_style4 .wrap{ overflow: hidden; } - +.defulat_widget_typeB_style4 img{ + height:50px; + width:50px; +} /* 5 */ -.news5{ - overflow: hidden; +.defulat_widget_typeC{ + font: 12px/100% 'open sans',sans-serif; + margin: 0 0 20px; + position: relative; + width: 720px; } - -.news5 .img{ - float:left; - margin:0 10px 0 0; +.defulat_widget_typeC ul{ + margin: 0 0 0 70px; + padding: 0; } -.news5 ul{ - float: left; - text-align: left; - width: 540px; -} -.news5 li{ - border-bottom:1px solid #eee; -} - -.news5 .more{} -.news5 .hot, .news5 .title, .news5 .date, .news5 .tags, .news5 .text{ - -} - -.news5 .wrap{ +.defulat_widget_typeC li{ + border-bottom: 1px solid #AAAAAA; + clear: both; + margin: 0 0 10px; overflow: hidden; + padding: 0 0 10px; +} + +.defulat_widget_typeC .app-pic{ + background: none repeat scroll 0 0 #AAAAAA; + border-radius: 3px 3px 3px 3px; + height: 50px; + left: 0; + margin: 0 10px 0 0; + overflow: hidden; + position: absolute; + top: 0; + width: 50px; +} + +.defulat_widget_typeC span{ + display:block; + margin:0 0 5px; + text-align: left; +} + +.defulat_widget_typeC .wrap{ + overflow: hidden; +} +.defulat_widget_typeC img{ + height:50px; + width:50px; } \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 068f6ab7..efa078ea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -184,6 +184,7 @@ module ApplicationHelper stylesheets << "\n" stylesheets << "\n" stylesheets << "\n" + stylesheets << "\n" stylesheets << "\n" if page.design.css_default theme = page.design.themes.detect{ |d| d.id == page.theme_id } stylesheets << "\n" if theme