added noto sans and google material symbols
This commit is contained in:
@@ -0,0 +1,211 @@
|
||||
/* Padding and borders should not change an element's declared size. */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Browser margin/padding defaults vary wildly across elements and vendors.
|
||||
Start from zero - handle spacing intentionally via the design system. */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Prevents flex/grid children from overflowing their container.
|
||||
The default min-width: auto on flex and grid children causes overflow bugs
|
||||
that are notoriously confusing to debug. */
|
||||
* {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Hidden means hidden: !important is warranted here. */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Allows CSS transitions to/from intrinsic keyword sizes (auto, min-content, etc.).
|
||||
Only meaningful for users who haven't requested reduced motion. */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
html {
|
||||
interpolate-size: allow-keywords;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent adjustments of font size after orientation changes in iOS. */
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%; /* Safari, iOS Safari */
|
||||
text-size-adjust: 100%; /* Chrome, Edge, Firefox Android */
|
||||
}
|
||||
|
||||
/* Ensures the page occupies at least the full viewport.
|
||||
dvh accounts for mobile browser UI (address bar, navigation)
|
||||
and overrides the vh fallback in browsers that support it. */
|
||||
body {
|
||||
min-height: 100vh;
|
||||
min-height: 100svh;
|
||||
}
|
||||
|
||||
/* Reserves space for the scrollbar, when the scrollbar is not showing.
|
||||
Prevents flicker when changes on the page cause the scrollbar to toggle. */
|
||||
html {
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
/* Scroll events captured by the scrolling area you're pointing at, by default. */
|
||||
html {
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
/* Antialiased rendering looks better on high-DPI (retina) screens.
|
||||
On lower-DPI displays, subpixel antialiasing (the default) can be
|
||||
sharper, so this is slightly lossy on older monitors.
|
||||
Enable kerning and ligatures at small font-sizes by default. */
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-smooth: always;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
/* A unitless line-height avoids inheritance math issues.
|
||||
The smaller default line-height for h-elements avoids excessive
|
||||
line-height when your design system (likely) applies larger fonts.
|
||||
WCAG recommends at least 1.5 for body copy. */
|
||||
body {
|
||||
line-height: 1.5;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
/* Prevents long URLs or unbreakable strings from blowing out their container. */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Smarter line-breaking:
|
||||
'pretty' avoids widows (lone words on the last line of a paragraph).
|
||||
'balance' distributes heading text more evenly across lines.
|
||||
Harmless in browsers that don't support them. */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/* Headings carry semantic meaning, not visual weight.
|
||||
h1–h6 sizing and boldness should come from your design system. */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/* Inline embedded content has a gap at the bottom caused by baseline alignment.
|
||||
Block display removes it; max-width prevents overflow.
|
||||
height: auto preserves aspect ratio when max-width constrains the width. */
|
||||
img, picture, video, canvas, svg, embed, iframe, object, audio {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Exemption for SVG icons (Heroicons/Lucide/Phosphor, etc.) with explicit sizes:
|
||||
these should not be constrained. */
|
||||
svg[width][height] {
|
||||
max-width: revert;
|
||||
}
|
||||
|
||||
/* Strips visual chrome from buttons so they can be styled from scratch. */
|
||||
button {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Form elements use OS-level fonts and ignore font inheritance by default. */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* Strips OS-level native styling from interactive elements.
|
||||
Leaves border and background intact, providing accessibility by default.
|
||||
Visual styling should be handled by the design system. */
|
||||
input, button, textarea, select {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
/* Anything interactive should signal clickability.
|
||||
'button' attribute targets [type="button"], [type="submit"], etc. */
|
||||
button,
|
||||
[role="button"],
|
||||
label,
|
||||
summary,
|
||||
select {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Inherit color by default so links don't always appear in browser-default blue.
|
||||
Text-decoration is intentionally left as underlined for accessibility. */
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Removes bullets/numbers.
|
||||
list markers should be an explicit choice, not a default. */
|
||||
ul, ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Tables default to separated borders with spacing between cells.
|
||||
For any custom table design, you'll want to collapse the borders. */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* Browsers apply bold to <th> elements.
|
||||
Boldness in tables should be controlled by your design system. */
|
||||
th {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/* Fieldsets have a surprise border and padding that most UIs don't want. */
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* More of a normalization, but these are inconsistently styled in some browsers. */
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sub { bottom: -0.25em; }
|
||||
sup { top: -0.5em; }
|
||||
|
||||
/* Ensures monospace elements render at the same size as surrounding text. */
|
||||
pre, code, kbd, samp {
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/* Browser-generated quotation marks are rarely wanted in a design system. */
|
||||
blockquote,
|
||||
q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote::before,
|
||||
blockquote::after,
|
||||
q::before,
|
||||
q::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* Creates an explicit stacking context on the app root.
|
||||
Prevents z-index bleed from portals, modals, or tooltips
|
||||
from leaking out unexpectedly. */
|
||||
#root {
|
||||
isolation: isolate;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@use 'reset';
|
||||
|
||||
// Self-hosted font assets, bundled and versioned by Webpack Encore.
|
||||
@import '@fontsource/noto-sans/latin-400.css';
|
||||
@import '@fontsource/noto-sans/latin-600.css';
|
||||
@import 'material-symbols/outlined.css';
|
||||
|
||||
body {
|
||||
background-color: #108ac2;
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
}
|
||||
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
DEPLOYMENT="k8s/deployment.yaml"
|
||||
IMAGE_PREFIX="symfony-k3s:dev-"
|
||||
|
||||
# Find the current image version in deployment.yaml
|
||||
CURRENT_VERSION=$(grep -oP "${IMAGE_PREFIX}\K[0-9]+" "$DEPLOYMENT" | head -1)
|
||||
|
||||
if [[ -z "$CURRENT_VERSION" ]]; then
|
||||
echo "ERROR: Could not determine current image version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NEW_VERSION=$((CURRENT_VERSION + 1))
|
||||
IMAGE="${IMAGE_PREFIX}${NEW_VERSION}"
|
||||
TAR="symfony-k3s-dev-${NEW_VERSION}.tar"
|
||||
|
||||
echo "==> Deploying $IMAGE"
|
||||
echo
|
||||
|
||||
echo "==> Building Docker image"
|
||||
docker build -t "$IMAGE" .
|
||||
|
||||
echo
|
||||
echo "==> Saving image to $TAR"
|
||||
docker save "$IMAGE" -o "$TAR"
|
||||
|
||||
echo
|
||||
echo "==> Importing image into K3s"
|
||||
sudo k3s ctr images import "$TAR"
|
||||
|
||||
echo
|
||||
echo "==> Updating Kubernetes deployment"
|
||||
#sed -i "s|${IMAGE_PREFIX}[0-9]*|${IMAGE}|g" "$DEPLOYMENT"
|
||||
sed -i "s|${IMAGE_PREFIX}[0-9]*|${IMAGE}|g" "$DEPLOYMENT"
|
||||
|
||||
echo
|
||||
echo "==> Applying Kubernetes manifests"
|
||||
echo "==> Clearing obsolete client-side apply metadata"
|
||||
# deployment-old.yaml was previously applied with `command` at the PodSpec
|
||||
# level. Kubernetes does not support that field, but kubectl saved it in this
|
||||
# annotation. Remove the stale record so client-side apply can build its patch
|
||||
# from the corrected manifest below.
|
||||
if kubectl get deployment/symfony -n symfony >/dev/null 2>&1; then
|
||||
kubectl annotate deployment/symfony -n symfony \
|
||||
kubectl.kubernetes.io/last-applied-configuration-
|
||||
fi
|
||||
kubectl apply -f k8s/
|
||||
|
||||
echo
|
||||
echo "==> Waiting for Symfony rollout"
|
||||
kubectl rollout status deployment/symfony -n symfony
|
||||
|
||||
echo
|
||||
echo "==> Current pods"
|
||||
kubectl get pods -n symfony
|
||||
|
||||
echo
|
||||
echo "==> Removing old image archives"
|
||||
shopt -s nullglob
|
||||
for archive in symfony-k3s-dev-*.tar; do
|
||||
[[ "$archive" == "$TAR" ]] && continue
|
||||
rm -- "$archive"
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
echo
|
||||
echo "========================================"
|
||||
echo " Deployment complete: $IMAGE"
|
||||
echo "========================================"
|
||||
@@ -1,53 +1,68 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
DEPLOYMENT="k8s/deployment.yaml"
|
||||
IMAGE_PREFIX="symfony-k3s:dev-"
|
||||
IMAGE="symfony-k3s:dev"
|
||||
IMAGE_REF="docker.io/library/$IMAGE"
|
||||
TAR="symfony-k3s-dev.tar"
|
||||
NAMESPACE="symfony"
|
||||
DEPLOYMENT="symfony"
|
||||
|
||||
# Find the current image version in deployment.yaml
|
||||
CURRENT_VERSION=$(grep -oP "${IMAGE_PREFIX}\K[0-9]+" "$DEPLOYMENT" | head -1)
|
||||
|
||||
if [[ -z "$CURRENT_VERSION" ]]; then
|
||||
echo "ERROR: Could not determine current image version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NEW_VERSION=$((CURRENT_VERSION + 1))
|
||||
IMAGE="${IMAGE_PREFIX}${NEW_VERSION}"
|
||||
TAR="symfony-k3s-dev-${NEW_VERSION}.tar"
|
||||
|
||||
echo "==> Deploying $IMAGE"
|
||||
echo "========================================"
|
||||
echo " Building and deploying $IMAGE"
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
echo "==> Removing previous Docker image (if any)"
|
||||
docker image rm "$IMAGE" >/dev/null 2>&1 || true
|
||||
|
||||
echo
|
||||
echo "==> Building Docker image"
|
||||
docker build -t "$IMAGE" .
|
||||
docker build --pull -t "$IMAGE" .
|
||||
|
||||
echo
|
||||
echo "==> Saving image to $TAR"
|
||||
echo "==> Exporting image"
|
||||
rm -f "$TAR"
|
||||
docker save "$IMAGE" -o "$TAR"
|
||||
|
||||
echo
|
||||
echo "==> Removing previous K3s image (if any)"
|
||||
sudo k3s ctr images rm "$IMAGE_REF" >/dev/null 2>&1 || true
|
||||
|
||||
echo
|
||||
echo "==> Importing image into K3s"
|
||||
sudo k3s ctr images import "$TAR"
|
||||
|
||||
echo
|
||||
echo "==> Updating Kubernetes deployment"
|
||||
#sed -i "s|${IMAGE_PREFIX}[0-9]*|${IMAGE}|g" "$DEPLOYMENT"
|
||||
sed -i "s|${IMAGE_PREFIX}[0-9]*|${IMAGE}|g" "$DEPLOYMENT"
|
||||
echo "==> Clearing obsolete apply metadata"
|
||||
if kubectl get deployment "$DEPLOYMENT" -n "$NAMESPACE" >/dev/null 2>&1; then
|
||||
kubectl annotate deployment "$DEPLOYMENT" \
|
||||
-n "$NAMESPACE" \
|
||||
kubectl.kubernetes.io/last-applied-configuration- \
|
||||
--overwrite >/dev/null
|
||||
fi
|
||||
echo
|
||||
echo "==> Replacing old deployment.yaml"
|
||||
kubectl replace -f k8s/deployment.yaml --force
|
||||
|
||||
echo
|
||||
echo "==> Applying Kubernetes manifests"
|
||||
echo "==> Applying manifests"
|
||||
|
||||
echo "==> Recreating Deployment"
|
||||
kubectl delete deployment symfony \
|
||||
-n symfony \
|
||||
--ignore-not-found
|
||||
|
||||
kubectl apply -f k8s/
|
||||
|
||||
echo
|
||||
echo "==> Waiting for Symfony rollout"
|
||||
kubectl rollout status deployment/symfony -n symfony
|
||||
echo "==> Waiting for rollout"
|
||||
kubectl rollout status deployment/"$DEPLOYMENT" -n "$NAMESPACE"
|
||||
|
||||
echo
|
||||
echo "==> Current pods"
|
||||
kubectl get pods -n symfony
|
||||
kubectl get pods -n "$NAMESPACE"
|
||||
|
||||
echo
|
||||
echo "========================================"
|
||||
echo " Deployment complete: $IMAGE"
|
||||
echo "========================================"
|
||||
echo " Deployment complete!"
|
||||
echo "========================================"
|
||||
@@ -1,82 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: symfony
|
||||
namespace: symfony
|
||||
labels:
|
||||
app: symfony
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
|
||||
selector:
|
||||
matchLabels:
|
||||
app: symfony
|
||||
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: symfony
|
||||
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: cluster-01
|
||||
command:
|
||||
- php
|
||||
- bin/console
|
||||
- doctrine:migrations:migrate
|
||||
- --no-interaction
|
||||
|
||||
containers:
|
||||
- name: symfony
|
||||
image: symfony-k3s:dev-8
|
||||
imagePullPolicy: Never
|
||||
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
|
||||
env:
|
||||
- name: APP_ENV
|
||||
value: prod
|
||||
|
||||
- name: APP_DEBUG
|
||||
value: "0"
|
||||
|
||||
# - name: APP_ENV
|
||||
# value: dev
|
||||
|
||||
# - name: APP_DEBUG
|
||||
# value: "1"
|
||||
|
||||
- name: SERVER_NAME
|
||||
value: ":8080"
|
||||
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: symfony-database
|
||||
key: DATABASE_URL
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
+3
-2
@@ -24,7 +24,8 @@ spec:
|
||||
|
||||
initContainers:
|
||||
- name: database-migrations
|
||||
image: symfony-k3s:dev-11
|
||||
#image: symfony-k3s:dev-13
|
||||
image: docker.io/library/symfony-k3s:dev
|
||||
imagePullPolicy: Never
|
||||
|
||||
env:
|
||||
@@ -48,7 +49,7 @@ spec:
|
||||
|
||||
containers:
|
||||
- name: symfony
|
||||
image: symfony-k3s:dev-11
|
||||
image: symfony-k3s:dev
|
||||
imagePullPolicy: Never
|
||||
|
||||
ports:
|
||||
|
||||
Generated
+16
-1
@@ -5,7 +5,9 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"htmx.org": "^2.0.10"
|
||||
"@fontsource/noto-sans": "^5.3.0",
|
||||
"htmx.org": "^2.0.10",
|
||||
"material-symbols": "^0.45.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@symfony/webpack-encore": "^7.1.0",
|
||||
@@ -1574,6 +1576,14 @@
|
||||
"node": ">=14.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource/noto-sans": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/noto-sans/-/noto-sans-5.3.0.tgz",
|
||||
"integrity": "sha512-fBCog2PY7DiVVTEEqtI/Qdinx/knobHYfoGpjFXdfBX5RoJaBp1Prw2G75p0OIsdlMZg3cLo0c+YbIUYOxnQJw==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/gen-mapping": {
|
||||
"version": "0.3.13",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
||||
@@ -3419,6 +3429,11 @@
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/material-symbols": {
|
||||
"version": "0.45.10",
|
||||
"resolved": "https://registry.npmjs.org/material-symbols/-/material-symbols-0.45.10.tgz",
|
||||
"integrity": "sha512-2A2mgdfZO4es9DFpIOSMAx3d/7erCLQWRm7zGxA3iXt9jV8e2vNLOszbG3kxzYQ6qp5GAWXVl13de8lS2oHVng=="
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
|
||||
+3
-1
@@ -6,7 +6,9 @@
|
||||
"build": "encore production --progress"
|
||||
},
|
||||
"dependencies": {
|
||||
"htmx.org": "^2.0.10"
|
||||
"@fontsource/noto-sans": "^5.3.0",
|
||||
"htmx.org": "^2.0.10",
|
||||
"material-symbols": "^0.45.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@symfony/webpack-encore": "^7.1.0",
|
||||
|
||||
Reference in New Issue
Block a user