Compare commits
15 Commits
07561a4335
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
e2571880ce
|
|||
|
0eafcb9a67
|
|||
|
9a2e7f65cb
|
|||
|
e5110ddd75
|
|||
|
3b2abe7a99
|
|||
|
4cbe911b0c
|
|||
|
75321034aa
|
|||
|
174afb6a10
|
|||
|
483e80db79
|
|||
|
a303b8be00
|
|||
|
bb0b348069
|
|||
|
cf2195b4f3
|
|||
|
6de9c9c83b
|
|||
|
e3787281fd
|
|||
|
255abd508d
|
@@ -12,20 +12,20 @@ jobs:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
@@ -33,3 +33,6 @@ jobs:
|
||||
tags: |
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||
provenance: false
|
||||
cache-from: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache
|
||||
cache-to: type=registry,ref=${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:buildcache,mode=max
|
||||
17
Dockerfile
17
Dockerfile
@@ -1,19 +1,24 @@
|
||||
FROM oven/bun:1.3.9-alpine AS builder
|
||||
FROM oven/bun:1.3.9-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock* ./
|
||||
FROM base AS prod-deps
|
||||
COPY package.json bun.lock ./
|
||||
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
|
||||
bun install --production --frozen-lockfile || bun install --production
|
||||
|
||||
RUN bun install --frozen-lockfile || bun install
|
||||
FROM base AS builder
|
||||
COPY package.json bun.lock ./
|
||||
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile || bun install
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
RUN rm -rf node_modules && bun install --production
|
||||
|
||||
FROM oven/bun:1.3.9-alpine AS runtime
|
||||
FROM base AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY package.json ./
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
15
package.json
15
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "atashdotdev",
|
||||
"type": "module",
|
||||
"version": "1.3.0",
|
||||
"version": "2.0.0",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
@@ -9,20 +9,17 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/node": "10.0.0-beta.5",
|
||||
"@astrojs/vue": "6.0.0-beta.1",
|
||||
"@fontsource-variable/roboto-slab": "^5.2.8",
|
||||
"@astrojs/node": "9.5.4",
|
||||
"@astrojs/vue": "5.1.4",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"astro": "6.0.0-beta.15",
|
||||
"motion-v": "2.0.0",
|
||||
"astro": "5.18.0",
|
||||
"nodemailer": "^8.0.1",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"vue": "^3.5.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.3.0",
|
||||
"@types/node": "^25.3.3",
|
||||
"@types/nodemailer": "^7.0.11",
|
||||
"daisyui": "^5.5.19"
|
||||
},
|
||||
"packageManager": "bun@1.3.9"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
public/fonts/roboto.woff2
Normal file
BIN
public/fonts/roboto.woff2
Normal file
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
---
|
||||
interface Props {
|
||||
items: Array<{
|
||||
text: string;
|
||||
className: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
const { items } = Astro.props;
|
||||
---
|
||||
|
||||
<span class="text-rotate duration-9000">
|
||||
<span>
|
||||
{
|
||||
items.map((item) => (
|
||||
<span class:list={["mx-auto text-center", item.className]}>
|
||||
{item.text}
|
||||
</span>
|
||||
))
|
||||
}
|
||||
</span>
|
||||
</span>
|
||||
33
src/components/RotatingText.vue
Normal file
33
src/components/RotatingText.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<span class="block w-full my-2">
|
||||
<span class="text-rotate">
|
||||
<span class="justify-items-center">
|
||||
<span
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:class="item.className"
|
||||
>
|
||||
{{ item.text }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface RotatingTextItem {
|
||||
text: string;
|
||||
className: string;
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
items: RotatingTextItem[];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.text-rotate:hover,
|
||||
.text-rotate:hover * {
|
||||
animation-play-state: running !important;
|
||||
}
|
||||
</style>
|
||||
@@ -239,12 +239,12 @@ ${message.value}`,
|
||||
class="btn btn-lg w-full shadow-lg transition-all duration-300"
|
||||
:class="[
|
||||
status === 'success'
|
||||
? 'btn-success text-white'
|
||||
? 'btn-success text-white pointer-events-none'
|
||||
: status === 'error'
|
||||
? 'btn-error text-white'
|
||||
? 'btn-error text-white pointer-events-none'
|
||||
: 'btn-primary',
|
||||
]"
|
||||
:disabled="status === 'sending' || status === 'success'"
|
||||
:disabled="status === 'sending'"
|
||||
>
|
||||
<template v-if="status === 'sending'">
|
||||
<span
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { siteConfig } from "../../config/site";
|
||||
import Icon from "../Icon.astro";
|
||||
import Section from "../Section.astro";
|
||||
import RotatingText from "../RotatingText.astro";
|
||||
import RotatingText from "../RotatingText.vue";
|
||||
import StatusIndicator from "../StatusIndicator.vue";
|
||||
|
||||
const rotatingText = (siteConfig.hero as any).rotatingText as
|
||||
@@ -30,7 +30,7 @@ const rotatingText = (siteConfig.hero as any).rotatingText as
|
||||
{
|
||||
rotatingText ? (
|
||||
<>
|
||||
<RotatingText items={rotatingText} />
|
||||
<RotatingText items={rotatingText} client:idle />
|
||||
<span class="block">
|
||||
{siteConfig.hero.mainTitle
|
||||
.replace("{rotating}", "")
|
||||
|
||||
@@ -108,7 +108,7 @@ export const siteConfig = {
|
||||
variant: "primary",
|
||||
},
|
||||
{
|
||||
title: "Slop-free",
|
||||
title: "Slop-free Guarantee",
|
||||
content: "Hand-crafted code built with care",
|
||||
variant: "secondary",
|
||||
},
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import Header from "../components/Header.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
import { siteConfig } from "../config/site";
|
||||
import "@fontsource-variable/roboto-slab";
|
||||
import "../styles/global.css";
|
||||
|
||||
interface Props {
|
||||
@@ -65,6 +64,13 @@ const isProd = import.meta.env.PROD;
|
||||
<meta property="og:image:alt" content={resolvedOgImage.alt} />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<link rel="canonical" href={siteUrl} />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<title>{metaTitle}</title>
|
||||
{
|
||||
isProd && (
|
||||
@@ -87,7 +93,7 @@ const isProd = import.meta.env.PROD;
|
||||
)
|
||||
}
|
||||
</head>
|
||||
<body class="min-h-screen flex flex-col bg-base-100 font-sans antialiased">
|
||||
<body class="min-h-screen flex flex-col bg-base-100 antialiased">
|
||||
<Header />
|
||||
<main class="grow flex flex-col">
|
||||
<slot />
|
||||
|
||||
@@ -40,6 +40,14 @@ html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Roboto Slab Variable", serif;
|
||||
@font-face {
|
||||
font-family: "Roboto Slab";
|
||||
src: url("/fonts/roboto.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Roboto Slab", serif;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user