Compare commits
9 Commits
website-co
...
c580665963
| Author | SHA1 | Date | |
|---|---|---|---|
| c580665963 | |||
| 6952b77980 | |||
| 134790aa25 | |||
| 817c6076dc | |||
| 6305482fc1 | |||
| 3ddd9b3640 | |||
| 43d0724345 | |||
| aeffd1545f | |||
| e9dd38ca6a |
@@ -57,16 +57,12 @@ jobs:
|
|||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: 192.168.1.36:30008
|
registry: gitea.perren.cloud
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.ACTIONS_TOKEN }}
|
password: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
|
||||||
buildkitd-config-inline: |
|
|
||||||
[registry."192.168.1.36:30008"]
|
|
||||||
http = true
|
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -74,8 +70,8 @@ jobs:
|
|||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
192.168.1.36:30008/caperren/${{ needs.test.outputs.repo_name }}:${{ needs.test.outputs.repo_version_hash }}
|
gitea.perren.cloud/caperren/${{ needs.test.outputs.repo_name }}:${{ needs.test.outputs.repo_version_hash }}
|
||||||
192.168.1.36:30008/caperren/caperren-com:latest
|
gitea.perren.cloud/caperren/caperren-com:latest
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
||||||
BUILD_ENVIRONMENT=production
|
BUILD_ENVIRONMENT=production
|
||||||
|
|||||||
@@ -57,16 +57,12 @@ jobs:
|
|||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: 192.168.1.36:30008
|
registry: gitea.perren.cloud
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.ACTIONS_TOKEN }}
|
password: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
|
||||||
buildkitd-config-inline: |
|
|
||||||
[registry."192.168.1.36:30008"]
|
|
||||||
http = true
|
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -74,7 +70,7 @@ jobs:
|
|||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
192.168.1.36:30008/caperren/caperren-com:latest-staging
|
gitea.perren.cloud/caperren/caperren-com:latest-staging
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
||||||
BUILD_ENVIRONMENT=staging
|
BUILD_ENVIRONMENT=staging
|
||||||
|
|||||||
13
Makefile
@@ -15,8 +15,7 @@
|
|||||||
cleanup-check \
|
cleanup-check \
|
||||||
cleanup-code \
|
cleanup-code \
|
||||||
convert_video \
|
convert_video \
|
||||||
convert_video_times \
|
convert_video_times
|
||||||
generate_asset_imports
|
|
||||||
|
|
||||||
default: dev
|
default: dev
|
||||||
|
|
||||||
@@ -84,17 +83,9 @@ convert_video_times:
|
|||||||
-init_hw_device vaapi=va:/dev/dri/renderD128 \
|
-init_hw_device vaapi=va:/dev/dri/renderD128 \
|
||||||
-filter_hw_device va \
|
-filter_hw_device va \
|
||||||
-i $(input) \
|
-i $(input) \
|
||||||
-ss $(start) \
|
-vf 'format=nv12,hwupload,scale_vaapi=-2:720,trim=start=$(start):end=$(end)' \
|
||||||
-to $(end) \
|
|
||||||
-vf 'format=nv12,hwupload,scale_vaapi=-2:720' \
|
|
||||||
-c:v h264_vaapi \
|
-c:v h264_vaapi \
|
||||||
-rc_mode CQP \
|
-rc_mode CQP \
|
||||||
-qp 28 \
|
-qp 28 \
|
||||||
-an \
|
-an \
|
||||||
$(output)
|
$(output)
|
||||||
|
|
||||||
generate_asset_imports:
|
|
||||||
@for assets_path in `find "src/assets/${assets_relative_path}" -maxdepth 1 -type f -printf "%f\n"`; do \
|
|
||||||
without_extension=$${assets_path/%.*}; \
|
|
||||||
echo "import $${without_extension//-/_} from \"@assets/${assets_relative_path}/$$assets_path\";"; \
|
|
||||||
done;
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const disabledPaths = getPaths(siteLayout, [], true);
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://caperren.com",
|
site: "https://caperren.com",
|
||||||
trailingSlash: "never",
|
|
||||||
prefetch: {
|
prefetch: {
|
||||||
prefetchAll: true,
|
prefetchAll: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ Altium
|
|||||||
ASSEM
|
ASSEM
|
||||||
astrojs
|
astrojs
|
||||||
Atmel
|
Atmel
|
||||||
automations
|
|
||||||
barebones
|
barebones
|
||||||
beaglebone
|
|
||||||
Bitwarden
|
|
||||||
Candian
|
Candian
|
||||||
caperren
|
caperren
|
||||||
CEOAS
|
CEOAS
|
||||||
@@ -15,20 +12,10 @@ Concours
|
|||||||
CONSERV
|
CONSERV
|
||||||
Corwin
|
Corwin
|
||||||
dangerousthings
|
dangerousthings
|
||||||
dechorionation
|
|
||||||
Dechorionator
|
Dechorionator
|
||||||
dechorionators
|
|
||||||
dockerization
|
|
||||||
dockerizing
|
|
||||||
drumheller
|
|
||||||
ebox
|
ebox
|
||||||
ELMI
|
|
||||||
fhhs
|
fhhs
|
||||||
flowbite
|
flowbite
|
||||||
flowrate
|
|
||||||
gcode
|
|
||||||
gerbers
|
|
||||||
Gitea
|
|
||||||
HDFS
|
HDFS
|
||||||
headshot
|
headshot
|
||||||
Homelab
|
Homelab
|
||||||
@@ -37,60 +24,36 @@ iceops
|
|||||||
ITAR
|
ITAR
|
||||||
Jetson
|
Jetson
|
||||||
KFSK
|
KFSK
|
||||||
Labjack
|
|
||||||
leconte
|
leconte
|
||||||
Loctite
|
Loctite
|
||||||
luxon
|
luxon
|
||||||
MGMT
|
MGMT
|
||||||
microcontroller
|
|
||||||
microcontroller's
|
|
||||||
Micropumps
|
|
||||||
Millis
|
|
||||||
modbus
|
|
||||||
Mokai
|
Mokai
|
||||||
Multimeters
|
Multimeters
|
||||||
nixos
|
nixos
|
||||||
nvme
|
|
||||||
offroad
|
offroad
|
||||||
Onshape
|
Onshape
|
||||||
OSSM
|
OSSM
|
||||||
OSURC
|
OSURC
|
||||||
panelized
|
|
||||||
Passthroughs
|
|
||||||
pcbs
|
|
||||||
Perren
|
Perren
|
||||||
Perren's
|
Perren's
|
||||||
Pixhawk
|
Pixhawk
|
||||||
Protocase
|
|
||||||
pubpath
|
pubpath
|
||||||
RFID
|
RFID
|
||||||
Rito
|
|
||||||
RSSI
|
RSSI
|
||||||
SARL
|
SARL
|
||||||
SCARA
|
|
||||||
showerheads
|
|
||||||
Shuttlebox
|
Shuttlebox
|
||||||
simplemotion
|
|
||||||
sinnhuber
|
sinnhuber
|
||||||
sitemapindex
|
sitemapindex
|
||||||
Smartsheet
|
|
||||||
solderable
|
|
||||||
ssds
|
ssds
|
||||||
Starlink
|
Starlink
|
||||||
steller
|
steller
|
||||||
Steller
|
Steller
|
||||||
Tanguay
|
|
||||||
Teamcenter
|
|
||||||
timelapse
|
timelapse
|
||||||
touchoff
|
|
||||||
triaging
|
|
||||||
trivago
|
trivago
|
||||||
Truong
|
|
||||||
Ubiquiti
|
|
||||||
Unstow
|
Unstow
|
||||||
uuidv
|
uuidv
|
||||||
vaapi
|
vaapi
|
||||||
vitest
|
vitest
|
||||||
Waterjet
|
|
||||||
Zebrafish
|
Zebrafish
|
||||||
zscan
|
zscan
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 14 MiB |
|
Before Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 4.7 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 4.0 MiB |
|
Before Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 4.0 MiB |
|
Before Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 7.7 MiB |
|
Before Width: | Height: | Size: 7.3 MiB |
|
Before Width: | Height: | Size: 8.3 MiB |
|
Before Width: | Height: | Size: 7.6 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 6.4 MiB |
|
Before Width: | Height: | Size: 7.9 MiB |
|
Before Width: | Height: | Size: 8.9 MiB |
|
Before Width: | Height: | Size: 8.7 MiB |
|
Before Width: | Height: | Size: 7.8 MiB |
|
Before Width: | Height: | Size: 5.9 MiB |
|
Before Width: | Height: | Size: 9.2 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 1013 KiB |
|
Before Width: | Height: | Size: 6.8 MiB |
|
Before Width: | Height: | Size: 9.2 MiB |
|
Before Width: | Height: | Size: 8.8 MiB |
|
Before Width: | Height: | Size: 8.5 MiB |
|
Before Width: | Height: | Size: 6.3 MiB |
|
Before Width: | Height: | Size: 1017 KiB |
|
Before Width: | Height: | Size: 878 KiB |
|
Before Width: | Height: | Size: 7.1 MiB |
|
Before Width: | Height: | Size: 605 KiB |
|
Before Width: | Height: | Size: 826 KiB |
|
Before Width: | Height: | Size: 7.1 MiB |
|
Before Width: | Height: | Size: 6.1 MiB |
|
Before Width: | Height: | Size: 6.9 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 8.3 MiB |
|
Before Width: | Height: | Size: 7.5 MiB |
|
Before Width: | Height: | Size: 7.2 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 438 KiB |
|
Before Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 437 KiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 580 KiB |
|
Before Width: | Height: | Size: 600 KiB |
|
Before Width: | Height: | Size: 701 KiB |
|
Before Width: | Height: | Size: 2.4 MiB |
@@ -1,23 +1,10 @@
|
|||||||
---
|
---
|
||||||
import InlineLink from "@components/InlineLink.astro";
|
|
||||||
|
|
||||||
const { pathname } = Astro.url;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<footer
|
<footer
|
||||||
class="border-t-caperren-green-dark text-caperren-green-dark z-50 flex w-full max-w-full items-center justify-between border-t bg-black px-6 py-2 text-sm"
|
class="border-t-caperren-green-dark text-caperren-green-dark z-50 flex w-full max-w-full items-center justify-between border-t bg-black px-6 py-2 text-sm"
|
||||||
>
|
>
|
||||||
<span>{import.meta.env.PUBLIC_BUILD_ENVIRONMENT || "development"}</span>
|
<span>{import.meta.env.PUBLIC_BUILD_ENVIRONMENT || "development"}</span>
|
||||||
<div>
|
|
||||||
<InlineLink
|
|
||||||
class:list={[
|
|
||||||
"text-caperren-green-dark hover:text-caperren-green",
|
|
||||||
pathname === "/hobby/this-website"
|
|
||||||
? "border-caperren-green-dark hover:border-caperren-green border-b-2"
|
|
||||||
: false,
|
|
||||||
]}
|
|
||||||
href="/hobby/this-website">About This Website</InlineLink
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<span>{import.meta.env.PUBLIC_REPO_VERSION_HASH || "invalid"}</span>
|
<span>{import.meta.env.PUBLIC_REPO_VERSION_HASH || "invalid"}</span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<h4 class="md:text-md text-xs sm:text-sm"><slot /></h4>
|
|
||||||
@@ -7,10 +7,16 @@ interface Props extends ComponentPropsBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { class: className, href, target } = Astro.props;
|
const { class: className, href, target } = Astro.props;
|
||||||
const { pathname } = Astro.url;
|
|
||||||
|
|
||||||
const finalTarget =
|
let finalTarget: string | undefined = target;
|
||||||
target === undefined ? (href.startsWith("/") ? undefined : "_blank") : target;
|
|
||||||
|
if (target === undefined) {
|
||||||
|
if (href.startsWith("/")) {
|
||||||
|
finalTarget = "";
|
||||||
|
} else {
|
||||||
|
finalTarget = "_blank";
|
||||||
|
}
|
||||||
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<>
|
<>
|
||||||
@@ -18,7 +24,6 @@ const finalTarget =
|
|||||||
class:list={["text-blue-500", "hover:text-blue-300", className]}
|
class:list={["text-blue-500", "hover:text-blue-300", className]}
|
||||||
href={href}
|
href={href}
|
||||||
target={finalTarget}
|
target={finalTarget}
|
||||||
aria-current={pathname === href ? "page" : undefined}
|
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,21 +1,15 @@
|
|||||||
---
|
---
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
|
|
||||||
import type { ComponentPropsBase } from "@interfaces/components.ts";
|
|
||||||
import type { carouselGroup } from "@interfaces/image-carousel.ts";
|
import type { carouselGroup } from "@interfaces/image-carousel.ts";
|
||||||
|
|
||||||
interface Props extends ComponentPropsBase {
|
const groupToShow: carouselGroup = Astro.props.carouselGroup;
|
||||||
carouselGroup: carouselGroup;
|
|
||||||
showBorder?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { class: className, carouselGroup, showBorder = true } = Astro.props;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<custom-carousel
|
<custom-carousel
|
||||||
class="relative flex w-full flex-col"
|
class="relative flex w-full flex-col"
|
||||||
data-custom-carousel={carouselGroup.animation ?? "slide"}
|
data-custom-carousel={groupToShow.animation}
|
||||||
data-custom-carousel-interval={carouselGroup.interval}
|
data-custom-carousel-interval={groupToShow.interval}
|
||||||
>
|
>
|
||||||
<!-- Modal for fullscreen viewing -->
|
<!-- Modal for fullscreen viewing -->
|
||||||
<div
|
<div
|
||||||
@@ -63,18 +57,11 @@ const { class: className, carouselGroup, showBorder = true } = Astro.props;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Carousel wrapper -->
|
<!-- Carousel wrapper -->
|
||||||
<div
|
<div class="relative h-56 w-full overflow-hidden md:h-120">
|
||||||
class:list={[
|
|
||||||
"relative h-56 w-full overflow-hidden rounded-lg md:h-120",
|
|
||||||
showBorder ? "border" : false,
|
|
||||||
className ? className : "border-caperren-green-dark",
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
carouselGroup.images &&
|
groupToShow.images.map((image, index) => (
|
||||||
carouselGroup.images.map((image, index) => (
|
|
||||||
<div
|
<div
|
||||||
class="hidden bg-black duration-1500 ease-in-out"
|
class="hidden duration-1500 ease-in-out"
|
||||||
data-custom-carousel-item={index}
|
data-custom-carousel-item={index}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
@@ -91,14 +78,13 @@ const { class: className, carouselGroup, showBorder = true } = Astro.props;
|
|||||||
|
|
||||||
<!-- Slider indicators -->
|
<!-- Slider indicators -->
|
||||||
{
|
{
|
||||||
carouselGroup.images && carouselGroup.images.length > 1 && (
|
groupToShow.images.length > 1 && (
|
||||||
<div>
|
<div>
|
||||||
<div class="absolute bottom-2 left-1/2 z-30 flex -translate-x-1/2 space-x-3 rounded-full">
|
<div class="absolute bottom-2 left-1/2 z-30 flex -translate-x-1/2 space-x-3 rounded-full">
|
||||||
{carouselGroup.images &&
|
{groupToShow.images.map((_, index) => (
|
||||||
carouselGroup.images.map((_, index) => (
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="hover:bg-caperren-green-light h-3 w-3 rounded-full"
|
class="hover:bg-caperren-green-light h-3 w-3 rounded-full bg-black"
|
||||||
aria-current={index ? "false" : "true"}
|
aria-current={index ? "false" : "true"}
|
||||||
aria-label={index.toString()}
|
aria-label={index.toString()}
|
||||||
data-custom-carousel-slide-to={index}
|
data-custom-carousel-slide-to={index}
|
||||||
@@ -110,16 +96,15 @@ const { class: className, carouselGroup, showBorder = true } = Astro.props;
|
|||||||
class="group absolute start-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none"
|
class="group absolute start-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none"
|
||||||
data-custom-carousel-prev
|
data-custom-carousel-prev
|
||||||
>
|
>
|
||||||
<span class="ring-caperren-green/35 group-hover:ring-caperren-green inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/35 ring-2 group-hover:bg-black/75">
|
<span class="ring-caperren-green/25 inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/25 ring-2 group-hover:bg-black/75">
|
||||||
<svg
|
<svg
|
||||||
class="text-caperren-green stroke-caperren-green group-hover:text-caperren-green-light h-4 w-4"
|
class="text-caperren-green group-hover:text-caperren-green-light h-4 w-4"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 8 10"
|
viewBox="0 0 6 10"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
fill-opacity="0%"
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
stroke-width="2"
|
stroke-width="2"
|
||||||
@@ -134,16 +119,15 @@ const { class: className, carouselGroup, showBorder = true } = Astro.props;
|
|||||||
class="group absolute end-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none"
|
class="group absolute end-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none"
|
||||||
data-custom-carousel-next
|
data-custom-carousel-next
|
||||||
>
|
>
|
||||||
<span class="ring-caperren-green/25 group-hover:ring-caperren-green inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/25 ring-2 group-hover:bg-black/75">
|
<span class="ring-caperren-green/25 inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/25 ring-2 group-hover:bg-black/75">
|
||||||
<svg
|
<svg
|
||||||
class="text-caperren-green stroke-caperren-green group-hover:text-caperren-green-light h-4 w-4"
|
class="text-caperren-green group-hover:text-caperren-green-light h-4 w-4"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 4 10"
|
viewBox="0 0 6 10"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
fill-opacity="0%"
|
|
||||||
stroke-linecap="round"
|
stroke-linecap="round"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
stroke-width="2"
|
stroke-width="2"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const {
|
|||||||
|
|
||||||
<div class="mx-auto my-auto">
|
<div class="mx-auto my-auto">
|
||||||
<video
|
<video
|
||||||
class="border-caperren-green-dark h-auto w-full rounded-lg border"
|
class="h-auto w-full"
|
||||||
controls={controls}
|
controls={controls}
|
||||||
autoplay={autoPlay}
|
autoplay={autoPlay}
|
||||||
loop={loop}
|
loop={loop}
|
||||||
|
|||||||
@@ -1,26 +1,13 @@
|
|||||||
---
|
---
|
||||||
import type { videoConfig } from "@interfaces/video.ts";
|
import type { videoConfig } from "@interfaces/video.ts";
|
||||||
|
|
||||||
interface Props extends videoConfig {}
|
const config: videoConfig = Astro.props.videoConfig;
|
||||||
|
|
||||||
const {
|
|
||||||
videoPath,
|
|
||||||
videoTitle,
|
|
||||||
width = "1920",
|
|
||||||
height = "1080",
|
|
||||||
autoPlay = false,
|
|
||||||
} = Astro.props;
|
|
||||||
|
|
||||||
const aspect = `${width} / ${height}`;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="mx-auto my-auto w-full" style={`aspect-ratio: ${aspect};`}>
|
|
||||||
<iframe
|
<iframe
|
||||||
src={videoPath}
|
class="h-128 w-full max-w-1/2"
|
||||||
title={videoTitle}
|
src={config.videoPath}
|
||||||
class="border-caperren-green-dark h-full w-full rounded-lg border"
|
title={config.videoTitle ?? ""}
|
||||||
allow={"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; " +
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||||
(autoPlay ? "autoplay;" : "")}
|
|
||||||
referrerpolicy="strict-origin-when-cross-origin"
|
referrerpolicy="strict-origin-when-cross-origin"
|
||||||
allowfullscreen></iframe>
|
allowfullscreen></iframe>
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
---
|
---
|
||||||
import type { navLink } from "@interfaces/site-layout.ts";
|
import type { navLink } from "@interfaces/site-layout.ts";
|
||||||
|
|
||||||
import { getHrefPath, getNavLinkSuffix } from "@data/site-layout.ts";
|
|
||||||
|
|
||||||
const items: navLink[] = Astro.props.items;
|
const items: navLink[] = Astro.props.items;
|
||||||
const depth: number = Astro.props.depth ?? 0;
|
const depth: number = Astro.props.depth ?? 0;
|
||||||
const paths: string[] = Astro.props.paths ?? [];
|
const paths: string[] = Astro.props.paths ?? [];
|
||||||
|
|
||||||
|
const getNavLinkSuffix = (entry: navLink): string => {
|
||||||
|
return "-" + [...paths, entry.path].join("-");
|
||||||
|
};
|
||||||
|
const getHrefPath = (entry: navLink): string => {
|
||||||
|
return entry.pubpath
|
||||||
|
? entry.pubpath
|
||||||
|
: "/" +
|
||||||
|
(paths && paths.length ? [...paths, entry.path].join("/") : entry.path);
|
||||||
|
};
|
||||||
|
|
||||||
const { pathname } = Astro.url;
|
const { pathname } = Astro.url;
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
class:list={[
|
class:list={[
|
||||||
"border-caperren-green flex flex-col space-y-4 bg-black",
|
"border-caperren-green flex flex-col space-y-4 space-x-8 bg-black",
|
||||||
depth
|
depth
|
||||||
? "space-y-4 py-4"
|
? "space-y-4 py-4"
|
||||||
: "items-start lg:mt-0 lg:flex-row lg:space-y-0 lg:space-x-8",
|
: "items-start lg:mt-0 lg:flex-row lg:space-y-0 lg:space-x-8",
|
||||||
@@ -21,23 +29,21 @@ const { pathname } = Astro.url;
|
|||||||
{
|
{
|
||||||
items.map(
|
items.map(
|
||||||
(entry) =>
|
(entry) =>
|
||||||
(entry.enabled ?? true) &&
|
(entry.enabled ?? true) && (
|
||||||
!(entry.hidden ?? false) && (
|
|
||||||
<li class="">
|
<li class="">
|
||||||
{Array.isArray(entry.children) && entry.children.length ? (
|
{Array.isArray(entry.children) && entry.children.length ? (
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
id={"dropdownNavbarLink" + getNavLinkSuffix(paths, entry)}
|
id={"dropdownNavbarLink" + getNavLinkSuffix(entry)}
|
||||||
data-dropdown-toggle={
|
data-dropdown-toggle={
|
||||||
"dropdownNavbar" + getNavLinkSuffix(paths, entry)
|
"dropdownNavbar" + getNavLinkSuffix(entry)
|
||||||
}
|
}
|
||||||
data-dropdown-placement="bottom-start"
|
data-dropdown-placement="bottom-start"
|
||||||
data-dropdown-offset-distance="5"
|
data-dropdown-offset-distance="5"
|
||||||
data-dropdown-offset-skidding="12"
|
data-dropdown-offset-skidding="12"
|
||||||
class:list={[
|
class:list={[
|
||||||
"hover:text-caperren-green-light lg:hover:text-caperren-green-light flex w-full items-center justify-between lg:p-0 lg:hover:bg-transparent",
|
"hover:text-caperren-green-light lg:hover:text-caperren-green-light flex w-full items-center justify-between lg:p-0 lg:hover:bg-transparent",
|
||||||
pathname.startsWith(getHrefPath(paths, entry)) &&
|
pathname.startsWith(getHrefPath(entry))
|
||||||
!(entry.placeholderEntry ?? false)
|
|
||||||
? "border-caperren-green border-b-2"
|
? "border-caperren-green border-b-2"
|
||||||
: false,
|
: false,
|
||||||
]}
|
]}
|
||||||
@@ -59,7 +65,7 @@ const { pathname } = Astro.url;
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
id={"dropdownNavbar" + getNavLinkSuffix(paths, entry)}
|
id={"dropdownNavbar" + getNavLinkSuffix(entry)}
|
||||||
class="border-caperren-green z-10 hidden w-max max-w-screen border bg-black px-6 shadow-sm"
|
class="border-caperren-green z-10 hidden w-max max-w-screen border bg-black px-6 shadow-sm"
|
||||||
>
|
>
|
||||||
<Astro.self
|
<Astro.self
|
||||||
@@ -72,32 +78,18 @@ const { pathname } = Astro.url;
|
|||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
href={
|
href={getHrefPath(entry)}
|
||||||
!(entry.placeholderEntry ?? false)
|
target={getHrefPath(entry).startsWith("/") ? "" : "_blank"}
|
||||||
? getHrefPath(paths, entry)
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
target={
|
|
||||||
getHrefPath(paths, entry).startsWith("/") ? "" : "_blank"
|
|
||||||
}
|
|
||||||
class:list={[
|
class:list={[
|
||||||
"ring-caperren-green-dark block bg-transparent lg:p-0",
|
"hover:text-caperren-green-light ring-caperren-green-dark block bg-transparent lg:p-0",
|
||||||
pathname === getHrefPath(paths, entry)
|
pathname === getHrefPath(entry)
|
||||||
? "border-caperren-green border-b-2"
|
? "border-caperren-green border-b-2"
|
||||||
: false,
|
: false,
|
||||||
entry.isSubItem ? "ms-3" : false,
|
|
||||||
entry.placeholderEntry
|
|
||||||
? false
|
|
||||||
: "hover:text-caperren-green-light",
|
|
||||||
]}
|
]}
|
||||||
aria-current={
|
aria-current={
|
||||||
pathname === getHrefPath(paths, entry) &&
|
pathname === getHrefPath(entry) ? "page" : undefined
|
||||||
!(entry.placeholderEntry ?? false)
|
|
||||||
? "page"
|
|
||||||
: undefined
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{entry.isSubItem && "∟ "}
|
|
||||||
{entry.navText}
|
{entry.navText}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const hasHeader = Astro.slots.has("header");
|
|||||||
const hasDefault = Astro.slots.has("default");
|
const hasDefault = Astro.slots.has("default");
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="grid grid-cols-1 gap-0.5">
|
<div class="grid grid-cols-1 gap-3">
|
||||||
{
|
{
|
||||||
Astro.slots.has("header") && (
|
Astro.slots.has("header") && (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -7,15 +7,10 @@ const keys: { [key: string]: string } = {
|
|||||||
ADCP: "Acoustic doppler current profiler",
|
ADCP: "Acoustic doppler current profiler",
|
||||||
COTS: "Consumer off-the-shelf",
|
COTS: "Consumer off-the-shelf",
|
||||||
CTD: "Conductivity, temperature, and depth sensor",
|
CTD: "Conductivity, temperature, and depth sensor",
|
||||||
DUTs: "Devices under test",
|
|
||||||
GUI: "Graphical user interface",
|
GUI: "Graphical user interface",
|
||||||
NUC: "A small and low-power computer made by Intel",
|
NUC: "A small and low-power computer made by Intel",
|
||||||
PCBs: "Printed circuit boards",
|
PCBs: "Printed circuit boards",
|
||||||
SCARA: "Selective Compliance Assembly Robot Arm",
|
|
||||||
TDD: "Test driven development",
|
|
||||||
UPS: "Uninterruptible power supply",
|
UPS: "Uninterruptible power supply",
|
||||||
VISA: "Virtual instrument software architecture",
|
|
||||||
VPS: "Virtual private server",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const key: string | undefined = Astro.props.key;
|
const key: string | undefined = Astro.props.key;
|
||||||
@@ -26,12 +21,6 @@ if (key && keys.hasOwnProperty(key)) {
|
|||||||
word = key;
|
word = key;
|
||||||
definition = keys[key];
|
definition = keys[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!word || !definition) {
|
|
||||||
throw new Error(
|
|
||||||
`Popover definition is missing! Inputs were\nkey: ${key}\nword: ${word}\ndefinition: ${definition}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<>
|
<>
|
||||||
|
|||||||