فوترِ ساده
پیشنمایش تمامصفحهبخشِ فوترِ وسطچین: برند، یک ردیف لینک، شبکههای اجتماعی و کپیرایت؛ برای سایتهای کوچک.
۱. نصب کامپوننتها
این بلاک از ۴ آیتم دیگ استفاده میکند: control-sizefootericonspersian
npx digdesign@latest add https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/footer.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.jsonpnpm dlx digdesign@latest add https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/footer.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.jsonyarn dlx digdesign@latest add https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/footer.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.jsonbunx --bun digdesign@latest add https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/footer.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.jsonnpx digdesign@latest add control-size footer persian --framework vuepnpm dlx digdesign@latest add control-size footer persian --framework vueyarn dlx digdesign@latest add control-size footer persian --framework vuebunx --bun digdesign@latest add control-size footer persian --framework vueهیچکدام از کامپوننتهای این بلاک هنوز برای Svelte پورت نشده است.
npx digdesign@latest add control-size footer icons persian --framework angularpnpm dlx digdesign@latest add control-size footer icons persian --framework angularyarn dlx digdesign@latest add control-size footer icons persian --framework angularbunx --bun digdesign@latest add control-size footer icons persian --framework angularnpx digdesign@latest add control-size persian --framework androidpnpm dlx digdesign@latest add control-size persian --framework androidyarn dlx digdesign@latest add control-size persian --framework androidbunx --bun digdesign@latest add control-size persian --framework android۲. کد صفحه
کد را در صفحهٔ پروژهتان بگذارید (React: app/<route>/page.tsx) و متنها، داده و هندلرها را با محصول خودتان عوض کنید. با سوییچر فریمورک کدِ همین صفحه در فریمورک دیگر را ببینید.
"use client"
import { InstagramLogo, LinkedInLogo, TelegramLogo } from "@/components/icons"
import { ControlSizeProvider } from "@/components/ui/control-size"
import { Footer, FooterSocialLink, FooterSocialLinks } from "@/components/ui/footer"
import { toFaDigits } from "@/lib/persian"
const LINKS = ["امکانات", "قیمتها", "مجله", "درباره ما", "تماس"]
/**
* فوترِ ساده و وسطچین: نشانِ برند، یک ردیف لینکِ اصلی، شبکههای اجتماعی و کپیرایت؛
* برای سایتهای کوچک و صفحههای تکمحصولی که فوترِ ستونی برایشان زیاد است.
*/
export default function FooterSimpleBlock() {
return (
<ControlSizeProvider size="xl" asChild>
<Footer>
<div className="mx-auto flex w-full max-w-6xl flex-col items-center gap-5 px-4 py-8 text-center sm:px-6">
<span className="flex items-center gap-2 text-lg font-black">
<span aria-hidden className="size-3 rounded-sm bg-[var(--dig-violet-500)]" />
آوند
</span>
<nav aria-label="لینکهای فوتر">
<ul className="flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
{LINKS.map((link) => (
<li key={link}>
<a href="#" className="text-muted-foreground hover:text-foreground">
{link}
</a>
</li>
))}
</ul>
</nav>
<FooterSocialLinks>
<FooterSocialLink href="#" aria-label="اینستاگرام">
<InstagramLogo />
</FooterSocialLink>
<FooterSocialLink href="#" aria-label="تلگرام">
<TelegramLogo />
</FooterSocialLink>
<FooterSocialLink href="#" aria-label="لینکدین">
<LinkedInLogo />
</FooterSocialLink>
</FooterSocialLinks>
<p className="text-sm text-muted-foreground">© {toFaDigits(1405)} آوند. همهٔ حقوق محفوظ است.</p>
</div>
</Footer>
</ControlSizeProvider>
)
}
<script setup lang="ts">
import ControlSize from "@/components/ui/ControlSize.vue"
import Footer from "@/components/ui/Footer.vue"
import FooterSocialLink from "@/components/ui/FooterSocialLink.vue"
import FooterSocialLinks from "@/components/ui/FooterSocialLinks.vue"
import { DigIcon } from "@/lib/icons"
import { toFaDigits } from "@/lib/persian"
const LINKS = ["امکانات", "قیمتها", "مجله", "درباره ما", "تماس"]
/**
* فوترِ ساده و وسطچین: نشانِ برند، یک ردیف لینکِ اصلی، شبکههای اجتماعی و کپیرایت؛
* برای سایتهای کوچک و صفحههای تکمحصولی که فوترِ ستونی برایشان زیاد است.
* همان صفحهٔ `footer-simple` نسخهٔ React.
*/
</script>
<template>
<ControlSize size="xl" as-child>
<Footer>
<div class="mx-auto flex w-full max-w-6xl flex-col items-center gap-5 px-4 py-8 text-center sm:px-6">
<span class="flex items-center gap-2 text-lg font-black">
<span aria-hidden="true" class="size-3 rounded-sm bg-[var(--dig-violet-500)]" />
آوند
</span>
<nav aria-label="لینکهای فوتر">
<ul class="flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
<li v-for="link in LINKS" :key="link">
<a href="#" class="text-muted-foreground hover:text-foreground">{{ link }}</a>
</li>
</ul>
</nav>
<FooterSocialLinks>
<FooterSocialLink href="#" aria-label="اینستاگرام"><DigIcon name="instagram-logo" /></FooterSocialLink>
<FooterSocialLink href="#" aria-label="تلگرام"><DigIcon name="telegram-logo" /></FooterSocialLink>
<FooterSocialLink href="#" aria-label="لینکدین"><DigIcon name="linked-in-logo" /></FooterSocialLink>
</FooterSocialLinks>
<p class="text-sm text-muted-foreground">© {{ toFaDigits(1405) }} آوند. همهٔ حقوق محفوظ است.</p>
</div>
</Footer>
</ControlSize>
</template>
کدِ این بلاک هنوز برای Svelte نوشته نشده است.
این موارد هنوز برای Svelte آماده نیستند: control-sizefooterpersianآیکون instagram-logoآیکون linked-in-logoآیکون telegram-logo
کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="svelte" ایجنت آن را با کامپوننتهای Svelte میسازد.
import { ChangeDetectionStrategy, Component } from "@angular/core"
import { DigControlSize } from "@/components/ui/control-size"
import {
DigFooter,
DigFooterSocialLink,
DigFooterSocialLinks,
} from "@/components/ui/footer"
import { DigIcon } from "@/lib/icons"
import { toFaDigits } from "@/lib/persian"
const LINKS = ["امکانات", "قیمتها", "مجله", "درباره ما", "تماس"]
@Component({
selector: "dig-block-footer-simple",
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
DigControlSize,
DigFooter,
DigFooterSocialLink,
DigFooterSocialLinks,
DigIcon,
],
template: `
<footer digFooter digControlSize="xl">
<div
class="mx-auto flex w-full max-w-6xl flex-col items-center gap-5 px-4 py-8 text-center sm:px-6"
>
<span class="flex items-center gap-2 text-lg font-black">
<span
aria-hidden="true"
class="size-3 rounded-sm bg-[var(--dig-violet-500)]"
></span>
آوند
</span>
<nav aria-label="لینکهای فوتر">
<ul class="flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
@for (link of LINKS; track link) {
<li>
<a
href="#"
class="text-muted-foreground hover:text-foreground"
>{{ link }}</a
>
</li>
}
</ul>
</nav>
<div digFooterSocialLinks>
<a digFooterSocialLink href="#" aria-label="اینستاگرام"
><svg digIcon="instagram-logo"></svg
></a>
<a digFooterSocialLink href="#" aria-label="تلگرام"
><svg digIcon="telegram-logo"></svg
></a>
<a digFooterSocialLink href="#" aria-label="لینکدین"
><svg digIcon="linked-in-logo"></svg
></a>
</div>
<p class="text-sm text-muted-foreground">
© {{ toFaDigits(1405) }} آوند. همهٔ حقوق محفوظ است.
</p>
</div>
</footer>
`,
})
export class FooterSimpleBlock {
readonly LINKS = LINKS
readonly toFaDigits = toFaDigits
}
کدِ این بلاک هنوز برای Android نوشته نشده است.
این موارد هنوز برای Android آماده نیستند: footer
کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="android" ایجنت آن را با کامپوننتهای Android میسازد.