Changeset 496

Show
Ignore:
Timestamp:
09/03/07 22:27:31 (1 year ago)
Author:
duane.johns..@gmail.com
Message:

Added stylesheet as separate file for skeleton app. Renamed view files to consistently use .html.erb

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/README

    r456 r496  
    6363with instance vars available in the views automatically. Merb also supports  
    6464layouts. It will look for a layout named after your controller class first and 
    65 then fall back to application.herb if no layout exists named after your controller. 
    66 You can use render <tt>:layout => :none</tt>. 
     65then fall back to application.html.erb if no layout exists named after your 
     66controller. You can use render <tt>:layout => :none</tt>. 
    6767 
    6868Merb does not automatically render for you in your controller actions, you have 
  • trunk/app_generators/merb/merb_generator.rb

    r464 r496  
    2727      m.file_copy_each %w( global_helper.rb ), "app/helpers" 
    2828      m.file_copy_each %w( application.erb ), "app/mailers/layout" 
    29       m.file_copy_each %w( application.herb ), "app/views/layout" 
    30       m.file_copy_each %w( not_found.erb ), "app/views/exceptions" 
     29      m.file_copy_each %w( application.html.erb ), "app/views/layout" 
     30      m.file_copy_each %w( not_found.html.erb ), "app/views/exceptions" 
    3131      m.file_copy_each %w( merb.jpg ), "public/images" 
     32      m.file_copy_each %w( master.css ), "public/stylesheets" 
    3233      m.file_copy_each %w( database.yml merb.yml merb_init.rb router.rb upload.conf ), "config" 
    3334      m.file_copy_each %w( development.rb production.rb test.rb ), "config/environments" 
  • trunk/app_generators/merb/templates/app/views/exceptions/not_found.html.erb

    r466 r496  
    2626          <li>config/merb.yml <strong><em>(optional)</em></strong></li> 
    2727          <li>config/router.rb <strong><em>(recommended)</em></strong></li> 
    28           <li>app/views/exceptions/not_found.erb <strong><em>(recommended)</em></strong></li> 
    29           <li>app/views/layout/application.herb <strong><em>(change this layout)</em></strong></li> 
     28          <li>app/views/exceptions/not_found.html.erb <strong><em>(recommended)</em></strong></li> 
     29          <li>app/views/layout/application.html.erb <strong><em>(change this layout)</em></strong></li> 
    3030        </ul> 
    3131      </p> 
  • trunk/app_generators/merb/templates/app/views/layout/application.html.erb

    r466 r496  
    44    <title>Fresh Merb App</title> 
    55    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
    6     <style> 
    7       body { 
    8         font-family: Arial, Verdana, sans-serif; 
    9         font-size: 12px; 
    10         background-color: #fff; 
    11       } 
    12       * { 
    13         margin: 0px; 
    14         padding: 0px; 
    15         text-decoration: none; 
    16       } 
    17       html { 
    18         height: 100%; 
    19         margin-bottom: 1px; 
    20       } 
    21       #container { 
    22         width: 80%; 
    23         text-align: left; 
    24         background-color: #fff; 
    25         margin-right: auto; 
    26         margin-left: auto; 
    27       } 
    28       #header-container { 
    29         width: 100%; 
    30         padding-top: 15px; 
    31       } 
    32       #header-container h1, #header-container h2 { 
    33         margin-left: 6px; 
    34         margin-bottom: 6px; 
    35       } 
    36       .spacer { 
    37         width: 100%; 
    38         height: 15px; 
    39       } 
    40       hr { 
    41         border: 0px; 
    42         color: #ccc; 
    43         background-color: #cdcdcd; 
    44         height: 1px; 
    45         width: 100%; 
    46         text-align: left; 
    47       } 
    48       h1 { 
    49         font-size: 28px; 
    50         color: #c55; 
    51         background-color: #fff; 
    52         font-family: Arial, Verdana, sans-serif; 
    53         font-weight: 300; 
    54       } 
    55       h2 { 
    56         font-size: 15px; 
    57         color: #999; 
    58         font-family: Arial, Verdana, sans-serif; 
    59         font-weight: 300; 
    60         background-color: #fff; 
    61       } 
    62       h3 { 
    63         color: #4d9b12; 
    64         font-size: 15px; 
    65         text-align: left; 
    66         font-weight: 300; 
    67         padding: 5px; 
    68         margin-top: 5px; 
    69       } 
    70  
    71       #left-container { 
    72         float: left; 
    73         width: 250px; 
    74         background-color: #FFFFFF; 
    75         color: black; 
    76       } 
    77        
    78       #left-container h3 { 
    79         color: #c55; 
    80       } 
    81  
    82       #main-container { 
    83         margin: 5px 5px 5px 260px; 
    84         padding: 15px; 
    85         border-left: 1px solid silver; 
    86         min-height: 400px; 
    87       } 
    88       p { 
    89         color: #000; 
    90         background-color: #fff; 
    91         line-height: 20px; 
    92         padding: 5px; 
    93       } 
    94       a { 
    95         color: #4d9b12; 
    96         background-color: #fff; 
    97         text-decoration: none; 
    98       } 
    99       a:hover { 
    100         color: #4d9b12; 
    101         background-color: #fff; 
    102         text-decoration: underline; 
    103       } 
    104       #footer-container { 
    105         clear: both; 
    106         font-size: 12px; 
    107         font-family: Verdana, Arial, sans-serif; 
    108       } 
    109       .right { 
    110         float: right; 
    111         font-size: 100%; 
    112         margin-top: 5px; 
    113         color: #999; 
    114         background-color: #fff; 
    115       } 
    116       .left { 
    117         float: left; 
    118         font-size: 100%; 
    119         margin-top: 5px; 
    120         color: #999; 
    121         background-color: #fff; 
    122       } 
    123       #main-container ul { 
    124         margin-left: 3.0em; 
    125       } 
    126     </style> 
     6    <link rel="stylesheet" href="/stylesheets/master.css" type="text/css" media="screen" charset="utf-8"> 
    1277  </head> 
    1288  <body> 
  • trunk/lib/merb/exceptions.rb

    r479 r496  
    2525  # 
    2626  # The NotFound exception will look for a template at 
    27   #   app/views/exceptions/not_found.erb 
     27  #   app/views/exceptions/not_found.html.erb 
    2828  # If the template is not found then a simple message will be sent. 
    2929  # 
  • trunk/lib/merb/mixins/view_context.rb

    r438 r496  
    112112    # 
    113113    # ==== Examples 
    114     #   # File: app/views/layouts/application.herb 
     114    #   # File: app/views/layouts/application.html.erb 
    115115    # 
    116116    #   <html> 
     
    199199    # ==== Examples 
    200200    #   # my_action.herb has a call to require_js 'jquery' 
    201     #   # File: layout/application.herb 
     201    #   # File: layout/application.html.erb 
    202202    #   include_required_js 
    203203    #   # => <script src="/javascripts/jquery.js" type="text/javascript"></script> 
    204204    # 
    205205    #   # my_action.herb has a call to require_js 'jquery', 'effects', 'validation' 
    206     #   # File: layout/application.herb 
     206    #   # File: layout/application.html.erb 
    207207    #   include_required_js 
    208208    #   # => <script src="/javascripts/jquery.js" type="text/javascript"></script> 
     
    219219    # ==== Examples 
    220220    #   # my_action.herb has a call to require_css 'style' 
    221     #   # File: layout/application.herb 
     221    #   # File: layout/application.html.erb 
    222222    #   include_required_css 
    223223    #   # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css"/> 
    224224    # 
    225225    #   # my_action.herb has a call to require_js 'style', 'ie-specific' 
    226     #   # File: layout/application.herb 
     226    #   # File: layout/application.html.erb 
    227227    #   include_required_css 
    228228    #   # => <link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css"/> 
  • trunk/specs/merb/merb_generator_spec.rb

    r453 r496  
    5757      app/helpers/global_helper.rb 
    5858      app/mailers/layout/application.erb 
    59       app/views/layout/application.herb 
     59      app/views/layout/application.html.erb 
    6060      config/database.yml 
    6161      config/environments/development.rb