From d68a7844c3e43d6b8fedec408964b9db91d8a72d Mon Sep 17 00:00:00 2001 From: 186526 Date: Mon, 2 May 2022 22:52:08 +0800 Subject: [PATCH] Update --- deploy.yaml | 85 +++++++++++++++++++++++++++++++++++++++++ src/styles/base.css | 4 +- src/styles/contents.css | 6 +-- src/styles/header.css | 9 ++++- 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 0000000..84ebc9e --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: home-app + namespace: dn42 + labels: + app: home-app + dn42: "yes" +spec: + replicas: 5 + selector: + matchLabels: + app: home-app + template: + metadata: + labels: + app: home-app + + spec: + # affinity: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: edge/region + # operator: In + # values: + # - eu + containers: + - name: "home-app" + image: "registry.186526.xyz/home-app" + resources: + limits: + memory: 64Mi + cpu: 250m + ports: + - name: web + containerPort: 80 + protocol: TCP + env: + - name: REGION + valueFrom: + fieldRef: + fieldPath: spec.nodeName +--- +apiVersion: v1 +kind: Service +metadata: + name: "home-app" + namespace: dn42 +spec: + type: ClusterIP + ports: + - port: 80 + name: web + selector: + app: "home-app" +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: "home-app-ingress" + namespace: dn42 + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: web,websecure + traefik.ingress.kubernetes.io/router.middlewares: edge-network-middleware@file,compress@file + kubernetes.io/ingress.class: traefik + cert-manager.io/cluster-issuer: dn42-acme + +spec: + tls: + - secretName: home-app-cert + hosts: + - home-app.186526.dn42 + rules: + - host: home-app.186526.dn42 + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: "home-app" + port: + number: 80 diff --git a/src/styles/base.css b/src/styles/base.css index b7cc5c9..4494e62 100644 --- a/src/styles/base.css +++ b/src/styles/base.css @@ -109,8 +109,8 @@ background { right: 0px; float: right; position: absolute; - min-width: 100%; - min-height: 75vh; + width: 100%; + height: 75vh; background-size: cover; background-image: url(background.webp), url(background.png); diff --git a/src/styles/contents.css b/src/styles/contents.css index d1caa1d..e64ae67 100644 --- a/src/styles/contents.css +++ b/src/styles/contents.css @@ -1,7 +1,7 @@ contents { display: flex; position: relative; - top: 32.5vh; + top: calc(37.5vh - 0.5rem); right: 0vh; left: 0vh; @@ -70,11 +70,11 @@ group#footer > * { @media screen and (max-width: 1024px) { contents { - top: 27.5vh; + top: calc(32.5vh - 0.5rem); } } -@media screen and (max-width: 480px) { +@media screen and (max-width: 530px) { contents { top: 20vh; } diff --git a/src/styles/header.css b/src/styles/header.css index 119bf46..b228da5 100644 --- a/src/styles/header.css +++ b/src/styles/header.css @@ -62,12 +62,19 @@ header > img { @media screen and (max-width: 1024px) { header { + height: 15vh; width: -moz-available; width: -webkit-fill-available; width: fill-available; } } -@media screen and (max-width: 480px) { + +@media screen and (max-width: 768px) { + header { + height: auto; + } +} +@media screen and (max-width: 530px) { header { min-height: 30vh; }