Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
pytest | ||
pytest | ||
flask | ||
flask-bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from web.app import app | ||
|
||
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Config(object): | ||
BOOTSTRAP_USE_MINIFIED = True | ||
BOOTSTRAP_SERVE_LOCAL = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import render_template, Flask | ||
from flask_bootstrap import Bootstrap | ||
|
||
from web import Config | ||
|
||
app = Flask(__name__) | ||
app.config.from_object(Config) | ||
Bootstrap(app) | ||
|
||
|
||
@app.route('/') | ||
def index(): | ||
return render_template('hash.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
/* The html and body elements cannot have any padding or margin. */ | ||
} | ||
|
||
/* Wrapper for page content to push down footer */ | ||
#wrap { | ||
min-height: 100%; | ||
height: auto !important; | ||
height: 100%; | ||
/* Negative indent footer by its height */ | ||
margin: 0 auto -60px; | ||
/* Pad bottom by footer height */ | ||
padding: 0 0 60px; | ||
} | ||
|
||
/* Set the fixed height of the footer here */ | ||
#footer { | ||
height: 60px; | ||
background-color: #f5f5f5; | ||
} | ||
|
||
/* Custom page CSS | ||
-------------------------------------------------- */ | ||
/* Not required for template or sticky footer method. */ | ||
|
||
#wrap > .container { | ||
padding: 40px 15px 0; | ||
} | ||
|
||
.container .credit { | ||
margin: 20px 0; | ||
} | ||
|
||
#footer > .container { | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
} | ||
|
||
code { | ||
font-size: 80%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends "./layout.html" %} | ||
|
||
{% block title %}Photo Dup by Hash{% endblock %} | ||
|
||
{% block page_header %} | ||
<h2>111212131 (3)</h2> | ||
{% endblock %} | ||
|
||
{% block content_area %} | ||
<form> | ||
<input type="checkbox" name="sports" value="soccer"/> file 1 | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% extends "bootstrap/base.html" %} | ||
{% block title %}Home{% endblock %} | ||
|
||
{% block styles %} | ||
{{ super() }} | ||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | ||
{% endblock %} | ||
|
||
|
||
{% block content %} | ||
<div id="wrap"> | ||
<!-- Begin nav bar --> | ||
<div class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="#">PHOTODUP</a> | ||
</div> | ||
<div class="collapse navbar-collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li class="active"><a href="/">By Hash</a></li> | ||
<li><a href="/">By Name</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Begin page content --> | ||
<div class="container"> | ||
<div class="page-header"> | ||
{% block page_header %}{% endblock %} | ||
</div> | ||
{% block content_area %}{% endblock %} | ||
</div> | ||
</div> | ||
<div id="footer"> | ||
<div class="container"> | ||
<p class="text-muted credit">Copyright © <a href="https://github.com/tobyqin/">Toby Qin</a> | ||
- <a href="https://github.com/tobyqin/photodup">Source at Github</a></p> | ||
</div> | ||
</div> | ||
{% endblock %} |