A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: footer layout adjustment
shuai480474d7beae
diff --git a/i18n/en_US.yaml b/i18n/en_US.yamlindex 40017b75..b9cbccfa 100644--- a/i18n/en_US.yaml+++ b/i18n/en_US.yaml@@ -1208,9 +1208,7 @@ ui:search:placeholder: Searchfooter:- build_on: >-- Powered by <1> Apache Answer </1>- the open-source software that powers Q&A- communities.<br />Made with love © {{cc}}.+ build_on: Powered by <1> Apache Answer </1>upload_img:name: Changeloading: loading...@@ -1807,6 +1805,7 @@ ui:branding: Brandinglegal: Legalwrite: Write+ terms: Termstos: Terms of Serviceprivacy: Privacyseo: SEOdiff --git a/i18n/zh_CN.yaml b/i18n/zh_CN.yamlindex 0f7a2515..9d6605a1 100644--- a/i18n/zh_CN.yaml+++ b/i18n/zh_CN.yaml@@ -1190,8 +1190,7 @@ ui:search:placeholder: 搜索footer:- build_on: >-- 由 <1>Apache Answer</1> 提供动力 - 驱动问答社区的开源软件。<br />用爱制造 © {{cc}}.+ build_on: 由 <1>Apache Answer</1> 提供动力upload_img:name: 更改loading: 加载中...@@ -1768,6 +1767,7 @@ ui:branding: 品牌legal: 法律条款write: 撰写+ terms: 服务条款tos: 服务条款privacy: 隐私政策seo: SEOdiff --git a/ui/src/components/Footer/index.tsx b/ui/src/components/Footer/index.tsxindex ad6e2755..340264b9 100644--- a/ui/src/components/Footer/index.tsx+++ b/ui/src/components/Footer/index.tsx@@ -21,6 +21,7 @@ import React from 'react';import { Link } from 'react-router-dom';import { Trans, useTranslation } from 'react-i18next';+import Row from 'react-bootstrap/Row';import dayjs from 'dayjs';import { siteInfoStore } from '@/stores';@@ -29,34 +30,37 @@ const Index = () => {const { t } = useTranslation('translation', { keyPrefix: 'footer' }); // Scoped translations for footerconst fullYear = dayjs().format('YYYY');const siteName = siteInfoStore((state) => state.siteInfo.name);- const cc = `${fullYear} ${siteName}`;+ const cc = `${siteName} © ${fullYear}`;return (- <footer className="py-3 w-100">- <p className="text-center mb-0 small">- {/* Link to Terms of Service with right margin */}- <Link to="/tos" className="me-3">- {t('label', { keyPrefix: 'admin.legal.terms_of_service' })}- </Link>-- {/* Link to Privacy Policy with right margin for spacing */}- <Link to="/privacy">- {t('label', { keyPrefix: 'admin.legal.privacy_policy' })}- </Link>- </p>- <p className="text-center mb-0 small">- <Trans i18nKey="footer.build_on" values={{ cc }}>- Powered by- {/* eslint-disable-next-line react/jsx-no-target-blank */}- <a href="https://answer.apache.org" target="_blank">- Apache Answer- </a>- - the open-source software that powers Q&A communities.- <br />- Made with love. © 2022 Answer.- </Trans>- </p>- </footer>+ <Row>+ <footer className="py-3 d-flex flex-wrap align-items-center justify-content-between text-secondary small">+ <div className="d-flex align-items-center">+ <div className="me-3">{cc}</div>++ <Link to="/tos" className="me-3 link-secondary">+ {t('terms', { keyPrefix: 'nav_menus' })}+ </Link>++ {/* Link to Privacy Policy with right margin for spacing */}+ <Link to="/privacy" className="link-secondary">+ {t('privacy', { keyPrefix: 'nav_menus' })}+ </Link>+ </div>+ <div>+ <Trans i18nKey="footer.build_on" values={{ cc }}>+ Powered by+ <a+ href="https://answer.apache.org"+ target="_blank"+ className="link-secondary"+ rel="noreferrer">+ Apache Answer+ </a>+ </Trans>+ </div>+ </footer>+ </Row>);};diff --git a/ui/src/index.scss b/ui/src/index.scssindex 92f143d5..13526113 100644--- a/ui/src/index.scss+++ b/ui/src/index.scss@@ -127,8 +127,6 @@ img[src=''] {margin-top: auto !important;padding-bottom: constant(safe-area-inset-bottom);padding-bottom: env(safe-area-inset-bottom);- padding-left: 12px !important;- padding-right: 12px !important;}.bg-f5 {diff --git a/ui/src/pages/SideNavLayout/index.tsx b/ui/src/pages/SideNavLayout/index.tsxindex 0db8593e..3ace2165 100644--- a/ui/src/pages/SideNavLayout/index.tsx+++ b/ui/src/pages/SideNavLayout/index.tsx@@ -36,9 +36,10 @@ const Index: FC = () => {<div className="d-flex justify-content-center px-0 px-md-4"><div className="answer-container"><Outlet />++ <Footer /></div></div>- <Footer /></div></div>);