Added main files
This commit is contained in:
parent
0f73dcb540
commit
c0b87d9e6a
|
@ -70,10 +70,15 @@ Thank you!
|
|||
</li>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li class="pull-right {% if section == 'blog' %}active{% endif %}">
|
||||
{% if user.is_authenticated() %}
|
||||
<li class="{% if section == 'studio' %}active{% endif %}">
|
||||
<a href="{{ url('studio') }}">Studio</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="{% if section == 'blog' %}active{% endif %}">
|
||||
<a href="{{ url('blog_list') }}">Blog</a>
|
||||
</li>
|
||||
<li class="pull-right {% if section == 'about' %}active{% endif %}">
|
||||
<li class="{% if section == 'about' %}active{% endif %}">
|
||||
<a href="{{ url('aboutpage') }}">About the project</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -107,13 +112,13 @@ Thank you!
|
|||
</footer>
|
||||
{% 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');
|
||||
(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');
|
||||
ga('create', '{{ google_analytics }}', 'minecraftcodex.com');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<header>
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<div class="container" style="width: auto;">
|
||||
<a class="brand" href="/">
|
||||
Minecraft Codex : Block Studio
|
||||
</a>
|
||||
{#<div class="nav-collapse">#}
|
||||
<div>
|
||||
<ul class="nav">
|
||||
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li>
|
||||
<a href="{{ url('homepage') }}">
|
||||
<i class="icon-arrow-left"></i> Go back
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- /.nav-collapse -->
|
||||
</div>
|
||||
</div><!-- /navbar-inner -->
|
||||
</div>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="studio-editor">
|
||||
<div class="span3">
|
||||
<div class="well">Left</div>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div class="well">Canvas</div>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<div class="well">Right</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
|
@ -124,6 +124,10 @@ def about(request):
|
|||
return render_to_response('about.html', context_instance=context)
|
||||
|
||||
|
||||
def studio(request):
|
||||
context = RequestContext(request)
|
||||
return render_to_response('studio/main.html', context_instance=context)
|
||||
|
||||
def error404(request):
|
||||
from raven.contrib.django.raven_compat.models import sentry_exception_handler
|
||||
sentry_exception_handler(request=request)
|
||||
|
|
|
@ -49,6 +49,9 @@ urlpatterns = patterns('',
|
|||
url(r'^blog/(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/(?P<slug>[\w\-]+)/$',
|
||||
'blog.views.blog_item', name='blog_item'),
|
||||
|
||||
# Admin only
|
||||
url(r'^studio/', 'database.views.studio', name='studio'),
|
||||
|
||||
# Robots
|
||||
(r'^robots\.txt$', lambda r: HttpResponse("", mimetype="text/plain")),
|
||||
|
||||
|
|
Loading…
Reference in New Issue