First Initialization
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>گراف گزارهها - نود {{ node_id }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout-container">
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-content">
|
||||
<h2>اطلاعات گراف</h2>
|
||||
<p style="font-size: 0.85em; color: #aaa; margin-bottom: 20px;">
|
||||
نود مربوطه: <span style="color: #e9c46a;">{{ node_id }}</span>
|
||||
</p>
|
||||
|
||||
<div id="hover-info" class="details-box" style="transition: all 0.3s ease; border-right-color: #444;">
|
||||
<em>برای مشاهده جزئیات، موس را روی گزارهها یا خطوط ارتباطی ببرید...</em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<button onclick="window.close()" class="btn btn-secondary btn-block" style="background-color: #444;">بستن این پنجره</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-content">
|
||||
<iframe src="/graph_iframe/{{ project_name }}/{{ node_id }}" class="graph-iframe" id="graph-iframe"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>داشبورد پردازش متن</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>پروژههای گذشته</h1>
|
||||
<a href="/new_project" class="btn">+ ایجاد پروژه جدید</a>
|
||||
<hr style="border-color: #444; margin: 20px 0;">
|
||||
<ul class="project-list">
|
||||
{% for project in projects %}
|
||||
<li>
|
||||
<span>پروژه: {{ project }}</span>
|
||||
<a href="/tree/{{ project }}">مشاهده درخت</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>هیچ پروژهای یافت نشد.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>در حال پردازش...</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="text-align: center;">
|
||||
<h2>در حال ساخت گراف تعاملی...</h2>
|
||||
<p>در حال ارتباط با API و پردازش روابط علی و غایی.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>پروژه جدید</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="process-form">
|
||||
<h1>تعریف پروژه جدید</h1>
|
||||
<form action="/process" method="POST" onsubmit="showLoading()">
|
||||
<label for="text">متن ورودی خود را وارد کنید:</label>
|
||||
<textarea id="text" name="text" required placeholder="متن خود را اینجا پیست کنید..."></textarea>
|
||||
|
||||
<label for="target_segments">تعداد سگمنتهای نهایی (اختیاری):</label>
|
||||
<input type="number" id="target_segments" name="target_segments" placeholder="مثلا: 5" min="1">
|
||||
|
||||
<button type="submit">شروع پردازش (Bottom-Up)</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- بخش لودینگ (پنهان در حالت عادی) -->
|
||||
<div class="container" id="loading-section" style="display: none; text-align: center;">
|
||||
<h2>در حال پردازش متن و ساخت درخت...</h2>
|
||||
<p>لطفا صبور باشید. این عملیات ممکن است چند دقیقه طول بکشد.</p>
|
||||
<img src="{{ url_for('static', filename='images/loading.gif') }}" alt="Loading" style="width: 50px;">
|
||||
</div>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>نمایش درخت معنایی - {{ project_name }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout-container">
|
||||
<!-- پنل سمت راست (سایدبار) -->
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-content" id="node-details">
|
||||
<h3>سگمنت: <span id="node-id-display" style="color: #2a9d8f;">انتخاب نشده</span></h3>
|
||||
<p><strong>تعداد جملات:</strong> <span id="node-sentences-count">0</span></p>
|
||||
|
||||
<p><strong>خلاصه (واحد معنایی):</strong></p>
|
||||
<div id="node-summary" class="details-box">
|
||||
برای مشاهده جزئیات، روی یک نود در گراف کلیک کنید.
|
||||
</div>
|
||||
|
||||
<p><strong>جملات اصلی:</strong></p>
|
||||
<div id="node-sentences" class="details-box" style="font-size: 0.9em; line-height: 1.8;">
|
||||
<!-- جملات با کلیک لود میشوند -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<a href="/" class="btn btn-secondary btn-block">بازگشت به داشبورد</a>
|
||||
|
||||
<div class="helper-text">برای استخراج گزارهها و ساخت گراف روابط این سگمنت، روی دکمه زیر کلیک کنید:</div>
|
||||
<a id="btn-build-graph" href="#" class="btn btn-primary disabled btn-block">ساخت و نمایش گراف</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- پنل سمت چپ (محتوای اصلی / گراف) -->
|
||||
<div class="main-content">
|
||||
<iframe src="{{ url_for('tree_iframe', project_name=project_name) }}" class="graph-iframe"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.type === 'node_click') {
|
||||
const nodeId = event.data.id;
|
||||
|
||||
document.getElementById('node-id-display').textContent = nodeId;
|
||||
document.getElementById('node-summary').innerText = event.data.summary;
|
||||
document.getElementById('node-sentences-count').textContent = event.data.num_sentences;
|
||||
document.getElementById('node-sentences').innerHTML = event.data.sentences;
|
||||
|
||||
const btnGraph = document.getElementById('btn-build-graph');
|
||||
btnGraph.href = `/graph/{{ project_name }}/${nodeId}`;
|
||||
btnGraph.classList.remove('disabled');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user