summaryrefslogtreecommitdiff
path: root/static/website/templates
diff options
context:
space:
mode:
authorJayaram Pai2013-11-24 01:55:26 +0530
committerJayaram Pai2013-11-24 01:55:26 +0530
commit81a1802ae9bdd0aca461cbc38bb3bd7f934de8b3 (patch)
treed7390126bb94f775bd3119e66307d61b76353759 /static/website/templates
downloadspoken-tutorial-forums-81a1802ae9bdd0aca461cbc38bb3bd7f934de8b3.tar.gz
spoken-tutorial-forums-81a1802ae9bdd0aca461cbc38bb3bd7f934de8b3.tar.bz2
spoken-tutorial-forums-81a1802ae9bdd0aca461cbc38bb3bd7f934de8b3.zip
initial commit
Diffstat (limited to 'static/website/templates')
-rw-r--r--static/website/templates/base.html74
-rw-r--r--static/website/templates/fetch_posts.html9
-rw-r--r--static/website/templates/fetch_tutorials.html9
-rw-r--r--static/website/templates/get_post.html12
-rw-r--r--static/website/templates/index.html12
-rw-r--r--static/website/templates/recent_posts.html5
6 files changed, 121 insertions, 0 deletions
diff --git a/static/website/templates/base.html b/static/website/templates/base.html
new file mode 100644
index 0000000..dd81da9
--- /dev/null
+++ b/static/website/templates/base.html
@@ -0,0 +1,74 @@
+{% load static %}
+<html>
+ <head>
+ <title>Spoken-Tutorial Forums</title>
+ <link rel="stylesheet" href="{% static 'website/css/bootstrap.min.css' %}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="{% static 'website/css/main.css' %}" type="text/css" media="screen" charset="utf-8" />
+ </head>
+ <body>
+ <div id="header-wrapper">
+ <div id="header-inner">
+ <nav class="navbar navbar-default" role="navigation">
+ <div class="container">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="{% url 'website:home' %}">Spoken Tutorial Forums</a>
+ </div> <!-- /.navbar-header -->
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#">Home</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div> <!-- /.navbar-collapse -->
+ </div> <!-- /.container -->
+ </nav>
+ </div> <!-- /#header-inner -->
+ </div> <!-- /#header-wrapper -->
+
+ <div id="content-wrapper">
+ <div id="content-inner" class="container">
+ <div id="content" class="col-lg-10 col-md-10 col-sm-10">
+ {% block content %}
+ {% endblock %}
+ </div> <!-- /#content -->
+
+ <div id="sidebar" class="col-lg-2 col-md-2 col-sm-2">
+ {% block sidebar %}
+ <h4>Recent Posts</h4>
+ {% load sidebar_tags %}
+ {% recent_posts %}
+ {% endblock %}
+ </div> <!-- /#sidebar -->
+ </div> <!-- /#content-inner -->
+ </div> <!-- /#content-wrapper -->
+
+ <div id="footer-wrapper">
+ <div id="footer-inner" class="container">
+ <div class="pull-left">
+ </div>
+ <div class="pull-right">
+ </div>
+ </div> <!-- /#footer-inner -->
+ </div> <!-- /#footer-wrapper -->
+
+ <script src="{% static 'website/js/jquery.min.js' %}"></script>
+ <script src="{% static 'website/js/bootstrap.min.js' %}"></script>
+ </body>
+</html>
diff --git a/static/website/templates/fetch_posts.html b/static/website/templates/fetch_posts.html
new file mode 100644
index 0000000..d6d4e06
--- /dev/null
+++ b/static/website/templates/fetch_posts.html
@@ -0,0 +1,9 @@
+{% extends 'website/templates/base.html' %}
+{% block content %}
+{{ category }}, {{ tutorial }}
+<br>
+Number of posts: {{ posts|length }} <br>
+{% for post in posts %}
+ <a href="{% url 'website:get_post' post.id %}"> {{ post.title }}</a>
+{% endfor %}
+{% endblock %}
diff --git a/static/website/templates/fetch_tutorials.html b/static/website/templates/fetch_tutorials.html
new file mode 100644
index 0000000..524930f
--- /dev/null
+++ b/static/website/templates/fetch_tutorials.html
@@ -0,0 +1,9 @@
+{% extends 'website/templates/base.html' %}
+{% block content %}
+{% for tut in tutorials %}
+ <a href="{% url 'website:fetch_posts' category tut.tutorial_name %}">
+ {{tut.tutorial_name}}
+ </a>
+ <br>
+{% endfor %}
+{% endblock %}
diff --git a/static/website/templates/get_post.html b/static/website/templates/get_post.html
new file mode 100644
index 0000000..359bcd2
--- /dev/null
+++ b/static/website/templates/get_post.html
@@ -0,0 +1,12 @@
+{% extends 'website/templates/base.html' %}
+{% block content %}
+<h4>{{post.title}}</h4>
+<p>
+ {{ post.body }}
+</p>
+
+<b>Replies</b>
+{% for reply in replies %}
+ {{ reply.body }}
+{% endfor %}
+{% endblock %}
diff --git a/static/website/templates/index.html b/static/website/templates/index.html
new file mode 100644
index 0000000..b936643
--- /dev/null
+++ b/static/website/templates/index.html
@@ -0,0 +1,12 @@
+{% extends 'website/templates/base.html' %}
+{% block content %}
+{% for category in categories %}
+ <div class="col-lg-4 col-">
+ <a href="{% url 'website:fetch_tutorials' category %}">{{ category }}</a>
+ <br>
+ {% load count_tags %}
+ Count = {% category_post_count category %}
+ </div>
+{% endfor %}
+<div class="clear"></div>
+{% endblock %}
diff --git a/static/website/templates/recent_posts.html b/static/website/templates/recent_posts.html
new file mode 100644
index 0000000..3b6ad0e
--- /dev/null
+++ b/static/website/templates/recent_posts.html
@@ -0,0 +1,5 @@
+<ul>
+{% for post in recent_posts %}
+ <li>{{post.title}}</li>
+{% endfor %}
+</ul>