Added blocks header and footer to the main layout, also container div is now inside the content block, so it's optional

This commit is contained in:
Felipe Martín 2013-05-30 11:49:51 +02:00
parent 46244b9add
commit 718c3729f6
10 changed files with 139 additions and 118 deletions

View File

@ -1,6 +1,7 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<div class="container">
<h1>Blog</h1> <h1>Blog</h1>
{% for item in page.object_list %} {% for item in page.object_list %}
<hr /> <hr />
@ -30,4 +31,5 @@
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,7 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<div class="container">
<p><a href="{{ url('blog_list') }}"><i class="icon-arrow-left"></i> Go back</a></p> <p><a href="{{ url('blog_list') }}"><i class="icon-arrow-left"></i> Go back</a></p>
<article class="blog-entry"> <article class="blog-entry">
<h1>{{ item.title }}</h1> <h1>{{ item.title }}</h1>
@ -13,4 +14,5 @@
{{ item.content|safe }} {{ item.content|safe }}
</div> </div>
</article> </article>
</div>
{% endblock %} {% endblock %}

View File

@ -5,70 +5,72 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1>About</h1> <div class="container">
<!-- PROJECT SECTION --> <h1>About</h1>
<h2>The project</h1> <!-- PROJECT SECTION -->
<img src="/static/images/about/lan.original.jpg" class="pull-right img-polaroid span4" /> <h2>The project</h1>
<p>Ooh, name it after me! Alright, let's mafia things up a bit. Joey, burn down the ship. Clamps, burn down the crew. Pansy. Really?! Okay, it's 500 dollars, you have no choice of carrier, the battery can't hold the charge and the reception isn't very&hellip; Leela's gonna kill me.</p> <h2>A Pharaoh to Remember</h2> <p>I can explain. It's very valuable. Oh God, what have I done? Bender, you risked your life to save me! I don't know what you did, Fry, but once again, you screwed up! Now all the planets are gonna start cracking wise about our mamas. Why would a robot need to drink? Ah, yes! John Quincy Adding Machine. He struck a chord with the voters when he pledged not to go on a killing spree.</p> <ul> <li>Goodbye, friends. I never thought I'd die like this. But I always really hoped.</li> <li>Now Fry, it's been a few years since medical school, so remind me. Disemboweling in your species: fatal or non-fatal?</li> <li>Who said that? SURE you can die! You want to die?!</li> </ul> <h3>Time Keeps on Slippin'</h3> <p>There's no part of that sentence I didn't like! I guess because my parents keep telling me to be more ladylike. As though! Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."</p> <h4>Where the Buggalo Roam</h4> <p>But I've never been to the moon! This is the worst part. The calm before the battle. But I've never been to the moon! Whoa a real live robot; or is that some kind of cheesy New Year's costume? You wouldn't. Ask anyway!</p> <img src="/static/images/about/lan.original.jpg" class="pull-right img-polaroid span4" />
<div class="clearfix"></div> <p>Ooh, name it after me! Alright, let's mafia things up a bit. Joey, burn down the ship. Clamps, burn down the crew. Pansy. Really?! Okay, it's 500 dollars, you have no choice of carrier, the battery can't hold the charge and the reception isn't very&hellip; Leela's gonna kill me.</p> <h2>A Pharaoh to Remember</h2> <p>I can explain. It's very valuable. Oh God, what have I done? Bender, you risked your life to save me! I don't know what you did, Fry, but once again, you screwed up! Now all the planets are gonna start cracking wise about our mamas. Why would a robot need to drink? Ah, yes! John Quincy Adding Machine. He struck a chord with the voters when he pledged not to go on a killing spree.</p> <ul> <li>Goodbye, friends. I never thought I'd die like this. But I always really hoped.</li> <li>Now Fry, it's been a few years since medical school, so remind me. Disemboweling in your species: fatal or non-fatal?</li> <li>Who said that? SURE you can die! You want to die?!</li> </ul> <h3>Time Keeps on Slippin'</h3> <p>There's no part of that sentence I didn't like! I guess because my parents keep telling me to be more ladylike. As though! Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."</p> <h4>Where the Buggalo Roam</h4> <p>But I've never been to the moon! This is the worst part. The calm before the battle. But I've never been to the moon! Whoa a real live robot; or is that some kind of cheesy New Year's costume? You wouldn't. Ask anyway!</p>
<div class="clearfix"></div>
<!-- PEOPLE SECTION --> <!-- PEOPLE SECTION -->
<h2>The people</h2> <h2>The people</h2>
<div class="row"> <div class="row">
<div class="span6"> <div class="span6">
<div class="well"> <div class="well">
<img src="https://www.gravatar.com/avatar/49dbfd4eff4d399330de2bc4b03cb334?s=200px" <img src="https://www.gravatar.com/avatar/49dbfd4eff4d399330de2bc4b03cb334?s=200px"
class="img-circle pull-left" /> class="img-circle pull-left" />
<div class="span3 pull-right"> <div class="span3 pull-right">
<h3>Felipe Mart&iacute;n</h3> <h3>Felipe Mart&iacute;n</h3>
<p>Developer and minecraft lover.</p> <p>Developer and minecraft lover.</p>
<p> <p>
Want to help the awesome minecraft community building a tool to Want to help the awesome minecraft community building a tool to
help everyone on its days over <i>minecraftia</i>. help everyone on its days over <i>minecraftia</i>.
<p> <p>
<a href="https://twitter.com/fmartingr"> <a href="https://twitter.com/fmartingr">
<i class="icon-twitter"></i> @fmartingr <i class="icon-twitter"></i> @fmartingr
</a> </a>
</p> </p>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div>
</div> </div>
</div> <div class="span6">
<div class="span6"> <div class="well">
<div class="well"> <img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;s=200px"
<img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;s=200px" class="img-circle pull-left" />
class="img-circle pull-left" /> <div class="span3 pull-right">
<div class="span3 pull-right"> <h3>Ramiro Sanchez</h3>
<h3>Ramiro Sanchez</h3> <p>Design and stuff.</p>
<p>Design and stuff.</p> <p>I haven't done anything yet, but it's cool to be here!<br />:)</p>
<p>I haven't done anything yet, but it's cool to be here!<br />:)</p> <p>
<p> <a href="https://twitter.com/rsanchezbalo">
<a href="https://twitter.com/rsanchezbalo"> <i class="icon-twitter"></i> @rsanchezbalo
<i class="icon-twitter"></i> @rsanchezbalo </a>
</a> </p>
</p> </div>
</div> <div class="clearfix"></div>
<div class="clearfix"></div> </div>
</div> </div>
</div> {# TEMPLATE
{# TEMPLATE <div class="span6">
<div class="span6"> <div class="well">
<div class="well"> <img src="avatar"
<img src="avatar" class="img-circle pull-left" />
class="img-circle pull-left" /> <div class="span3 pull-right">
<div class="span3 pull-right"> <h3>Name</h3>
<h3>Name</h3> <p>What it does</p>
<p>What it does</p> <p>Little text</p>
<p>Little text</p> <p>
<p> <a href="https://twitter.com/">
<a href="https://twitter.com/"> <i class="icon-twitter"></i> @
<i class="icon-twitter"></i> @ </a>
</a> </p>
</p> </div>
</div> <div class="clearfix"></div>
<div class="clearfix"></div> </div>
</div> </div>
#}
</div> </div>
#}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,7 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<div class="container">
<h1>Blocks</h1> <h1>Blocks</h1>
<hr /> <hr />
<div class="row-fluid"> <div class="row-fluid">
@ -70,4 +71,5 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -9,33 +9,35 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="row-fluid"> <div class="container">
<div class="span9"> <div class="row-fluid">
<h1>{{ item.name() }}</h1> <div class="span9">
<hr /> <h1>{{ item.name() }}</h1>
<h3>Can drop</h3> <hr />
... <h3>Can drop</h3>
<h3>Used in</h3> ...
... <h3>Used in</h3>
</div> ...
<div class="span3"> </div>
<div class="well"> <div class="span3">
<div class="block-render"> <div class="well">
<div class="codexicon x8 margin-auto text-center"> <div class="block-render">
{% if item.main_texture %} <div class="codexicon x8 margin-auto text-center">
<img src="/static/textures/{{ item.main_texture.get_image(8) }}" /> {% if item.main_texture %}
{% endif %} <img src="/static/textures/{{ item.main_texture.get_image(8) }}" />
{% endif %}
</div>
</div> </div>
{% if user.is_authenticated() %}
<script defer="defer" type="text/javascript">
block = BlockRenderer('block', {side:'/static/textures/{{ item.main_texture.get_image() }}'}, '.block-render', 'auto', 'auto');
</script>
{% endif %}
<ul>
<li>Data value: {{ item.data_value }}</li>
</li>
<div class="clearfix"></div>
</div> </div>
{% if user.is_authenticated() %}
<script defer="defer" type="text/javascript">
block = BlockRenderer('block', {side:'/static/textures/{{ item.main_texture.get_image() }}'}, '.block-render', 'auto', 'auto');
</script>
{% endif %}
<ul>
<li>Data value: {{ item.data_value }}</li>
</li>
<div class="clearfix"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,6 +1,7 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<div class="container">
<h1>Items</h1> <h1>Items</h1>
<hr /> <hr />
<div class="row-fluid"> <div class="row-fluid">
@ -70,4 +71,5 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,26 +1,28 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<div class="row-fluid"> <div class="container">
<div class="span9"> <div class="row-fluid">
<h1>{{ item.name() }}</h1> <div class="span9">
<hr /> <h1>{{ item.name() }}</h1>
<h3>Can drop</h3> <hr />
... <h3>Can drop</h3>
<h3>Used in</h3> ...
... <h3>Used in</h3>
</div> ...
<div class="span3"> </div>
<div class="well"> <div class="span3">
<div class="codexicon x8 margin-auto text-center"> <div class="well">
{% if item.main_texture %} <div class="codexicon x8 margin-auto text-center">
<img src="/static/textures/{{ item.main_texture.get_image(8) }}" /> {% if item.main_texture %}
{% endif %} <img src="/static/textures/{{ item.main_texture.get_image(8) }}" />
{% endif %}
</div>
<ul>
<li>Data value: {{ item.data_value }}</li>
</li>
<div class="clearfix"></div>
</div> </div>
<ul>
<li>Data value: {{ item.data_value }}</li>
</li>
<div class="clearfix"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -31,6 +31,7 @@ Thank you!
<title>{% block head_title %}{{ site_title }}{% endblock %}</title> <title>{% block head_title %}{{ site_title }}{% endblock %}</title>
</head> </head>
<body> <body>
{% block header %}
<div class="alert alert-info margin-none text-center"> <div class="alert alert-info margin-none text-center">
<strong> <strong>
Lack of information? Lack of information?
@ -81,10 +82,11 @@ Thank you!
</div><!-- /navbar-inner --> </div><!-- /navbar-inner -->
</div> </div>
</header> </header>
<div class="container"> {% endblock %}
{% block content %} {% block content %}
{% endblock %} <div class="container"></div>
</div> {% endblock %}
{% block footer %}
<footer class="container-fluid"> <footer class="container-fluid">
<hr style="margin: 0" /> <hr style="margin: 0" />
<div class="pull-left"> <div class="pull-left">
@ -103,16 +105,17 @@ Thank you!
</a> </a>
</div> </div>
</footer> </footer>
{% if google_analytics %} {% if google_analytics and not user.is_authenticated() %}
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ google_analytics }}', 'minecraftcodex.com'); ga('create', '{{ google_analytics }}', 'minecraftcodex.com');
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% endif %} {% endif %}
{% endblock %}
</body> </body>
</html> </html>

View File

@ -5,6 +5,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="container">
<h1>Minecraft versions</h1> <h1>Minecraft versions</h1>
<hr /> <hr />
<a href="/versions/"><i class="icon-arrow-left"></i> Go back</a> <a href="/versions/"><i class="icon-arrow-left"></i> Go back</a>
@ -24,4 +25,5 @@
<h3>Changelog</h3> <h3>Changelog</h3>
<p>{{ version.changelog|nl2br }}</p> <p>{{ version.changelog|nl2br }}</p>
{% endfor %} {% endfor %}
</div>
{% endblock %} {% endblock %}

View File

@ -5,6 +5,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="container">
<h1>Minecraft versions</h1> <h1>Minecraft versions</h1>
<hr /> <hr />
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
@ -58,4 +59,5 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div>
{% endblock %} {% endblock %}