-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glad: Added a landing page after generation.
- Loading branch information
Showing
9 changed files
with
266 additions
and
18 deletions.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.pyc | ||
__pycache__ | ||
cache | ||
temp |
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
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
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
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,47 @@ | ||
{% extends '__autoindex__/autoindex.html' %} | ||
{% import 'macros.html' as macros with context %} | ||
|
||
|
||
{% block meta %} | ||
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css"> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='normalize.css') }}"> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='multi-select.css') }}"> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='skeleton.css') }}"> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='glad.css') }}"> | ||
{% endblock %} | ||
|
||
|
||
{% block header %} | ||
<div class="container"> | ||
<header class="header"> | ||
<h3>Glad</h3><h5>Generated files. <small>These files are not permanent!</small></h5> | ||
</header> | ||
{% endblock %} | ||
|
||
|
||
{% block table %} | ||
<div class="aidx"> | ||
<table> | ||
<thead> | ||
{{ macros.thead() }} | ||
{% if not curdir.is_root() %} | ||
<tr> | ||
<td class="breadcrumb" colspan="4"> | ||
<h1>{{ macros.breadcrumb(curdir) }}</h1> | ||
</td> | ||
</tr> | ||
{% endif %} | ||
</thead> | ||
<tbody> | ||
{% for ent in entries %} | ||
{{ macros.entry(ent) }} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% endblock %} | ||
|
||
|
||
{% block footer %} | ||
</div> | ||
{% 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,70 @@ | ||
{% macro entry(ent) %} | ||
<tr> | ||
{% set icon = ent.guess_icon() %} | ||
<td class="icon"> | ||
{% if icon %} | ||
<img src="{{ icon }}" /> | ||
{% endif %} | ||
</td> | ||
<td class="name"> | ||
<a href="{{ url_for(endpoint, root=root, path=ent.path) }}"> | ||
{%- if ent.name == ".." -%} | ||
Parent folder | ||
{%- else -%} | ||
{{ ent.name }} | ||
{%- endif -%} | ||
</a></td> | ||
<td class="modified"> | ||
<time datetime="{{ ent.modified }}">{{ ent.modified }}</time> | ||
</td> | ||
<td class="size"> | ||
{% if ent.size %} | ||
{{ ent.size|filesizeformat }} | ||
{% else %} | ||
- | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% endmacro %} | ||
|
||
{% macro th(key, label, colspan=1) %} | ||
<th class="{{ key }}" colspan="{{ colspan }}"> | ||
{%- if sort_by == key and order > 0 -%} | ||
<a href="?sort_by={{ key }}&order=desc">{{ label }}</a> | ||
{%- else -%} | ||
<a href="?sort_by={{ key }}">{{ label }}</a> | ||
{%- endif -%} | ||
{%- if sort_by == key -%} | ||
{%- if order > 0 -%} | ||
<img src="{{ url_for('__autoindex__.static', filename='asc.gif') }}" alt="ASC" /> | ||
{%- elif order < 0 -%} | ||
<img src="{{ url_for('__autoindex__.static', filename='desc.gif') }}" alt="DESC" /> | ||
{%- endif -%} | ||
{%- endif -%} | ||
</th> | ||
{% endmacro %} | ||
|
||
{% macro thead() %} | ||
<tr> | ||
{{ th("name", "Name", 2) }} | ||
{{ th("modified", "Last modified") }} | ||
{{ th("size", "Size") }} | ||
</tr> | ||
{% endmacro %} | ||
|
||
{% macro breadcrumb(ent) %} | ||
{% set parent = ent.parent %} | ||
{% if parent %} | ||
{{ breadcrumb(parent) }} | ||
<span class="sep">»</span> | ||
{% endif %} | ||
<a href="{{ url_for(endpoint, root=root, path=ent.path) }}"> | ||
{% set icon = ent.guess_icon() %} | ||
{% if icon %} | ||
<img src="{{ icon }}" /> | ||
{% endif %} | ||
{% if not ent.is_root() %} | ||
{{ ent.name }} | ||
{% endif %} | ||
</a> | ||
{% endmacro %} |
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,9 @@ | ||
from flask import Blueprint, abort | ||
|
||
|
||
generated = Blueprint('generated', __name__) | ||
|
||
|
||
# @generated.route('/') | ||
# def landing(): | ||
# return abort(404) |
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
Empty file.