Skip to content

Commit 5ce27f2

Browse files
committed
Merge branch 'web-example-deploy' into 'main'
Deploy updated web example See merge request Wacton/Unicolour!100
2 parents d20f222 + 787207e commit 5ce27f2

39 files changed

+223
-51
lines changed

Example.Web/App.razor

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<img class="icon unicolour-icon" src="icon-192.png" alt="Unicolour icon"/>
55
</a>
66

7-
<label class="title-text">Unicolour Picker</label>
7+
<label class="title-text colour-text">Unicolour Picker</label>
88

99
<a href="https://github.com/waacton/Unicolour" target="_blank" rel="noopener noreferrer" aria-label="Unicolour GitHub">
1010
@* https://github.com/logos - 98x96 size is from the original SVG *@
@@ -36,16 +36,17 @@
3636
the css here is for elements that adapt to the current colour selected on a child page
3737
*@
3838
<style>
39-
body {
39+
body, .colour-background {
4040
background: linear-gradient(to bottom, @cssInsideGamut, @cssOutsideGamut), var(--light-stripes) no-repeat;
4141
}
4242
43-
.title-text {
43+
.colour-text {
4444
color: @(conversionError ? light.Hex : cssInsideGamut);
4545
}
4646
4747
.text-on-colour {
4848
color: @(useLightText ? light.Hex : dark.Hex);
4949
filter: drop-shadow(0 0 0.075rem @(useLightText ? dark.Hex : light.Hex));
50+
opacity: 0.9;
5051
}
5152
</style>

Example.Web/Example.Web.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.15" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.15" PrivateAssets="all" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.21" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.21" PrivateAssets="all" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

Example.Web/Pages/Light.razor

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
@* @page "/Light" TODO: decide if want to route via layout *@
2-
3-
<div class="column gap-large dark-background power-button-reference-point">
1+
<div class="column gap-large dark-background power-button-reference-point">
42
<LightSpaces />
53

64
@if (powerMode)
75
{
86
<LightSpaces />
97
}
108

11-
<button class="power-button monospace" @onclick="TogglePower">
12-
<span>&#x23FB;</span> @**@
9+
<button class="power-button monospace @(powerMode ? "colour-background" : "")" @onclick="TogglePower">
10+
<span class=@(powerMode ? "text-on-colour" : "")>🗲</span>
1311
</button>
1412
</div>
1513

Example.Web/wwwroot/css/app.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ body {
150150
}
151151

152152
.title-text {
153-
/* color: this attribute is set by app */
154153
font-variant: all-small-caps;
155154
font-size: 2rem;
156155
letter-spacing: 0.25rem;
@@ -284,13 +283,6 @@ input[type=range]::-moz-range-thumb {
284283
color: var(--light);
285284
}
286285

287-
.text-on-colour {
288-
/* color: this attribute is set by app */
289-
/* filter: this attribute is set by app, because it requires dynamic colour */
290-
text-align: center;
291-
opacity: 0.9;
292-
}
293-
294286
.monospace {
295287
font-family: monospace;
296288
font-size: 1rem;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)