Commit 44d752156aa35301dd758321dff49449a8365042
- Diff rendering mode:
- inline
- side by side
app/controllers/application.rb
(0 / 10)
|   | |||
| 1 | # Filters added to this controller apply to all controllers in the application. | ||
| 2 | # Likewise, all the methods added will be available for all controllers. | ||
| 3 | |||
| 4 | class ApplicationController < ActionController::Base | ||
| 5 | helper_method :settings | ||
| 6 | |||
| 7 | def settings | ||
| 8 | @settings ||= Setting.all | ||
| 9 | end | ||
| 10 | end |
|   | |||
| 1 | # Filters added to this controller apply to all controllers in the application. | ||
| 2 | # Likewise, all the methods added will be available for all controllers. | ||
| 3 | |||
| 4 | class ApplicationController < ActionController::Base | ||
| 5 | helper_method :settings | ||
| 6 | |||
| 7 | def settings | ||
| 8 | @settings ||= Setting.all | ||
| 9 | end | ||
| 10 | end |
app/stylesheets/base.sass
(35 / 0)
|   | |||
| 1 | @import compass/reset.sass | ||
| 2 | @import yui/modules/fonts.sass | ||
| 3 | @import blueprint/modules/interaction.sass | ||
| 4 | |||
| 5 | /* Base Grid inspired from Blueprint Grid | ||
| 6 | |||
| 7 | # You can redefine content width in your sass fail, | ||
| 8 | # for example add '!containerWidth = 850px' | ||
| 9 | !containerWidth = 975px | ||
| 10 | |||
| 11 | body | ||
| 12 | margin: 10px | ||
| 13 | .container | ||
| 14 | width = !containerWidth | ||
| 15 | margin: 0 auto | ||
| 16 | |||
| 17 | // Examples: | ||
| 18 | // +column(750px) # => usual column | ||
| 19 | // +column(750px, last) # => last column | ||
| 20 | // +column # => using containerWidth value, it is also last column. | ||
| 21 | // Default width value is 975px. You can redefine | ||
| 22 | // !containerWidth in your application.sass | ||
| 23 | // | ||
| 24 | =column(!n = max, !last = false) | ||
| 25 | float: left | ||
| 26 | @if !n != max | ||
| 27 | @if !last | ||
| 28 | margin-right: 0px | ||
| 29 | width = !n | ||
| 30 | @else | ||
| 31 | margin-right: 10px | ||
| 32 | width = !n - 10px | ||
| 33 | @if !n == max | ||
| 34 | margin-right: 0px | ||
| 35 | width = !containerWidth |
app/stylesheets/ie.sass
(6 / 0)
|   | |||
| 1 | /* | ||
| 2 | Welcome to Compass. Use this file to write IE specific override styles. | ||
| 3 | Import this file using the following HTML or equivalent: | ||
| 4 | <!--[if IE]> | ||
| 5 | <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" /> | ||
| 6 | <![endif]--> |
app/stylesheets/print.sass
(5 / 0)
|   | |||
| 1 | /* | ||
| 2 | Welcome to Compass. Use this file to define print styles. | ||
| 3 | Import this file using the following HTML or equivalent: | ||
| 4 | <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" /> | ||
| 5 |
app/stylesheets/screen.sass
(129 / 0)
|   | |||
| 1 | @import base.sass | ||
| 2 | !contentWidth = 975px | ||
| 3 | |||
| 4 | a | ||
| 5 | color: #000 | ||
| 6 | text-decoration: none | ||
| 7 | &:hover | ||
| 8 | text-decoration: underline | ||
| 9 | |||
| 10 | label | ||
| 11 | display: block | ||
| 12 | li | ||
| 13 | margin-bottom: 10px | ||
| 14 | |||
| 15 | =for-reading | ||
| 16 | font-size= !16px | ||
| 17 | font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif | ||
| 18 | |||
| 19 | =normal-pa | ||
| 20 | p | ||
| 21 | a | ||
| 22 | text-decoration: underline | ||
| 23 | |||
| 24 | =normal-ul | ||
| 25 | ol,ul,dl | ||
| 26 | margin-left: 2em | ||
| 27 | ul li | ||
| 28 | list-style: disc outside | ||
| 29 | |||
| 30 | =openid_identifier | ||
| 31 | background: url(../images/login-bg.gif) no-repeat | ||
| 32 | background-color: #fff | ||
| 33 | backgroung-position: 0 50% | ||
| 34 | color: #000 | ||
| 35 | padding-left: 18px | ||
| 36 | width: 150px | ||
| 37 | |||
| 38 | |||
| 39 | #Header | ||
| 40 | +column | ||
| 41 | |||
| 42 | .title | ||
| 43 | +column(400px) | ||
| 44 | height: 50px | ||
| 45 | padding: 20px 0 10px 0 | ||
| 46 | h1 | ||
| 47 | display: inline | ||
| 48 | |||
| 49 | .account | ||
| 50 | +column(575px,last) | ||
| 51 | text-align: right | ||
| 52 | .openid_identifier | ||
| 53 | +openid_identifier | ||
| 54 | |||
| 55 | #Main | ||
| 56 | +column | ||
| 57 | |||
| 58 | .content | ||
| 59 | +column(430px) | ||
| 60 | padding-right: 60px | ||
| 61 | h1 | ||
| 62 | display: inline | ||
| 63 | h2 | ||
| 64 | display: inline | ||
| 65 | font-size= !20px | ||
| 66 | |||
| 67 | .post, | ||
| 68 | .page | ||
| 69 | +for-reading | ||
| 70 | +normal-ul | ||
| 71 | +normal-pa | ||
| 72 | textarea | ||
| 73 | width: 100% | ||
| 74 | margin-bottom: 40px | ||
| 75 | |||
| 76 | |||
| 77 | .title | ||
| 78 | margin-bottom: 20px | ||
| 79 | h1 | ||
| 80 | font-size= !25px | ||
| 81 | .new_comment | ||
| 82 | textarea | ||
| 83 | height: 10em | ||
| 84 | |||
| 85 | .edit_page | ||
| 86 | textarea | ||
| 87 | height: 30em | ||
| 88 | width: 400px | ||
| 89 | font-size= !18px | ||
| 90 | overflow-y: scroll | ||
| 91 | |||
| 92 | .datum p | ||
| 93 | text-align: right | ||
| 94 | font-size= !12px | ||
| 95 | |||
| 96 | .settings | ||
| 97 | |||
| 98 | #comments | ||
| 99 | h2 | ||
| 100 | font-size= !18px | ||
| 101 | .datetime | ||
| 102 | font-size= !8px | ||
| 103 | text-align: right | ||
| 104 | |||
| 105 | .openid_identifier | ||
| 106 | +openid_identifier | ||
| 107 | width: 200px | ||
| 108 | |||
| 109 | .subnavi | ||
| 110 | +column(250px) | ||
| 111 | padding-right: 20px | ||
| 112 | h5 | ||
| 113 | img | ||
| 114 | margin: 0 0 0 4px | ||
| 115 | |||
| 116 | .navigation | ||
| 117 | +column(200px,last) | ||
| 118 | ul | ||
| 119 | margin: 0 | ||
| 120 | |||
| 121 | #Footer | ||
| 122 | +column | ||
| 123 | border-top: 1px solid | ||
| 124 | padding: 8px 0 18px 0 | ||
| 125 | margin-top: 20px | ||
| 126 | |||
| 127 | .wym_iframe | ||
| 128 | +for-reading | ||
| 129 | +normal-ul |
|   | |||
| 7 | 7 | = "#{yield :title} - " if yield :title | |
| 8 | 8 | = settings.blog_name | |
| 9 | 9 | = auto_discovery_link_tag :atom, formatted_posts_url(:atom), :title => 'Posts feed' | |
| 10 | = stylesheet_link_tag 'application', 'jquery.wysiwyg', :media => 'screen, projection' | ||
| 10 | = stylesheet_link_tag 'compiled/screen.css', 'jquery.wysiwyg', :media => 'screen, projection' | ||
| 11 | = stylesheet_link_tag 'compiled/print.css', :media => 'print' | ||
| 11 | 12 | = javascript_include_tag 'jquery-1.2.6.min', 'jquery.livequery.min', 'lowpro.jquery' | |
| 12 | 13 | = javascript_include_tag '/javascripts/wymeditor/jquery.wymeditor.pack.js', 'application' | |
| 13 | 14 | %body |
config/compass.config
(11 / 0)
|   | |||
| 1 | # Require any additional compass plugins here. | ||
| 2 | project_type = :rails | ||
| 3 | project_path = RAILS_ROOT if defined?(RAILS_ROOT) | ||
| 4 | css_dir = "public/stylesheets/compiled" | ||
| 5 | sass_dir = "app/stylesheets" | ||
| 6 | images_dir = "public/images" | ||
| 7 | javascripts_dir = "public/javascripts" | ||
| 8 | output_style = :compact | ||
| 9 | # To enable relative image paths using the images_url() function: | ||
| 10 | # http_images_path = :relative | ||
| 11 | http_images_path = "/public/images" |
|   | |||
| 1 | require 'compass' | ||
| 2 | # If you have any compass plugins, require them here. | ||
| 3 | Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config")) | ||
| 4 | Compass.configure_sass_plugin! |
|   | |||
| 1 | @import base.sass | ||
| 2 | !contentWidth = 975px | ||
| 3 | |||
| 4 | a | ||
| 5 | color: #000 | ||
| 6 | text-decoration: none | ||
| 7 | &:hover | ||
| 8 | text-decoration: underline | ||
| 9 | |||
| 10 | label | ||
| 11 | display: block | ||
| 12 | li | ||
| 13 | margin-bottom: 10px | ||
| 14 | |||
| 15 | =for-reading | ||
| 16 | font-size= !16px | ||
| 17 | font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif | ||
| 18 | |||
| 19 | =normal-pa | ||
| 20 | p | ||
| 21 | a | ||
| 22 | text-decoration: underline | ||
| 23 | |||
| 24 | =normal-ul | ||
| 25 | ol,ul,dl | ||
| 26 | margin-left: 2em | ||
| 27 | ul li | ||
| 28 | list-style: disc outside | ||
| 29 | |||
| 30 | =openid_identifier | ||
| 31 | background: url(../images/login-bg.gif) no-repeat | ||
| 32 | background-color: #fff | ||
| 33 | backgroung-position: 0 50% | ||
| 34 | color: #000 | ||
| 35 | padding-left: 18px | ||
| 36 | width: 150px | ||
| 37 | |||
| 38 | |||
| 39 | #Header | ||
| 40 | +column | ||
| 41 | |||
| 42 | .title | ||
| 43 | +column(400px) | ||
| 44 | height: 50px | ||
| 45 | padding: 20px 0 10px 0 | ||
| 46 | h1 | ||
| 47 | display: inline | ||
| 48 | |||
| 49 | .account | ||
| 50 | +column(575px,last) | ||
| 51 | text-align: right | ||
| 52 | .openid_identifier | ||
| 53 | +openid_identifier | ||
| 54 | |||
| 55 | #Main | ||
| 56 | +column | ||
| 57 | |||
| 58 | .content | ||
| 59 | +column(430px) | ||
| 60 | padding-right: 60px | ||
| 61 | h1 | ||
| 62 | display: inline | ||
| 63 | h2 | ||
| 64 | display: inline | ||
| 65 | font-size= !20px | ||
| 66 | |||
| 67 | .post, | ||
| 68 | .page | ||
| 69 | +for-reading | ||
| 70 | +normal-ul | ||
| 71 | +normal-pa | ||
| 72 | textarea | ||
| 73 | width: 100% | ||
| 74 | margin-bottom: 40px | ||
| 75 | |||
| 76 | |||
| 77 | .title | ||
| 78 | margin-bottom: 20px | ||
| 79 | h1 | ||
| 80 | font-size= !25px | ||
| 81 | .new_comment | ||
| 82 | textarea | ||
| 83 | height: 10em | ||
| 84 | |||
| 85 | .edit_page | ||
| 86 | textarea | ||
| 87 | height: 30em | ||
| 88 | width: 400px | ||
| 89 | font-size= !18px | ||
| 90 | overflow-y: scroll | ||
| 91 | |||
| 92 | .datum p | ||
| 93 | text-align: right | ||
| 94 | font-size= !12px | ||
| 95 | |||
| 96 | .settings | ||
| 97 | |||
| 98 | #comments | ||
| 99 | h2 | ||
| 100 | font-size= !18px | ||
| 101 | .datetime | ||
| 102 | font-size= !8px | ||
| 103 | text-align: right | ||
| 104 | |||
| 105 | .openid_identifier | ||
| 106 | +openid_identifier | ||
| 107 | width: 200px | ||
| 108 | |||
| 109 | .subnavi | ||
| 110 | +column(250px) | ||
| 111 | padding-right: 20px | ||
| 112 | h5 | ||
| 113 | img | ||
| 114 | margin: 0 0 0 4px | ||
| 115 | |||
| 116 | .navigation | ||
| 117 | +column(200px,last) | ||
| 118 | ul | ||
| 119 | margin: 0 | ||
| 120 | |||
| 121 | #Footer | ||
| 122 | +column | ||
| 123 | border-top: 1px solid | ||
| 124 | padding: 8px 0 18px 0 | ||
| 125 | margin-top: 20px | ||
| 126 | |||
| 127 | .wym_iframe | ||
| 128 | +for-reading | ||
| 129 | +normal-ul |

