Created
November 25, 2011 13:14
-
-
Save danielvlopes/1393504 to your computer and use it in GitHub Desktop.
Códigos aula 5 - UNA Web 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*= require bootstrap | |
*/ | |
html, body { | |
background-color: #eee; | |
} | |
body { | |
padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */ | |
} | |
.container > footer p { | |
text-align: center; /* center align it with the container */ | |
} | |
.container { | |
width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */ | |
} | |
/* The white background content wrapper */ | |
.container > .content { | |
background-color: #fff; | |
padding: 20px; | |
margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */ | |
-webkit-border-radius: 0 0 6px 6px; | |
-moz-border-radius: 0 0 6px 6px; | |
border-radius: 0 0 6px 6px; | |
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); | |
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); | |
box-shadow: 0 1px 2px rgba(0,0,0,.15); | |
} | |
/* Page header tweaks */ | |
.page-header { | |
background-color: #f5f5f5; | |
padding: 20px 20px 10px; | |
margin: -20px -20px 20px; | |
} | |
/* Styles you shouldn't keep as they are for displaying this base example only */ | |
.content .span10, | |
.content .span4 { | |
min-height: 500px; | |
} | |
/* Give a quick and non-cross-browser friendly divider */ | |
.content .span4 { | |
margin-left: 0; | |
padding-left: 19px; | |
border-left: 1px solid #eee; | |
} | |
.topbar .btn { | |
border: 0; | |
} | |
.field { | |
margin: 20px 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Admin</title> | |
<%= stylesheet_link_tag "application" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body id="<%= body_css_id %>"> | |
<div class="topbar"> | |
<div class="fill"> | |
<div class="container"> | |
<a class="brand" href="#">Resume</a> | |
<ul class="nav"> | |
<li><a href="#about">About me</a></li> | |
<li><%= link_to "Employments", employments_path %></li> | |
<li><%= link_to "Skills", "#" %></li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
<div class="container"> | |
<div class="content"> | |
<%= flash_messages %> | |
<%= yield %> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class <%= controller_class_name %>Controller < ApplicationController | |
respond_to :html, :json, :xml | |
def index | |
@<%= plural_table_name %> = <%= orm_class.all(class_name) %> | |
respond_with @<%= plural_table_name %> | |
end | |
def show | |
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> | |
respond_with @<%= singular_table_name %> | |
end | |
def new | |
@<%= singular_table_name %> = <%= orm_class.build(class_name) %> | |
respond_with @<%= singular_table_name %> | |
end | |
def edit | |
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> | |
end | |
def create | |
@<%= singular_table_name %> = <%= orm_class.build(class_name, "params[:#{singular_table_name}]") %> | |
flash[:notice] = '<%= human_name %> was successfully created.' if @<%= orm_instance.save %> | |
respond_with @<%= singular_table_name %> | |
end | |
def update | |
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> | |
flash[:notice] = '<%= human_name %> was successfully updated.' if @<%= orm_instance.update_attributes("params[:#{singular_table_name}]") %> | |
respond_with @<%= singular_table_name %> | |
end | |
def destroy | |
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> | |
@<%= orm_instance.destroy %> | |
respond_with @<%= singular_table_name %>, :location => <%= index_helper %>_url | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body#resumes { | |
font-size: 16px; | |
font-family: Helvetica, Arial, sans-serif; | |
h1, h2, h3, h4 { font-weight: bold; margin: 20px 0;} | |
h1 { font-size: 40px; } | |
h2 { font-size: 28px; } | |
h3 { font-size: 22px; } | |
h4 { font-size: 20px; } | |
h2, h4 { color: #35bcb6; font-weight: normal; } | |
p { margin: 4px 0; line-height: 20px; } | |
#wrapper { width: 740px; margin: 80px auto; } | |
span { | |
color: #58595b; | |
font-style: italic; | |
font-family: Georgia; | |
display: inline-block; | |
text-align: right; | |
} | |
#column2 { | |
padding-top: 40px; | |
} | |
#bio { | |
span { | |
width: 60px; | |
margin-left: -75px; | |
padding-right: 10px; | |
} | |
#contacts { margin: 20px 0; } | |
} | |
#column1 { | |
width: 420px; | |
float: left; | |
.employment { | |
margin: 50px 0; | |
position: relative; | |
} | |
.dateInterval { | |
line-height: 22px; | |
width: 60px; | |
margin-left: -100px; | |
position: absolute; | |
top: 90px; | |
text-align: right; | |
font-style: italic; | |
font-family: Georgia; | |
} | |
} | |
#column2 { width: 250px; float: right; } | |
#skills { | |
ul { font-size: 18px; } | |
li { line-height: 24px; margin: 14px 0; } | |
li span { display: block; text-align: left; } | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Curriculum</title> | |
<%= stylesheet_link_tag "curriculum" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body id="<%= body_css_id %>"> | |
<%= yield %> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment