Moved shlink versions to the outer element so that's always visible

This commit is contained in:
Alejandro Celaya
2020-09-06 12:36:17 +02:00
parent 90abf29db9
commit b814f500de
12 changed files with 152 additions and 426 deletions

View File

@@ -2,7 +2,7 @@
.home {
text-align: center;
height: calc(100vh - #{$headerHeight});
height: calc(100vh - #{$headerHeight} - #{($footer-height + $footer-margin)});
display: flex;
align-items: center;
justify-content: center;

View File

@@ -33,25 +33,11 @@
color: white;
}
$footer-height: 2.3rem;
$footer-margin: .8rem;
.menu-layout__container {
padding: 20px 0 ($footer-height + $footer-margin);
padding: 20px 0 0;
min-height: 100%;
margin-bottom: -($footer-height + $footer-margin);
@media (min-width: $mdMin) {
padding: 30px 15px ($footer-height + $footer-margin);
}
}
.menu-layout__footer {
height: $footer-height;
margin-top: $footer-margin;
padding: 0;
@media (min-width: $mdMin) {
padding: 0 15px;
padding: 30px 15px 0;
}
}

View File

@@ -19,7 +19,6 @@ const MenuLayout = (
CreateShortUrl: FC,
ShortUrlVisits: FC,
TagVisits: FC,
ShlinkVersions: FC,
ServerError: FC,
) => withSelectedServer(({ location, selectedServer }) => {
const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle();
@@ -71,10 +70,6 @@ const MenuLayout = (
/>
</Switch>
</div>
<div className="menu-layout__footer text-center text-md-right">
<ShlinkVersions />
</div>
</div>
</div>
</Swipeable>

View File

@@ -1,3 +1,3 @@
.no-menu-wrapper {
padding: 40px 20px;
padding: 40px 20px 20px;
}

View File

@@ -14,12 +14,7 @@ export interface ShlinkVersionsProps {
className?: string;
}
interface VersionLinkProps {
project: 'shlink' | 'shlink-web-client';
version: string;
}
const VersionLink = ({ project, version }: VersionLinkProps) => (
const VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => (
<ExternalLink href={`https://github.com/shlinkio/${project}/releases/${version}`} className="text-muted">
<b>{version}</b>
</ExternalLink>

View File

@@ -30,7 +30,6 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter:
'CreateShortUrl',
'ShortUrlVisits',
'TagVisits',
'ShlinkVersions',
'ServerError',
);
bottle.decorator('MenuLayout', connect([ 'selectedServer', 'shortUrlsListParams' ], [ 'selectServer' ]));