diff --git a/src/app/App.tsx b/src/app/App.tsx index f00af006..3c7c540d 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -66,7 +66,7 @@ const App: FCWithDeps = (
-
+
} /> } /> diff --git a/src/common/Home.scss b/src/common/Home.scss index 58798fd2..18eb7826 100644 --- a/src/common/Home.scss +++ b/src/common/Home.scss @@ -1,50 +1,7 @@ @import 'node_modules/@shlinkio/shlink-frontend-kit/dist/base'; -@import '../utils/mixins/vertical-align'; - -$mainCardWidth: 720px; -$fiveColumnsSize: .4167; // 12 / 5 -> Can't use "/" operator in latest dart-sass - -.home { - position: relative; - padding-top: 15px; - width: 100%; - - @media (min-width: $mdMin) { - padding-top: 0; - height: calc(100vh - #{$headerHeight} - #{($footer-height + $footer-margin)}); - } -} - -.home__logo-wrapper { - padding: 1.5rem !important; - height: 100% !important; - min-height: 300px; -} - -.home__logo { - @include vertical-align(); - - width: calc(#{$mainCardWidth * $fiveColumnsSize} - 3rem); -} - -.home__main-card { - margin: 0 auto; - max-width: $mainCardWidth; - - @media (min-width: $mdMin) { - @include vertical-align(); - } -} - -.home__title-wrapper { - padding: 1.5rem !important; - border-bottom: 1px solid var(--border-color); -} .home__title { - text-align: center; font-size: 1.75rem; - margin: 0; @media (min-width: $mdMin) { font-size: 2.2rem; diff --git a/src/common/Home.tsx b/src/common/Home.tsx index 42dc695d..3b6d31ab 100644 --- a/src/common/Home.tsx +++ b/src/common/Home.tsx @@ -1,9 +1,10 @@ import { faExternalLinkAlt, faPlus } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { clsx } from 'clsx'; import { useEffect } from 'react'; import { ExternalLink } from 'react-external-link'; import { Link, useNavigate } from 'react-router-dom'; -import { Card, Row } from 'reactstrap'; +import { Card } from 'reactstrap'; import type { ServersMap } from '../servers/data'; import { ServersListGroup } from '../servers/ServersListGroup'; import { ShlinkLogo } from './img/ShlinkLogo'; @@ -27,33 +28,36 @@ export const Home = ({ servers }: HomeProps) => { }, [serversList, navigate]); return ( -
- - -
-
-
- -
+
+ +
+
+
+
-
-
-

Welcome!

-
+ +
+

+ Welcome! +

{!hasServers && ( -
-

This application will help you manage your Shlink servers.

-

+

+

This application will help you manage your Shlink servers.

+

- Add a server + Add a server

-

+

- Learn more about Shlink + Learn more about Shlink +

@@ -61,7 +65,7 @@ export const Home = ({ servers }: HomeProps) => { )}
- +
); diff --git a/test/app/App.test.tsx b/test/app/App.test.tsx index 2be2b3c4..ab6a9405 100644 --- a/test/app/App.test.tsx +++ b/test/app/App.test.tsx @@ -56,7 +56,7 @@ describe('', () => { it.each([ ['/foo', 'shlink-wrapper'], ['/bar', 'shlink-wrapper'], - ['/', 'shlink-wrapper d-flex d-md-block align-items-center'], + ['/', 'shlink-wrapper d-flex align-items-center pt-3'], ])('renders expected classes on shlink-wrapper based on current pathname', async (pathname, expectedClasses) => { const { container } = await setUp(pathname); const shlinkWrapper = container.querySelector('.shlink-wrapper');