Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9b948a8b5 | ||
|
|
a0e0afff1f | ||
|
|
8db4d5afed |
@@ -24,6 +24,7 @@ SECRET_KEY = os.getenv("SECRET_KEY")
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True if os.getenv("DEBUG") == "True" else False
|
||||
LOGGING_CONFIG = None
|
||||
|
||||
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "localhost").split(",")
|
||||
|
||||
|
||||
@@ -1,21 +1,42 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-internal-tls
|
||||
annotations:
|
||||
ingress.kubernetes.io/ssl-redirect: "true"
|
||||
name: $DEPLOY
|
||||
kubernetes.io/ingress.class: traefik-internal
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
- hosts:
|
||||
- $DEPLOY.ducoterra.net
|
||||
secretName: letsencrypt
|
||||
rules:
|
||||
- host: $DEPLOY.ducoterra.net
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: $DEPLOY
|
||||
servicePort: 8000
|
||||
certResolver: myresolver
|
||||
domains:
|
||||
- main: "*.ducoterra.net"
|
||||
routes:
|
||||
- match: Host(`$DEPLOY.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: $DEPLOY
|
||||
port: 8000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-internal-web
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-internal
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`$DEPLOY.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: $DEPLOY
|
||||
port: 8000
|
||||
middlewares:
|
||||
- name: httpsredirect
|
||||
|
||||
---
|
||||
|
||||
@@ -23,11 +44,13 @@ apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-external-tls
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
secretName: letsencrypt
|
||||
certResolver: myresolver
|
||||
routes:
|
||||
- match: Host(`$DEPLOY.ducoterra.net`)
|
||||
kind: Rule
|
||||
@@ -41,6 +64,8 @@ apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-external-web
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
|
||||
@@ -1,18 +1,39 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-internal-tls
|
||||
annotations:
|
||||
ingress.kubernetes.io/ssl-redirect: "true"
|
||||
name: $DEPLOY
|
||||
kubernetes.io/ingress.class: traefik-internal
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
- hosts:
|
||||
- $DEPLOY.ducoterra.net
|
||||
secretName: letsencrypt
|
||||
rules:
|
||||
- host: $DEPLOY.ducoterra.net
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: $DEPLOY
|
||||
servicePort: 8000
|
||||
certResolver: myresolver
|
||||
domains:
|
||||
- main: "*.ducoterra.net"
|
||||
routes:
|
||||
- match: Host(`$DEPLOY.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: $DEPLOY
|
||||
port: 8000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: $DEPLOY-internal-web
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-internal
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`$DEPLOY.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: $DEPLOY
|
||||
port: 8000
|
||||
middlewares:
|
||||
- name: httpsredirect
|
||||
23
ui/static/ui/smooth.css
Normal file
23
ui/static/ui/smooth.css
Normal file
@@ -0,0 +1,23 @@
|
||||
html, body, .section, .container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.element::-webkit-scrollbar { width: 0 !important }
|
||||
.element { overflow: -moz-scrollbars-none; }
|
||||
.element { -ms-overflow-style: none; }
|
||||
|
||||
.hide-overflow {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.h-100 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
39
ui/static/ui/smooth.js
Normal file
39
ui/static/ui/smooth.js
Normal file
@@ -0,0 +1,39 @@
|
||||
// temp0.scrollIntoView({behavior: "smooth"});
|
||||
const scroll0 = document.getElementById("scroll-0");
|
||||
const scroll1 = document.getElementById("scroll-1");
|
||||
const scroll2 = document.getElementById("scroll-2");
|
||||
const scroll3 = document.getElementById("scroll-3");
|
||||
|
||||
window.addEventListener("scroll", function(event) {
|
||||
window.addEventListener("mouseup", event => {
|
||||
console.log("hello");
|
||||
});
|
||||
event.preventDefault();
|
||||
document.querySelector("html").classList.add("hide-overflow");
|
||||
if (scroll0.dataset.isScrolling != "true") {
|
||||
scroll0.dataset.isScrolling = 'true';
|
||||
|
||||
if (scroll1.dataset.seen != "true") {
|
||||
scroll1.dataset.seen = "true";
|
||||
scroll1.scrollIntoView({behavior: "smooth"});
|
||||
}
|
||||
else if (scroll2.dataset.seen != "true") {
|
||||
scroll2.dataset.seen = "true";
|
||||
scroll2.scrollIntoView({behavior: "smooth"});
|
||||
}
|
||||
else if (scroll3.dataset.seen != "true") {
|
||||
scroll3.dataset.seen = "true";
|
||||
scroll3.scrollIntoView({behavior: "smooth"});
|
||||
}
|
||||
else {
|
||||
scroll1.dataset.seen = "false";
|
||||
scroll2.dataset.seen = "false";
|
||||
scroll3.dataset.seen = "false";
|
||||
scroll0.scrollIntoView({behavior: "smooth"});
|
||||
}
|
||||
setTimeout(() => {
|
||||
scroll0.dataset.isScrolling = false;
|
||||
document.querySelector("html").classList.remove("hide-overflow");
|
||||
}, 1000)
|
||||
}
|
||||
});
|
||||
@@ -22,7 +22,7 @@
|
||||
<h1 class="title">
|
||||
The Button
|
||||
</h1>
|
||||
<button class="button is-primary" id="BUTTON">Press</button>
|
||||
<button class="button is-danger" id="BUTTON">Press</button>
|
||||
</div>
|
||||
<div><br></div>
|
||||
<div>
|
||||
|
||||
31
ui/templates/ui/smooth.html
Normal file
31
ui/templates/ui/smooth.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends 'ui/base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="{% static 'ui/smooth.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'ui/smooth.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<div id="scroll-0" class="h-100 w-100">
|
||||
<h1 class="title">Hello There</h1>
|
||||
</div>
|
||||
|
||||
<div id="scroll-1" class="h-100 w-100">
|
||||
<h1 class="title">I'm an Apple Ad</h1>
|
||||
</div>
|
||||
|
||||
<div id="scroll-2" class="h-100 w-100">
|
||||
<h1 class="title">See me scroll</h1>
|
||||
</div>
|
||||
|
||||
<div id="scroll-3" class="h-100 w-100">
|
||||
<h1 class="title">You owe me $3,000 dollars for this</h1>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -3,4 +3,5 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('button/', views.button, name = 'button'),
|
||||
path('smooth/', views.smooth, name = 'smooth'),
|
||||
]
|
||||
@@ -74,3 +74,6 @@ def button(request):
|
||||
achieved = {k:v for k,v in achievements.items() if k <= pressed}
|
||||
response.update({ACHIEVE: achieved})
|
||||
return render(request, "ui/button.html", response)
|
||||
|
||||
def smooth(request):
|
||||
return render(request, "ui/smooth.html")
|
||||
Reference in New Issue
Block a user