Skip to content

V6 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 68 commits into
base: preview
Choose a base branch
from
Draft

V6 #26

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
7bac0c7
feat: add store title key
rdsov Jan 7, 2025
e9c6220
feat: change homepage title to store
rdsov Jan 7, 2025
c5126ea
feat: add test comment
rdsov Jan 7, 2025
1bac809
fix: remove test comment
rdsov Jan 7, 2025
24f0938
fix: store branch not deploying
rdsov Jan 7, 2025
ae9469e
feat: restore homepage title
rdsov Jan 8, 2025
a48acf2
fix: make navbar padding larger on mobile
rdsov Jan 10, 2025
7eed1b7
feat: add store link to header
rdsov Jan 10, 2025
771d4d7
feat: add store content collection
rdsov Jan 10, 2025
d233dd2
refactor: add custom color variables
rdsov Jan 10, 2025
529dc2c
feat: create first demo store item
rdsov Jan 10, 2025
36c4022
feat: create store home page
rdsov Jan 10, 2025
b173df5
feat: create item component
rdsov Jan 10, 2025
0cbe622
fix: make serif title normal weight
rdsov Jan 11, 2025
6039553
feat: add StarterKit category
rdsov Jan 11, 2025
1ce37cf
feat: create product page
rdsov Jan 11, 2025
9c81d3e
refactor: set max month delta
rdsov Jan 16, 2025
adb2443
feat: move h1 style into css
rdsov Jan 16, 2025
2612ec5
feat: add more neutral shades
rdsov Jan 16, 2025
aae12bd
feat: create link class
rdsov Jan 16, 2025
b3de39b
feat: create product page
rdsov Jan 17, 2025
aa40fcc
feat: add hr style
rdsov Jan 17, 2025
979f209
feat: create navigation component for product pages
rdsov Jan 17, 2025
3879e76
feat: create button component
rdsov Jan 17, 2025
ffbcb85
feat: create mock gallery page
rdsov Jan 17, 2025
18cca8d
feat: change footer group title to span
rdsov Apr 13, 2025
1f1f0a7
refactor: move store item data out of localized path
rdsov Apr 13, 2025
0cccaf0
feat: provide translations
rdsov Apr 13, 2025
390292b
feat: add new translations for store
rdsov Apr 13, 2025
4ffc451
refactor: adjust getStaticPaths so it recognizes new structure
rdsov Apr 13, 2025
d577a2f
feat: adjust style
rdsov Apr 13, 2025
08f18b8
feat: add details tab
rdsov Apr 13, 2025
0d50557
feat: add zod support for store item details
rdsov Apr 13, 2025
2983e89
feat: populate UI with correct item data
rdsov Apr 13, 2025
5ea32c6
feat: make base font size bigger
rdsov Apr 13, 2025
22236ad
feat: remove grid margin
rdsov Apr 13, 2025
fb94b72
feat: adjust navbar padding
rdsov Apr 13, 2025
95e8d35
feat: restrict mobile devices for certain products
rdsov Apr 13, 2025
e02fc9f
feat: extend button styles
rdsov Apr 13, 2025
05b8872
feat(ui): adjust margins
rdsov Apr 14, 2025
64abc04
refactor: remove unused console logs
rdsov Apr 14, 2025
14c65ff
refactor: remove unused type Socials
rdsov Apr 14, 2025
af4428a
feat(store): move credits to separate section so table stays responsive
rdsov Apr 14, 2025
d1f2d76
fix(store): display correct release date
rdsov Apr 14, 2025
da4f51c
feat(news): infer language if none is provided
rdsov Apr 14, 2025
ff08b6e
refactor(news): move utility functions into separate file
rdsov Apr 14, 2025
a20d3bd
refactor(store): organize imports
rdsov Apr 14, 2025
179d2fb
refactor(i18n): move getTranslatedSlug into i18n
rdsov Apr 14, 2025
579425c
feat(store): introduce new styling for items
rdsov Apr 14, 2025
c0bf7ac
refactor(store): remove code duplication for utility functions
rdsov Apr 14, 2025
0d87554
feat(store): offer prototype for localized prices
rdsov Apr 14, 2025
5078410
feat: ensure URLs are valid Futureblur shortlinks (fut.red)
rdsov Apr 14, 2025
dc82c5d
style(store): reorganize import
rdsov Apr 14, 2025
d8bda7a
chore(build): update browserslist
rdsov Apr 14, 2025
19b0fd3
fix(store): display proper grid layout on desktop and adjust spacing
rdsov Apr 14, 2025
35a645d
feat(button): add disabled property
rdsov Apr 15, 2025
c7450d1
feat(store): restrict action on paid products since they are not supp…
rdsov Apr 15, 2025
a22a9c1
style(store): rearrange tags
rdsov Apr 15, 2025
0ce6dc5
feat(store): provide translation keys
rdsov Apr 15, 2025
2c4a043
feat(store): display correct currency format for now
rdsov Apr 15, 2025
e80c05e
feat(store): remove unused console log
rdsov Apr 15, 2025
2dcbb79
feat(store): launch url in new tab
rdsov Apr 15, 2025
f5d7d15
feat(store): create PaidNotSupported
rdsov Apr 15, 2025
c96bff8
chore(build): deploy v6 branch
rdsov Apr 15, 2025
56dc3c4
feat(store): create mock mode for debugging layout
rdsov Apr 15, 2025
476c334
chore(build): rename pushlish.yml to deploy.yml
rdsov Apr 15, 2025
3a2a6ba
chore(build): update version
rdsov Apr 15, 2025
5b41cc9
chore(build): enforce preview branch for main merges
rdsov Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/publish.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
branches:
- main
- preview
- 'v*'
paths-ignore:
- "*.md"
- ".github/**/*.md"
Expand All @@ -13,10 +14,10 @@ jobs:
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
Expand All @@ -35,13 +36,11 @@ jobs:

- name: Build
run: pnpm run build

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: web
directory: dist
command: pages deploy dist --project-name=web
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
16 changes: 16 additions & 0 deletions .github/workflows/protect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Enforce preview branch for main merges
on:
pull_request:
branches:
- main

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Fail if not from preview branch
run: |
if [[ "${{ github.head_ref }}" != "preview" ]]; then
echo "Only pull requests from 'preview' branch can be merged into 'main'."
exit 1
fi
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web",
"type": "module",
"version": "0.0.1",
"version": "6.0.0",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand All @@ -11,26 +11,26 @@
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/rss": "^4.0.6",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/mdx": "^3.1.5",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@fontsource-variable/instrument-sans": "^5.1.0",
"@fontsource-variable/space-grotesk": "^5.0.18",
"@fontsource/instrument-serif": "^5.0.22",
"astro": "^4.9.2",
"astro-critters": "^2.1.10",
"astro-pagefind": "^1.5.0",
"@fontsource-variable/space-grotesk": "^5.1.0",
"@fontsource/instrument-serif": "^5.1.0",
"astro": "^4.15.4",
"astro-critters": "^2.2.0",
"astro-pagefind": "^1.6.0",
"clsx": "^2.1.1",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5"
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.4.11",
"typescript": "^5.6.2"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.13",
"@tailwindcss/typography": "^0.5.15",
"astro-robots-txt": "^1.0.0",
"pagefind": "^1.1.0",
"prettier": "^3.2.5",
"pagefind": "^1.1.1",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-tailwindcss": "^0.5.14",
Expand Down
38 changes: 19 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/images/store-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/store/octane-starter-kit/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions src/components/Button.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
interface Props {
id: string;
className?: string;
style: "primary" | "secondary" | "outlined";
size?: "normal" | "tall" | "taller";
disabled?: boolean;
}

const { id, style, size, className, disabled } = Astro.props;
---

<base-button data-id={id}>
<button
class:list={[
"flex w-full flex-nowrap justify-center rounded-full px-6 py-1.5 font-mono transition-colors disabled:cursor-not-allowed",
style === "primary" &&
"bg-black text-white disabled:bg-neutral-200 disabled:text-neutral-700",
style === "secondary" &&
"bg-neutral-300 text-black disabled:bg-neutral-200 disabled:text-neutral-700",
style === "outlined" &&
"border border-neutral-300 text-black duration-300 hover:bg-neutral-200/50 disabled:bg-neutral-100 disabled:text-neutral-700",
size === "normal" && "py-1.5",
size === "tall" && "py-2",
size === "taller" && "py-2.5",
]}
class={className}
disabled={disabled}
>
<div class="text-sm">
<slot />
</div>
</button>
</base-button>

<script>
import type { BaseButtonClickEvent } from "@types";

class BaseButton extends HTMLElement {
connectedCallback() {
const id: string = this.dataset.id as string;
const button = this.querySelector("button");
button?.addEventListener("click", () => onClick());

function onClick() {
const event = new CustomEvent<BaseButtonClickEvent>(
"base-button-click",
{
bubbles: true,
detail: {
id,
},
},
);

button?.dispatchEvent(event);
}
}
}

customElements.define("base-button", BaseButton);
</script>
2 changes: 1 addition & 1 deletion src/components/Container.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

---

<div class=`mx-auto max-w-screen-md px-6 page-spacing`>
<div class=`mx-auto max-w-screen-md px-6 mt-2 lg:page-spacing`>
<slot />
</div>
4 changes: 2 additions & 2 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function getLinkTitle(link: NavigationLink) {
{
footerGroup.map((group) => (
<div class="flex w-1/2 flex-col gap-2 px-2 md:w-auto md:px-0">
<h2 class="text-primary font-medium">
<span class="text-primary font-medium">
{t(getGroupTitle(group))}
</h2>
</span>
<ul class="flex flex-col gap-2">
{group.links.map((link) => (
<li class="hyphens-auto">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let currentNavItem = "";
---

<nav
class="bg-secondary/80 top-0 mx-auto flex h-fit w-full flex-col rounded-lg px-4 py-1 font-mono sm:max-w-screen-lg sm:py-0"
class="bg-secondary/80 top-0 mx-auto flex h-fit w-full flex-col rounded-lg py-1 pl-4 pr-2 font-mono sm:max-w-screen-lg sm:py-0"
aria-label="Global"
>
<div id="empty" class=""></div>
Expand Down
13 changes: 11 additions & 2 deletions src/components/Navigation/NavBarLink.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
import type { ui } from "@i18n/ui";
import { getLangFromUrl, useTranslations } from "@i18n/utils";
import {
getLangFromUrl,
useTranslatedPath,
useTranslations,
} from "@i18n/utils";
import type { NavigationLink } from "@types";

const { link } = Astro.props;

const lang = getLangFromUrl(Astro.url);
const translatePath = useTranslatedPath(lang);
const t = useTranslations(lang);

function getLinkTitle(link: NavigationLink) {
Expand All @@ -14,7 +19,11 @@ function getLinkTitle(link: NavigationLink) {
---

<li class="text-black">
<a href={link.url} target={link.external ? "_blank" : "_self"} class="py-3">
<a
href={link.external ? link.url : translatePath(link.url)}
target={link.external ? "_blank" : "_self"}
class="py-3"
>
{t(getLinkTitle(link))}
</a>
</li>
2 changes: 1 addition & 1 deletion src/components/News/Card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CollectionEntry } from "astro:content";
import { Image } from "astro:assets";
import FormattedDate from "./FormattedDate.astro";
import { getLangFromUrl, useTranslations } from "@i18n/utils";
import { getTranslatedSlug } from "@lib/utils";
import { getTranslatedSlug } from "@i18n/utils";
import { ui } from "@i18n/ui";

type Props = {
Expand Down
12 changes: 10 additions & 2 deletions src/components/News/FormattedDate.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
---
import { getLangFromUrl } from "@i18n/utils";

interface Props {
date: Date;
lang: string;
lang?: string;
}

const { date, lang } = Astro.props;
let { date, lang } = Astro.props;

const language = getLangFromUrl(Astro.url);

if (!lang) {
lang = language;
}
---

<time datetime={date.toISOString()}>
Expand Down
Loading
Loading