kopia lustrzana https://github.com/snarfed/bridgy-fed
convert home page from static file to jinja template
rodzic
d743609c6f
commit
741107c3b5
6
app.yaml
6
app.yaml
|
@ -28,12 +28,6 @@ handlers:
|
||||||
- url: /oauth_dropins_static
|
- url: /oauth_dropins_static
|
||||||
static_dir: oauth_dropins_static
|
static_dir: oauth_dropins_static
|
||||||
|
|
||||||
- url: /
|
|
||||||
static_files: static/index.html
|
|
||||||
upload: static/index.html
|
|
||||||
expiration: 1m
|
|
||||||
secure: always
|
|
||||||
|
|
||||||
- url: /favicon.ico
|
- url: /favicon.ico
|
||||||
static_files: static/favicon.ico
|
static_files: static/favicon.ico
|
||||||
upload: static/favicon.ico
|
upload: static/favicon.ico
|
||||||
|
|
8
pages.py
8
pages.py
|
@ -1,5 +1,6 @@
|
||||||
"""Render recent responses and logs."""
|
"""Render recent responses and logs."""
|
||||||
import calendar
|
import calendar
|
||||||
|
import datetime
|
||||||
from itertools import islice
|
from itertools import islice
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
|
@ -13,6 +14,13 @@ import common
|
||||||
from models import Response
|
from models import Response
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
@flask_util.cached(cache, datetime.timedelta(days=1))
|
||||||
|
def front_page():
|
||||||
|
"""View for the front page."""
|
||||||
|
return render_template('index.html')
|
||||||
|
|
||||||
|
|
||||||
@app.get('/responses')
|
@app.get('/responses')
|
||||||
@app.get(f'/responses/<regex("{common.DOMAIN_RE}"):domain>')
|
@app.get(f'/responses/<regex("{common.DOMAIN_RE}"):domain>')
|
||||||
def responses(domain=None):
|
def responses(domain=None):
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>{% block title %}Bridgy Fed{% endblock %}</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes"/>
|
||||||
|
<link rel="shortcut icon" sizes="128x128" href="https://brid.gy/static/bridgy_logo_128.jpg">
|
||||||
|
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="https://brid.gy/static/bridgy_logo_128.jpg">
|
||||||
|
<!-- 32x32 last so that browsers prefer it -->
|
||||||
|
<link rel="shortcut icon" sizes="32x32" href="https://brid.gy/static/favicon.png">
|
||||||
|
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="https://brid.gy/static/favicon.png">
|
||||||
|
<link rel="stylesheet" href="/oauth_dropins_static/bootstrap.min.css" />
|
||||||
|
<link rel="stylesheet" href="/static/style.css" type="text/css" />
|
||||||
|
<link rel="webmention" href="/webmention" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<main class="tp-main lead container">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div id="intro" class="row">
|
||||||
|
<div id="logos" class="col-xs-4">
|
||||||
|
<a href="/"><img class="img-responsive" src="/static/bridgy_logo.jpg" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="fedsocnet-logos" class="col-xs-1">
|
||||||
|
<a href="https://joinmastodon.org/"><img src="/static/mastodon_logo.png" class="img-responsive" /></a>
|
||||||
|
<a href="https://hubzilla.org/"><img src="/static/hubzilla_logo.png" class="img-responsive" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="header" class="col-xs-7">
|
||||||
|
<p class="big">
|
||||||
|
Got an <a href="https://indieweb.org/">IndieWeb</a> site?
|
||||||
|
Want to interact with <a href="https://joinmastodon.org/">Mastodon</a>, <a href="https://project.hubzilla.org/">Hubzilla</a>,
|
||||||
|
and the rest of the <a href="https://en.wikipedia.org/wiki/Fediverse">fediverse</a>?
|
||||||
|
<a id="title" href="/">Bridgy Fed</a> is for you.
|
||||||
|
</p></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="clearfix"></p>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
<a href="https://github.com/snarfed/bridgy-fed/issues">Bugs</a>
|
||||||
|
| <a href="https://github.com/snarfed/bridgy-fed">Source</a>
|
||||||
|
| <a href="https://indieweb.org/">#IndieWeb</a>
|
||||||
|
| <a href="https://brid.gy/">Bridgy</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script src="/static/fragmention.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,48 +1,6 @@
|
||||||
<!DOCTYPE html>
|
{% extends "base.html" %}
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Bridgy Fed</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="mobile-web-app-capable" content="yes"/>
|
|
||||||
<link rel="shortcut icon" sizes="128x128" href="https://brid.gy/static/bridgy_logo_128.jpg">
|
|
||||||
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="https://brid.gy/static/bridgy_logo_128.jpg">
|
|
||||||
<!-- 32x32 last so that browsers prefer it -->
|
|
||||||
<link rel="shortcut icon" sizes="32x32" href="https://brid.gy/static/favicon.png">
|
|
||||||
<link rel="apple-touch-icon-precomposed" sizes="32x32" href="https://brid.gy/static/favicon.png">
|
|
||||||
<link rel="stylesheet" href="/oauth_dropins_static/bootstrap.min.css" />
|
|
||||||
<link rel="stylesheet" href="/static/style.css" type="text/css" />
|
|
||||||
<link rel="webmention" href="/webmention" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
{% block content %}
|
||||||
|
|
||||||
<main class="tp-main lead container">
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div id="intro" class="row">
|
|
||||||
<div id="logos" class="col-xs-4">
|
|
||||||
<a href="/"><img class="img-responsive" src="/static/bridgy_logo.jpg" /></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="fedsocnet-logos" class="col-xs-1">
|
|
||||||
<a href="https://joinmastodon.org/"><img src="/static/mastodon_logo.png" class="img-responsive" /></a>
|
|
||||||
<a href="https://hubzilla.org/"><img src="/static/hubzilla_logo.png" class="img-responsive" /></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="header" class="col-xs-7">
|
|
||||||
<p class="big">
|
|
||||||
Got an <a href="https://indieweb.org/">IndieWeb</a> site?
|
|
||||||
Want to interact with <a href="https://joinmastodon.org/">Mastodon</a>, <a href="https://project.hubzilla.org/">Hubzilla</a>,
|
|
||||||
and the rest of the <a href="https://en.wikipedia.org/wiki/Fediverse">fediverse</a>?
|
|
||||||
<a id="title" href="/">Bridgy Fed</a> is for you.
|
|
||||||
</p></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="clearfix"></p>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div id="docs">
|
<div id="docs">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -280,16 +238,4 @@ I'm <a href="https://snarfed.org/">Ryan Barrett</a>. I'm just a guy who
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
{% endblock %}
|
||||||
<a href="https://github.com/snarfed/bridgy-fed/issues">Bugs</a>
|
|
||||||
| <a href="https://github.com/snarfed/bridgy-fed">Source</a>
|
|
||||||
| <a href="https://indieweb.org/">#IndieWeb</a>
|
|
||||||
| <a href="https://brid.gy/">Bridgy</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script src="/static/fragmention.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Ładowanie…
Reference in New Issue