From a96993fda9475a2f614e30f0f29c6ee90197e9a5 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 21 Feb 2021 13:32:49 -0800 Subject: [PATCH] feat: Add PWA support to subdomains (#1915) * fix: Remove overscroll * Remove title from fixed header in PWA as it's displayed immediately above in application title --- app/components/Header.js | 5 +++++ shared/styles/globals.js | 2 +- webpack.config.js | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/components/Header.js b/app/components/Header.js index 9a0e6790..57fb7c30 100644 --- a/app/components/Header.js +++ b/app/components/Header.js @@ -94,6 +94,11 @@ const Title = styled(Flex)` ${breakpoint("tablet")` flex-grow: 1; `}; + + @media (display-mode: standalone) { + overflow: hidden; + flex-grow: 0 !important; + } `; const Actions = styled(Flex)` diff --git a/shared/styles/globals.js b/shared/styles/globals.js index b8a27f32..4ccccda4 100644 --- a/shared/styles/globals.js +++ b/shared/styles/globals.js @@ -31,7 +31,7 @@ export default createGlobalStyle` font-size: 16px; line-height: 1.5; color: ${(props) => props.theme.text}; - + overscroll-behavior-y: none; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; diff --git a/webpack.config.js b/webpack.config.js index 7fcbf065..e29237c0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -66,7 +66,8 @@ module.exports = { short_name: "Outline", background_color: "#fff", theme_color: "#fff", - start_url: process.env.URL, + start_url: "/", + publicPath: "/static/", display: "standalone", icons: [ {