diff --git a/app.py b/app.py index 9233911..7d17007 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ import threading import RNS from http.server import HTTPServer -from db import init_db +from db import init_db, set_setting from handlers import dispatch_request from gateway import GatewayState, GatewayHandler, GATEWAY_PORT @@ -55,6 +55,7 @@ def main(): ) destination.announce() + set_setting("dest_hash", destination.hash.hex()) start_gateway(reticulum) print(f"TinyWeb running!") diff --git a/handlers.py b/handlers.py index 42944a5..2c0ec07 100644 --- a/handlers.py +++ b/handlers.py @@ -196,7 +196,8 @@ def handle_search(query): f' | browse' f' | tags' f' | subscriptions' - f' | customize
' + f' | customize' + f' | about' f'This instance shares its index publicly. Subscribe to join the network.
' + if sharing else + 'This instance is private.
' + ) + + hash_html = "" + if dest_hash: + hash_html = ( + f'To subscribe to this instance, add this destination hash in your TinyWeb:
' + f'{esc(dest_hash)}'
+ )
+
+ return _respond(
+ f'A personal search engine, built for the slow web.
' + f'TinyWeb is about taking back the internet. No algorithms, no ads, no tracking. ' + f'Just human-curated pages shared freely across a mesh network.
' + f'The slow web is a movement for intentionality over speed, ' + f'human curation over algorithmic feeds, privacy over surveillance, ' + f'and community over corporations. Every page in this index was saved by a person ' + f'because they found it valuable — not because an algorithm told them to click.
' + f'