Initial commit

This commit is contained in:
2015-06-16 21:07:21 +01:00
commit 32680d1d01
32 changed files with 10110 additions and 0 deletions

68
comic/templates/base.html Normal file
View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>{% block title %}CB Reader{% endblock %}</title>
<!-- Bootstrap core CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/static/css/base.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="#">CBReader</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% block navbar %}
<li class="active"><a href="/comic/">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
{% endblock %}
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
{% block content %}{% endblock %}
</div>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="../../static/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}My amazing blog{% endblock %}
{% block content %}
<h2 class="center">Comics</h2>
<div class="list-group">
{% if file_list %}
{% for file in file_list %}
<a href="/comic/file/0/{{ file }}/" class="list-group-item">{{ file }}</a>
{% endfor %}
{% else %}
<p class="list-group-item">No comics.</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<center>
<br/>
<a href="/comic/file/{{ nav.next }}/{{ file_name }}/">
<img src="/comic/file/{{ nav.cur }}/{{ file_name }}/img" height="900"></img>
</a>
<br/>
<a href="/comic/file/{{ nav.prev }}/{{ file_name }}/">Prev</a>
{% if pages %}
<select>
{% for file in pages %}
<option value="{{ file.index }}" {% if nav.cur == file.index%}selected="True"{% endif %}>{{ file.name }}</option>
{% endfor %}
</select>
{% else %}
<p>No comics.</p>
{% endif %}
<a href="/comic/file/{{ nav.next }}/{{ file_name }}/">Next</a>
</center>
{% endblock %}