Bettern cmap handling. Lots of changes.
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
/* CMap view, concept presentation and CMapTools-like interactions. */
|
||||
|
||||
#cmap-view {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.cmap-page-header {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.cmap-toolbar {
|
||||
display: flex;
|
||||
gap: .45rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.cmap-toolbar button {
|
||||
font: inherit;
|
||||
padding: .35rem .65rem;
|
||||
}
|
||||
|
||||
.cmap-help {
|
||||
margin: .25rem 0 .75rem;
|
||||
}
|
||||
|
||||
.cmap-canvas {
|
||||
position: relative;
|
||||
width: min(1380px, 100%);
|
||||
min-width: 760px;
|
||||
height: 720px;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--wiki-border);
|
||||
background-color: #fbfbf8;
|
||||
background-image:
|
||||
linear-gradient(#ecece7 1px, transparent 1px),
|
||||
linear-gradient(90deg, #ecece7 1px, transparent 1px);
|
||||
background-size: 24px 24px;
|
||||
}
|
||||
|
||||
.cmap-prototype-node {
|
||||
box-sizing: border-box;
|
||||
cursor: move;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 15px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.cmap-card {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 9px 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cmap-card-title {
|
||||
margin-bottom: .3rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cmap-card-synopsis {
|
||||
color: #4b4b4b;
|
||||
font-size: .84rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.cmap-card-page .cmap-card-title::after {
|
||||
content: " ↗";
|
||||
color: #4479a1;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cmap-card-submap .cmap-card-title::after {
|
||||
content: " [+]";
|
||||
color: #57834a;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.rw-cmap-item {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.rw-cmap-selected {
|
||||
z-index: 20 !important;
|
||||
outline: 3px solid #9994ff !important;
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 1px rgb(255 255 255 / 95%),
|
||||
0 0 0 5px rgb(132 126 255 / 38%) !important;
|
||||
}
|
||||
|
||||
.rw-cmap-handle {
|
||||
position: absolute;
|
||||
z-index: 60;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
padding: 0;
|
||||
border: 1px solid #111;
|
||||
border-radius: 0;
|
||||
background: #fff;
|
||||
box-shadow: none;
|
||||
color: #111;
|
||||
cursor: crosshair;
|
||||
font: 10px/1 Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.rw-cmap-relation-handle {
|
||||
top: -21px;
|
||||
left: 50%;
|
||||
width: 34px;
|
||||
height: 12px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.rw-cmap-relation-handle::before,
|
||||
.rw-cmap-relation-handle::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
width: 15px;
|
||||
border-top: 1px solid #111;
|
||||
}
|
||||
|
||||
.rw-cmap-relation-handle::before {
|
||||
left: 2px;
|
||||
transform: rotate(18deg);
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
||||
.rw-cmap-relation-handle::after {
|
||||
right: 2px;
|
||||
transform: rotate(-18deg);
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.rw-cmap-resize-handle {
|
||||
right: -8px;
|
||||
bottom: -8px;
|
||||
background:
|
||||
linear-gradient(135deg,
|
||||
transparent 0 42%,
|
||||
#111 43% 51%,
|
||||
transparent 52% 63%,
|
||||
#111 64% 72%,
|
||||
transparent 73%),
|
||||
#fff;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.rw-cmap-item-phrase {
|
||||
border-radius: 4px !important;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.rw-cmap-phrase-label {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 4px 8px;
|
||||
font-size: 14px;
|
||||
line-height: 1.1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rw-cmap-phrase-input {
|
||||
width: calc(100% - 8px);
|
||||
height: calc(100% - 8px);
|
||||
box-sizing: border-box;
|
||||
margin: 4px;
|
||||
padding: 2px 5px;
|
||||
border: 1px solid #5966d6;
|
||||
background: #fff;
|
||||
font: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rw-cmap-draft-layer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 50;
|
||||
overflow: visible;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.rw-cmap-draft-line {
|
||||
stroke: #4f5ee8;
|
||||
stroke-width: 2.5;
|
||||
stroke-dasharray: 6 4;
|
||||
}
|
||||
|
||||
.rw-cmap-connector {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.cmap-canvas {
|
||||
min-width: 0;
|
||||
height: 620px;
|
||||
}
|
||||
}
|
||||
+283
-4
@@ -9,6 +9,17 @@ body { margin: 0; }
|
||||
button, input, select, textarea { font: inherit; }
|
||||
button { cursor: pointer; }
|
||||
.hidden { display: none !important; }
|
||||
.visually-hidden {
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
height: 1px !important;
|
||||
padding: 0 !important;
|
||||
margin: -1px !important;
|
||||
overflow: hidden !important;
|
||||
clip: rect(0, 0, 0, 0) !important;
|
||||
white-space: nowrap !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
.muted { color: #6b7280; font-size: 0.9rem; }
|
||||
.error { color: #b42318; margin-top: .75rem; }
|
||||
.danger { color: #b42318; }
|
||||
@@ -91,6 +102,14 @@ button { cursor: pointer; }
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
.EasyMDEContainer .editor-toolbar button.rw-mde-button svg {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
vertical-align: middle;
|
||||
stroke-width: 1.9;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.EasyMDEContainer .editor-toolbar button.rw-mde-bold {
|
||||
font-weight: 750;
|
||||
}
|
||||
@@ -207,6 +226,40 @@ body {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.sidebar-icon-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: -2px 0 14px;
|
||||
}
|
||||
|
||||
.sidebar-icon-link {
|
||||
position: relative;
|
||||
display: grid;
|
||||
width: 38px;
|
||||
height: 32px;
|
||||
place-items: center;
|
||||
color: var(--wiki-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidebar-icon-link + .sidebar-icon-link {
|
||||
border-left: 1px solid #c8cbd0;
|
||||
}
|
||||
|
||||
.sidebar-icon-link:hover,
|
||||
.sidebar-icon-link:focus-visible {
|
||||
background: #fff;
|
||||
color: #24356f;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.sidebar-icon-link svg {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
stroke-width: 1.8;
|
||||
}
|
||||
|
||||
#user-box,
|
||||
#sidebar .muted {
|
||||
color: var(--wiki-muted);
|
||||
@@ -452,10 +505,6 @@ body {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.EasyMDEContainer .editor-toolbar button.fa::before {
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
#app { grid-template-columns: 1fr; }
|
||||
#sidebar {
|
||||
@@ -565,10 +614,45 @@ body {
|
||||
}
|
||||
|
||||
.search-result h2 {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 0 5px;
|
||||
font-size: 1.08rem;
|
||||
}
|
||||
|
||||
.search-result-type {
|
||||
display: inline-block;
|
||||
padding: 2px 7px;
|
||||
border: 1px solid #b7c0ca;
|
||||
border-radius: 999px;
|
||||
background: #f3f5f7;
|
||||
color: #536273;
|
||||
font-size: .72rem;
|
||||
font-weight: 650;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.search-result[data-result-type="cmap"] .search-result-type {
|
||||
border-color: #86a77c;
|
||||
background: #edf7e8;
|
||||
color: #35672c;
|
||||
}
|
||||
|
||||
.special-page-heading {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.special-page-row[data-result-type="cmap"] .search-result-type {
|
||||
border-color: #86a77c;
|
||||
background: #edf7e8;
|
||||
color: #35672c;
|
||||
}
|
||||
|
||||
.search-result h2 a {
|
||||
color: var(--wiki-link);
|
||||
text-decoration: none;
|
||||
@@ -1057,6 +1141,16 @@ body.editor-mode .editor-metadata-row {
|
||||
stroke: #1e2f6d;
|
||||
}
|
||||
|
||||
.wiki-graph-node-cmap circle {
|
||||
fill: #57834a;
|
||||
}
|
||||
|
||||
.wiki-graph-node-cmap:hover circle,
|
||||
.wiki-graph-node-cmap:focus circle {
|
||||
fill: #315f2b;
|
||||
stroke: #315f2b;
|
||||
}
|
||||
|
||||
|
||||
/* 0.2.15 context navigation and sticky-anchor correction ---------------- */
|
||||
.context-link {
|
||||
@@ -1218,3 +1312,188 @@ body.editor-mode .editor-metadata-row {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
/* Rename and alias administration */
|
||||
.rename-form { max-width: 48rem; }
|
||||
.rename-form label { display: block; margin: 0 0 1rem; }
|
||||
.rename-form input { display: block; width: 100%; margin-top: .3rem; }
|
||||
.admin-version { margin: 0 0 1rem; }
|
||||
.alias-row { padding: .75rem 0; border-bottom: 1px solid #d9d9d9; }
|
||||
.alias-row .alias-address { font-family: monospace; }
|
||||
.alias-references { margin: .35rem 0 0 1.25rem; }
|
||||
|
||||
.alias-summary { margin-top: .35rem; }
|
||||
.alias-history { color: #666; }
|
||||
.alias-actions { display: flex; gap: .5rem; margin-top: .6rem; }
|
||||
.alias-actions button { font: inherit; }
|
||||
|
||||
/* 0.2.36 context graph overlay and docking ------------------------------ */
|
||||
.page-reading-layout {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-right {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(360px, 42%);
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-top .context-dock {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
.context-dock {
|
||||
border: 1px solid var(--wiki-border);
|
||||
background: #fafafa;
|
||||
padding: .75rem;
|
||||
position: sticky;
|
||||
top: 84px;
|
||||
max-height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.context-dock-header,
|
||||
.context-overlay-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.context-graph-actions {
|
||||
display: flex;
|
||||
gap: .7rem;
|
||||
flex-wrap: wrap;
|
||||
font-size: .82rem;
|
||||
}
|
||||
|
||||
.context-graph-actions a {
|
||||
color: var(--wiki-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.context-graph-actions a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.context-graph-small {
|
||||
min-width: 0;
|
||||
min-height: 320px;
|
||||
max-height: 520px;
|
||||
}
|
||||
|
||||
.context-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 500;
|
||||
background: rgb(0 0 0 / 35%);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.context-overlay-panel {
|
||||
width: min(1180px, 96vw);
|
||||
max-height: 92vh;
|
||||
overflow: auto;
|
||||
background: white;
|
||||
border: 1px solid var(--wiki-border);
|
||||
box-shadow: 0 14px 44px rgb(0 0 0 / 24%);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.context-overlay-header h2 {
|
||||
margin: 0 0 .2rem;
|
||||
}
|
||||
|
||||
.context-overlay-graph-shell {
|
||||
margin-top: .8rem;
|
||||
}
|
||||
|
||||
.wiki-graph-edges marker path {
|
||||
fill: #9a9a9a;
|
||||
}
|
||||
|
||||
.wiki-graph-edge-incoming {
|
||||
stroke: #7a5d9e !important;
|
||||
}
|
||||
|
||||
.wiki-graph-edge-outgoing {
|
||||
stroke: #46639b !important;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.page-reading-layout.context-dock-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-right .context-dock {
|
||||
order: -1;
|
||||
width: 100%;
|
||||
position: static;
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.context-overlay {
|
||||
padding: .5rem;
|
||||
}
|
||||
|
||||
.context-overlay-panel {
|
||||
width: 100%;
|
||||
max-height: 96vh;
|
||||
}
|
||||
|
||||
.context-overlay-header {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-graph-actions {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep the established document width and use otherwise empty desktop
|
||||
space for the docked context view. */
|
||||
#page-view:has(.context-dock-right) {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-right {
|
||||
grid-template-columns: minmax(0, 900px) minmax(420px, 520px);
|
||||
justify-content: start;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-right .markdown-body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-reading-layout.context-dock-right .context-dock {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.context-dock .wiki-graph-node text {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.context-dock .wiki-graph-node-focus text {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: 1450px) {
|
||||
.page-reading-layout.context-dock-right {
|
||||
grid-template-columns: minmax(0, 760px) minmax(360px, 440px);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user