import { clsx } from 'clsx' import { For, createSignal, onMount } from 'solid-js' import { useLocalize } from '~/context/localize' import { Icon } from '../_shared/Icon' import { Newsletter } from '../_shared/Newsletter' import styles from './Footer.module.scss' const social = [ { name: 'facebook', href: 'https://facebook.com/discoursio' }, { name: 'vk', href: 'https://vk.com/discoursio' }, { name: 'twitter', href: 'https://twitter.com/discours_io' }, { name: 'telegram', href: 'https://t.me/discoursio' } ] type FooterItem = { title: string slug: string rel?: string } export const FooterView = () => { const { t, lang } = useLocalize() const [footerLinks, setFooterLinks] = createSignal>([]) onMount(() => { setFooterLinks([ { header: t('About the project'), items: [ { title: t('Discours Manifest'), slug: '/manifest' }, { title: t('How it works'), slug: '/guide' }, { title: t('Dogma'), slug: '/dogma' }, { title: t('Our principles'), slug: '/principles' }, { title: t('How to write an article'), slug: '/how-to-write-a-good-article' } ] }, { header: t('Participating'), items: [ { title: t('Suggest an idea'), slug: '/connect' }, { title: t('Become an author'), slug: '/edit/new' }, { title: t('Support Discours'), slug: '/support' }, { title: t('Cooperate with Discours'), slug: 'https://docs.google.com/forms/d/e/1FAIpQLSeNNvIzKlXElJtkPkYiXl-jQjlvsL9u4-kpnoRjz1O8Wo40xQ/viewform' } ] }, { header: t('Sections'), items: [ { title: t('Authors'), slug: '/author' }, { title: t('Communities'), slug: '/community' }, { title: t('Partners'), slug: '/partners' }, { title: t('Special projects'), slug: '/projects' }, { title: lang() === 'ru' ? 'English' : 'Русский', slug: `?lng=${lang() === 'ru' ? 'en' : 'ru'}`, rel: 'external' } ] } ]) }) return ( ) }