Browse Source

HTML5; style header a small bit.

old-ruby
Ben Kurtovic 9 years ago
parent
commit
3da26356af
5 changed files with 35 additions and 21 deletions
  1. +20
    -2
      app/assets/stylesheets/application.css
  2. +1
    -1
      app/helpers/application_helper.rb
  3. +2
    -2
      app/views/layouts/application.html.erb
  4. +2
    -2
      app/views/shared/_footer.html.erb
  5. +10
    -14
      app/views/shared/_header.html.erb

+ 20
- 2
app/assets/stylesheets/application.css View File

@@ -14,7 +14,25 @@
*= require_self
*/

img#corp_logo {
width: 64px;
header #home-link {
text-decoration: none;
color: black;
font-family: sans-serif;
}

header #corp-logo {
width: 64px;
height: 64px;
vertical-align: middle;
margin-right: 0.5em;
}

header #corp-name {
font-size: 250%;
vertical-align: middle;
}

header #user-links {
float: right;
margin: 0.5em;
}

+ 1
- 1
app/helpers/application_helper.rb View File

@@ -11,7 +11,7 @@ module ApplicationHelper
corp_id = AdminSetting.get('corp_id')
corp_name = AdminSetting.get('corp_name')
image_tag("https://image.eveonline.com/Corporation/#{corp_id}_256.png",
id: 'corp_logo', title: corp_name, alt: "#{corp_name} Logo")
id: 'corp-logo', title: corp_name, alt: "#{corp_name} Logo")
end

def copyright_year


+ 2
- 2
app/views/layouts/application.html.erb View File

@@ -9,9 +9,9 @@
<body>
<%= render "shared/header" %>
</div>
<div id="content">
<main>
<%= yield %>
</div>
</main>
<%= render "shared/footer" %>
</body>
</html>

+ 2
- 2
app/views/shared/_footer.html.erb View File

@@ -1,4 +1,4 @@
<div id="footer">
<footer>
<p>
Copyright &copy; <%= copyright_year %> <%= AdminSetting.get('copyright') %>
&bull;
@@ -6,4 +6,4 @@
&bull;
<a href="//eveonline.com">EVE Online</a> and all related trademarks are property of <a href="//ccpgames.com">CCP hf</a>.
</p>
</div>
</footer>

+ 10
- 14
app/views/shared/_header.html.erb View File

@@ -1,19 +1,15 @@
<div id="header">
<h1>
<header>
<%= link_to({controller: 'tools', action: 'index'}, {id: 'home-link'}) do %>
<%= corp_logo_tag %>
<%= AdminSetting.get('corp_name') %>
</h1>
<p>
<%= link_to 'Home', controller: 'tools', action: 'index' %>
</p>
<p>
Users:
<span id="corp-name">
<%= AdminSetting.get('corp_name') %>
</span>
<% end %>
<span id="user-links">
<%= link_to "Signup", controller: "users", action: "create" %>
&bull;
<%= link_to "Login", controller: "users", action: "login" %>
</p>
<p>
Admin:
&bull;
<%= link_to "Admin", controller: "admin", action: "index" %>
</p>
</div>
</span>
</header>

Loading…
Cancel
Save