Skip to content

Commit

Permalink
WIP: static files, landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
katjabercic committed Oct 31, 2023
1 parent 72fa4a8 commit bfd5e0c
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 2 deletions.
13 changes: 13 additions & 0 deletions web/concepts/static/concepts/mathswitch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
footer {
border: 1px solid red;
}

.powered-by-wikidata {
content: url("http://imgur.com/SZ8Cm.jpg");
}

@media (prefers-color-scheme: dark) {
.powered-by-wikidata {
content: url("http://imgur.com/SZ8Cm.jpg");
}
}
Binary file added web/concepts/static/concepts/wd-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/concepts/static/concepts/wd-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions web/concepts/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html lang="en">
<head>
{% load static %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
<link rel="stylesheet" href="{% static 'concepts/mathswitch.css' %}">
<title>mathswitch</title>
</head>
<body>
<main class="container">
<h1>mathswitch</h1>
<p>Infrastructure for relaying and exchanging mathematical concepts.</p>
<p>Example: <a href="concept/Q1369621/">Q1369621</a></p>
</main>
<footer>
<img class="powered-by-wikidata" alt="Powered by Wikidata" />
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion web/concepts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
from . import views

urlpatterns = [
path("<slug:item_id>/", views.index),
path("<slug:item_id>/", views.concept),
]
5 changes: 4 additions & 1 deletion web/concepts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.shortcuts import get_object_or_404, render


def index(request, item_id):
def concept(request, item_id):
item = get_object_or_404(Item, identifier=item_id)
context = {
"item": {
Expand All @@ -14,3 +14,6 @@ def index(request, item_id):
}
}
return render(request, "detail.html", context)

def home(request):
return render(request, "index.html")
2 changes: 2 additions & 0 deletions web/web/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"""
from django.contrib import admin
from django.urls import include, path
from concepts import views

urlpatterns = [
path('', views.home),
path("concept/", include("concepts.urls")),
path("admin/", admin.site.urls),
]

0 comments on commit bfd5e0c

Please sign in to comment.