PBI-Measure-CallGraph/static/css/style.css
2025-03-16 01:32:50 +08:00

364 lines
5.7 KiB
CSS

/* Global styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f5f5f5;
}
.container {
max-width: 96%;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 30px;
}
h1 {
color: #0078d4;
margin-bottom: 10px;
}
h2 {
color: #0078d4;
margin-bottom: 15px;
font-size: 1.5rem;
}
/* Main content layout - new */
.main-content {
display: flex;
gap: 10px;
}
.visualization-container {
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
flex: 4;
}
.measure-details {
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
flex: 1;
min-width: 30%;
max-width: 40%;
height: fit-content;
position: sticky;
top: 20px;
}
/* Connection panel */
.connection-panel {
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1rem;
}
button {
background-color: #0078d4;
color: white;
border: none;
padding: 10px 15px;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s;
}
button:hover {
background-color: #005a9e;
}
#connection-status {
margin-top: 10px;
font-weight: 500;
}
.success {
color: #107c10;
}
.error {
color: #d83b01;
}
.controls {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.search-box {
flex-grow: 1;
margin-left: 15px;
}
#graph-container {
width: 100%;
height: 500px;
border: 1px solid #ddd;
border-radius: 4px;
overflow: hidden;
margin-bottom: 20px;
}
/* 选中节点相关图 */
#graph-container-detail {
width: 100%;
height: 300px;
border: 1px solid #ddd;
border-radius: 4px;
overflow: hidden;
margin-top: 20px;
position: relative;
}
#graph-container-detail h3 {
margin: 10px;
color: #0078d4;
font-size: 1.2rem;
pointer-events: none;
position: absolute;
z-index: 5;
background-color: rgba(255, 255, 255, 0.7);
padding: 5px;
border-radius: 3px;
}
/* 重置按钮 */
.reset-btn {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
padding: 0;
}
.reset-btn:hover {
background-color: #0078d4;
color: white;
border-color: #0078d4;
}
/* Graph styles */
.node circle {
fill: #0078d4;
stroke: #fff;
stroke-width: 2px;
}
.node text {
font-size: 12px;
fill: #333;
}
/* 高亮节点样式 */
.node.highlighted circle {
fill: #ffb900;
stroke-width: 3px;
}
.node.selected circle {
fill: #107c10;
stroke-width: 3px;
}
/* 连线样式 */
.link {
stroke: #999;
stroke-opacity: 0.6;
stroke-width: 1px;
}
.link.highlighted {
stroke: #ffb900;
stroke-opacity: 0.8;
stroke-width: 2px;
}
/* 搜索匹配的节点文本样式 */
.node.search-match text {
font-weight: bold;
font-size: 14px;
fill: #d83b01;
}
/* 暗淡效果 */
.node.dimmed circle {
fill-opacity: 0.3;
}
.node.dimmed text {
opacity: 0.3;
}
.link.dimmed {
stroke-opacity: 0.2;
}
/* 箭头标记样式 */
.arrow {
fill: #999;
}
.arrow.highlighted {
fill: #ffb900;
}
.arrow.dimmed {
fill-opacity: 0.2;
}
/* Measure details */
#measure-name {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 10px;
}
#measure-expression {
background-color: #f8f8f8;
padding: 15px;
border-radius: 4px;
border: 1px solid #ddd;
white-space: pre-wrap;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
font-size: 0.9rem;
overflow-x: auto;
}
/* Tooltip */
.tooltip {
position: absolute;
background-color: rgba(0, 0, 0, 0.8);
color: white;
padding: 10px;
border-radius: 4px;
font-size: 12px;
max-width: 300px;
z-index: 10;
pointer-events: none;
}
/* 力模型参数 - 使节点更分散 */
.graph-svg {
width: 100%;
height: 100%;
}
/* 水平布局的节点 */
.detail-node.reference circle {
fill: #0078d4;
}
.detail-node.referenced circle {
fill: #107c10;
}
.detail-node.selected circle {
fill: #ffb900;
}
.detail-link {
stroke: #999;
stroke-opacity: 0.6;
stroke-width: 1.5px;
}
/* 详情图中的节点文本 */
.detail-node text {
font-size: 13px;
font-weight: 500;
}
.detail-node.referenced text {
fill: #107c10;
}
.detail-node.reference text {
fill: #0078d4;
}
.detail-node.selected text {
fill: #d83b01;
font-weight: bold;
}
/* 左右布局的连接表单 */
.connection-form {
display: flex;
gap: 20px;
margin-bottom: 15px;
}
.connection-form .form-group {
flex: 1;
}
/* 详情图交互样式 */
.detail-node {
cursor: pointer;
transition: all 0.2s ease;
}
.detail-node circle:hover {
stroke: #333;
stroke-width: 2px;
filter: brightness(1.2);
transform: scale(1.1);
}
.detail-node text:hover {
font-weight: bold;
}
/* 拖动状态样式 */
.detail-node.dragging circle {
stroke: #d83b01;
stroke-width: 3px;
}