From 84bbb40e25e7372f1ab23d5f38cdfff836cc3562 Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Sun, 30 Oct 2022 17:09:17 +0100 Subject: [PATCH] Fix mobile views --- src/css/App.less | 10 ++++++++-- src/pages/Hub.tsx | 6 +++++- src/pages/User.tsx | 25 ++++++++++++++----------- src/pages/auth/Profile.tsx | 24 +++++++++++++----------- 4 files changed, 40 insertions(+), 25 deletions(-) diff --git a/src/css/App.less b/src/css/App.less index c2a86a7..9afdeb1 100644 --- a/src/css/App.less +++ b/src/css/App.less @@ -11,7 +11,8 @@ body { background-color: @main-dark; } -html, body { +html, +body { overscroll-behavior-x: none; } @@ -172,7 +173,8 @@ select:-webkit-autofill:focus { font-size: 2em; } - code, pre { + code, + pre { background-color: @main; border-radius: @border-radius-base; } @@ -201,4 +203,8 @@ select:-webkit-autofill:focus { &.unlisted { opacity: 0.5; } + + code { + white-space: nowrap; + } } diff --git a/src/pages/Hub.tsx b/src/pages/Hub.tsx index 83098f3..400cd91 100644 --- a/src/pages/Hub.tsx +++ b/src/pages/Hub.tsx @@ -118,7 +118,11 @@ const Hub = () => { <> {tune.vehicleName} - {tune.author}, {tune.published} + + + {tune.authorUsername} + , {tune.published} + {tune.engineMake}, {tune.engineCode}, {tune.displacement}, {tune.cylindersCount} cylinders, {tune.aspiration} {tune.signature} diff --git a/src/pages/User.tsx b/src/pages/User.tsx index ed1b675..a4faa20 100644 --- a/src/pages/User.tsx +++ b/src/pages/User.tsx @@ -12,6 +12,7 @@ import { Divider, List, Pagination, + Space, Typography, } from 'antd'; import { ArrowRightOutlined } from '@ant-design/icons'; @@ -77,17 +78,19 @@ const Profile = () => { ]} className={tune.visibility} > - - {tune.vehicleName} {tune.signature} - } - description={<> - {tune.engineMake}, {tune.engineCode}, {tune.displacement}, {tune.aspiration} - } - /> -
- {tune.published} -
+ + + {tune.vehicleName} {tune.signature} + } + description={<> + {tune.engineMake}, {tune.engineCode}, {tune.displacement}, {tune.aspiration} + } + /> +
+ {tune.published} +
+
)} footer={ diff --git a/src/pages/auth/Profile.tsx b/src/pages/auth/Profile.tsx index ac5f8e6..4d6e1d9 100644 --- a/src/pages/auth/Profile.tsx +++ b/src/pages/auth/Profile.tsx @@ -212,17 +212,19 @@ const Profile = () => {