/
spirzen
/
it-knowledge-base
Обзор
Документация
Войти
/
spirzen
/
it-knowledge-base
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
Mobile
src/components/MemoryAddressingDemo.module.css
427 строк
9 KB
Spirzen
Ultra Mega Components Buff
20 май 2026, 03:14
20 май 2026, 03:14
3a2dddc
Код
Авторство
О чём код?
.root { max-width: min(640px, 100%); margin: 0 auto; } .scenarioTabs { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-bottom: 0.65rem; } .scenarioTab { padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--ifm-color-emphasis-300); background: var(--ifm-background-surface-color); font-size: 0.78rem; font-weight: 600; color: var(--ifm-color-content-secondary); cursor: pointer; transition: all 0.2s ease; } .scenarioTab:hover:not(:disabled) { border-color: var(--ifm-color-primary); color: var(--ifm-color-primary); } .scenarioTab:disabled { opacity: 0.55; cursor: not-allowed; } .scenarioTabActive { border-color: var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 12%, var(--ifm-background-surface-color)); color: var(--ifm-color-primary); } .scenarioHint { margin: 0 0 0.85rem; font-size: 0.82rem; line-height: 1.4; text-align: center; color: var(--ifm-color-content-secondary); } /* —— Лента байтов —— */ .tape { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-bottom: 0.75rem; } .tapeCell { display: flex; flex-direction: column; align-items: center; min-width: 3.25rem; padding: 0.35rem 0.25rem; border: 2px solid var(--ifm-color-emphasis-300); border-radius: 8px; background: var(--ifm-background-surface-color); cursor: pointer; transition: all 0.2s ease; font-family: inherit; } .tapeCell:hover { border-color: var(--ifm-color-primary); } .tapeCellSelected { border-color: var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 12%, var(--ifm-background-surface-color)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ifm-color-primary) 18%, transparent); } .tapeCellGroupX { border-top: 3px solid #1565c0; } .tapeCellGroupC { border-top: 3px solid #2e7d32; } .tapeAddr { font-size: 0.62rem; font-family: var(--ifm-font-family-monospace); color: var(--ifm-color-content-secondary); } .tapeValue { font-size: 0.85rem; font-weight: 700; font-family: var(--ifm-font-family-monospace); } .tapeLegend { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; font-size: 0.72rem; color: var(--ifm-color-content-secondary); margin-bottom: 0.75rem; } .legendItem { display: flex; align-items: center; gap: 0.35rem; } .legendSwatch { width: 1rem; height: 0.35rem; border-radius: 2px; } .legendX { background: #1565c0; } .legendC { background: #2e7d32; } .cellInfo { padding: 0.65rem 0.75rem; border-radius: 8px; border: 1px solid var(--ifm-color-emphasis-300); background: var(--ifm-background-surface-color); font-size: 0.84rem; line-height: 1.45; margin-bottom: 0.75rem; } .cellInfo strong { display: block; margin-bottom: 0.25rem; } /* —— MAR / MDR —— */ .cpuBlock { border: 2px solid var(--ifm-color-emphasis-300); border-radius: 10px; padding: 0.55rem 0.65rem; background: var(--ifm-background-surface-color); transition: border-color 0.25s ease, box-shadow 0.25s ease; } .cpuBlockActive { border-color: var(--ifm-color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ifm-color-primary) 18%, transparent); } .cpuTitle { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ifm-color-content-secondary); margin-bottom: 0.45rem; } .regRow { display: flex; flex-wrap: wrap; gap: 0.45rem; } .register { flex: 1; min-width: 5.5rem; padding: 0.4rem 0.5rem; border-radius: 6px; border: 1px solid var(--ifm-color-emphasis-300); background: color-mix(in srgb, var(--ifm-color-emphasis-200) 40%, transparent); transition: all 0.25s ease; } .registerActive { border-color: var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 10%, var(--ifm-background-surface-color)); } .regLabel { display: block; font-size: 0.65rem; font-weight: 700; color: var(--ifm-color-content-secondary); } .regValue { font-family: var(--ifm-font-family-monospace); font-size: 0.8rem; font-weight: 600; } .busColumn { display: flex; flex-direction: column; align-items: center; padding: 0.35rem 0; } .busLine { width: 3px; min-height: 1.5rem; background: var(--ifm-color-emphasis-400); border-radius: 2px; transition: background 0.25s ease, min-height 0.25s ease; } .busLineActive { background: var(--ifm-color-primary); min-height: 2rem; box-shadow: 0 0 8px color-mix(in srgb, var(--ifm-color-primary) 40%, transparent); } .busCaption { font-size: 0.68rem; font-weight: 700; color: var(--ifm-color-content-secondary); margin-top: 0.2rem; text-align: center; } .ramPanel { border: 2px solid var(--ifm-color-emphasis-300); border-radius: 10px; padding: 0.55rem 0.65rem; background: color-mix(in srgb, var(--ifm-color-success) 6%, var(--ifm-background-surface-color)); transition: border-color 0.25s ease, box-shadow 0.25s ease; } .ramPanelActive { border-color: #2e7d32; box-shadow: 0 0 0 3px color-mix(in srgb, #2e7d32 18%, transparent); } .ramGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; margin-top: 0.35rem; } .ramCell { text-align: center; padding: 0.25rem 0.15rem; border-radius: 5px; border: 1px solid transparent; font-size: 0.68rem; transition: all 0.25s ease; } .ramCellHighlight { border-color: var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 14%, var(--ifm-background-surface-color)); font-weight: 700; } .ramCellAddr { display: block; font-family: var(--ifm-font-family-monospace); font-size: 0.6rem; color: var(--ifm-color-content-secondary); } .readFlow { display: flex; flex-direction: column; gap: 0; margin-bottom: 0.75rem; } /* —— Виртуальная память —— */ .virtualLayout { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: stretch; margin-bottom: 0.75rem; } @media (max-width: 560px) { .virtualLayout { grid-template-columns: 1fr; } } .processBox { border: 2px solid var(--ifm-color-emphasis-300); border-radius: 10px; padding: 0.5rem 0.55rem; background: var(--ifm-background-surface-color); transition: all 0.25s ease; } .processBoxActive { border-color: #1565c0; box-shadow: 0 0 0 3px color-mix(in srgb, #1565c0 16%, transparent); } .processBoxBActive { border-color: #6a1b9a; box-shadow: 0 0 0 3px color-mix(in srgb, #6a1b9a 16%, transparent); } .processTitle { font-size: 0.72rem; font-weight: 700; margin-bottom: 0.35rem; } .mmuBox { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0.45rem 0.55rem; border: 2px dashed var(--ifm-color-emphasis-400); border-radius: 10px; background: color-mix(in srgb, var(--ifm-color-warning) 8%, var(--ifm-background-surface-color)); font-size: 0.72rem; font-weight: 700; text-align: center; min-width: 4.5rem; transition: all 0.25s ease; } .mmuBoxActive { border-style: solid; border-color: var(--ifm-color-warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ifm-color-warning) 20%, transparent); } .mapRow { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; margin: 0.2rem 0; font-family: var(--ifm-font-family-monospace); } .mapArrow { color: var(--ifm-color-content-secondary); } .physicalRam { border: 2px solid var(--ifm-color-emphasis-300); border-radius: 10px; padding: 0.55rem 0.65rem; background: color-mix(in srgb, var(--ifm-color-success) 6%, var(--ifm-background-surface-color)); transition: all 0.25s ease; } .physicalRamActive { border-color: #2e7d32; box-shadow: 0 0 0 3px color-mix(in srgb, #2e7d32 16%, transparent); } .frameRow { display: grid; grid-template-columns: 5rem 1fr; gap: 0.35rem; align-items: center; padding: 0.3rem 0.4rem; margin: 0.2rem 0; border-radius: 6px; border: 1px solid transparent; font-size: 0.72rem; transition: all 0.25s ease; } .frameRowHighlight { border-color: var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 10%, transparent); } .stepPanel { margin-bottom: 0.85rem; padding: 0.65rem 0.75rem; border-radius: 8px; border-left: 3px solid var(--ifm-color-primary); background: color-mix(in srgb, var(--ifm-color-primary) 8%, var(--ifm-background-surface-color)); font-size: 0.84rem; line-height: 1.45; } .stepPanel p { margin: 0.35rem 0 0; color: var(--ifm-color-content-secondary); } .stepLabel { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ifm-color-primary); margin-bottom: 0.2rem; } .controls { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-bottom: 0.5rem; } .footer { margin: 0; font-size: 0.72rem; line-height: 1.35; text-align: center; color: var(--ifm-color-content-secondary); }