move Community sub-list-blocks to list
This commit is contained in:
35
src/app.css
35
src/app.css
@ -135,6 +135,41 @@ body::before {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ── Выпадающие списки (платформа установки, выбор субъектов) ── */
|
||||
.bx-select {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
min-width: 0;
|
||||
padding: 8px 32px 8px 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
background: var(--surface)
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%238a9997' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
|
||||
no-repeat right 10px center / 12px 12px;
|
||||
color: var(--hi);
|
||||
font-family: var(--mono);
|
||||
font-size: 12.5px;
|
||||
letter-spacing: 0.04em;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.18s ease;
|
||||
}
|
||||
.bx-select:hover { border-color: var(--line-2); }
|
||||
.bx-select:focus-visible { outline: 1px solid var(--line-2); outline-offset: 2px; }
|
||||
.bx-select option,
|
||||
.bx-select optgroup {
|
||||
background: #0a0e10;
|
||||
color: var(--text);
|
||||
font-family: var(--mono);
|
||||
}
|
||||
/* уменьшенная версия списка (версия ОС и т.п.) */
|
||||
.bx-select.sm {
|
||||
padding: 5px 26px 5px 10px;
|
||||
border-radius: 8px;
|
||||
font-size: 11.5px;
|
||||
background-position: right 8px center;
|
||||
background-size: 10px 10px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: var(--mono);
|
||||
font-size: 0.88em;
|
||||
|
||||
@ -1,25 +1,31 @@
|
||||
<script>
|
||||
import { onDestroy } from 'svelte';
|
||||
|
||||
// шаги установки: текст пояснения и/или команда (инлайн-код)
|
||||
const platforms = [
|
||||
{ label: 'Windows', hint: 'Win+R', cmd: 'powershell -c "irm bionyx.sh | iex"' },
|
||||
{ label: 'Linux / macOS / BSD', hint: 'терминал', cmd: 'curl -sL bionyx.sh | bash' },
|
||||
{
|
||||
id: 'win',
|
||||
label: 'Windows',
|
||||
steps: [
|
||||
{ text: 'Нажмите Win+R' },
|
||||
{ text: 'Вставьте', cmd: 'powershell -c "irm bionyx.sh | iex"' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'unix',
|
||||
label: 'Linux / macOS / BSD',
|
||||
steps: [{ cmd: 'curl -sL bionyx.sh | bash' }], // без пояснений
|
||||
},
|
||||
];
|
||||
|
||||
let active = $state(0);
|
||||
const winVersions = ['11', '10', '8.1', '7'];
|
||||
let platformId = $state('win');
|
||||
let winVersion = $state('11');
|
||||
let copied = $state(false);
|
||||
let timer = 0;
|
||||
|
||||
const current = $derived(platforms[active]);
|
||||
|
||||
function select(i) {
|
||||
active = i;
|
||||
copied = false;
|
||||
}
|
||||
|
||||
const current = $derived(platforms.find((p) => p.id === platformId) ?? platforms[0]);
|
||||
const cmd = $derived(current.steps.find((s) => s.cmd)?.cmd ?? '');
|
||||
async function copy() {
|
||||
try {
|
||||
await navigator.clipboard.writeText(current.cmd);
|
||||
await navigator.clipboard.writeText(cmd);
|
||||
copied = true;
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => (copied = false), 1600);
|
||||
@ -27,127 +33,118 @@
|
||||
// буфер недоступен — молча игнорируем
|
||||
}
|
||||
}
|
||||
|
||||
onDestroy(() => clearTimeout(timer));
|
||||
</script>
|
||||
|
||||
<div class="install">
|
||||
<p class="bx-label">Простая установка на любом устройстве</p>
|
||||
|
||||
<div class="tabs">
|
||||
{#each platforms as p, i}
|
||||
<h3 class="install-title">УСТАНОВКА</h3>
|
||||
<div class="pick-row">
|
||||
<select
|
||||
class="bx-select"
|
||||
bind:value={platformId}
|
||||
onchange={() => (copied = false)}
|
||||
aria-label="Платформа"
|
||||
>
|
||||
{#each platforms as p}
|
||||
<option value={p.id}>{p.label}</option>
|
||||
{/each}
|
||||
</select>
|
||||
{#if platformId === 'win'}
|
||||
<select class="bx-select sm" bind:value={winVersion} aria-label="Версия Windows">
|
||||
{#each winVersions as v}
|
||||
<option value={v}>{v}</option>
|
||||
{/each}
|
||||
</select>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="steps">
|
||||
{#each current.steps as s, i}
|
||||
<div class="step">
|
||||
<span class="num" aria-hidden="true">{i + 1}</span>
|
||||
{#if s.text}<span class="step-text">{s.text}</span>{/if}
|
||||
{#if s.cmd}
|
||||
<!-- инлайн-код по ширине текста: клик по нему = копировать -->
|
||||
<button
|
||||
type="button"
|
||||
class="tab"
|
||||
class:active={active === i}
|
||||
aria-pressed={active === i}
|
||||
onclick={() => select(i)}
|
||||
>
|
||||
{p.label}
|
||||
</button>
|
||||
class="cmd"
|
||||
class:done={copied}
|
||||
onclick={copy}
|
||||
title={copied ? 'Скопировано' : 'Нажмите, чтобы скопировать'}
|
||||
aria-label="Скопировать команду: {s.cmd}"
|
||||
>{s.cmd}</button>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="cmd-row">
|
||||
<span class="hint">{current.hint} →</span>
|
||||
<code class="cmd">{current.cmd}</code>
|
||||
<button type="button" class="copy" onclick={copy}>
|
||||
{copied ? 'Скопировано' : 'Копировать'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.install {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
margin-top: 4px;
|
||||
padding-top: 16px;
|
||||
gap: 12px;
|
||||
margin-top: 6px;
|
||||
padding-top: 18px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.tabs {
|
||||
.install-title {
|
||||
margin: 0;
|
||||
font-size: clamp(22px, 3vw, 30px);
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--dim);
|
||||
}
|
||||
.pick-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.tab {
|
||||
padding: 7px 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
background: var(--surface);
|
||||
color: var(--dim);
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.04em;
|
||||
cursor: pointer;
|
||||
transition: all 0.18s ease;
|
||||
.steps {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.tab:hover {
|
||||
color: var(--hi);
|
||||
border-color: var(--line-2);
|
||||
}
|
||||
.tab.active {
|
||||
color: #04120d;
|
||||
background: var(--acc);
|
||||
border-color: var(--acc);
|
||||
font-weight: 700;
|
||||
}
|
||||
.cmd-row {
|
||||
.step {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
}
|
||||
.hint {
|
||||
/* нумерация: чисто цифры, полупрозрачные серые, без рамок и подложек */
|
||||
.num {
|
||||
flex-shrink: 0;
|
||||
width: 10px;
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
color: var(--dim);
|
||||
opacity: 0.55;
|
||||
}
|
||||
.step-text {
|
||||
font-family: var(--mono);
|
||||
font-size: 15px;
|
||||
color: var(--text);
|
||||
}
|
||||
/* команда = обычный инлайн-код: рамка по тексту, не до края фрейма */
|
||||
.cmd {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: block;
|
||||
padding: 9px 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
font-size: 12.5px;
|
||||
white-space: pre;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.cmd::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.copy {
|
||||
flex-shrink: 0;
|
||||
min-width: 104px;
|
||||
padding: 9px 12px;
|
||||
border: 1px solid var(--line-2);
|
||||
border-radius: 10px;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
padding: 2px 8px;
|
||||
border: 1px solid rgba(79, 240, 183, 0.16);
|
||||
border-radius: 6px;
|
||||
background: var(--acc-soft);
|
||||
color: var(--acc);
|
||||
font-family: var(--mono);
|
||||
font-size: 11.5px;
|
||||
letter-spacing: 0.04em;
|
||||
font-size: 12.5px;
|
||||
text-align: left;
|
||||
overflow-wrap: anywhere;
|
||||
cursor: pointer;
|
||||
transition: background 0.18s ease;
|
||||
}
|
||||
.copy:hover {
|
||||
background: rgba(79, 240, 183, 0.2);
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
.cmd-row {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.cmd {
|
||||
order: 3;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.copy {
|
||||
margin-left: auto;
|
||||
transition: background 0.18s ease, box-shadow 0.18s ease;
|
||||
}
|
||||
.cmd:hover { background: rgba(79, 240, 183, 0.18); }
|
||||
.cmd.done {
|
||||
background: rgba(79, 240, 183, 0.22);
|
||||
box-shadow: 0 0 10px rgba(79, 240, 183, 0.4);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,13 +1,21 @@
|
||||
<script>
|
||||
import { slide } from 'svelte/transition';
|
||||
// open — bindable: родитель может раскрыть пункт программно (например, тизером)
|
||||
let { label, icon = undefined, hint = undefined, open = $bindable(false), children } = $props();
|
||||
// accent — акцентный тон заголовка (моно, зелёный с свечением) для подзаголовков-пунктов
|
||||
let {
|
||||
label,
|
||||
icon = undefined,
|
||||
hint = undefined,
|
||||
open = $bindable(false),
|
||||
accent = false,
|
||||
children,
|
||||
} = $props();
|
||||
const expandable = $derived(children !== undefined);
|
||||
</script>
|
||||
{#if expandable}
|
||||
<div class="node" class:open>
|
||||
<div class="row">
|
||||
<button type="button" class="head" aria-expanded={open} onclick={() => (open = !open)}>
|
||||
<button type="button" class="head" class:accent aria-expanded={open} onclick={() => (open = !open)}>
|
||||
<svg class="mark" viewBox="0 0 12 12" aria-hidden="true">
|
||||
<path
|
||||
d="M4 2.5 L8 6 L4 9.5"
|
||||
@ -32,7 +40,7 @@
|
||||
{:else}
|
||||
<div class="node static">
|
||||
<div class="row">
|
||||
<div class="head">
|
||||
<div class="head" class:accent>
|
||||
<span class="bullet" aria-hidden="true"></span>
|
||||
<span class="label">{label}</span>
|
||||
</div>
|
||||
@ -65,9 +73,19 @@
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
}
|
||||
/* акцентный тон: как бывшие подзаголовки «СУБЪЕКТ ↔ СУБЪЕКТ» / «МЕТРИКИ…» */
|
||||
.head.accent {
|
||||
font-family: var(--mono);
|
||||
font-size: clamp(14px, 2vw, 18px);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--acc);
|
||||
text-shadow: 0 0 12px rgba(79, 240, 183, 0.35);
|
||||
}
|
||||
button.head { cursor: pointer; transition: background 0.18s ease; }
|
||||
button.head:hover { background: rgba(79, 240, 183, 0.06); }
|
||||
.static .head { font-weight: 500; color: var(--text); }
|
||||
.static .head.accent { font-weight: 600; color: var(--acc); }
|
||||
.bullet {
|
||||
flex-shrink: 0;
|
||||
width: 6px;
|
||||
@ -103,6 +121,7 @@
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.head { font-size: 16.5px; }
|
||||
.head.accent { font-size: clamp(13px, 2vw, 16.5px); }
|
||||
.body { padding-left: 16px; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
// Граф субъектов в духе Obsidian Graph: репульсия, пружины-связи,
|
||||
// лёгкое плавание и перетаскивание узлов pointer'ом.
|
||||
const W = 520;
|
||||
const H = 330;
|
||||
const PAD = 26;
|
||||
<script module>
|
||||
// Палитра и состав узлов вынесены в модуль: список субъектов нужен
|
||||
// ещё и родителю (CommunityCard) для селектов «пример работы».
|
||||
const C = { human: '#3ee0ff', prog: '#e05cff', com: '#ffc65c' };
|
||||
const defs = [
|
||||
{ id: 'hub', label: 'СУБЪЕКТ', kind: 'hub' },
|
||||
@ -23,6 +19,19 @@
|
||||
{ id: 'c5', label: 'Интерфейсы', kind: 'child', color: C.com, parent: 'com' },
|
||||
{ id: 'c6', label: 'Графы контекста', kind: 'child', color: C.com, parent: 'com' },
|
||||
];
|
||||
// группы для селектов выбора субъектов (порядок = порядок на графе)
|
||||
export const SUBJECT_GROUPS = [
|
||||
{ name: 'Субъекты', items: defs.filter((d) => d.kind === 'type').map((d) => d.label) },
|
||||
{ name: 'Состав сообщества', items: defs.filter((d) => d.kind === 'child').map((d) => d.label) },
|
||||
];
|
||||
</script>
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
// Граф субъектов в духе Obsidian Graph: репульсия, пружины-связи,
|
||||
// лёгкое плавание и перетаскивание узлов pointer'ом.
|
||||
const W = 520;
|
||||
const H = 330;
|
||||
const PAD = 26;
|
||||
const links = defs
|
||||
.filter((d) => d.kind === 'type')
|
||||
.map((d) => ({ a: 'hub', b: d.id, rest: 92 }))
|
||||
|
||||
@ -1,23 +1,49 @@
|
||||
<script>
|
||||
import Card from '$lib/common/ui/Card.svelte';
|
||||
import SubjectGraph from '$lib/common/ui/SubjectGraph.svelte';
|
||||
import Node from '$lib/common/ui/Node.svelte';
|
||||
import SubjectGraph, { SUBJECT_GROUPS } from '$lib/common/ui/SubjectGraph.svelte';
|
||||
import RankRadar from '$lib/pages/bionyx/RankRadar.svelte';
|
||||
// выбор пары субъектов для будущего примера (пункт свёрнут по умолчанию)
|
||||
let subjectFrom = $state('');
|
||||
let subjectTo = $state('');
|
||||
</script>
|
||||
<Card title="BIONYX COMMUNITY" subtitle="Полная интеграция с экосистемой Bionyx">
|
||||
<div class="model-head">
|
||||
<h3 class="model-title">Модель взаимодействия</h3>
|
||||
<p class="model-sub">СУБЪЕКТ ↔ СУБЪЕКТ</p>
|
||||
</div>
|
||||
<Node label="СУБЪЕКТ ↔ СУБЪЕКТ" accent>
|
||||
<div class="demo-row">
|
||||
<span class="demo-text">Получите пример:</span>
|
||||
<select class="bx-select subject" bind:value={subjectFrom} aria-label="Субъект-источник">
|
||||
{@render subjectOptions()}
|
||||
</select>
|
||||
<span class="demo-link" aria-hidden="true">↔</span>
|
||||
<select class="bx-select subject" bind:value={subjectTo} aria-label="Субъект-получатель">
|
||||
{@render subjectOptions()}
|
||||
</select>
|
||||
</div>
|
||||
</Node>
|
||||
<!-- граф живёт вне пункта и виден всегда -->
|
||||
<SubjectGraph />
|
||||
<RankRadar />
|
||||
<p class="bx-note">Открыто для любых направлений.</p>
|
||||
</Card>
|
||||
{#snippet subjectOptions()}
|
||||
<option value="" disabled>выбрать субъект</option>
|
||||
{#each SUBJECT_GROUPS as g}
|
||||
<optgroup label={g.name}>
|
||||
{#each g.items as item}
|
||||
<option value={item}>{item}</option>
|
||||
{/each}
|
||||
</optgroup>
|
||||
{/each}
|
||||
{/snippet}
|
||||
<style>
|
||||
.model-head {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.model-title {
|
||||
margin: 0;
|
||||
@ -27,13 +53,26 @@
|
||||
text-transform: uppercase;
|
||||
color: var(--dim);
|
||||
}
|
||||
.model-sub {
|
||||
margin: 0;
|
||||
/* одна строка: подпись + два селекта через ↔ */
|
||||
.demo-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.demo-text {
|
||||
font-family: var(--mono);
|
||||
font-size: clamp(14px, 2vw, 18px);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.06em;
|
||||
font-size: 12.5px;
|
||||
color: var(--dim);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.subject { max-width: 100%; }
|
||||
.demo-link {
|
||||
flex-shrink: 0;
|
||||
font-family: var(--mono);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--acc);
|
||||
text-shadow: 0 0 12px rgba(79, 240, 183, 0.35);
|
||||
text-shadow: 0 0 10px rgba(79, 240, 183, 0.45);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import Node from '$lib/common/ui/Node.svelte';
|
||||
// Радар навыков сообщества.
|
||||
// 6 осей в 3 делениях по соседству: MIND / BODY / KNOWLEDGE.
|
||||
// Имена осей — ВОДЯНЫЕ ЗНАКИ в полосе между кольцами R_AXIS и R_ARC:
|
||||
@ -252,7 +253,9 @@
|
||||
<div class="rank-head">
|
||||
<div class="rank-intro">
|
||||
<h3 class="rank-title">Ранг система</h3>
|
||||
<p class="rank-sub">МЕТРИКИ И ИЗМЕРЕНИЕ</p>
|
||||
<Node label="МЕТРИКИ И ИЗМЕРЕНИЕ" accent>
|
||||
<p class="bx-note">…</p>
|
||||
</Node>
|
||||
</div>
|
||||
<div class="rank-side">
|
||||
<span class="rank-kicker">текущий ранг</span>
|
||||
@ -446,15 +449,9 @@
|
||||
text-transform: uppercase;
|
||||
color: var(--dim);
|
||||
}
|
||||
.rank-sub {
|
||||
margin: 0;
|
||||
font-family: var(--mono);
|
||||
font-size: clamp(13px, 1.8vw, 16px);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--acc);
|
||||
text-shadow: 0 0 12px rgba(79, 240, 183, 0.35);
|
||||
}
|
||||
/* сохраняем прежний кегль подзаголовка внутри шапки ранга */
|
||||
.rank-intro :global(.head.accent) { font-size: clamp(13px, 1.8vw, 16px); }
|
||||
.rank-intro :global(.node .body) { padding-left: 20px; }
|
||||
.rank-grade {
|
||||
font-family: var(--mono);
|
||||
font-size: 46px;
|
||||
|
||||
Reference in New Issue
Block a user