feat: add website link to app footer, Join Alpha opens in new tab
Fixes #2 - Add website link to app footer - Add VITE_WEBSITE_URL build arg for configurable website URL - Add Git Repository and License links to app footer - Update Join Free Alpha links to open in new tab (target=_blank)
This commit is contained in:
@@ -11,12 +11,14 @@ RUN bun build src/index.ts --outdir ./dist --target bun
|
||||
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
ARG VITE_GIT_URL=https://git.kropa.tech/lotherk/deardiary
|
||||
ARG VITE_WEBSITE_URL=https://deardiary.lother.io
|
||||
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY frontend ./
|
||||
ENV VITE_GIT_URL=$VITE_GIT_URL
|
||||
ENV VITE_WEBSITE_URL=$VITE_WEBSITE_URL
|
||||
RUN npm run build
|
||||
|
||||
FROM oven/bun:1.1-alpine AS runner
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- APP_URL=${WEBSITE_APP_URL:-http://localhost:3000}
|
||||
- GIT_URL=${GIT_URL:-https://github.com/lotherk/deardiary}
|
||||
- GIT_URL=${GIT_URL:-https://git.kropa.tech/lotherk/deardiary}
|
||||
restart: unless-stopped
|
||||
|
||||
app:
|
||||
@@ -16,6 +16,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- VITE_GIT_URL=${GIT_URL:-https://git.kropa.tech/lotherk/deardiary}
|
||||
- VITE_WEBSITE_URL=${WEBSITE_APP_URL:-http://localhost:3000}
|
||||
ports:
|
||||
- "3000:80"
|
||||
environment:
|
||||
|
||||
@@ -81,7 +81,7 @@ function Footer({ appName = 'DearDiary' }: { appName?: string }) {
|
||||
const { resolvedTheme } = useTheme();
|
||||
return (
|
||||
<footer className={`py-6 text-center text-sm text-slate-500 ${resolvedTheme === 'dark' ? 'border-t border-slate-800' : 'border-t border-slate-200'}`}>
|
||||
<p>{appName} v{packageJson.version} — Self-hosted AI-powered journaling · <a href={import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'} className="hover:text-purple-400 transition">Git Repository</a> · MIT License · © 2026 Konrad Lother</p>
|
||||
<p>{appName} v{packageJson.version} · <a href={import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'} target="_blank" rel="noopener noreferrer" className="hover:text-purple-400 transition">Git Repository</a> · <a href={`${import.meta.env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'}/src/branch/main/LICENSE'} target="_blank" rel="noopener noreferrer" className="hover:text-purple-400 transition">License</a></p>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.VITE_GIT_URL': JSON.stringify(env.VITE_GIT_URL || 'https://git.kropa.tech/lotherk/deardiary'),
|
||||
'import.meta.env.VITE_WEBSITE_URL': JSON.stringify(env.VITE_WEBSITE_URL || 'https://deardiary.lother.io'),
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<a href="#features">Features</a>
|
||||
<a href="docs/">Docs</a>
|
||||
<a href="${GIT_URL}" target="_blank">Git Repository</a>
|
||||
<a href="${APP_URL}" class="btn btn-primary">Join Free Alpha</a>
|
||||
<a href="${APP_URL}" target="_blank" class="btn btn-primary">Join Free Alpha</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -29,7 +29,7 @@
|
||||
<h1>Your AI-Powered<br><span class="gradient-text">Daily Journal</span></h1>
|
||||
<p class="hero-subtitle">Capture events throughout the day and let AI transform them into beautiful, thoughtful diary pages. Self-hosted. Private. Yours.</p>
|
||||
<div class="hero-actions">
|
||||
<a href="${APP_URL}" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||
<a href="${APP_URL}" target="_blank" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||
<a href="docs/" class="btn btn-secondary btn-large">Read Docs</a>
|
||||
</div>
|
||||
<div class="hero-meta">
|
||||
@@ -115,12 +115,12 @@
|
||||
<h2>Ready to start journaling?</h2>
|
||||
<p>Try our free alpha hosted for you, or self-host in minutes with Docker.</p>
|
||||
<div class="try-actions">
|
||||
<a href="${APP_URL}" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||
<a href="${APP_URL}" target="_blank" class="btn btn-primary btn-large">Join Free Alpha</a>
|
||||
<span class="try-or">or</span>
|
||||
<a href="docs/getting-started/installation.html" class="btn btn-secondary btn-large">Self-Host</a>
|
||||
</div>
|
||||
<div class="try-code">
|
||||
<code>git clone https://github.com/lotherk/deardiary.git && cd deardiary && docker compose up -d</code>
|
||||
<code>git clone ${GIT_URL}.git && cd deardiary && docker compose up -d</code>
|
||||
</div>
|
||||
<p class="try-hint">Self-hosted default login: admin@localhost / changeme123</p>
|
||||
</div>
|
||||
@@ -135,7 +135,7 @@
|
||||
<a href="#features">Features</a>
|
||||
<a href="docs/">Documentation</a>
|
||||
<a href="#how">How it Works</a>
|
||||
<a href="${APP_URL}">Free Alpha</a>
|
||||
<a href="${APP_URL}" target="_blank">Free Alpha</a>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>Resources</h4>
|
||||
|
||||
Reference in New Issue
Block a user