Add jinja2 templates

This commit is contained in:
Peter Šurda 2024-01-29 14:46:29 +08:00
parent d2428983bb
commit 754cc950b9
Signed by: PeterSurda
GPG Key ID: 3E47497CF67ABB95
5 changed files with 63 additions and 0 deletions

9
templates/login.jinja2 Normal file
View File

@ -0,0 +1,9 @@
<html>
<head>
<title>Logging in</title>
<meta http-equiv="refresh" content="0; url="https://www.inoreader.com/oauth2/auth?client_id={%inoreader_client_id%}"&redirect_uri={%siteurl%}/processoauth2&response_type=code&scope=read&state={%csrf_protection_string%}/">
</head>
<body>
Redirecting ...
</body>
</html>

9
templates/logout.jinja2 Normal file
View File

@ -0,0 +1,9 @@
<html>
<head>
<title>Logout</title>
<meta http-equiv="refresh" content="0; url="{%siteurl%}/">
</head>
<body>
Redirecting ...
</body>
</html>

View File

@ -0,0 +1,21 @@
<html>
<head>
<title>Inoreader 2 Readwise main screen
</head>
<body>
Hello {% inoreader_username %}
<p/>
<form action="setapikey">
API key:
<input type="text" id="apikey">{% readwise_apikey %}</input>
<submit>Change</submit>
</form>
<br/>
Last time sync: {%lastsync%} {%syncstatus%}}
<br/>
Next time sync: {%nextsync%}
<form action="logout">
<submit>Logout</submit>
</form>
</body>
</html>

View File

@ -0,0 +1,15 @@
<html>
<head>
<title>Processing oauth2</title>
{%if login_success%}
<meta http-equiv="refresh" content="0; url="{%siteurl%}/">
{%endif%}
</head>
<body>
{%if login_success%}
Redirecting ...
{%else%}
Login failed.
{%endif%}
</body>
</html>

View File

@ -0,0 +1,9 @@
<html>
<head>
<title>Changing API key</title>
<meta http-equiv="refresh" content="0; url="{%siteurl%}/">
</head>
<body>
Redirecting ...
</body>
</html>