Fix web splash (#5456)
* Fix web splash * Untangle base styles * Fix id name, remove log
This commit is contained in:
@@ -32,6 +32,53 @@
|
|||||||
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf">
|
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf">
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/**
|
||||||
|
* Minimum styles required to render splash.
|
||||||
|
*
|
||||||
|
* ALL OTHER STYLES BELONG IN `src/style.css`
|
||||||
|
*
|
||||||
|
* THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
|
||||||
|
*/
|
||||||
|
html {
|
||||||
|
background-color: white;
|
||||||
|
scrollbar-gutter: stable both-edges;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
/* Platform-specific reset */
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
font-synthesis-weight: none;
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#root {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
#splash {
|
||||||
|
position: fixed;
|
||||||
|
width: 100px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateX(-50%) translateY(-50%) translateY(-50px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
{% include "scripts.html" %}
|
{% include "scripts.html" %}
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
||||||
@@ -48,7 +95,7 @@
|
|||||||
<body>
|
<body>
|
||||||
{%- block body_all %}
|
{%- block body_all %}
|
||||||
<div id="root">
|
<div id="root">
|
||||||
<div id="preload">
|
<div id="splash">
|
||||||
<!-- Bluesky SVG -->
|
<!-- Bluesky SVG -->
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320"><path fill="#0085ff" d="M180 142c-16.3-31.7-60.7-90.8-102-120C38.5-5.9 23.4-1 13.5 3.4 2.1 8.6 0 26.2 0 36.5c0 10.4 5.7 84.8 9.4 97.2 12.2 41 55.7 55 95.7 50.5-58.7 8.6-110.8 30-42.4 106.1 75.1 77.9 103-16.7 117.3-64.6 14.3 48 30.8 139 116 64.6 64-64.6 17.6-97.5-41.1-106.1 40 4.4 83.5-9.5 95.7-50.5 3.7-12.4 9.4-86.8 9.4-97.2 0-10.3-2-27.9-13.5-33C336.5-1 321.5-6 282 22c-41.3 29.2-85.7 88.3-102 120Z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320"><path fill="#0085ff" d="M180 142c-16.3-31.7-60.7-90.8-102-120C38.5-5.9 23.4-1 13.5 3.4 2.1 8.6 0 26.2 0 36.5c0 10.4 5.7 84.8 9.4 97.2 12.2 41 55.7 55 95.7 50.5-58.7 8.6-110.8 30-42.4 106.1 75.1 77.9 103-16.7 117.3-64.6 14.3 48 30.8 139 116 64.6 64-64.6 17.6-97.5-41.1-106.1 40 4.4 83.5-9.5 95.7-50.5 3.7-12.4 9.4-86.8 9.4-97.2 0-10.3-2-27.9-13.5-33C336.5-1 321.5-6 282 22c-41.3 29.2-85.7 88.3-102 120Z"/></svg>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+39
-83
@@ -1,3 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* IMPORTANT
|
||||||
|
*
|
||||||
|
* Some of these styles are duplicated in the `web/index.html` and
|
||||||
|
* `bskyweb/templates/base.html` files. Depending on what you're updating, you
|
||||||
|
* may need to touch all three. Ask Eric if you aren't sure.
|
||||||
|
*/
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Inter-Regular';
|
font-family: 'Inter-Regular';
|
||||||
src: local('Inter-Regular'),
|
src: local('Inter-Regular'),
|
||||||
@@ -96,46 +104,43 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the react-native-web reset:
|
* BEGIN STYLES
|
||||||
* https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/exports/StyleSheet/initialRules.js
|
*
|
||||||
|
* HTML & BODY STYLES IN `web/index.html` and `bskyweb/templates/base.html`
|
||||||
*/
|
*/
|
||||||
html,
|
:root {
|
||||||
body,
|
--text: black;
|
||||||
#root {
|
--background: white;
|
||||||
width: 100%;
|
--backgroundLight: hsl(211, 20%, 95%);
|
||||||
/* To smooth any scrolling behavior */
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
/* Allows content to fill the viewport and go beyond the bottom */
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
}
|
||||||
#root {
|
@media (prefers-color-scheme: dark) {
|
||||||
flex-shrink: 0;
|
:root {
|
||||||
flex-basis: auto;
|
color-scheme: dark;
|
||||||
flex-grow: 1;
|
--text: white;
|
||||||
display: flex;
|
--background: black;
|
||||||
flex: 1;
|
--backgroundLight: hsl(211, 20%, 20%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html.theme--light {
|
||||||
/* Prevent text size change on orientation change https://gist.github.com/tfausak/2222823#file-ios-8-web-app-html-L138 */
|
--text: black;
|
||||||
-webkit-text-size-adjust: 100%;
|
--background: white;
|
||||||
height: calc(100% + env(safe-area-inset-top));
|
--backgroundLight: hsl(211, 20%, 95%);
|
||||||
scrollbar-gutter: stable both-edges;
|
background-color: white;
|
||||||
}
|
}
|
||||||
html,
|
html.theme--dark {
|
||||||
body {
|
color-scheme: dark;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
background-color: black;
|
||||||
'Liberation Sans', Helvetica, Arial, sans-serif;
|
--text: white;
|
||||||
|
--background: black;
|
||||||
|
--backgroundLight: hsl(211, 20%, 20%);
|
||||||
}
|
}
|
||||||
|
html.theme--dim {
|
||||||
#preload {
|
color-scheme: dark;
|
||||||
width: 100px;
|
background-color: hsl(211, 28%, 12%);
|
||||||
position: fixed;
|
--text: white;
|
||||||
left: 50%;
|
--background: hsl(211, 20%, 4%);
|
||||||
top: 50%;
|
--backgroundLight: hsl(211, 20%, 10%);
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Buttons and inputs have a font set by UA, so we'll have to reset that */
|
/* Buttons and inputs have a font set by UA, so we'll have to reset that */
|
||||||
@@ -146,42 +151,6 @@ textarea {
|
|||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Color theming */
|
|
||||||
/* Default will always be white */
|
|
||||||
:root {
|
|
||||||
--text: black;
|
|
||||||
--background: white;
|
|
||||||
--backgroundLight: hsl(211, 20%, 95%);
|
|
||||||
}
|
|
||||||
/* This gives us a black background when system is dark and we have not loaded the theme/color scheme values in JS */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--text: white;
|
|
||||||
--background: black;
|
|
||||||
--backgroundLight: hsl(211, 20%, 20%);
|
|
||||||
color-scheme: dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Overwrite those preferences with the selected theme */
|
|
||||||
html.theme--light {
|
|
||||||
--text: black;
|
|
||||||
--background: white;
|
|
||||||
--backgroundLight: hsl(211, 20%, 95%);
|
|
||||||
}
|
|
||||||
html.theme--dark {
|
|
||||||
--text: white;
|
|
||||||
--background: black;
|
|
||||||
--backgroundLight: hsl(211, 20%, 20%);
|
|
||||||
color-scheme: dark;
|
|
||||||
}
|
|
||||||
html.theme--dim {
|
|
||||||
--text: white;
|
|
||||||
--background: hsl(211, 20%, 4%);
|
|
||||||
--backgroundLight: hsl(211, 20%, 10%);
|
|
||||||
color-scheme: dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove autofill styles on Webkit */
|
/* Remove autofill styles on Webkit */
|
||||||
input:autofill,
|
input:autofill,
|
||||||
input:-webkit-autofill,
|
input:-webkit-autofill,
|
||||||
@@ -200,19 +169,6 @@ input::-webkit-date-and-time-value {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
display: flex;
|
|
||||||
/* Allows you to scroll below the viewport; default value is visible */
|
|
||||||
overflow-y: auto;
|
|
||||||
overscroll-behavior-y: none;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
background-color: var(--background);
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
-ms-overflow-style: scrollbar;
|
|
||||||
font-synthesis-weight: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove default link styling */
|
/* Remove default link styling */
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|||||||
+48
-1
@@ -36,6 +36,53 @@
|
|||||||
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Black.66e9a87f1c921e844ed4.otf">
|
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-Black.66e9a87f1c921e844ed4.otf">
|
||||||
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf">
|
<link rel="preload" as="font" type="font/otf" href="/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf">
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/**
|
||||||
|
* Minimum styles required to render splash.
|
||||||
|
*
|
||||||
|
* ALL OTHER STYLES BELONG IN `src/style.css`
|
||||||
|
*
|
||||||
|
* THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
|
||||||
|
*/
|
||||||
|
html {
|
||||||
|
background-color: white;
|
||||||
|
scrollbar-gutter: stable both-edges;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
/* Platform-specific reset */
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
font-synthesis-weight: none;
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#root {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
#splash {
|
||||||
|
position: fixed;
|
||||||
|
width: 100px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateX(-50%) translateY(-50%) translateY(-50px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -90,7 +137,7 @@
|
|||||||
|
|
||||||
<!-- The root element for your Expo app. -->
|
<!-- The root element for your Expo app. -->
|
||||||
<div id="root">
|
<div id="root">
|
||||||
<div id="preload">
|
<div id="splash">
|
||||||
<!-- Bluesky SVG -->
|
<!-- Bluesky SVG -->
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320"><path fill="#0085ff" d="M180 142c-16.3-31.7-60.7-90.8-102-120C38.5-5.9 23.4-1 13.5 3.4 2.1 8.6 0 26.2 0 36.5c0 10.4 5.7 84.8 9.4 97.2 12.2 41 55.7 55 95.7 50.5-58.7 8.6-110.8 30-42.4 106.1 75.1 77.9 103-16.7 117.3-64.6 14.3 48 30.8 139 116 64.6 64-64.6 17.6-97.5-41.1-106.1 40 4.4 83.5-9.5 95.7-50.5 3.7-12.4 9.4-86.8 9.4-97.2 0-10.3-2-27.9-13.5-33C336.5-1 321.5-6 282 22c-41.3 29.2-85.7 88.3-102 120Z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320"><path fill="#0085ff" d="M180 142c-16.3-31.7-60.7-90.8-102-120C38.5-5.9 23.4-1 13.5 3.4 2.1 8.6 0 26.2 0 36.5c0 10.4 5.7 84.8 9.4 97.2 12.2 41 55.7 55 95.7 50.5-58.7 8.6-110.8 30-42.4 106.1 75.1 77.9 103-16.7 117.3-64.6 14.3 48 30.8 139 116 64.6 64-64.6 17.6-97.5-41.1-106.1 40 4.4 83.5-9.5 95.7-50.5 3.7-12.4 9.4-86.8 9.4-97.2 0-10.3-2-27.9-13.5-33C336.5-1 321.5-6 282 22c-41.3 29.2-85.7 88.3-102 120Z"/></svg>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user