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" %}
{% block content %}
<div class="container">
<h1>Blog</h1>
{% for item in page.object_list %}
<hr />
@ -30,4 +31,5 @@
</ul>
</div>
{% endif %}
</div>
{% endblock %}

View File

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

View File

@ -5,70 +5,72 @@
{% endblock %}
{% block content %}
<h1>About</h1>
<!-- PROJECT SECTION -->
<h2>The project</h1>
<img src="/static/images/about/lan.original.jpg" class="pull-right img-polaroid span4" />
<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>
<div class="container">
<h1>About</h1>
<!-- PROJECT SECTION -->
<h2>The project</h1>
<img src="/static/images/about/lan.original.jpg" class="pull-right img-polaroid span4" />
<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 -->
<h2>The people</h2>
<div class="row">
<div class="span6">
<div class="well">
<img src="https://www.gravatar.com/avatar/49dbfd4eff4d399330de2bc4b03cb334?s=200px"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Felipe Mart&iacute;n</h3>
<p>Developer and minecraft lover.</p>
<p>
Want to help the awesome minecraft community building a tool to
help everyone on its days over <i>minecraftia</i>.
<p>
<a href="https://twitter.com/fmartingr">
<i class="icon-twitter"></i> @fmartingr
</a>
</p>
</div>
<div class="clearfix"></div>
<!-- PEOPLE SECTION -->
<h2>The people</h2>
<div class="row">
<div class="span6">
<div class="well">
<img src="https://www.gravatar.com/avatar/49dbfd4eff4d399330de2bc4b03cb334?s=200px"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Felipe Mart&iacute;n</h3>
<p>Developer and minecraft lover.</p>
<p>
Want to help the awesome minecraft community building a tool to
help everyone on its days over <i>minecraftia</i>.
<p>
<a href="https://twitter.com/fmartingr">
<i class="icon-twitter"></i> @fmartingr
</a>
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="span6">
<div class="well">
<img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;s=200px"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Ramiro Sanchez</h3>
<p>Design and stuff.</p>
<p>I haven't done anything yet, but it's cool to be here!<br />:)</p>
<p>
<a href="https://twitter.com/rsanchezbalo">
<i class="icon-twitter"></i> @rsanchezbalo
</a>
</p>
</div>
<div class="clearfix"></div>
<div class="span6">
<div class="well">
<img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mm&amp;s=200px"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Ramiro Sanchez</h3>
<p>Design and stuff.</p>
<p>I haven't done anything yet, but it's cool to be here!<br />:)</p>
<p>
<a href="https://twitter.com/rsanchezbalo">
<i class="icon-twitter"></i> @rsanchezbalo
</a>
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
{# TEMPLATE
<div class="span6">
<div class="well">
<img src="avatar"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Name</h3>
<p>What it does</p>
<p>Little text</p>
<p>
<a href="https://twitter.com/">
<i class="icon-twitter"></i> @
</a>
</p>
</div>
<div class="clearfix"></div>
{# TEMPLATE
<div class="span6">
<div class="well">
<img src="avatar"
class="img-circle pull-left" />
<div class="span3 pull-right">
<h3>Name</h3>
<p>What it does</p>
<p>Little text</p>
<p>
<a href="https://twitter.com/">
<i class="icon-twitter"></i> @
</a>
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
#}
</div>
#}
</div>
{% endblock %}

View File

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

View File

@ -9,33 +9,35 @@
{% endblock %}
{% block content %}
<div class="row-fluid">
<div class="span9">
<h1>{{ item.name() }}</h1>
<hr />
<h3>Can drop</h3>
...
<h3>Used in</h3>
...
</div>
<div class="span3">
<div class="well">
<div class="block-render">
<div class="codexicon x8 margin-auto text-center">
{% if item.main_texture %}
<img src="/static/textures/{{ item.main_texture.get_image(8) }}" />
{% endif %}
<div class="container">
<div class="row-fluid">
<div class="span9">
<h1>{{ item.name() }}</h1>
<hr />
<h3>Can drop</h3>
...
<h3>Used in</h3>
...
</div>
<div class="span3">
<div class="well">
<div class="block-render">
<div class="codexicon x8 margin-auto text-center">
{% if item.main_texture %}
<img src="/static/textures/{{ item.main_texture.get_image(8) }}" />
{% endif %}
</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>
{% 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>

View File

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

View File

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

View File

@ -31,6 +31,7 @@ Thank you!
<title>{% block head_title %}{{ site_title }}{% endblock %}</title>
</head>
<body>
{% block header %}
<div class="alert alert-info margin-none text-center">
<strong>
Lack of information?
@ -81,10 +82,11 @@ Thank you!
</div><!-- /navbar-inner -->
</div>
</header>
<div class="container">
{% block content %}
{% endblock %}
</div>
{% endblock %}
{% block content %}
<div class="container"></div>
{% endblock %}
{% block footer %}
<footer class="container-fluid">
<hr style="margin: 0" />
<div class="pull-left">
@ -103,16 +105,17 @@ Thank you!
</a>
</div>
</footer>
{% if google_analytics %}
<script>
(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),
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');
{% if google_analytics and not user.is_authenticated() %}
<script>
(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),
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');
ga('create', '{{ google_analytics }}', 'minecraftcodex.com');
ga('send', 'pageview');
</script>
{% endif %}
ga('create', '{{ google_analytics }}', 'minecraftcodex.com');
ga('send', 'pageview');
</script>
{% endif %}
{% endblock %}
</body>
</html>

View File

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

View File

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