diff --git a/.gitignore b/.gitignore index 3f37279..68c284b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.session -.env +*.env __pycache__/ venv/ tests/ @@ -10,4 +10,5 @@ app.json Procfile .vscode/ .gitignore -pyproject.toml \ No newline at end of file +.venv/ +pyproject.toml diff --git a/.replit b/.replit new file mode 100644 index 0000000..7d0962a --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language="bash" +run="chmod +x main.sh;./main.sh" \ No newline at end of file diff --git a/app/config.py b/app/config.py index bf8fc53..168c240 100644 --- a/app/config.py +++ b/app/config.py @@ -49,6 +49,7 @@ logo_folder.mkdir(parents=True, exist_ok=True) username = os.environ.get("TGINDEX_USERNAME", "") password = os.environ.get("PASSWORD", "") +file_icon_path = "app/icons/document-icon.png" SHORT_URL_LEN = int(os.environ.get("SHORT_URL_LEN", 3)) authenticated = bool(username and password) SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60") diff --git a/app/icons/document-icon.png b/app/icons/document-icon.png new file mode 100644 index 0000000..ce7c033 Binary files /dev/null and b/app/icons/document-icon.png differ diff --git a/app/main.py b/app/main.py index bf08b97..30ad69d 100644 --- a/app/main.py +++ b/app/main.py @@ -74,4 +74,4 @@ async def cleanup(self, server: web.Application): log.debug("telegram client disconnected!") def run(self): - web.run_app(self.server, host=host, port=port, loop=self.loop) + web.run_app(self.server, host=host, port=port) diff --git a/app/templates/header.html b/app/templates/header.html index 1489435..1b2cd57 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -4,7 +4,7 @@ - + @@ -16,9 +16,9 @@ } @@ -28,13 +28,13 @@ - + -
+
- Telegram index + Telegram index
- {% if authenticated %} diff --git a/app/templates/home.html b/app/templates/home.html index 6ddeb11..dccf380 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -1,6 +1,6 @@ {% include 'header.html' %} -

+

Available Sources

@@ -8,11 +8,10 @@

diff --git a/app/templates/index.html b/app/templates/index.html index 1307244..fa936c4 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,28 +1,30 @@ {% include 'header.html' %} {% block javascript %} {% endblock %} -
-
- - {{name}} +
+ + + -
+ +
- -
-
- +
+