First Initialization
This commit is contained in:
@@ -0,0 +1,213 @@
|
||||
/* static/css/style.css */
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background-color: #121212;
|
||||
color: #ffffff;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/* ساختار کلی صفحات دارای سایدبار */
|
||||
.layout-container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* سایدبار */
|
||||
.sidebar {
|
||||
width: 350px;
|
||||
background-color: #1e1e1e;
|
||||
border-left: 1px solid #333;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
box-shadow: -2px 0 5px rgba(0,0,0,0.5);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar h2 {
|
||||
font-size: 1.2rem;
|
||||
border-bottom: 1px solid #444;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.info-box {
|
||||
background-color: #2a2a2a;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
/* بخش اصلی (محل نمایش درخت یا گراف) */
|
||||
.main-content {
|
||||
flex-grow: 1;
|
||||
position: relative;
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
|
||||
iframe.vis-iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* فرمها و دکمهها */
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 50px auto;
|
||||
background-color: #1e1e1e;
|
||||
padding: 30px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
background-color: #2a2a2a;
|
||||
color: #fff;
|
||||
border: 1px solid #444;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
font-family: inherit;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
input[type="number"], input[type="text"] {
|
||||
width: 100%;
|
||||
background-color: #2a2a2a;
|
||||
color: #fff;
|
||||
border: 1px solid #444;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
button, .btn {
|
||||
display: inline-block;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
margin-top: 15px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
button:hover, .btn:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
/* لیست پروژهها */
|
||||
.project-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.project-list li {
|
||||
background-color: #2a2a2a;
|
||||
margin-bottom: 10px;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.project-list a {
|
||||
color: #4da6ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* Container Layout */
|
||||
.layout-container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Sidebar Structure */
|
||||
.sidebar {
|
||||
width: 380px;
|
||||
background-color: #2b2b2b;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-left: 2px solid #444;
|
||||
}
|
||||
|
||||
/* Scrollable Content inside Sidebar */
|
||||
.sidebar-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* Custom Scrollbar for Sidebar */
|
||||
.sidebar-content::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
.sidebar-content::-webkit-scrollbar-thumb {
|
||||
background-color: #555;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Fixed Footer inside Sidebar */
|
||||
.sidebar-footer {
|
||||
flex-shrink: 0;
|
||||
padding: 20px;
|
||||
background-color: #1a1a1a;
|
||||
border-top: 1px solid #444;
|
||||
}
|
||||
|
||||
/* Details Box Styling */
|
||||
.details-box {
|
||||
background-color: #333;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
border-right: 4px solid #2a9d8f;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Main Content Structure */
|
||||
.main-content {
|
||||
flex: 1;
|
||||
background-color: #1a1a1a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.graph-iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Buttons and Helpers */
|
||||
.btn-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.helper-text {
|
||||
text-align: center;
|
||||
font-size: 0.85em;
|
||||
margin-bottom: 10px;
|
||||
color: #ccc;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// static/js/main.js
|
||||
|
||||
window.addEventListener("message", function(event) {
|
||||
const data = event.data;
|
||||
|
||||
if (!data || !data.type) return;
|
||||
|
||||
// بهروزرسانی سایدبار گراف هنگام هاور
|
||||
if (data.type === 'hoverNode' || data.type === 'hoverEdge') {
|
||||
const infoDiv = document.getElementById('hover-info');
|
||||
if (infoDiv) {
|
||||
// تبدیل \n به <br> برای نمایش درست در HTML
|
||||
const formattedInfo = data.info.replace(/\n/g, '<br>');
|
||||
infoDiv.innerHTML = `<strong>جزئیات:</strong><br><br>${formattedInfo}`;
|
||||
infoDiv.style.borderRightColor = data.type === 'hoverEdge' ? '#e9c46a' : '#2a9d8f';
|
||||
}
|
||||
}
|
||||
|
||||
// پاک کردن سایدبار وقتی موس از روی عنصر کنار میرود
|
||||
if (data.type === 'blur') {
|
||||
const infoDiv = document.getElementById('hover-info');
|
||||
if (infoDiv) {
|
||||
infoDiv.innerHTML = '<em>برای مشاهده جزئیات، موس را روی گزارهها یا خطوط ارتباطی ببرید...</em>';
|
||||
infoDiv.style.borderRightColor = '#444';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function showLoading() {
|
||||
document.getElementById('process-form').style.display = 'none';
|
||||
document.getElementById('loading-section').style.display = 'block';
|
||||
}
|
||||
Vendored
+49
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user