mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 07:26:44 +00:00
init project
This commit is contained in:
9
rsshub/templates/errors/400.html
Normal file
9
rsshub/templates/errors/400.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
|
||||
{% block title %}400 错误{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron">
|
||||
<h1>400 Bad Request</h1>
|
||||
</div>
|
||||
{% endblock %}
|
||||
9
rsshub/templates/errors/404.html
Normal file
9
rsshub/templates/errors/404.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
|
||||
{% block title %}404 错误{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron">
|
||||
<h1>404 Not Found</h1>
|
||||
</div>
|
||||
{% endblock %}
|
||||
9
rsshub/templates/errors/500.html
Normal file
9
rsshub/templates/errors/500.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
|
||||
{% block title %}500 错误{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron">
|
||||
<h1>服务器出错</h1>
|
||||
</div>
|
||||
{% endblock %}
|
||||
69
rsshub/templates/layout.html
Normal file
69
rsshub/templates/layout.html
Normal 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">×</button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
{% block footer %}
|
||||
<footer>
|
||||
<p class="float-left">
|
||||
<small>©
|
||||
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>
|
||||
22
rsshub/templates/main/atom.xml
Normal file
22
rsshub/templates/main/atom.xml
Normal 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>
|
||||
11
rsshub/templates/main/feeds.html
Normal file
11
rsshub/templates/main/feeds.html
Normal 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 %}
|
||||
13
rsshub/templates/main/index.html
Normal file
13
rsshub/templates/main/index.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user