Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<!-- Framework-Agnostic Packages -->
<ItemGroup>
<PackageVersion Include="Inxton.Operon" Version="0.3.0-alpha.100" />
<PackageVersion Include="Inxton.Operon" Version="0.3.0-alpha.102" />
<PackageVersion Include="Cake.DocFx" Version="1.0.0" />
<PackageVersion Include="Octokit" Version="13.0.1" />
<PackageVersion Include="Octokit.Extensions" Version="1.0.7" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@

<script src="_framework/blazor.server.js"></script>
<script src="/_content/Operon/js/javascript.js"></script>

<script src="~/js/theme.js"></script>
<script>themeManager.init();</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

@inject IJSRuntime JSRuntime

<div class="sidebar">
<div class="bg-background-light">
<NavMenu />
</div>
<div class="main">
<div class="bg-background">

<div class="content px-4">
@Body
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<header class="bg-primary-50">
<Theme />
<div class="mx-auto max-w-screen-xl px-4 sm:px-6 lg:px-8">
<div class="flex h-16 items-center justify-between">
@* <div class="flex-1 md:flex md:items-center md:gap-12"> *@
Expand Down
13 changes: 13 additions & 0 deletions src/AXSharp.blazor/tests/sandbox/IxBlazor.App/Shared/Theme.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@inject ThemeService _themeService

<nav class="tab my-auto">
<button type="button" class="btn btn-primary @(0 != 0 ? "active" : null)" @onclick="() => _themeService.SetLightAsync()">
<Operon.Icons.HeroIcon Icon="sun" Type="Operon.Icons.IconType.Outline" Class="size-5" />
</button>
<button type="button" class="btn btn-primary @(0 != 0 ? "active" : null)" @onclick="() => _themeService.SetDarkAsync()">
<Operon.Icons.HeroIcon Icon="moon" Type="Operon.Icons.IconType.Outline" Class="size-5" />
</button>
<button type="button" class="btn btn-primary @(0 != 0 ? "active" : null)" @onclick="() => _themeService.SetSystemAsync()">
<Operon.Icons.HeroIcon Icon="computer-desktop" Type="Operon.Icons.IconType.Outline" Class="size-5" />
</button>
</nav>
2 changes: 2 additions & 0 deletions src/AXSharp.blazor/tests/sandbox/IxBlazor.App/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public void ConfigureServices(IServiceCollection services)
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddIxBlazorServices();

services.AddScoped<ThemeService>();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
24 changes: 24 additions & 0 deletions src/AXSharp.blazor/tests/sandbox/IxBlazor.App/ThemeService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Microsoft.JSInterop;
using System.Threading.Tasks;

namespace ixBlazor.App
{
public class ThemeService
{
private readonly IJSRuntime _js;

public ThemeService(IJSRuntime js) => _js = js;

public ValueTask InitAsync() =>
_js.InvokeVoidAsync("themeManager.init");

public ValueTask SetLightAsync() =>
_js.InvokeVoidAsync("themeManager.setLight");

public ValueTask SetDarkAsync() =>
_js.InvokeVoidAsync("themeManager.setDark");

public ValueTask SetSystemAsync() =>
_js.InvokeVoidAsync("themeManager.setSystem");
}
}
229 changes: 225 additions & 4 deletions src/AXSharp.blazor/tests/sandbox/IxBlazor.App/wwwroot/css/momentum.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
Expand All @@ -22,27 +22,44 @@
--color-gray-500: oklch(55.1% 0.027 264.364);
--color-gray-600: oklch(44.6% 0.03 256.802);
--color-gray-700: oklch(37.3% 0.034 259.733);
--color-white: #fff;
--color-white: #FFFFFF;
--spacing: 0.25rem;
--breakpoint-xl: 80rem;
--container-4xl: 56rem;
--text-sm: 0.875rem;
--text-sm--line-height: calc(1.25 / 0.875);
--text-base: 1rem;
--text-base--line-height: calc(1.5 / 1);
--text-lg: 1.125rem;
--text-lg--line-height: calc(1.75 / 1.125);
--text-xl: 1.25rem;
--text-xl--line-height: calc(1.75 / 1.25);
--text-2xl: 1.5rem;
--text-2xl--line-height: calc(2 / 1.5);
--text-3xl: 1.875rem;
--text-3xl--line-height: calc(2.25 / 1.875);
--text-3xl--line-height: calc(2 / 1.5);
--text-4xl: 2.25rem;
--text-4xl--line-height: calc(2.5 / 2.25);
--text-4xl--line-height: calc(2 / 1.5);
--text-5xl: 3rem;
--text-5xl--line-height: calc(2 / 1.5);
--font-weight-normal: 400;
--font-weight-bold: 700;
--radius-md: 0.375rem;
--radius-lg: 0.5rem;
--default-transition-duration: 150ms;
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
--default-font-family: var(--font-sans);
--default-mono-font-family: var(--font-mono);
--radius-full: calc(infinity * 1px);
--radius-small: 1rem;
--radius-extra-small: var(--radius-md);
--color-background: #FEFEFE;
--color-background-light: #FFFFFF;
--color-text: #000000;
--color-text-light: #5F5F5F;
--color-link: #0065B3;
--color-link-hover: #003078;
--color-danger: #D0190F;
}
}
@layer base {
Expand Down Expand Up @@ -229,6 +246,9 @@
.my-4 {
margin-block: calc(var(--spacing) * 4);
}
.my-auto {
margin-block: auto;
}
.mt-4 {
margin-top: calc(var(--spacing) * 4);
}
Expand All @@ -253,6 +273,10 @@
.hidden {
display: none;
}
.size-5 {
width: calc(var(--spacing) * 5);
height: calc(var(--spacing) * 5);
}
.h-8 {
height: calc(var(--spacing) * 8);
}
Expand Down Expand Up @@ -316,6 +340,12 @@
.border-gray-300 {
border-color: var(--color-gray-300);
}
.bg-background {
background-color: var(--color-background);
}
.bg-background-light {
background-color: var(--color-background-light);
}
.bg-blue-600 {
background-color: var(--color-blue-600);
}
Expand Down Expand Up @@ -382,6 +412,9 @@
.text-nowrap {
text-wrap: nowrap;
}
.text-danger {
color: var(--color-danger);
}
.text-gray-500 {
color: var(--color-gray-500);
}
Expand Down Expand Up @@ -509,6 +542,194 @@
}
}
}
@layer theme {
:root, :host {
--font-sans: "Familjen Grotesk", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
}
@layer base {
h1 {
font-size: var(--text-5xl);
line-height: var(--tw-leading, var(--text-5xl--line-height));
--tw-font-weight: var(--font-weight-bold);
font-weight: var(--font-weight-bold);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
h2 {
font-size: var(--text-4xl);
line-height: var(--tw-leading, var(--text-4xl--line-height));
--tw-font-weight: var(--font-weight-bold);
font-weight: var(--font-weight-bold);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
h3 {
font-size: var(--text-3xl);
line-height: var(--tw-leading, var(--text-3xl--line-height));
--tw-font-weight: var(--font-weight-bold);
font-weight: var(--font-weight-bold);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
h4 {
font-size: var(--text-2xl);
line-height: var(--tw-leading, var(--text-2xl--line-height));
--tw-font-weight: var(--font-weight-bold);
font-weight: var(--font-weight-bold);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
h5 {
font-size: var(--text-xl);
line-height: var(--tw-leading, var(--text-xl--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
h6 {
font-size: var(--text-lg);
line-height: var(--tw-leading, var(--text-lg--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
p {
font-size: var(--text-base);
line-height: var(--tw-leading, var(--text-base--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text-light);
}
a {
cursor: pointer;
font-size: var(--text-base);
line-height: var(--tw-leading, var(--text-base--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
text-decoration-line: underline;
color: var(--color-link);
&:hover {
@media (hover: hover) {
color: var(--color-link-hover);
}
}
}
hr {
color: var(--color-text-light);
opacity: 30%;
}
span {
font-size: var(--text-base);
line-height: var(--tw-leading, var(--text-base--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
div {
font-size: var(--text-base);
line-height: var(--tw-leading, var(--text-base--line-height));
--tw-font-weight: var(--font-weight-normal);
font-weight: var(--font-weight-normal);
text-wrap: wrap;
overflow-wrap: break-word;
color: var(--color-text);
}
input[type="date"], input[type="time"], input[type="datetime-local"] {
color-scheme: light;
}
[data-theme="dark"] input[type="date"], [data-theme="dark"] input[type="time"], [data-theme="dark"] input[type="datetime-local"] {
color-scheme: dark;
}
}
[data-theme="dark"] {
--color-black: #FFFFFF;
--color-white: #0B0C0C;
--color-gray-1: #2A2A2A;
--color-gray-2: #3A3A3A;
--color-gray-3: #9E9E9E;
--color-background: #121212;
--color-background-light: #1F1F1F;
--color-background-dark: #1F1F1F;
--color-background-modal: #1E1E1E;
--color-background-modal-light: #252525;
--color-text: #FFFFFF;
--color-text-light: #CFCFCF;
--color-border: #3A3A3A;
--color-border-input: #FFFFFF;
--color-link: #82B1FF;
--color-link-hover: #AECbFA;
--color-link-visited: #B39DDB;
--color-primary: #82B1FF;
--color-primary-light: #1E2A44;
--color-success: #4CAF50;
--color-success-light: #1E3B2C;
--color-warning: #FFB74D;
--color-warning-light: #3A2A12;
--color-danger: #EF5350;
--color-danger-light: #3A1F1F;
--color-info: #64B5F6;
--color-info-light: #1E2F3F;
--color-noactive: #9E9E9E;
--color-noactive-light: #2A2A2A;
--color-result-failed: #EF5350;
--color-result-passed: #4CAF50;
--color-result-inprogress: #64B5F6;
--color-result-exclude: #9575CD;
--color-result-bypassed: #CE93D8;
--color-result-inconcllusive: #D4A373;
--color-result-runnig: #4DD0E1;
--color-result-noaction: #9E9E9E;
--color-diagnostic-debug: #64B5F6;
--color-diagnostic-verbose: #90A4AE;
--color-diagnostic-information: #4FC3F7;
--color-diagnostic-warning: #FFB74D;
--color-diagnostic-error: #EF5350;
--color-diagnostic-fatal: #E53935;
--color-automat: #4CAF50;
--color-ground: #64B5F6;
--color-grounded: #42A5F5;
--color-idle: #9E9E9E;
--color-manual: #FFB74D;
--color-oee: #82B1FF;
--color-availability: #4CAF50;
--color-performance: #64B5F6;
--color-quality: #FFB74D;
--color-downtime-unassigned: #616161;
--color-downtime-material: #FFB74D;
--color-downtime-operator: #EF9A9A;
--color-downtime-working: #AED581;
--color-downtime-technical: #B39DDB;
--color-downtime-planned: #80DEEA;
--color-btn-primary: #82B1FF;
--color-btn-primary-hover: #1E2A44;
--color-btn-success: #4CAF50;
--color-btn-success-hover: #1E3B2C;
--color-btn-danger: #EF5350;
--color-btn-danger-hover: #3A1F1F;
--color-btn-warning: #FFB74D;
--color-btn-warning-hover: #3A2A12;
--color-btn-info: #64B5F6;
--color-btn-info-hover: #1E2F3F;
--color-btn-noactive: #9E9E9E;
--color-btn-noactive-hover: #2A2A2A;
--color-btn-outline-bg: transparent;
--color-btn-no-bg-bg: transparent;
}
@property --tw-space-x-reverse {
syntax: "*";
inherits: false;
Expand Down
Loading