init project

This commit is contained in:
alphardex
2019-01-16 22:45:05 +08:00
commit d9f4136fa4
32 changed files with 1044 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
{% extends 'layout.html' %}
{% block title %}400 错误{% endblock %}
{% block content %}
<div class="jumbotron">
<h1>400 Bad Request</h1>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends 'layout.html' %}
{% block title %}404 错误{% endblock %}
{% block content %}
<div class="jumbotron">
<h1>404 Not Found</h1>
</div>
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends 'layout.html' %}
{% block title %}500 错误{% endblock %}
{% block content %}
<div class="jumbotron">
<h1>服务器出错</h1>
</div>
{% endblock %}

View File

@@ -0,0 +1,69 @@
{% from 'bootstrap/nav.html' import render_nav_item %}
<!DOCTYPE html>
<html>
<head>
{% block head %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}{% endblock title %}</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
{% block styles %}
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
{% endblock styles %}
{% endblock head %}
</head>
<body>
{% block nav %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" role="navigation">
<div class="container">
<a class="navbar-brand" href="{{url_for('main.index')}}">{{ config['SITE_NAME'] }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="nav navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
{% endblock nav %}
<main class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-dismissable alert-{{ category }}" role="alert">
<button type="button" class="close" data-dismiss="alert">&times;</button>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
{% block footer %}
<footer>
<p class="float-left">
<small>&copy;
Made by <a href="https://github.com/{{config['GITHUB_USERNAME']}}" target="_blank">{{config['GITHUB_USERNAME']}}</a>
with <span class="fa fa-heart"></span>
</small>
</p>
<p class="float-right">
<small><a href="mailto:{{ config['EMAIL'] }}">Contact</a></small>
</p>
</footer>
{% endblock footer %}
</main>
{% block scripts %}
{{ bootstrap.load_js() }}
{{ moment.include_moment() }}
{{ moment.locale('zh-cn') }}
{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<generator>{{config['SITE_NAME']}}</generator>
<webMaster>{{config['EMAIL']}}</webMaster>
<language>zh-cn</language>
<id>{{link}}</id>
<title><![CDATA[{{title|safe}}]]></title>
<link href="{{link}}"/>
<author>
<name><![CDATA[{{author|safe}}]]></name>
</author>
{% for item in items %}
<entry>
<id>{{item.link}}</id>
<title><![CDATA[{{item.title|safe}}]]></title>
<published>{{item.pubDate}}</published>
<updated>{{item.pubDate}}</updated>
<link href="{{item.link}}"/>
<content type="html" src="{{item.link}}"><![CDATA[{{item.description|safe}}]]></content>
</entry>
{% endfor %}
</feed>

View File

@@ -0,0 +1,11 @@
{% extends "layout.html" %}
{% block title %}All Feeds{% endblock title %}
{% block content %}
<div class="list-group">
{% for rule in rules %}
<a href="{{rule.rule}}" class="list-group-item list-group-item-action">{{rule.endpoint[5:]}}</a>
{% endfor %}
</div>
{% endblock content %}

View File

@@ -0,0 +1,13 @@
{% extends 'layout.html' %}
{% block title %}Welcome to RSShub!{% endblock title %}
{% block content %}
<div class="jumbotron">
<h1 class="display-4">Welcome to RSSHub!</h1>
<p class="lead">If you see this page, the RSSHub is successfully installed and working.</p>
<p>
<a class="btn btn-primary btn-lg" role="button" href="{{url_for('main.feeds')}}">View All Feeds</a>
</p>
</div>
{% endblock %}