Skip to content

Commit cd08938

Browse files
committed
fix(web): remove unnecessary whitespace and improve HTML structure
- Remove extra whitespace and newlines from the HTML file - Adjust indentation for better readability - Add missing closing tags for html and head elements - Format code inside style tags for better visibility - Add line breaks between HTML elements for clarity
1 parent 78ad5a7 commit cd08938

File tree

1 file changed

+35
-21
lines changed

1 file changed

+35
-21
lines changed

web/index.html

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<!DOCTYPE html><html><head>
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
25
<!--
36
If you are serving your web app in a path other than the root, change the
47
href value below to reflect the base path you are serving from.
@@ -30,13 +33,13 @@
3033
<title>Flutter News App</title>
3134
<link rel="manifest" href="manifest.json">
3235
<link rel="stylesheet" type="text/css" href="splash/splash.css">
33-
34-
36+
37+
3538
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
36-
37-
38-
39-
39+
40+
41+
42+
4043
<style id="splash-screen-style">
4144
html {
4245
height: 100%
@@ -46,7 +49,7 @@
4649
margin: 0;
4750
min-height: 100%;
4851
background-color: #FFFFFF;
49-
background-size: 100% 100%;
52+
background-size: 100% 100%;
5053
}
5154

5255
.center {
@@ -59,19 +62,22 @@
5962
}
6063

6164
.contain {
62-
display:block;
63-
width:100%; height:100%;
65+
display: block;
66+
width: 100%;
67+
height: 100%;
6468
object-fit: contain;
6569
}
6670

6771
.stretch {
68-
display:block;
69-
width:100%; height:100%;
72+
display: block;
73+
width: 100%;
74+
height: 100%;
7075
}
7176

7277
.cover {
73-
display:block;
74-
width:100%; height:100%;
78+
display: block;
79+
width: 100%;
80+
height: 100%;
7581
object-fit: cover;
7682
}
7783

@@ -98,32 +104,40 @@
98104
@media (prefers-color-scheme: dark) {
99105
body {
100106
background-color: #212121;
101-
}
107+
}
102108
}
103109
</style>
104110
<script id="splash-screen-script">
105111
function removeSplashFromWeb() {
106112
document.getElementById("splash")?.remove();
107113
document.getElementById("splash-branding")?.remove();
114+
document.getElementById("splash-container")?.remove();
108115
document.body.style.background = "transparent";
109116
}
110117
</script>
111118
</head>
119+
112120
<body>
113121
<picture id="splash">
114-
<source srcset="splash/img/light-1x.png 1x, splash/img/light-2x.png 2x, splash/img/light-3x.png 3x, splash/img/light-4x.png 4x" media="(prefers-color-scheme: light)">
115-
<source srcset="splash/img/dark-1x.png 1x, splash/img/dark-2x.png 2x, splash/img/dark-3x.png 3x, splash/img/dark-4x.png 4x" media="(prefers-color-scheme: dark)">
116-
<img class="center" aria-hidden="true" src="splash/img/light-1x.png" alt="">
122+
<source
123+
srcset="splash/img/light-1x.png 1x, splash/img/light-2x.png 2x, splash/img/light-3x.png 3x, splash/img/light-4x.png 4x"
124+
media="(prefers-color-scheme: light)">
125+
<source
126+
srcset="splash/img/dark-1x.png 1x, splash/img/dark-2x.png 2x, splash/img/dark-3x.png 3x, splash/img/dark-4x.png 4x"
127+
media="(prefers-color-scheme: dark)">
128+
<img class="center" aria-hidden="true" src="splash/img/light-1x.png" alt="">
117129
</picture>
118-
130+
119131
<div id="splash-container" class="center">
120132
<div class="loader"></div>
121133
</div>
122134
<script>
123-
{{flutter_bootstrap_js}}
135+
{ { flutter_bootstrap_js } }
124136
</script>
125137

126138

127139

128140

129-
</body></html>
141+
</body>
142+
143+
</html>

0 commit comments

Comments
 (0)