feat(khira): implement Black Obsidian Liquid Glass UI with SVG refraction and specular filters based on kube.io reference

This commit is contained in:
2026-10-26 17:05:02 +05:30
parent d8221a5d75
commit 0dd89a5e8b
9 changed files with 1525 additions and 348 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ function dlg(o){
/* ── auth ── */
async function boot(){
theme(document.documentElement.dataset.theme||'light');
theme(document.documentElement.dataset.theme||'dark');
const r=await api('/khira/api/auth/me');
if(r.authenticated&&r.user)enter(r.user);else $('#auth').hidden=false;
}
@@ -991,7 +991,7 @@ function pop(){
}
function theme(t){
document.documentElement.dataset.theme=t;try{localStorage.setItem('khira_theme',t)}catch(e){}
$('#theme').innerHTML=ms(t==='dark'?'light_mode':'dark_mode');$('#tc').content=t==='dark'?'#0F1511':'#F5FBF5';
$('#theme').innerHTML=ms(t==='dark'?'light_mode':'dark_mode');$('#tc').content=t==='dark'?'#06080c':'#090c12';
}
/* ── events ── */
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

+70 -3
View File
@@ -3,18 +3,85 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="theme-color" content="#F5FBF5" id="tc">
<meta name="theme-color" content="#06080c" id="tc">
<title>Khira</title>
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='18' fill='%231B6B4A'/%3E%3Cpath d='M22 16h8v12l10-12h10L38 31l13 17H41L30 34v14h-8z' fill='%23B3F1CE'/%3E%3C/svg%3E">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='18' fill='%2306080c'/%3E%3Cpath d='M22 16h8v12l10-12h10L38 31l13 17H41L30 34v14h-8z' fill='%2310b981'/%3E%3C/svg%3E">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:wght@400;500;600&family=Roboto+Mono:wght@400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0&display=block" rel="stylesheet">
<link rel="stylesheet" href="/khira/styles.css">
<script>try{document.documentElement.dataset.theme=localStorage.khira_theme||(matchMedia('(prefers-color-scheme:dark)').matches?'dark':'light')}catch(e){}</script>
<script>try{document.documentElement.dataset.theme=localStorage.khira_theme||'dark'}catch(e){}</script>
</head>
<body>
<!-- Kube.io Liquid Glass SVG Filters -->
<svg color-interpolation-filters="sRGB" style="position:fixed;width:0;height:0;pointer-events:none;z-index:-1;opacity:0" aria-hidden="true">
<defs>
<!-- Liquid Glass Obsidian - Card / Panel Filter -->
<filter id="liquid-glass-panel" color-interpolation-filters="sRGB" x="-10%" y="-10%" width="120%" height="120%">
<feGaussianBlur in="SourceGraphic" stdDeviation="0.4" result="blurred_source"></feGaussianBlur>
<feImage href="/khira/assets/displacement-map-panel.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="displacement_map"></feImage>
<feDisplacementMap in="blurred_source" in2="displacement_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="38"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="displaced_saturated" values="3.2"></feColorMatrix>
<feImage href="/khira/assets/specular-map-panel.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="specular_layer"></feImage>
<feComposite in="displaced_saturated" in2="specular_layer" operator="in" result="specular_saturated"></feComposite>
<feComponentTransfer in="specular_layer" result="specular_faded">
<feFuncA type="linear" slope="0.32"></feFuncA>
</feComponentTransfer>
<feBlend in="specular_saturated" in2="displaced" mode="normal" result="withSaturation"></feBlend>
<feBlend in="specular_faded" in2="withSaturation" mode="normal"></feBlend>
</filter>
<!-- Liquid Glass Obsidian - Bar / Search Filter -->
<filter id="liquid-glass-bar" color-interpolation-filters="sRGB" x="-5%" y="-5%" width="110%" height="110%">
<feGaussianBlur in="SourceGraphic" stdDeviation="0.5" result="blurred_source"></feGaussianBlur>
<feImage href="/khira/assets/displacement-map-bar.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="displacement_map"></feImage>
<feDisplacementMap in="blurred_source" in2="displacement_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="32"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="displaced_saturated" values="2.6"></feColorMatrix>
<feImage href="/khira/assets/specular-map-bar.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="specular_layer"></feImage>
<feComposite in="displaced_saturated" in2="specular_layer" operator="in" result="specular_saturated"></feComposite>
<feComponentTransfer in="specular_layer" result="specular_faded">
<feFuncA type="linear" slope="0.25"></feFuncA>
</feComponentTransfer>
<feBlend in="specular_saturated" in2="displaced" mode="normal" result="withSaturation"></feBlend>
<feBlend in="specular_faded" in2="withSaturation" mode="normal"></feBlend>
</filter>
<!-- Liquid Glass Obsidian - Pill / Button / Chip Filter -->
<filter id="liquid-glass-pill" color-interpolation-filters="sRGB" x="-10%" y="-10%" width="120%" height="120%">
<feGaussianBlur in="SourceGraphic" stdDeviation="0.3" result="blurred_source"></feGaussianBlur>
<feImage href="/khira/assets/displacement-map-pill.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="displacement_map"></feImage>
<feDisplacementMap in="blurred_source" in2="displacement_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="24"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="displaced_saturated" values="3.0"></feColorMatrix>
<feImage href="/khira/assets/specular-map-pill.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="specular_layer"></feImage>
<feComposite in="displaced_saturated" in2="specular_layer" operator="in" result="specular_saturated"></feComposite>
<feComponentTransfer in="specular_layer" result="specular_faded">
<feFuncA type="linear" slope="0.3"></feFuncA>
</feComponentTransfer>
<feBlend in="specular_saturated" in2="displaced" mode="normal" result="withSaturation"></feBlend>
<feBlend in="specular_faded" in2="withSaturation" mode="normal"></feBlend>
</filter>
<!-- Liquid Glass Obsidian - Universal Procedural Filter -->
<filter id="liquid-glass-obsidian" color-interpolation-filters="sRGB" x="-20%" y="-20%" width="140%" height="140%">
<feGaussianBlur in="SourceGraphic" stdDeviation="0.8" result="blurred_source"></feGaussianBlur>
<feTurbulence type="fractalNoise" baseFrequency="0.015 0.02" numOctaves="2" seed="42" result="turbulence"></feTurbulence>
<feDisplacementMap in="blurred_source" in2="turbulence" xChannelSelector="R" yChannelSelector="G" scale="16" result="displaced"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="displaced_saturated" values="2.4"></feColorMatrix>
<feSpecularLighting in="turbulence" surfaceScale="2.2" specularConstant="1.3" specularExponent="22" lighting-color="#ffffff" result="specular_light">
<fePointLight x="280" y="-90" z="220"></fePointLight>
</feSpecularLighting>
<feComposite in="specular_light" in2="SourceGraphic" operator="in" result="specular_clipped"></feComposite>
<feComponentTransfer in="specular_clipped" result="specular_faded">
<feFuncA type="linear" slope="0.32"></feFuncA>
</feComponentTransfer>
<feBlend in="displaced_saturated" in2="SourceGraphic" mode="normal" result="base_liquid"></feBlend>
<feBlend in="specular_faded" in2="base_liquid" mode="screen"></feBlend>
</filter>
</defs>
</svg>
<main id="auth" class="auth" hidden>
<div class="ac">
<div class="logo"><span class="ms">confirmation_number</span></div>
+1453 -343
View File
File diff suppressed because it is too large Load Diff