update r2 config for enchunCMS email adapter

This commit is contained in:
2025-10-13 15:10:02 +08:00
parent 65c27e3386
commit 4678e47a8b
8 changed files with 3455 additions and 104 deletions

View File

@@ -0,0 +1,14 @@
<svg width="182" height="237" viewBox="0 0 182 237" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M149.22 74.7164C148.84 56.9861 143.014 41.5353 130.223 28.9974C120.851 19.7523 109.58 14.3065 96.4089 13.2933C75.3857 11.647 58.6685 20.0056 46.2572 36.8494C36.5055 50.1472 32.9595 65.3447 34.8591 81.8086C36.5055 96.3728 42.4579 109.037 52.8428 119.422C65.5074 132.087 81.0848 137.659 98.9418 135.886C110.467 134.746 120.725 130.314 129.97 123.348C130.603 122.842 131.236 122.209 132.123 121.955C133.516 121.575 134.909 122.082 135.669 123.348C136.429 124.615 136.302 125.881 135.289 127.021C132.376 130.314 128.957 133.227 125.284 135.633C114.266 143.232 101.981 146.904 88.5569 146.524C71.2064 146.018 56.2622 139.686 43.7243 127.654C31.8196 116.13 24.7275 102.199 22.0679 85.8613C17.3821 56.2262 30.2999 25.3247 57.0221 9.49398C83.6177 -6.33671 117.052 -2.03076 138.835 19.8789C150.993 32.0369 158.085 46.6011 160.238 63.5716C162.011 77.6293 160.112 91.307 154.286 104.225C152.513 108.278 149.6 109.164 145.801 107.138C129.21 98.0192 112.62 88.9007 96.1556 79.7823C95.1424 79.2757 94.3826 79.0224 93.2427 79.529C90.2033 80.6688 86.9105 79.0224 85.7707 75.9829C84.6308 72.8168 86.4039 69.524 89.4434 68.3842C92.6095 67.371 96.0289 69.0174 96.9155 72.1835C97.1688 73.3233 97.802 73.8299 98.6885 74.2099C114.013 81.0487 129.21 87.7609 144.534 94.7265C145.674 95.233 146.054 94.9797 146.307 93.8399C148.334 87.5076 149.347 81.1754 149.22 74.7164Z" fill="#3083BF"/>
<path d="M135.922 68.5108C135.922 69.6506 135.922 70.5372 135.922 71.4237C135.922 72.9434 134.909 73.9566 133.643 74.0832C131.996 74.3365 130.857 73.5766 130.477 72.0569C130.097 70.2839 129.843 68.5108 129.337 66.7378C125.537 53.3134 117.812 43.0551 104.388 38.2425C90.8365 33.43 78.172 35.7096 67.0272 44.9548C62.088 49.0074 58.4153 53.9466 55.5024 59.519C54.7425 61.0387 53.4761 61.672 52.2096 61.4187C50.8165 61.1654 50.0567 60.2789 49.6767 59.0124C49.5501 58.5058 49.6767 58.1259 49.8034 57.6193C51.1965 51.287 54.1093 45.7146 58.2886 40.6488C65.0008 32.5435 73.6127 27.4777 83.9977 25.578C96.5356 23.2984 107.934 26.2112 117.939 33.8099C128.324 41.5353 134.149 52.0469 135.922 64.8381C135.796 65.9779 135.922 67.371 135.922 68.5108Z" fill="#939494"/>
<path d="M91.5964 164.128C72.8529 163.875 56.1356 158.303 42.078 145.511C40.6849 144.245 40.4316 143.105 41.0648 141.839C41.698 140.699 42.7112 140.066 43.9777 140.192C44.7375 140.319 45.2441 140.699 45.8774 141.079C53.3494 145.891 61.4548 149.437 70.0667 151.717C80.4516 154.503 91.0898 155.136 101.855 153.743C114.266 152.097 125.664 147.918 136.049 141.079C136.556 140.699 137.189 140.319 137.822 140.192C139.215 139.939 140.482 140.572 141.115 141.712C141.748 142.978 141.495 144.245 140.355 145.385C138.075 147.664 135.542 149.691 133.009 151.59C123.384 158.303 112.746 162.102 101.095 163.622C97.9287 163.875 94.7625 164.002 91.5964 164.128Z" fill="#3083BF"/>
<path d="M94.2561 91.9402C95.1426 91.9402 96.0291 91.8136 96.789 91.8136C98.4354 91.8136 99.3219 92.4468 99.5752 93.7132C99.8285 94.9797 99.0686 95.9929 97.6755 96.4994C94.3827 97.7659 90.9633 98.0192 87.5439 97.7659C77.7922 97.006 69.3069 90.2938 66.2674 81.0487C61.8348 67.4976 70.0668 52.9334 84.3777 49.5139C97.1689 46.3478 109.96 53.44 113.506 65.5979C113.633 66.1045 113.76 66.6111 113.886 67.1177C114.139 68.5108 113.506 69.7772 112.366 70.1572C111.227 70.5371 109.96 70.0305 109.327 68.6374C108.44 66.8644 107.301 65.218 106.034 63.6982C98.3088 54.5798 83.4912 55.3396 76.779 65.3446C72.0931 72.3101 73.6129 81.8086 80.1984 87.1277C84.3777 90.5471 88.937 92.0669 94.2561 91.9402Z" fill="#939494"/>
<path d="M88.81 122.335C70.8263 122.715 54.2358 108.531 49.0433 90.6738C47.9035 86.7478 47.2703 82.6952 47.2703 78.6425C47.2703 76.6162 48.0301 75.4764 49.5499 75.3497C51.1963 75.2231 52.0828 76.1096 52.4627 78.1359C54.1091 85.8613 57.2753 92.8268 62.4677 98.7792C68.8 106.125 76.9053 110.557 86.4037 112.33C95.0156 113.977 103.121 112.33 110.973 108.784C111.86 108.404 112.619 108.024 113.506 107.644C115.026 107.011 116.292 107.264 117.052 108.278C117.938 109.544 117.812 110.81 116.545 112.077C114.519 114.103 112.113 115.75 109.707 117.143C103.754 120.815 97.1686 122.335 88.81 122.335Z" fill="#939494"/>
<path d="M91.3431 180.339C79.0585 180.212 67.4071 177.173 56.6422 171.094C56.3889 170.967 56.1356 170.84 55.8823 170.714C54.6159 169.827 54.2359 168.687 54.8692 167.548C55.3757 166.408 56.5156 165.775 58.0353 166.281C62.5945 167.548 67.0271 168.814 71.5864 169.827C87.6704 173.373 103.501 172.487 119.205 167.674C120.725 167.168 122.371 166.661 123.891 166.281C125.411 165.775 126.677 166.281 127.31 167.548C127.944 168.814 127.437 170.207 126.044 171.094C117.052 176.413 107.427 179.452 97.0421 180.212C95.0158 180.212 93.1161 180.465 91.3431 180.339Z" fill="#3083BF"/>
<path d="M0.533691 217.007C0.882309 216.21 0.882309 215.325 1.14377 214.528C4.10703 203.636 16.8316 198.588 25.8085 204.964C31.5607 209.038 33.5652 214.705 32.7809 221.701C32.6937 222.143 32.5194 222.321 32.0836 222.321C27.1158 222.321 22.148 222.321 17.2674 222.321C16.8316 222.321 16.6573 222.143 16.6573 221.701C16.6573 220.107 16.6573 218.513 16.6573 216.919C16.6573 216.21 17.0059 216.299 17.4417 216.299C20.1435 216.299 22.8452 216.299 25.547 216.299C26.3314 216.299 26.5057 216.122 26.2443 215.413C24.2397 209.48 18.0517 206.912 13.0839 209.48C8.98768 211.606 6.72166 214.971 6.89597 219.753C7.07028 224.446 9.24914 227.811 13.5197 229.582C17.3545 231.176 21.015 230.556 24.1526 227.634C24.5883 227.191 24.8498 227.191 25.2856 227.634C26.5057 228.696 27.813 229.671 29.1204 230.645C29.469 230.91 29.5561 231.176 29.2075 231.53C25.4599 235.249 21.015 237.02 15.8729 236.489C7.94182 235.604 2.45109 230.379 0.795155 222.409C0.795155 222.232 0.795155 221.966 0.533691 221.878C0.533691 220.107 0.533691 218.601 0.533691 217.007Z" fill="#3083BF"/>
<path d="M102.592 213.111C103.289 212.403 103.899 211.783 104.509 211.251C109.041 207.266 116.1 208.418 118.802 213.642C119.674 215.325 119.935 217.184 120.022 219.044C120.022 224.269 120.022 229.582 120.022 234.807C120.022 235.515 119.935 235.781 119.151 235.781C117.408 235.692 115.752 235.692 114.009 235.781C113.311 235.781 113.137 235.515 113.137 234.895C113.137 230.025 113.137 225.154 113.137 220.284C113.137 219.575 113.05 218.956 112.963 218.247C112.266 214.794 108.867 213.377 105.816 215.236C104.683 215.945 103.725 217.007 102.853 218.07C102.592 218.424 102.592 218.867 102.592 219.221C102.592 224.446 102.592 229.582 102.592 234.807C102.592 235.604 102.417 235.869 101.633 235.781C99.8897 235.692 98.2338 235.781 96.4907 235.781C95.9678 235.781 95.7063 235.692 95.7063 235.072C95.7063 222.409 95.7063 209.746 95.7063 197.083C95.7063 196.551 95.8806 196.374 96.4035 196.374C98.1466 196.374 99.9769 196.463 101.72 196.374C102.417 196.374 102.592 196.551 102.592 197.26C102.592 202.13 102.592 207.001 102.592 211.871C102.592 212.137 102.592 212.491 102.592 213.111Z" fill="#3083BF"/>
<path d="M164.123 213.022C165.691 211.34 167.26 210.012 169.177 209.392C175.365 207.355 181.205 211.34 181.379 217.981C181.553 223.649 181.379 229.405 181.466 235.072C181.466 235.604 181.292 235.781 180.769 235.781C179.026 235.781 177.37 235.692 175.627 235.781C174.843 235.781 174.581 235.604 174.581 234.718C174.581 229.759 174.581 224.8 174.581 219.841C174.581 219.044 174.581 218.336 174.32 217.539C173.535 214.705 171.008 213.377 168.393 214.439C166.563 215.148 165.43 216.565 164.297 218.07C164.035 218.424 164.123 218.778 164.123 219.133C164.123 224.357 164.123 229.493 164.123 234.718C164.123 235.515 163.948 235.781 163.164 235.781C161.421 235.692 159.765 235.781 158.022 235.781C157.412 235.781 157.237 235.692 157.237 234.984C157.237 226.66 157.237 218.336 157.237 210.1C157.237 209.48 157.412 209.392 157.935 209.392C159.765 209.392 161.595 209.392 163.338 209.392C163.861 209.392 164.123 209.569 164.035 210.1C164.123 210.986 164.123 211.871 164.123 213.022Z" fill="#3083BF"/>
<path d="M45.5925 213.022C47.4227 210.986 49.253 209.657 51.6061 209.126C57.3583 207.798 62.5004 211.606 62.8491 217.627C63.1977 223.472 62.9362 229.316 62.9362 235.249C62.9362 235.692 62.8491 235.869 62.3261 235.869C60.4087 235.869 58.5785 235.869 56.6611 235.869C55.8767 235.869 56.051 235.426 56.051 234.984C56.051 230.025 56.051 224.977 56.051 220.018C56.051 219.31 55.9639 218.513 55.7895 217.804C54.918 214.439 51.519 213.199 48.5557 215.236C47.4227 216.033 46.6383 217.007 45.7668 218.07C45.4182 218.424 45.5053 218.867 45.5053 219.31C45.5053 224.534 45.5053 229.67 45.5053 234.895C45.5053 235.781 45.2439 235.958 44.4595 235.958C42.8035 235.869 41.0604 235.958 39.4045 235.958C38.7944 235.958 38.533 235.869 38.533 235.161C38.533 226.925 38.533 218.601 38.533 210.366C38.533 209.834 38.6201 209.569 39.2302 209.569C41.0604 209.569 42.8907 209.569 44.8081 209.569C45.4182 209.569 45.5053 209.746 45.5053 210.366C45.5925 210.986 45.5925 211.871 45.5925 213.022Z" fill="#3083BF"/>
<path d="M143.554 232.327C143.031 232.858 142.596 233.213 142.247 233.567C139.894 235.604 137.192 236.666 133.967 236.223C129.871 235.604 126.733 232.327 126.385 228.076C126.123 225.066 126.298 221.966 126.298 218.955C126.298 216.122 126.298 213.288 126.298 210.454C126.298 209.746 126.385 209.48 127.169 209.48C128.825 209.569 130.568 209.569 132.224 209.48C132.921 209.48 133.183 209.657 133.183 210.366C133.183 215.236 133.183 220.107 133.183 225.066C133.183 225.774 133.183 226.482 133.357 227.191C133.793 230.025 136.059 231.619 138.848 230.999C140.94 230.556 142.421 229.228 143.467 227.368C143.729 226.925 143.641 226.571 143.641 226.128C143.641 220.904 143.641 215.768 143.641 210.543C143.641 209.746 143.816 209.48 144.6 209.569C146.256 209.657 147.825 209.657 149.481 209.569C150.352 209.569 150.614 209.746 150.614 210.631C150.527 216.919 150.614 223.117 150.614 229.405C150.614 231.264 150.614 233.124 150.614 235.072C150.614 235.781 150.439 236.046 149.742 235.958C147.999 235.869 146.256 235.869 144.513 235.958C143.816 235.958 143.641 235.692 143.729 235.072C143.641 234.098 143.554 233.39 143.554 232.327Z" fill="#3083BF"/>
<path d="M90.2156 213.554C90.2156 214.262 90.2156 215.059 90.2156 215.768C90.2156 216.476 90.0413 216.565 89.4312 216.21C87.5138 215.148 85.5093 214.439 83.3304 214.439C78.1883 214.439 74.8764 218.159 75.3993 223.56C75.9223 228.874 80.1928 231.707 85.5093 230.556C86.9909 230.29 88.4725 229.759 89.9541 229.139C90.4771 228.874 90.6514 229.051 90.6514 229.582C90.6514 230.999 90.6514 232.504 90.6514 233.921C90.6514 234.364 90.5642 234.629 90.1285 234.718C85.4221 236.401 80.6286 236.932 75.9223 234.984C71.0416 232.947 68.427 229.139 68.1655 223.737C67.904 219.841 68.6884 216.299 71.3031 213.288C74.4406 209.657 78.5369 208.506 83.1561 208.772C85.2478 208.86 87.3395 209.303 89.3441 210.1C89.9541 210.366 90.3028 210.632 90.2156 211.428C90.1285 212.225 90.2156 212.845 90.2156 213.554Z" fill="#3083BF"/>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,195 @@
---
import { Image } from "astro:assets";
interface Props {
desktopVideo: string;
mobileVideo: string;
hideOnDesktop?: boolean;
hideOnMobile?: boolean;
logo?: string;
header: string;
subheader: string;
useWebmFallback?: boolean;
focalPoint?: string;
}
const {
desktopVideo,
mobileVideo,
hideOnDesktop = false,
hideOnMobile = false,
logo,
header,
subheader,
useWebmFallback = true,
focalPoint = "object-right",
} = Astro.props;
// Helper to get base path without extension
const getBasePath = (path: string) => path.replace(/\.(mp4|webm)$/i, "");
// Generate sources based on useWebmFallback
const getSources = (inputPath: string) => {
const basePath = getBasePath(inputPath);
if (useWebmFallback) {
return [
{ src: `${basePath}.webm`, type: "video/webm" },
{ src: `${basePath}.mp4`, type: "video/mp4" },
];
}
return [
{
src: inputPath,
type: inputPath.endsWith(".webm") ? "video/webm" : "video/mp4",
},
];
};
---
<!-- Desktop Video -->
<video
id="desktop-video"
class={`absolute top-0 left-0 w-full h-[100dvh] object-cover z-0 hidden md:block ${focalPoint}`}
autoplay
muted
loop
playsinline
preload="metadata"
>
{
getSources(desktopVideo).map((source) => (
<source src={source.src} type={source.type} />
))
}
</video>
<!-- Mobile Video -->
<video
id="mobile-video"
class={`absolute top-0 left-0 w-full h-[100dvh] object-cover z-0 md:hidden block`}
autoplay
muted
loop
playsinline
preload="metadata"
>
{
getSources(mobileVideo).map((source) => (
<source src={source.src} type={source.type} />
))
}
</video>
<!-- Hero Content Overlay -->
<section
class={`h-[100dvh] -mt-[5rem] flex items-center justify-center relative ${hideOnDesktop ? "hidden md:block" : ""} ${hideOnMobile ? "md:hidden" : ""} z-10 overflow-hidden`}
>
<div
class="absolute top-0 left-0 w-full h-full bg-gradient-to-r from-black/80 to-black/0 flex items-center justify-center"
>
<div class="text-white max-w-6xl w-full p-8">
{
logo && (
<div class="flex items-center justify-start mb-6">
<Image
height={182}
width={237}
src={logo}
alt="enchun-ogo"
class="hidden md:block w-32 h-auto mr-8"
/>
<div class="flex flex-col items-start justify-start ">
<h1 class="text-2xl md:text-6xl text-start leading-tight font-extrabold mb-3 whitespace-break-spaces">
{header}
</h1>
<p class="text-xs md:text-3xl font-light mb-4 leading-relaxed whitespace-nowrap">
{subheader}
</p>
</div>
</div>
)
}
{
!logo && (
<div class="flex flex-col items-start">
<h1 class="text-2xl md:text-6xl text-start leading-tight font-extrabold mb-3 whitespace-break-spaces">
{header}
</h1>
<p class="text-xs md:text-3xl font-light mb-4 leading-relaxed whitespace-nowrap">
{subheader}
</p>
</div>
)
}
</div>
</div>
</section>
<script>
// Enhanced mobile/desktop detection and video loading
function initVideoHero() {
const desktopVideo = document.getElementById(
"desktop-video",
) as HTMLVideoElement;
const mobileVideo = document.getElementById(
"mobile-video",
) as HTMLVideoElement;
if (!desktopVideo || !mobileVideo) return;
// Function to check if we're on mobile
const isMobile = () => window.innerWidth < 768;
// Function to switch videos based on device
const switchVideos = () => {
const mobile = isMobile();
if (mobile) {
// On mobile, hide desktop video, show mobile video
desktopVideo.style.display = "none";
mobileVideo.style.display = "block";
} else {
// On desktop, show desktop video, hide mobile video
desktopVideo.style.display = "block";
mobileVideo.style.display = "none";
}
};
// Initial switch
switchVideos();
// Listen for resize events
window.addEventListener("resize", () => {
switchVideos();
});
// Handle video loading errors
[desktopVideo, mobileVideo].forEach((video) => {
video.addEventListener("error", (e) => {
console.warn("Video failed to load:", video.src);
// Could fallback to static image here
});
});
// Preload videos when they're hidden to improve switching
const preloadVideos = () => {
[desktopVideo, mobileVideo].forEach((video) => {
if (video.style.display === "none") {
video.load();
}
});
};
// Preload on load
window.addEventListener("load", preloadVideos);
}
// Initialize when DOM is ready
document.addEventListener("DOMContentLoaded", initVideoHero);
// Also initialize immediately if DOM is already ready
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initVideoHero);
} else {
initVideoHero();
}
</script>