diff --git a/login.html b/login.html index eb66bcb..8af21b3 100644 --- a/login.html +++ b/login.html @@ -2,6 +2,7 @@ + Login diff --git a/requirements.txt b/requirements.txt index 1bd097a..f8f6842 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Django>=5.2,<6 +duckduckgo_search>=8.1 diff --git a/search_results.json b/search_results.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/search_results.json @@ -0,0 +1 @@ +[] diff --git a/searcher.py b/searcher.py new file mode 100644 index 0000000..e60a7de --- /dev/null +++ b/searcher.py @@ -0,0 +1,28 @@ +import json +import time +from duckduckgo_search import DDGS + +QUERY = ( + "master thesis positions in stockholm for computing engineering students with masters degree in machine learning" +) +OUTPUT_FILE = "search_results.json" + + +def perform_search(): + ddgs = DDGS() + results = list(ddgs.text(QUERY, max_results=10)) + with open(OUTPUT_FILE, "w", encoding="utf-8") as f: + json.dump(results, f, ensure_ascii=False, indent=2) + + +def main(): + while True: + try: + perform_search() + except Exception as exc: + print(f"Search failed: {exc}") + time.sleep(60) + + +if __name__ == "__main__": + main() diff --git a/style.css b/style.css index a6596bc..37ef28b 100644 --- a/style.css +++ b/style.css @@ -5,8 +5,9 @@ body { display: flex; justify-content: center; align-items: center; - height: 100vh; + min-height: 100vh; color: #333; + padding: 1rem; } .card { @@ -15,7 +16,8 @@ body { border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); text-align: center; - width: 300px; + width: 100%; + max-width: 400px; } .card h2 { @@ -50,3 +52,35 @@ body { color: red; margin-top: 0.5rem; } +#results { + margin-top: 1rem; + text-align: left; +} + +.result-item { + display: flex; + align-items: center; + margin-bottom: 0.5rem; + gap: 0.5rem; +} + +.result-item img { + width: 16px; + height: 16px; + margin-right: 0.5rem; +} + +.result-item a { + flex: 1; + overflow-wrap: anywhere; +} + +@media (max-width: 480px) { + .card { + padding: 1.5rem; + } + + body { + padding: 0.5rem; + } +} diff --git a/welcome.html b/welcome.html index d74b27e..7285b2c 100644 --- a/welcome.html +++ b/welcome.html @@ -2,12 +2,15 @@ + Welcome

Welcome!

+ +