Permalink
Browse files

html to haml

  • Loading branch information...
1 parent 3553acb commit afb0a53d2da9575174554730bad042133a2acdd6 @Awea committed Jun 5, 2012
Showing with 189 additions and 200 deletions.
  1. +23 −25 views/index.haml
  2. +0 −175 views/layout.erb
  3. +166 −0 views/layout.haml
View
48 views/index.haml
@@ -1,31 +1,29 @@
.right-col
%h1
%a{:href => "#"} Soumettez nous vos gems
- if @error
- .alert.alert-error
- %strong Il y a des erreurs !
- Vérifiez que les champs requis sont corrects.
- end
- if @confirm
+ - if @error
+ .alert.alert-error
+ %strong Il y a des erreurs !
+ Vérifiez que les champs requis sont corrects.
+ - if @confirm
.alert.alert-success
%strong Gem transmise avec succès !
Merci pour votre contribution.
- end
- %form.form-horizontal{:action => "/", :method => "POST"}
- %fieldset
- .control-group
- %label.control-label{:for => "input01"} Lien vers la gem *
- .controls
- %input#input01.input-xlarge{:name => "bonjour_gem[link]", :type => "text"}
- %p.help-block exemple : https://github.com/sinatra/sinatra
- .control-group
- %label.control-label{:for => "input01"} Pseudo Twitter *
- .controls
- %input#input01.input-xlarge{:name => "bonjour_gem[twitter]", :type => "text"}
- %p.help-block exemple : @davidmaylis
- .control-group
- %label.control-label{:for => "input01"} Un message
- .controls
- %textarea#textarea.input-xlarge{:name => "bonjour_gem[message]", :rows => "5"}
- .form-actions
- %button.btn.btn-primary{:type => "submit"} Envoyer la gem
+ %form.form-horizontal{:action => "/", :method => "POST"}
+ %fieldset
+ .control-group
+ %label.control-label{:for => "input01"} Lien vers la gem *
+ .controls
+ %input#input01.input-xlarge{:name => "bonjour_gem[link]", :type => "text"}
+ %p.help-block exemple : https://github.com/sinatra/sinatra
+ .control-group
+ %label.control-label{:for => "input01"} Pseudo Twitter *
+ .controls
+ %input#input01.input-xlarge{:name => "bonjour_gem[twitter]", :type => "text"}
+ %p.help-block exemple : @davidmaylis
+ .control-group
+ %label.control-label{:for => "input01"} Un message
+ .controls
+ %textarea#textarea.input-xlarge{:name => "bonjour_gem[message]", :rows => "5"}
+ .form-actions
+ %button.btn.btn-primary{:type => "submit"} Envoyer la gem
View
175 views/layout.erb
@@ -1,175 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>Formulaire | Bonjour gem</title>
- <meta name="description" content="{block:PostSummary}{PostSummary} | {/block:PostSummary}{Title}. {Description}" />
-
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- <!-- RSS -->
- <link rel="alternate" type="application/rss+xml" href="{RSS}" />
-
- <!-- Google Webfonts -->
- <link href='http://fonts.googleapis.com/css?family=Noticia+Text:400,400italic,700,700italic' rel='stylesheet' type='text/css' />
- <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css' />
- <!-- Feuille de style font -->
- <link href="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/css/font.css" rel="stylesheet" />
- <!-- Le styles -->
- <link href="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/css/bootstrap.css" rel="stylesheet" />
-
- <!-- Le fav icon -->
- <link rel="shortcut icon" href="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/favicon.ico" />
- </head>
- <body onload="prettyPrint()">
-
- <!-- Precharger font -->
- <p class="hidden novecento-normal">Novecento Normal</p>
- <p class="hidden novecento-demibold">Novecento Demibold</p>
- <p class="hidden novecento-bold">Novecento Bold</p>
-
- <div class="container-fluid">
-
- <header class="row-fluid">
-
- <div class="span8">
-
- <div class="left-col"></div><!--/.left-col-->
-
- <div class="right-col">
- <a class="logo <%= today_class %>" href="http://www.bonjourgem.com"></a>
- <h3>Un jour, <span>une gem</span></h3>
- </div><!--/.right-col-->
-
- </div><!--/.span8-->
-
- </header><!--/header.row-fluid-->
-
- <div class="row-fluid">
-
- <div class="span8">
-
- <div class="left-col">
- <p class="date"><%= Time.now.strftime("%d/%m/%Y") %></p>
- <ul class="pager">
- <li><span class="btn-disabled" id="prev">Pr&eacute;c</span></li>
- <li><span class="btn-disabled" id="next">Suiv</span></li>
- </ul>
- </div><!--/.left-col-->
-
- <%= yield %>
-
- <div class="clear"></div>
-
- <div class="left-col">
- <ul class="pager">
- <li><span class="btn-disabled" id="prev">Pr&eacute;c</span></li>
- <li><span class="btn-disabled" id="next">Suiv</span></li>
- </ul>
- </div><!--/.left-col-->
-
- <div class="right-col">
- <ul class="social-buttons cf">
- <!-- <li><a href="https://plusone.google.com/_/+1/confirm?hl=en&amp;url={Permalink}" class="socialite googleplus" data-size="medium" data-href="{Permalink}" rel="nofollow" target="_blank"><span>Partager sur Google+</span></a></li> -->
- <li><a href="http://www.facebook.com/sharer.php?u={Permalink}" class="socialite facebook" data-href="{Permalink}" data-send="false" data-layout="button_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span>Partager sur Facebook</span></a></li>
- <li><a href="https://twitter.com/share" class="twitter-share-button" data-via="davidmaylis" data-lang="en" data-hashtags="BonjourGem" data-text="{block:Title}{Title}{/block:Title}">Partager sur Twitter</a></li>
- </ul>
- </div><!--/.right-col-->
-
- <div class="clear"></div>
-
- </div><!--/.span8-->
-
- <div class="span4">
-
- <div class="sidebar-nav">
- <ul class="nav nav-list">
- <li class="nav-header">Cat&eacute;gories</li>
- <li><a href="http://www.bonjourgem.com/tagged/authentification">Authentification</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/autorisation">Autorisation</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/base_de_données">Base de Données</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/communication">Communication</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/css">CSS</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/déploiement_et_hébergement">Déploiement et hébergement</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/gestion_de_contenu">Gestion de contenu</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/html">HTML</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/javascript">JavaScript</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/maintenance_et_monitoring">Maintenance et monitoring</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/outil_de_développement">Outil de développement</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/outil_pour_la_documentation">Outil pour la documentation</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/parseur">Parseur</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/plugin_active_record">Plugin Active Record</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/plugin_rails">Plugin Rails</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/service_et_interaction">Service et interaction</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/temps_et_espace">Temps et espace</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/test">Test</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/upload_de_fichier">Upload de fichier</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/utilitaire">Utilitaire</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/web_app">Web app</a></li>
- <li><a href="http://www.bonjourgem.com/tagged/wtf">WTF</a></li>
- </ul>
- <div class="separator"></div>
- <ul class="nav nav-list">
- <li class="nav-header follow-heading">Nous suivre</li>
- <li><a href="https://twitter.com/#!/davidmaylis" onclick="window.open(this.href);return false;">David & Maylis sur Twitter</a></li>
- </ul>
- </div><!--/.sidebar-nav -->
-
- </div><!--/.span4-->
-
- </div><!--/.row-fluid-->
-
- <footer class="row-fluid">
-
- <div class="span8">
-
- <div class="left-col"></div><!--/.left-col-->
-
- <div class="right-col">
- <span>
- <a href="https://www.tumblr.com" onclick="window.open(this.href);return false;">Tumblr</a> Bonjour gem par <a href="http://www.webdesigner-developpeur-marseille.com" onclick="window.open(this.href);return false;">David & Maylis</a> construit avec le fabuleux <a href="http://twitter.github.com/bootstrap" onclick="window.open(this.href);return false;">Twitter Bootstrap</a>
- </span>
- </div><!--/.right-col-->
-
- </div><!--/.span8-->
-
- </footer><!--/footer.row-fluid-->
-
- </div><!--/.container-fluid-->
-
- <!-- Le javascript -->
- <!-- Placed at the end of the document so the pages load faster -->
- <!-- Jquery -->
- <script src="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/jquery-1.7.1.min.js"></script>
- <!-- Prettify -->
- <script src="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/prettify.js"></script>
- <!-- Socialite -->
- <script src="http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/socialite-1.0.js"></script>
- <script type="text/javascript">
- $(document).ready(function()
- {
- Socialite.load($('.social-buttons'));
- }
- );
- </script>
- <script type="text/javascript">
- !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
- </script>
- <!-- Google Analytics -->
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-22833339-4']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
-
- </body>
-</html>
View
166 views/layout.haml
@@ -0,0 +1,166 @@
+!!!
+%html{:lang => "en"}
+ %head
+ %meta{:charset => "utf-8"}/
+ %title Formulaire | Bonjour gem
+ %meta{:content => "{block:PostSummary}{PostSummary} | {/block:PostSummary}{Title}. {Description}", :name => "description"}/
+ / Le HTML5 shim, for IE6-8 support of HTML elements
+ /[if lt IE 9]
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ / RSS
+ %link{:href => "{RSS}", :rel => "alternate", :type => "application/rss+xml"}/
+ / Google Webfonts
+ %link{:href => "http://fonts.googleapis.com/css?family=Noticia+Text:400,400italic,700,700italic", :rel => "stylesheet", :type => "text/css"}/
+ %link{:href => "http://fonts.googleapis.com/css?family=Droid+Sans+Mono", :rel => "stylesheet", :type => "text/css"}/
+ / Feuille de style font
+ %link{:href => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/css/font.css", :rel => "stylesheet"}/
+ / Le styles
+ %link{:href => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/css/bootstrap.css", :rel => "stylesheet"}/
+ / Le fav icon
+ %link{:href => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/favicon.ico", :rel => "shortcut icon"}/
+ %body{:onload => "prettyPrint()"}
+ / Precharger font
+ %p.hidden.novecento-normal Novecento Normal
+ %p.hidden.novecento-demibold Novecento Demibold
+ %p.hidden.novecento-bold Novecento Bold
+ .container-fluid
+ %header.row-fluid
+ .span8
+ .left-col
+ / /.left-col
+ .right-col
+ %a{:class => "logo #{today_class}", :href => "http://www.bonjourgem.com"}
+ %h3
+ Un jour,
+ %span une gem
+ / /.right-col
+ / /.span8
+ / /header.row-fluid
+ .row-fluid
+ .span8
+ .left-col
+ %p.date= Time.now.strftime("%d/%m/%Y")
+ %ul.pager
+ %li
+ %span#prev.btn-disabled Préc
+ %li
+ %span#next.btn-disabled Suiv
+ / /.left-col
+ = yield
+ .clear
+ .left-col
+ %ul.pager
+ %li
+ %span#prev.btn-disabled Préc
+ %li
+ %span#next.btn-disabled Suiv
+ / /.left-col
+ .right-col
+ %ul.social-buttons.cf
+ / <li><a href="https://plusone.google.com/_/+1/confirm?hl=en&amp;url={Permalink}" class="socialite googleplus" data-size="medium" data-href="{Permalink}" rel="nofollow" target="_blank"><span>Partager sur Google+</span></a></li>
+ %li
+ %a.socialite.facebook{"data-href" => "{Permalink}", "data-layout" => "button_count", "data-send" => "false", "data-show-faces" => "false", "data-width" => "60", :href => "http://www.facebook.com/sharer.php?u={Permalink}", :rel => "nofollow", :target => "_blank"}
+ %span Partager sur Facebook
+ %li
+ %a.twitter-share-button{"data-hashtags" => "BonjourGem", "data-lang" => "en", "data-text" => "{block:Title}{Title}{/block:Title}", "data-via" => "davidmaylis", :href => "https://twitter.com/share"} Partager sur Twitter
+ / /.right-col
+ .clear
+ / /.span8
+ .span4
+ .sidebar-nav
+ %ul.nav.nav-list
+ %li.nav-header Catégories
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/authentification"} Authentification
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/autorisation"} Autorisation
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/base_de_données"} Base de Données
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/communication"} Communication
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/css"} CSS
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/déploiement_et_hébergement"} Déploiement et hébergement
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/gestion_de_contenu"} Gestion de contenu
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/html"} HTML
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/javascript"} JavaScript
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/maintenance_et_monitoring"} Maintenance et monitoring
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/outil_de_développement"} Outil de développement
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/outil_pour_la_documentation"} Outil pour la documentation
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/parseur"} Parseur
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/plugin_active_record"} Plugin Active Record
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/plugin_rails"} Plugin Rails
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/service_et_interaction"} Service et interaction
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/temps_et_espace"} Temps et espace
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/test"} Test
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/upload_de_fichier"} Upload de fichier
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/utilitaire"} Utilitaire
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/web_app"} Web app
+ %li
+ %a{:href => "http://www.bonjourgem.com/tagged/wtf"} WTF
+ .separator
+ %ul.nav.nav-list
+ %li.nav-header.follow-heading Nous suivre
+ %li
+ %a{:href => "https://twitter.com/#!/davidmaylis", :onclick => "window.open(this.href);return false;"} David & Maylis sur Twitter
+ / /.sidebar-nav
+ / /.span4
+ / /.row-fluid
+ %footer.row-fluid
+ .span8
+ .left-col
+ / /.left-col
+ .right-col
+ %span
+ %a{:href => "https://www.tumblr.com", :onclick => "window.open(this.href);return false;"} Tumblr
+ Bonjour gem par
+ %a{:href => "http://www.webdesigner-developpeur-marseille.com", :onclick => "window.open(this.href);return false;"} David & Maylis
+ construit avec le fabuleux
+ %a{:href => "http://twitter.github.com/bootstrap", :onclick => "window.open(this.href);return false;"} Twitter Bootstrap
+ / /.right-col
+ / /.span8
+ / /footer.row-fluid
+ / /.container-fluid
+ / Le javascript
+ / Placed at the end of the document so the pages load faster
+ / Jquery
+ %script{:src => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/jquery-1.7.1.min.js"}
+ / Prettify
+ %script{:src => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/prettify.js"}
+ / Socialite
+ %script{:src => "http://www.webdesigner-developpeur-marseille.com/site/bonjour-gem/js/socialite-1.0.js"}
+ :javascript
+ $(document).ready(function()
+ {
+ Socialite.load($('.social-buttons'));
+ }
+ );
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
+ / Google Analytics
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-22833339-4']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();

0 comments on commit afb0a53

Please sign in to comment.