Permalink
Browse files

less files heavily refactored to use route names in <body>

  • Loading branch information...
inmarelibero committed Nov 8, 2012
1 parent 824cbdb commit e0bb08861d370f400bd8a77bbabcc036b15e084f
@@ -1,24 +1,25 @@
/******************************************************************************************
-SECTION: BRICK
+CONTROLLER-BRICK.LESS
-all the pages related with bricks: show, etc..
+rules for all the templates loaded through Bricks\SiteBundle\BrickController
******************************************************************************************/
-/* show a brick */
-#brick-show-wrapper {
+
+/**
+ show a brick
+
+ route: brick_show
+*/
+body.route-brick_show {
.description {
margin-bottom: 40px;
font-size: 14px;
}
.content {
- h1 {
- font-size: 20px;
- }
+ h1 { font-size: 20px; }
ul { margin: 0 0 10px 25px;
- li {
- list-style-type: disc;
- }
+ li { list-style-type: disc; }
}
}
-}
+}
@@ -1,7 +1,15 @@
/******************************************************************************************
-SECTION: INDEX
+CONTROLLER-DEFAULT.LESS
+
+rules for all the templates loaded through Bricks\SiteBundle\DefaultController
******************************************************************************************/
-#index-wrapper {
+
+/**
+ homepage
+
+ route: route-index_not_localized , homepage
+*/
+body.route-index_not_localized , body.route-homepage {
.right-col {
ul { margin-bottom: 10px;
li {
@@ -42,4 +50,22 @@ SECTION: INDEX
}
}
}
-}
+}
+
+/**
+ page "contribute"
+
+ route: contribute
+*/
+body.route-contribute {
+ ul#github-issues { margin-left: 20px;
+
+ li {
+ margin-bottom: 20px;
+ padding-left: 10px;
+ border-left:4px solid #CCC;
+
+ .info { font-size: 12px; }
+ }
+ }
+}
@@ -1,25 +0,0 @@
-/******************************************************************************************
-FIXED FOOTER
-
-footer fixed to bottom as explained here:
-http://ryanfait.com/resources/footer-stick-to-bottom-of-page/
-******************************************************************************************/
-@footerHeight: 80px;
-
-
-* {
- margin: 0;
-}
-html, body {
- height: 100%;
-}
-.wrapper {
- min-height: 100%;
- height: auto !important;
- height: 100%;
- margin: 0 auto -@footerHeight;
-}
-.footer, .push-footer {
- height: @footerHeight;
- padding-top: 20px;
-}
@@ -1,38 +0,0 @@
-/******************************************************************************************
-FORMS
-
-generic rules to be applied to forms
-******************************************************************************************/
-.form {
- .form-errors {
- margin-bottom: 20px;
- color: red;
- }
-
- textarea {
- width: 100%;
- }
-
-}
-
-/******************************************************************************************
-FORM: user creates/edits a brick
-******************************************************************************************/
-#user-brick-edit {
- #bricks_userbundle_bricktype_description {
- height: 100px;
- }
-
- #content-tab {
- margin-bottom: 0px;
- }
- #bricks_userbundle_bricktype_content {
- height: 600px;
- border-top: 0px;
- }
- #content-preview {
- padding: 4px 6px;
- border: 1px solid #CCC;
- border-top: 0px;
- }
-}
@@ -51,6 +51,32 @@ body {
}
}
+/******************************************************************************************
+FIXED FOOTER
+
+footer fixed to bottom as explained here:
+http://ryanfait.com/resources/footer-stick-to-bottom-of-page/
+******************************************************************************************/
+@footerHeight: 80px;
+
+
+* {
+ margin: 0;
+}
+html, body {
+ height: 100%;
+}
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -@footerHeight;
+}
+.footer, .push-footer {
+ height: @footerHeight;
+ padding-top: 20px;
+}
+
/******************************************************************************************
box-sizing hack: border-box
@@ -93,6 +119,13 @@ h1 {
margin-top: 0px;
}
+.form {
+ .form-errors {
+ margin-bottom: 20px;
+ color: red;
+ }
+}
+
/******************************************************************************************
GENERAL CLASSES
@@ -1,16 +0,0 @@
-/******************************************************************************************
-SECTION: CONTRUIBUTE
-******************************************************************************************/
-#contribute-wrapper {
- ul#github-issues {
- margin-left: 20px;
-
- li {
- margin-bottom: 20px;
- padding-left: 10px;
- border-left:4px solid #CCC;
-
- .info { font-size: 12px; }
- }
- }
-}
@@ -6,37 +6,33 @@
{% block main %}
- <div id="brick-show-wrapper">
-
- <div class="row">
- <div class="span12">
+ <div class="row">
+ <div class="span12">
+
+ <h1>{{ brick.title }}</h1>
- <h1>{{ brick.title }}</h1>
-
- <p class="description">{{ brick.description }}</p>
+ <p class="description">{{ brick.description }}</p>
+
+ <hr>
+ <i class="icon-user"></i> <a href="{{ path('userprofile_show', {'username': brick.user.username}) }}">{{ brick.user }}</a>
+ |
+ <i class="icon-calendar"></i> {{ 'brick.last_update'|trans }}: {{ brick.updatedAt|date('d/m/Y') }}
- <hr>
- <i class="icon-user"></i> <a href="{{ path('userprofile_show', {'username': brick.user.username}) }}">{{ brick.user }}</a>
- |
- <i class="icon-calendar"></i> {{ 'brick.last_update'|trans }}: {{ brick.updatedAt|date('d/m/Y') }}
-
-
- <a href="https://twitter.com/share" class="twitter-share-button pull-right"
- data-url="{{ app.request.uri }}"
- data-text="{{ brick.title }}"
- data-via="SymfonyBricks"
- >
- Tweet
- </a>
- <hr>
- <div class="content">
- {{ brick.content|markdown }}
- </div>
+ <a href="https://twitter.com/share" class="twitter-share-button pull-right"
+ data-url="{{ app.request.uri }}"
+ data-text="{{ brick.title }}"
+ data-via="SymfonyBricks"
+ >
+ Tweet
+ </a>
+ <hr>
+ <div class="content">
+ {{ brick.content|markdown }}
</div>
- </div>
+ </div>
</div>
-
+
{% endblock %}
Oops, something went wrong.

0 comments on commit e0bb088

Please sign in to comment.