📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Added Media & Press page
Blue Mouse53820db1c64b
diff --git a/public/locales/en.json b/public/locales/en.jsonindex 462e3d420..94e3af28e 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -723,6 +723,17 @@"title": "Beta","description": "This feature is in the Beta phase. Use it with caution as there may be side effects."},+ "press": {+ "description": "Our assets for use in your articles and other media. If you use any of the assets below, we'd be grateful if you'd leave a link to one of our pages on your website. If you need other assets or have any questions, please <url>contact us</url>.",+ "logos": "Logos",+ "logo": "Logo",+ "logoNoText": "Logo without text",+ "logoWhiteText": "Logo with white text",+ "font": {+ "title": "Font",+ "description": "We use {{font}} font on Swetrix websites. See more information about it on it's <url>official website</url>."+ }+ },"titles": {"recovery": "Account recovery","signin": "Sign in",@@ -736,7 +747,8 @@"billing": "Billing","contact": "Contact","changelog": "Changelog",- "main": "Ultimate open-source analytics to satisfy all your needs"+ "main": "Ultimate open-source analytics to satisfy all your needs",+ "press": "Media & Press"},"footer": {"slogan": "The best apps need the best services.",diff --git a/src/App.js b/src/App.jsindex 97918b77f..9f9d919ba 100644--- a/src/App.js+++ b/src/App.js@@ -53,6 +53,7 @@ const CookiePolicy = lazy(() => import('pages/CookiePolicy'))const CaptchaSettings = lazy(() => import('pages/Captcha/Settings'))const CaptchaView = lazy(() => import('pages/Captcha/View'))const ConfirmReportsShare = lazy(() => import('pages/Project/Settings/Emails/ConfirmReportsShare'))+const MediaAndPress = lazy(() => import('pages/Press'))const minimalFooterPages = ['/projects', '/dashboard', '/settings', '/contact',@@ -214,6 +215,7 @@ const App = () => {<Route path={routes.new_captcha} component={CaptchaSettings} exact /><Route path={routes.captcha} component={CaptchaView} exact /><Route path={routes.confirm_subcription} component={ConfirmReportsShare} exact />+ <Route path={routes.press} component={MediaAndPress} exact /><Route path='*' component={NotFound} /></Switch></Suspense>diff --git a/src/pages/Press/index.jsx b/src/pages/Press/index.jsxnew file mode 100644index 000000000..a01d11505--- /dev/null+++ b/src/pages/Press/index.jsx@@ -0,0 +1,116 @@+/* eslint-disable jsx-a11y/anchor-has-content */+import React from 'react'+import { Link } from 'react-router-dom'+import { useTranslation, Trans } from 'react-i18next'++import Title from 'components/Title'+import routes from 'routes'++const FONT_INTER_URL = 'https://rsms.me/inter/'+const FONT_NAME = 'Inter'++const LogoComponent = ({ description, logoSVG, logoPNG }) => (+ <p>+ <b className='font-bold text-gray-900 dark:text-gray-50 tracking-tight'>+ {description}+ </b>+ <img+ className='h-20 mt-5 mb-2'+ src={logoSVG || logoPNG}+ alt={description}+ />+ {logoSVG && (+ <a+ href={logoSVG}+ target='_blank'+ rel='noopener noreferrer'+ className='hover:underline text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'+ >+ SVG+ </a>+ )}+ {logoSVG && logoPNG && (+ <span className='text-gray-900 dark:text-gray-50'> | </span>+ )}+ {logoPNG && (+ <a+ href={logoPNG}+ target='_blank'+ rel='noopener noreferrer'+ className='hover:underline text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'+ >+ PNG+ </a>+ )}+ </p>+)++const Press = () => {+ const { t } = useTranslation('common')++ return (+ <Title title={t('titles.press')}>+ <div className='bg-gray-50 dark:bg-gray-800 min-h-min-footer'>+ <div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 whitespace-pre-line'>+ <h1 className='text-4xl font-bold text-gray-900 dark:text-gray-50 tracking-tight'>+ {t('titles.press')}+ </h1>+ <p className='mt-2 text-lg text-gray-900 dark:text-gray-50 tracking-tight'>+ <Trans+ i18nKey='press.description'+ components={{+ url: <Link to={routes.contact} className='font-medium hover:underline text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500' />,+ }}+ />+ </p>++ {/* Logos */}+ <h2 className='text-2xl mt-2 font-bold text-gray-900 dark:text-gray-50 tracking-tight'>+ {t('press.logos')}+ </h2>+ <div className='grid grid-cols-2 gap-4 mt-2'>+ <LogoComponent+ description={t('press.logo')}+ logoSVG='/assets/logo_blue.svg'+ logoPNG='/assets/logo_blue.png'+ />+ <LogoComponent+ description={t('press.logoWhiteText')}+ logoSVG='/assets/logo_white.svg'+ logoPNG='/assets/logo_white.png'+ />+ </div>+ <div className='grid grid-cols-2 gap-4 mt-8'>+ <LogoComponent+ description={t('press.logoNoText')}+ logoPNG='/logo512.png'+ />+ </div>++ {/* Font */}+ <h2 className='text-2xl mt-8 font-bold text-gray-900 dark:text-gray-50 tracking-tight'>+ {t('press.font.title')}+ </h2>+ <p className='mt-2 text-lg text-gray-900 dark:text-gray-50 tracking-tight'>+ <Trans+ i18nKey='press.font.description'+ components={{+ url: <a+ href={FONT_INTER_URL}+ className='font-medium hover:underline text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'+ target='_blank'+ rel='noopener noreferrer'+ />,+ }}+ values={{+ font: FONT_NAME,+ }}+ />+ </p>+ </div>+ </div>+ </Title>+ )+}++export default Pressdiff --git a/src/routes.js b/src/routes.jsindex 839ba4699..d5b487419 100644--- a/src/routes.js+++ b/src/routes.js@@ -26,6 +26,7 @@ const routes = Object.freeze({about: '/about',create_alert: '/projects/:pid/alerts/create',alert_settings: '/projects/:pid/alerts/settings/:id',+ press: '/press',})export default routes