Created
January 28, 2012 02:46
-
-
Save antillas21/1692244 to your computer and use it in GitHub Desktop.
SITIO BASICO: Como crear un simple sistema de plantillas para sitios web muy basicos. versión Ruby w/Sinatra
This file contains 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 'sinatra' | |
helpers do | |
def partial(page) | |
erb page, :layout => false | |
end | |
end | |
get '/' do | |
@page_title = 'Mi pagina web' | |
erb :index | |
end |
This file contains 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
<div id="header"> | |
<h1 align="center">badbit.org</h1> | |
<p align="center">Sitio web personal.</p> | |
<p align="center"><img src="./img/tinfoilhatarea-sign.jpg" /></p> | |
</div> | |
<div id="body"> | |
<p align="center"> | |
[ <a href="http://badbit.blogspot.com">blog</a> | |
| <a href="http://canal.badbit.org">podcast</a> | |
| <a href="/publicaciones">publicaciones</a> | |
| <a href="/cv">currículum</a> | |
| <a href="/cobach/index">estudiantes</a> ] | |
</p> | |
<p align="center"> </p> | |
<p align="center"><b>contacto</b></p> | |
<p align="center"> | |
[ el.badbit en gmail.com | |
| <a href="/redes">redes sociales</a> ] | |
</p> | |
</div> |
This file contains 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
<h1>Encabezado principal</h1> | |
<p>Información</p> |
This file contains 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head profile="http://www.w3.org/2005/10/profile"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link rel="icon" type="image/png" href="favicon.ico"> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> | |
<link rel="stylesheet" type="text/css" href="css/footer.css" /> | |
<!--[if lt IE 7]> | |
<link rel="stylesheet" type="text/css" href="css/ie7footer.css" /> | |
<![endif]--> | |
<title><%= @page_title %> - badbit.org</title> | |
</head> | |
<body> | |
<div id="container"> | |
<%= partial :header %> | |
<%= yield %> | |
</div> | |
<%= partial :footer %> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment