From fe218146077acef0a55733a0809558f337fbfd9c Mon Sep 17 00:00:00 2001 From: universac Date: Tue, 18 May 2010 22:35:38 +0800 Subject: [PATCH] import blueprint typograph --- app/models/profile.rb | 7 +- app/stylesheets/screen.scss | 5 +- app/views/educator/profiles/_record.haml | 2 +- public/stylesheets/layout.css | 2 +- public/stylesheets/public.css | 2 +- public/stylesheets/screen.css | 207 ++++++++++++++++++++++- 6 files changed, 215 insertions(+), 10 deletions(-) diff --git a/app/models/profile.rb b/app/models/profile.rb index 2cc7551..9bed4e3 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -42,8 +42,11 @@ def profile_check def title title_element = Element.find_by_is_title(true) - return "No title element defined" if title_element.nil? - return self.send(:"#{title_element.key}") + return "(No title element defined)" if title_element.nil? + + title = self.send(:"#{title_element.key}") + + (title.nil? || title.blank?) ? "(No title)" : title end Element.find(:all).each do |element| diff --git a/app/stylesheets/screen.scss b/app/stylesheets/screen.scss index c62b8c1..01d13cf 100644 --- a/app/stylesheets/screen.scss +++ b/app/stylesheets/screen.scss @@ -19,7 +19,10 @@ @include blueprint-scaffolding(".blueprint"); .blueprint { - //@include blueprint-typography(true); + @include blueprint-typography(true); + + font-size: 100%; + @include blueprint-utilities; //@include blueprint-debug; @include blueprint-interaction; diff --git a/app/views/educator/profiles/_record.haml b/app/views/educator/profiles/_record.haml index 477cecf..6f789e4 100644 --- a/app/views/educator/profiles/_record.haml +++ b/app/views/educator/profiles/_record.haml @@ -2,7 +2,7 @@ - Element.display_columns.each do |column| %td - if column.is_title - = link_to profile.send(:"#{column.key}"), educator_profile_path(profile) + = link_to profile.title, educator_profile_path(profile) - else = profile.send(:"#{column.key}") %td= profile.status \ No newline at end of file diff --git a/public/stylesheets/layout.css b/public/stylesheets/layout.css index 3bf15f3..3833014 100755 --- a/public/stylesheets/layout.css +++ b/public/stylesheets/layout.css @@ -18,7 +18,7 @@ .formInfo{margin:0 0 20px 80px;} .formInfo td{padding:5px; vertical-align: top; border-bottom: none; line-height: 22px;} .formInfo td.buttons{border-bottom: none;} -.formInfo .text{height:22px; border:1px solid #CCC; width:200px; line-height:22px;} +.formInfo .text{height:22px; border:1px solid #CCC; width:200px;} .formInfo .file{ border:1px solid #CCC; height:22px; width:275px;} select{border:1px solid #CCC;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 3bf26ad..6af0933 100755 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1,5 +1,5 @@ /* 杂项 */ -body { background: #FFF; color: #333; font-size: 12px; font-family: "Lucida Grande", Tahoma, Arial, Verdana, sans-serif;} +body { background: #FFF; color: #333; font-size: 12px; font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;} body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, blockquote, table, td, img, div, option { padding: 0; margin: 0; } ol,ul {list-style:none;} h1, h2, h3, h4, h5, h6 { font-size: 12px; } diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css index 88b7277..1604bbe 100644 --- a/public/stylesheets/screen.css +++ b/public/stylesheets/screen.css @@ -135,8 +135,207 @@ a img { /* line 21, ../../app/stylesheets/screen.scss */ .blueprint { + line-height: 1.5; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + color: #333333; + font-size: 75%; + font-size: 100%; margin: 30px; } +/* line 65, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h1, .blueprint h2, .blueprint h3, .blueprint h4, .blueprint h5, .blueprint h6 { + font-weight: normal; + color: #222222; +} +/* line 66, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h1 img, .blueprint h2 img, .blueprint h3 img, .blueprint h4 img, .blueprint h5 img, .blueprint h6 img { + margin: 0; +} +/* line 67, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h1 { + font-size: 3em; + line-height: 1; + margin-bottom: 0.50em; +} +/* line 68, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h2 { + font-size: 2em; + margin-bottom: 0.75em; +} +/* line 69, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h3 { + font-size: 1.5em; + line-height: 1; + margin-bottom: 1.00em; +} +/* line 70, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h4 { + font-size: 1.2em; + line-height: 1.25; + margin-bottom: 1.25em; +} +/* line 71, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h5 { + font-size: 1em; + font-weight: bold; + margin-bottom: 1.50em; +} +/* line 72, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint h6 { + font-size: 1em; + font-weight: bold; +} +/* line 73, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint p { + margin: 0 0 1.5em; +} +/* line 74, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint p img.left { + display: inline; + float: left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; +} +/* line 75, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint p img.right { + display: inline; + float: right; + margin: 1.5em 0 1.5em 1.5em; + padding: 0; +} +/* line 77, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint a { + text-decoration: underline; + color: #000099; +} +/* line 18, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss */ +.blueprint a:visited { + color: #000066; +} +/* line 21, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss */ +.blueprint a:focus { + color: black; +} +/* line 24, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss */ +.blueprint a:hover { + color: black; +} +/* line 27, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss */ +.blueprint a:active { + color: #cc0099; +} +/* line 78, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint blockquote { + margin: 1.5em; + color: #666666; + font-style: italic; +} +/* line 79, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint strong { + font-weight: bold; +} +/* line 80, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint em { + font-style: italic; +} +/* line 81, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint dfn { + font-style: italic; + font-weight: bold; +} +/* line 82, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint sup, .blueprint sub { + line-height: 0; +} +/* line 83, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint abbr, .blueprint acronym { + border-bottom: 1px dotted #666666; +} +/* line 84, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint address { + margin: 0 0 1.5em; + font-style: italic; +} +/* line 85, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint del { + color: #666666; +} +/* line 86, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint pre { + margin: 1.5em 0; + white-space: pre; +} +/* line 87, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint pre, .blueprint code, .blueprint tt { + font: 1em "andale mono", "lucida console", monospace; + line-height: 1.5; +} +/* line 88, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint li ul, .blueprint li ol { + margin: 0; +} +/* line 89, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint ul, .blueprint ol { + margin: 0 1.5em 1.5em 0; + padding-left: 3.333em; +} +/* line 90, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint ul { + list-style-type: disc; +} +/* line 91, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint ol { + list-style-type: decimal; +} +/* line 92, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint dl { + margin: 0 0 1.5em 0; +} +/* line 93, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint dl dt { + font-weight: bold; +} +/* line 94, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint dd { + margin-left: 1.5em; +} +/* line 95, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint table { + margin-bottom: 1.4em; + width: 100%; +} +/* line 96, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint th { + font-weight: bold; +} +/* line 97, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint thead th { + background: #c3d9ff; +} +/* line 98, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint th, .blueprint td, .blueprint caption { + padding: 4px 10px 4px 5px; +} +/* line 99, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint tr.even td { + background: #e5ecf9; +} +/* line 100, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint tfoot { + font-style: italic; +} +/* line 101, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint caption { + background: #eeeeee; +} +/* line 102, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint .quiet { + color: #666666; +} +/* line 103, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_typography.scss */ +.blueprint .loud { + color: #111111; +} /* line 9, ../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.10.1/frameworks/blueprint/stylesheets/blueprint/_utilities.scss */ .blueprint .clear { clear: both; @@ -243,13 +442,13 @@ a img { background: #990000; color: white; } -/* line 32, ../../app/stylesheets/screen.scss */ +/* line 35, ../../app/stylesheets/screen.scss */ .blueprint .header3 { font-size: 14px; margin-bottom: 14px; font-weight: bold; } -/* line 38, ../../app/stylesheets/screen.scss */ +/* line 41, ../../app/stylesheets/screen.scss */ .blueprint .button { display: -moz-inline-box; -moz-box-orient: vertical; @@ -354,12 +553,12 @@ a img { width: 390px; height: 250px; } -/* line 50, ../../app/stylesheets/screen.scss */ +/* line 53, ../../app/stylesheets/screen.scss */ .blueprint form input.text, .blueprint form input.title, .blueprint form input[type=text], .blueprint form input[type=password], .blueprint form textarea, .blueprint form select { margin: 0; padding: 0; } -/* line 55, ../../app/stylesheets/screen.scss */ +/* line 58, ../../app/stylesheets/screen.scss */ .blueprint form input.commit, .blueprint form input[type=commit] { display: -moz-inline-box; -moz-box-orient: vertical;