opus-magnum split
This commit is contained in:
parent
8584102402
commit
07f5c76a52
@ -32,18 +32,38 @@ def home(request: HttpRequest):
|
||||
|
||||
return render(
|
||||
request,
|
||||
"index.html",
|
||||
"home.html",
|
||||
{
|
||||
"collection": SteamCollection.objects.filter(is_active=True).last(),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def opus_magnum_home(request: HttpRequest):
|
||||
from submissions.models import SteamCollection
|
||||
|
||||
return render(
|
||||
request,
|
||||
"opus-magnum.html",
|
||||
{
|
||||
"collection": SteamCollection.objects.filter(is_active=True).last(),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def noita_home(request: HttpRequest):
|
||||
return render(request, "noita.html", {})
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("cas/login/", SimpleCASLoginView.as_view(), name="cas_ng_login"),
|
||||
path("cas/logout/", SimpleCASLogoutView.as_view(), name="cas_ng_logout"),
|
||||
path("api/", api.urls),
|
||||
path("opus-magnum", opus_magnum_home, name="opus-magnum.home"),
|
||||
path("noita", noita_home, name="noita.home"),
|
||||
path("", home, name="home"),
|
||||
]
|
||||
|
||||
|
||||
5
polylan_submitter/src/Home.vue
Normal file
5
polylan_submitter/src/Home.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
|
||||
<template>
|
||||
</template>
|
||||
9
polylan_submitter/src/home.ts
Normal file
9
polylan_submitter/src/home.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { createApp } from 'vue'
|
||||
import Home from '@/Home.vue'
|
||||
import '@/style.css'
|
||||
|
||||
// const app = createApp(App)
|
||||
const selector = "#app"
|
||||
const mountData = document.querySelector<HTMLElement>(selector)
|
||||
const app = createApp(Home, { ...mountData?.dataset })
|
||||
app.mount(selector)
|
||||
@ -5,11 +5,13 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Opus Magnum Puzzle Submitter</title>
|
||||
{% vite_hmr_client %}
|
||||
{% vite_asset 'src/main.ts' %}
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
{% if debug %}{% vite_hmr_client %}{% endif %}
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-collection-title="{{ collection.title }}" data-collection-url="{{ collection.url }}" data-collection-description="{{ collection.description }}"></div>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
13
polylan_submitter/templates/home.html
Normal file
13
polylan_submitter/templates/home.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load django_vite %}
|
||||
|
||||
{% block title %}Opus Magnum Puzzle Submitter{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% vite_asset 'src/home.ts' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="app"></div>
|
||||
{% endblock %}
|
||||
13
polylan_submitter/templates/opus-magnum.html
Normal file
13
polylan_submitter/templates/opus-magnum.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load django_vite %}
|
||||
|
||||
{% block title %}Opus Magnum Puzzle Submitter{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{% vite_asset 'src/main.ts' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="app" data-collection-title="{{ collection.title }}" data-collection-url="{{ collection.url }}" data-collection-description="{{ collection.description }}"></div>
|
||||
{% endblock %}
|
||||
Loading…
Reference in New Issue
Block a user