add/delete records

This commit is contained in:
usmannasir
2025-08-05 14:29:26 +05:00
parent 8d7c15d49b
commit 54112d07b8
4 changed files with 199 additions and 184 deletions

3
.idea/workspace.xml generated
View File

@@ -6,8 +6,9 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment=""> <list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dns/templates/dns/addDeleteDNSRecords.html" beforeDir="false" afterPath="$PROJECT_DIR$/dns/templates/dns/addDeleteDNSRecords.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dns/templates/dns/createNameServer.html" beforeDir="false" afterPath="$PROJECT_DIR$/dns/templates/dns/createNameServer.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/launchChild.html" beforeDir="false" afterPath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/launchChild.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/launchChild.html" beforeDir="false" afterPath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/launchChild.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/listChildDomains.html" beforeDir="false" afterPath="$PROJECT_DIR$/websiteFunctions/templates/websiteFunctions/listChildDomains.html" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -5,6 +5,7 @@
{% block header_scripts %} {% block header_scripts %}
<style> <style>
/* Modern DNS Manager Styles with Dark Mode Support */ /* Modern DNS Manager Styles with Dark Mode Support */
/* Commented out hardcoded :root variables - now using base template variables for proper dark mode support
:root { :root {
--primary-color: #5b5fcf; --primary-color: #5b5fcf;
--primary-hover: #4a4fc4; --primary-hover: #4a4fc4;
@@ -43,7 +44,7 @@
--radius-2xl: 16px; --radius-2xl: 16px;
--transition-base: all 0.2s ease; --transition-base: all 0.2s ease;
} } */
.dns-manager { .dns-manager {
background: transparent; background: transparent;
@@ -69,13 +70,13 @@
.dns-title { .dns-title {
font-size: 28px; font-size: 28px;
font-weight: 700; font-weight: 700;
color: var(--text-primary); color: var(--text-primary, #1e293b);
margin-bottom: 8px; margin-bottom: 8px;
} }
.dns-subtitle { .dns-subtitle {
font-size: 14px; font-size: 14px;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
line-height: 1.6; line-height: 1.6;
} }
@@ -84,28 +85,28 @@
align-items: center; align-items: center;
gap: 8px; gap: 8px;
padding: 10px 20px; padding: 10px 20px;
background: var(--bg-secondary); background: var(--bg-secondary, #f8f9ff);
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
border: 1px solid var(--border-color); border: 1px solid var(--border-primary, #e8e9ff);
border-radius: var(--radius-md); border-radius: 8px;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
transition: var(--transition-base); transition: all 0.2s ease;
} }
.docs-link:hover { .docs-link:hover {
background: var(--primary-color); background: var(--accent-color, #5b5fcf);
color: var(--bg-primary); color: var(--bg-primary, #ffffff);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: var(--shadow-primary); box-shadow: var(--accent-shadow, 0 4px 12px rgba(91,95,207,0.2));
} }
/* PowerDNS Disabled State */ /* PowerDNS Disabled State */
.powerdns-disabled { .powerdns-disabled {
background: #fff8e1; background: var(--warning-light, #fff8e1);
border: 1px solid #ffe082; border: 1px solid var(--warning-border, #ffe082);
border-radius: var(--radius-xl); border-radius: 12px;
padding: 40px; padding: 40px;
text-align: center; text-align: center;
margin-bottom: 30px; margin-bottom: 30px;
@@ -113,30 +114,30 @@
.powerdns-disabled i { .powerdns-disabled i {
font-size: 48px; font-size: 48px;
color: var(--warning-color); color: var(--warning-color, #ffa000);
margin-bottom: 20px; margin-bottom: 20px;
} }
.powerdns-disabled h3 { .powerdns-disabled h3 {
font-size: 20px; font-size: 20px;
color: var(--text-primary); color: var(--text-primary, #1e293b);
margin-bottom: 20px; margin-bottom: 20px;
} }
/* Main Content Card */ /* Main Content Card */
.dns-content-card { .dns-content-card {
background: var(--bg-primary); background: var(--bg-primary, #ffffff);
border-radius: var(--radius-2xl); border-radius: 16px;
box-shadow: var(--shadow-sm), var(--shadow-lg); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)), var(--shadow-lg, 0 10px 40px rgba(0,0,0,0.08));
border: 1px solid var(--border-color); border: 1px solid var(--border-primary, #e8e9ff);
overflow: hidden; overflow: hidden;
} }
/* Domain Selector */ /* Domain Selector */
.domain-selector-section { .domain-selector-section {
padding: 30px; padding: 30px;
background: var(--bg-gradient); background: linear-gradient(135deg, var(--bg-secondary, #f8f9ff) 0%, var(--bg-primary, #fff) 100%);
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-primary, #e8e9ff);
} }
.domain-selector-wrapper { .domain-selector-wrapper {
@@ -147,7 +148,7 @@
.domain-selector-label { .domain-selector-label {
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
margin-bottom: 12px; margin-bottom: 12px;
@@ -157,22 +158,22 @@
.domain-select { .domain-select {
width: 100%; width: 100%;
padding: 12px 16px; padding: 12px 16px;
border: 2px solid var(--border-color); border: 2px solid var(--border-primary, #e8e9ff);
border-radius: var(--radius-lg); border-radius: 10px;
font-size: 15px; font-size: 15px;
color: var(--text-primary); color: var(--text-primary, #1e293b);
background: var(--bg-primary); background: var(--bg-primary, #ffffff);
transition: var(--transition-base); transition: all 0.2s ease;
cursor: pointer; cursor: pointer;
} }
.domain-select:hover { .domain-select:hover {
border-color: var(--border-hover); border-color: var(--accent-color, #5b5fcf);
} }
.domain-select:focus { .domain-select:focus {
outline: none; outline: none;
border-color: var(--border-hover); border-color: var(--accent-color, #5b5fcf);
box-shadow: 0 0 0 3px rgba(91,95,207,0.1); box-shadow: 0 0 0 3px rgba(91,95,207,0.1);
} }
@@ -183,8 +184,8 @@
/* Record Type Tabs */ /* Record Type Tabs */
.record-type-tabs { .record-type-tabs {
background: var(--bg-tertiary); background: var(--bg-secondary, #fafbff);
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-primary, #e8e9ff);
padding: 0 30px; padding: 0 30px;
overflow-x: auto; overflow-x: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@@ -206,17 +207,17 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20px 24px; padding: 20px 24px;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
text-decoration: none; text-decoration: none;
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
transition: var(--transition-base); transition: all 0.2s ease;
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
} }
.record-type-tabs li.active a { .record-type-tabs li.active a {
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
} }
.record-type-tabs li.active::after { .record-type-tabs li.active::after {
@@ -226,12 +227,12 @@
left: 0; left: 0;
right: 0; right: 0;
height: 3px; height: 3px;
background: var(--primary-color); background: var(--accent-color, #5b5fcf);
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
} }
.record-type-tabs a:hover { .record-type-tabs a:hover {
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
} }
/* Record Type Badge */ /* Record Type Badge */
@@ -241,24 +242,24 @@
justify-content: center; justify-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
background: var(--border-color); background: var(--border-primary, #e8e9ff);
border-radius: var(--radius-md); border-radius: 8px;
font-size: 11px; font-size: 11px;
font-weight: 700; font-weight: 700;
margin-right: 10px; margin-right: 10px;
transition: var(--transition-base); transition: all 0.2s ease;
} }
.record-type-tabs li.active .record-type-badge { .record-type-tabs li.active .record-type-badge {
background: var(--primary-color); background: var(--accent-color, #5b5fcf);
color: var(--bg-primary); color: var(--bg-primary, #ffffff);
} }
/* Add Record Form */ /* Add Record Form */
.add-record-form { .add-record-form {
padding: 30px; padding: 30px;
background: var(--bg-tertiary); background: var(--bg-secondary, #fafbff);
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-primary, #e8e9ff);
} }
.record-form-grid { .record-form-grid {
@@ -284,7 +285,7 @@
display: block; display: block;
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 600;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
margin-bottom: 8px; margin-bottom: 8px;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
@@ -294,42 +295,42 @@
.form-field select { .form-field select {
width: 100%; width: 100%;
padding: 10px 14px; padding: 10px 14px;
border: 1px solid var(--border-light); border: 1px solid var(--border-light, #e2e8f0);
border-radius: var(--radius-md); border-radius: 8px;
font-size: 14px; font-size: 14px;
color: var(--text-primary); color: var(--text-primary, #1e293b);
background: var(--bg-primary); background: var(--bg-primary, #ffffff);
transition: var(--transition-base); transition: all 0.2s ease;
} }
.form-field input:hover, .form-field input:hover,
.form-field select:hover { .form-field select:hover {
border-color: var(--border-hover); border-color: var(--accent-color, #5b5fcf);
} }
.form-field input:focus, .form-field input:focus,
.form-field select:focus { .form-field select:focus {
outline: none; outline: none;
border-color: var(--border-hover); border-color: var(--accent-color, #5b5fcf);
box-shadow: 0 0 0 3px rgba(91,95,207,0.1); box-shadow: 0 0 0 3px rgba(91,95,207,0.1);
} }
.form-field input[disabled] { .form-field input[disabled] {
background: var(--bg-light); background: var(--bg-hover, #f1f5f9);
cursor: not-allowed; cursor: not-allowed;
} }
/* Add Button */ /* Add Button */
.btn-add-record { .btn-add-record {
padding: 10px 20px; padding: 10px 20px;
background: var(--primary-color); background: var(--accent-color, #5b5fcf);
color: var(--bg-primary); color: var(--bg-primary, #ffffff);
border: none; border: none;
border-radius: var(--radius-md); border-radius: 8px;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
transition: var(--transition-base); transition: all 0.2s ease;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
@@ -337,7 +338,7 @@
} }
.btn-add-record:hover { .btn-add-record:hover {
background: var(--primary-hover); background: var(--accent-hover, #4a4fc4);
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(91,95,207,0.3); box-shadow: 0 4px 12px rgba(91,95,207,0.3);
} }
@@ -357,7 +358,7 @@
.records-table-title { .records-table-title {
font-size: 18px; font-size: 18px;
font-weight: 700; font-weight: 700;
color: var(--text-primary); color: var(--text-primary, #1e293b);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
@@ -370,8 +371,8 @@
min-width: 28px; min-width: 28px;
height: 28px; height: 28px;
padding: 0 10px; padding: 0 10px;
background: var(--border-color); background: var(--border-primary, #e8e9ff);
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
border-radius: 14px; border-radius: 14px;
font-size: 13px; font-size: 13px;
font-weight: 700; font-weight: 700;
@@ -380,32 +381,32 @@
/* Modern Table */ /* Modern Table */
.modern-dns-table { .modern-dns-table {
width: 100%; width: 100%;
background: var(--bg-primary); background: var(--bg-primary, #ffffff);
border-radius: var(--radius-xl); border-radius: 12px;
overflow: hidden; overflow: hidden;
border: 1px solid var(--border-color); border: 1px solid var(--border-primary, #e8e9ff);
} }
.modern-dns-table thead { .modern-dns-table thead {
background: var(--bg-secondary); background: var(--bg-secondary, #f8f9ff);
} }
.modern-dns-table th { .modern-dns-table th {
padding: 16px 20px; padding: 16px 20px;
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 600;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
text-align: left; text-align: left;
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-primary, #e8e9ff);
} }
.modern-dns-table td { .modern-dns-table td {
padding: 12px 20px; padding: 12px 20px;
font-size: 14px; font-size: 14px;
color: var(--text-primary); color: var(--text-primary, #1e293b);
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-light, #f0f0f0);
} }
.modern-dns-table tbody tr:last-child td { .modern-dns-table tbody tr:last-child td {
@@ -413,7 +414,7 @@
} }
.modern-dns-table tbody tr:hover { .modern-dns-table tbody tr:hover {
background: var(--bg-tertiary); background: var(--bg-secondary, #fafbff);
} }
/* Type Badge in Table */ /* Type Badge in Table */
@@ -421,9 +422,9 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
padding: 4px 10px; padding: 4px 10px;
background: var(--border-color); background: var(--border-primary, #e8e9ff);
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
border-radius: var(--radius-sm); border-radius: 6px;
font-size: 11px; font-size: 11px;
font-weight: 700; font-weight: 700;
text-transform: uppercase; text-transform: uppercase;
@@ -435,22 +436,22 @@
width: 100%; width: 100%;
padding: 6px 10px; padding: 6px 10px;
border: 1px solid transparent; border: 1px solid transparent;
border-radius: var(--radius-sm); border-radius: 6px;
font-size: 14px; font-size: 14px;
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
background: transparent; background: transparent;
transition: var(--transition-base); transition: all 0.2s ease;
} }
.editable-input:hover { .editable-input:hover {
background: var(--bg-secondary); background: var(--bg-secondary, #f8f9ff);
border-color: var(--border-color); border-color: var(--border-primary, #e8e9ff);
} }
.editable-input:focus { .editable-input:focus {
outline: none; outline: none;
background: var(--bg-primary); background: var(--bg-primary, #ffffff);
border-color: var(--border-hover); border-color: var(--accent-color, #5b5fcf);
box-shadow: 0 0 0 3px rgba(91,95,207,0.1); box-shadow: 0 0 0 3px rgba(91,95,207,0.1);
} }
@@ -464,36 +465,36 @@
.btn-action { .btn-action {
padding: 6px 12px; padding: 6px 12px;
border: none; border: none;
border-radius: var(--radius-sm); border-radius: 6px;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
transition: var(--transition-base); transition: all 0.2s ease;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
} }
.btn-save { .btn-save {
background: var(--success-color); background: var(--success-color, #10b981);
color: var(--bg-primary); color: var(--bg-primary, #ffffff);
} }
.btn-save:hover { .btn-save:hover {
background: #059669; background: #059669;
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: var(--shadow-success); box-shadow: var(--success-shadow, 0 2px 8px rgba(16,185,129,0.3));
} }
.btn-delete { .btn-delete {
background: transparent; background: transparent;
color: var(--danger-color); color: var(--danger-color, #ef4444);
padding: 8px; padding: 8px;
} }
.btn-delete:hover { .btn-delete:hover {
background: #fee2e2; background: var(--danger-light, #fee2e2);
border-radius: var(--radius-sm); border-radius: 6px;
} }
/* Loading State */ /* Loading State */
@@ -501,8 +502,8 @@
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
border: 2px solid var(--border-color); border: 2px solid var(--border-primary, #e8e9ff);
border-top-color: var(--primary-color); border-top-color: var(--accent-color, #5b5fcf);
border-radius: 50%; border-radius: 50%;
animation: spin 0.8s linear infinite; animation: spin 0.8s linear infinite;
} }
@@ -515,24 +516,24 @@
.empty-state { .empty-state {
text-align: center; text-align: center;
padding: 60px 30px; padding: 60px 30px;
color: var(--text-muted); color: var(--text-muted, #94a3b8);
} }
.empty-state i { .empty-state i {
font-size: 48px; font-size: 48px;
color: var(--text-light); color: var(--text-muted, #cbd5e1);
margin-bottom: 20px; margin-bottom: 20px;
} }
.empty-state-text { .empty-state-text {
font-size: 16px; font-size: 16px;
color: var(--text-secondary); color: var(--text-secondary, #64748b);
margin-bottom: 8px; margin-bottom: 8px;
} }
.empty-state-subtext { .empty-state-subtext {
font-size: 14px; font-size: 14px;
color: var(--text-muted); color: var(--text-muted, #94a3b8);
} }
/* Alerts */ /* Alerts */
@@ -546,13 +547,13 @@
.dns-alert { .dns-alert {
padding: 16px 20px; padding: 16px 20px;
border-radius: var(--radius-lg); border-radius: 10px;
margin-bottom: 12px; margin-bottom: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
animation: slideIn 0.3s ease-out; animation: slideIn 0.3s ease-out;
box-shadow: var(--shadow-md); box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.1));
} }
@keyframes slideIn { @keyframes slideIn {
@@ -567,15 +568,15 @@
} }
.dns-alert-success { .dns-alert-success {
background: #e8f5e9; background: var(--success-light, #e8f5e9);
border: 1px solid #c8e6c9; border: 1px solid var(--success-border, #c8e6c9);
color: #2e7d32; color: var(--success-text, #2e7d32);
} }
.dns-alert-error { .dns-alert-error {
background: #ffebee; background: var(--danger-light, #ffebee);
border: 1px solid #ffcdd2; border: 1px solid var(--danger-border, #ffcdd2);
color: #c62828; color: var(--danger-text, #c62828);
} }
/* Tooltips */ /* Tooltips */
@@ -590,8 +591,8 @@
justify-content: center; justify-content: center;
width: 16px; width: 16px;
height: 16px; height: 16px;
background: var(--border-color); background: var(--border-primary, #e8e9ff);
color: var(--primary-color); color: var(--accent-color, #5b5fcf);
border-radius: 50%; border-radius: 50%;
font-size: 10px; font-size: 10px;
cursor: help; cursor: help;
@@ -666,7 +667,7 @@
<div class="powerdns-disabled"> <div class="powerdns-disabled">
<i class="fas fa-exclamation-circle"></i> <i class="fas fa-exclamation-circle"></i>
<h3>{% trans "PowerDNS is disabled" %}</h3> <h3>{% trans "PowerDNS is disabled" %}</h3>
<p style="margin-bottom: 24px; color: #64748b;">{% trans "You need to enable PowerDNS to manage DNS records" %}</p> <p style="margin-bottom: 24px; color: var(--text-secondary, #64748b);">{% trans "You need to enable PowerDNS to manage DNS records" %}</p>
<a href="{% url 'managePowerDNS' %}" class="btn-add-record" style="display: inline-flex;"> <a href="{% url 'managePowerDNS' %}" class="btn-add-record" style="display: inline-flex;">
<i class="fas fa-power-off"></i> <i class="fas fa-power-off"></i>
{% trans "Enable PowerDNS" %} {% trans "Enable PowerDNS" %}

View File

@@ -25,7 +25,7 @@
.nameserver-title { .nameserver-title {
font-size: 32px; font-size: 32px;
font-weight: 700; font-weight: 700;
color: #1e293b; color: var(--text-primary, #1e293b);
margin-bottom: 12px; margin-bottom: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -40,7 +40,7 @@
.nameserver-subtitle { .nameserver-subtitle {
font-size: 16px; font-size: 16px;
color: #64748b; color: var(--text-secondary, #64748b);
line-height: 1.6; line-height: 1.6;
max-width: 600px; max-width: 600px;
margin: 0 auto 20px; margin: 0 auto 20px;
@@ -51,9 +51,9 @@
align-items: center; align-items: center;
gap: 8px; gap: 8px;
padding: 10px 20px; padding: 10px 20px;
background: #f8f9ff; background: var(--bg-secondary, #f8f9ff);
color: #5b5fcf; color: #5b5fcf;
border: 1px solid #e8e9ff; border: 1px solid var(--border-primary, #e8e9ff);
border-radius: 8px; border-radius: 8px;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 14px;
@@ -70,8 +70,8 @@
/* PowerDNS Disabled State */ /* PowerDNS Disabled State */
.powerdns-disabled { .powerdns-disabled {
background: #fff8e1; background: var(--warning-light, #fff8e1);
border: 1px solid #ffe082; border: 1px solid var(--warning-border, #ffe082);
border-radius: 12px; border-radius: 12px;
padding: 40px; padding: 40px;
text-align: center; text-align: center;
@@ -86,7 +86,7 @@
.powerdns-disabled h3 { .powerdns-disabled h3 {
font-size: 20px; font-size: 20px;
color: #1e293b; color: var(--text-primary, #1e293b);
margin-bottom: 20px; margin-bottom: 20px;
} }
@@ -122,22 +122,22 @@
} }
.info-card { .info-card {
background: white; background: var(--bg-primary, white);
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
border: 1px solid #e8e9ff; border: 1px solid var(--border-primary, #e8e9ff);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.info-card:hover { .info-card:hover {
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(0,0,0,0.08); box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.08));
} }
.info-card-icon { .info-card-icon {
width: 48px; width: 48px;
height: 48px; height: 48px;
background: #f8f9ff; background: var(--bg-secondary, #f8f9ff);
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -150,35 +150,35 @@
.info-card-title { .info-card-title {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: #1e293b; color: var(--text-primary, #1e293b);
margin-bottom: 8px; margin-bottom: 8px;
} }
.info-card-text { .info-card-text {
font-size: 14px; font-size: 14px;
color: #64748b; color: var(--text-secondary, #64748b);
line-height: 1.6; line-height: 1.6;
} }
/* Main Form Card */ /* Main Form Card */
.nameserver-form-card { .nameserver-form-card {
background: white; background: var(--bg-primary, white);
border-radius: 16px; border-radius: 16px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.08); box-shadow: var(--shadow-md, 0 1px 3px rgba(0,0,0,0.05)), var(--shadow-lg, 0 10px 40px rgba(0,0,0,0.08));
border: 1px solid #e8e9ff; border: 1px solid var(--border-primary, #e8e9ff);
overflow: hidden; overflow: hidden;
} }
.form-card-header { .form-card-header {
background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%); background: linear-gradient(135deg, var(--bg-secondary, #f8f9ff) 0%, var(--bg-primary, #fff) 100%);
padding: 30px; padding: 30px;
border-bottom: 1px solid #e8e9ff; border-bottom: 1px solid var(--border-primary, #e8e9ff);
} }
.form-card-title { .form-card-title {
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
color: #1e293b; color: var(--text-primary, #1e293b);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
@@ -198,14 +198,14 @@
} }
.section-divider { .section-divider {
border-top: 1px solid #e8e9ff; border-top: 1px solid var(--border-primary, #e8e9ff);
margin: 0 30px; margin: 0 30px;
} }
.section-title { .section-title {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: #1e293b; color: var(--text-primary, #1e293b);
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -230,7 +230,7 @@
display: block; display: block;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
color: #64748b; color: var(--text-secondary, #64748b);
margin-bottom: 8px; margin-bottom: 8px;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
@@ -239,16 +239,16 @@
.form-control { .form-control {
width: 100%; width: 100%;
padding: 12px 16px; padding: 12px 16px;
border: 2px solid #e8e9ff; border: 2px solid var(--border-primary, #e8e9ff);
border-radius: 10px; border-radius: 10px;
font-size: 15px; font-size: 15px;
color: #1e293b; color: var(--text-primary, #1e293b);
background: white; background: var(--bg-primary, white);
transition: all 0.2s ease; transition: all 0.2s ease;
} }
.form-control:hover { .form-control:hover {
border-color: #c7c9ff; border-color: var(--border-secondary, #c7c9ff);
} }
.form-control:focus { .form-control:focus {
@@ -263,7 +263,7 @@
gap: 8px; gap: 8px;
margin-top: 8px; margin-top: 8px;
font-size: 13px; font-size: 13px;
color: #94a3b8; color: var(--text-muted, #94a3b8);
} }
.form-hint i { .form-hint i {
@@ -280,8 +280,8 @@
/* Visual Nameserver Display */ /* Visual Nameserver Display */
.nameserver-preview { .nameserver-preview {
background: #f8f9ff; background: var(--bg-secondary, #f8f9ff);
border: 1px solid #e8e9ff; border: 1px solid var(--border-primary, #e8e9ff);
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
margin-bottom: 30px; margin-bottom: 30px;
@@ -290,7 +290,7 @@
.preview-title { .preview-title {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #64748b; color: var(--text-secondary, #64748b);
margin-bottom: 16px; margin-bottom: 16px;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
@@ -303,8 +303,8 @@
} }
.preview-server { .preview-server {
background: white; background: var(--bg-primary, white);
border: 1px solid #e8e9ff; border: 1px solid var(--border-primary, #e8e9ff);
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 16px;
text-align: center; text-align: center;
@@ -326,21 +326,21 @@
.preview-server-name { .preview-server-name {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #1e293b; color: var(--text-primary, #1e293b);
margin-bottom: 4px; margin-bottom: 4px;
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
} }
.preview-server-ip { .preview-server-ip {
font-size: 13px; font-size: 13px;
color: #64748b; color: var(--text-secondary, #64748b);
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
} }
/* Submit Button */ /* Submit Button */
.form-actions { .form-actions {
padding: 30px; padding: 30px;
background: #fafbff; background: var(--bg-secondary, #fafbff);
text-align: center; text-align: center;
} }
@@ -377,7 +377,7 @@
display: inline-block; display: inline-block;
width: 20px; width: 20px;
height: 20px; height: 20px;
border: 2px solid #ffffff; border: 2px solid var(--bg-primary, #ffffff);
border-right-color: transparent; border-right-color: transparent;
border-radius: 50%; border-radius: 50%;
animation: spin 0.8s linear infinite; animation: spin 0.8s linear infinite;
@@ -486,7 +486,7 @@
<div class="powerdns-disabled"> <div class="powerdns-disabled">
<i class="fas fa-exclamation-circle"></i> <i class="fas fa-exclamation-circle"></i>
<h3>{% trans "PowerDNS is disabled" %}</h3> <h3>{% trans "PowerDNS is disabled" %}</h3>
<p style="margin-bottom: 24px; color: #64748b;"> <p style="margin-bottom: 24px; color: var(--text-secondary, #64748b);">
{% trans "You need to enable PowerDNS to create custom nameservers" %} {% trans "You need to enable PowerDNS to create custom nameservers" %}
</p> </p>
<a href="{% url 'managePowerDNS' %}" class="enable-btn"> <a href="{% url 'managePowerDNS' %}" class="enable-btn">

View File

@@ -58,7 +58,7 @@
margin: 0 auto; margin: 0 auto;
padding: 20px; padding: 20px;
min-height: 100vh; min-height: 100vh;
background: linear-gradient(180deg, var(--bg-secondary, #f8fafc) 0%, var(--border-light, #e2e8f0) 100%); background: transparent;
} }
/* Page Title Section */ /* Page Title Section */
@@ -112,10 +112,10 @@
/* Main Panel */ /* Main Panel */
.panel { .panel {
background: var(--bg-primary, #ffffff); background: var(--bg-secondary, white);
border-radius: var(--radius-xl); border-radius: var(--radius-xl);
box-shadow: var(--shadow-lg); box-shadow: 0 2px 8px var(--shadow-color, rgba(0,0,0,0.08));
border: 1px solid var(--border-color); border: 1px solid var(--border-color, #e8e9ff);
overflow: hidden; overflow: hidden;
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
@@ -131,11 +131,16 @@
/* Content Box */ /* Content Box */
.content-box { .content-box {
background: var(--bg-primary, #ffffff); background: var(--bg-secondary, white);
border-radius: var(--radius-xl); border-radius: var(--radius-xl);
box-shadow: var(--shadow-lg); box-shadow: 0 2px 8px var(--shadow-color, rgba(0,0,0,0.08));
border: 1px solid var(--border-color); border: 1px solid var(--border-color, #e8e9ff);
overflow: hidden; overflow: hidden;
transition: box-shadow 0.2s;
}
.content-box:hover {
box-shadow: 0 4px 16px var(--shadow-color-hover, rgba(0,0,0,0.12));
} }
/* Content Box Header */ /* Content Box Header */
@@ -145,8 +150,8 @@
margin: 0; margin: 0;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
color: var(--text-primary); color: var(--text-primary, #2f3640);
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color, #e8e9ff);
letter-spacing: -0.3px; letter-spacing: -0.3px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -242,10 +247,10 @@
/* Table Styling */ /* Table Styling */
.table { .table {
margin: 0; margin: 0;
background: var(--bg-primary, white); background: var(--bg-secondary, white);
border-radius: var(--radius-lg); border-radius: var(--radius-lg);
overflow: hidden; overflow: hidden;
box-shadow: var(--shadow-sm); box-shadow: 0 2px 8px var(--shadow-color, rgba(0,0,0,0.08));
} }
.table thead { .table thead {
@@ -264,7 +269,7 @@
.table tbody tr { .table tbody tr {
transition: all var(--transition-base); transition: all var(--transition-base);
border-bottom: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light, #f0f0ff);
} }
.table tbody tr:last-child { .table tbody tr:last-child {
@@ -272,20 +277,20 @@
} }
.table tbody tr:hover { .table tbody tr:hover {
background: var(--bg-hover, #f1f5f9); background: var(--bg-hover, #f8f9ff);
box-shadow: 0 2px 4px rgba(0,0,0,0.04); box-shadow: 0 2px 4px var(--shadow-color, rgba(0,0,0,0.08));
} }
.table tbody td { .table tbody td {
padding: 18px; padding: 18px;
border: none; border: none;
vertical-align: middle; vertical-align: middle;
color: var(--text-primary); color: var(--text-primary, #2f3640);
} }
.row-title { .row-title {
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary, #2f3640);
} }
/* Progress Bar */ /* Progress Bar */
@@ -293,11 +298,11 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 30px; height: 30px;
background: var(--border-light, #e2e8f0); background: var(--border-color, #e8e9ff);
border-radius: var(--radius-full); border-radius: var(--radius-full);
overflow: hidden; overflow: hidden;
margin-bottom: 20px; margin-bottom: 20px;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.06); box-shadow: inset 0 2px 4px var(--shadow-color, rgba(0,0,0,0.08));
} }
.progressbar-value { .progressbar-value {
@@ -319,7 +324,7 @@
.title-hero { .title-hero {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: var(--text-primary); color: var(--text-primary, #2f3640);
margin-bottom: 15px; margin-bottom: 15px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -377,17 +382,20 @@
align-items: center; align-items: center;
gap: 15px; gap: 15px;
padding: 20px; padding: 20px;
background: var(--bg-secondary, #f8fafc); background: var(--bg-hover, #f8f9ff);
border: 1px solid var(--border-color, #e8e9ff);
border-radius: var(--radius-lg); border-radius: var(--radius-lg);
transition: var(--transition-base); transition: var(--transition-base);
text-decoration: none; text-decoration: none;
color: var(--text-primary); color: var(--text-primary, #2f3640);
} }
.icon-box:hover { .icon-box:hover {
background: var(--bg-hover); background: var(--border-color, #e8e9ff);
border-color: var(--accent-color, #5b5fcf);
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: var(--shadow-md); box-shadow: 0 4px 12px var(--accent-shadow-light, rgba(91,95,207,0.15));
color: var(--accent-color, #5b5fcf);
} }
.icon-box img { .icon-box img {
@@ -400,15 +408,19 @@
margin: 0; margin: 0;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary, #2f3640);
}
.icon-box:hover .h4 {
color: var(--accent-color, #5b5fcf);
} }
/* Form Styling */ /* Form Styling */
.form-horizontal { .form-horizontal {
background: var(--bg-light); background: var(--bg-secondary, white);
padding: 25px; padding: 25px;
border-radius: var(--radius-lg); border-radius: var(--radius-lg);
border: 1px solid var(--border-color); border: 1px solid var(--border-color, #e8e9ff);
} }
.form-group { .form-group {
@@ -417,23 +429,24 @@
.control-label { .control-label {
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary, #2f3640);
margin-bottom: 8px; margin-bottom: 8px;
font-size: 14px; font-size: 14px;
} }
.form-control { .form-control {
border: 2px solid var(--border-color); border: 2px solid var(--border-color, #e8e9ff);
border-radius: var(--radius-md); border-radius: var(--radius-md);
padding: 12px 16px; padding: 12px 16px;
font-size: 15px; font-size: 15px;
transition: var(--transition-base); transition: var(--transition-base);
background: var(--bg-primary, white); background: var(--bg-secondary, white);
color: var(--text-primary, #2f3640);
} }
.form-control:focus { .form-control:focus {
border-color: var(--primary-color); border-color: var(--accent-color, #5b5fcf);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); box-shadow: 0 0 0 3px var(--accent-focus, rgba(91,95,207,0.1));
outline: none; outline: none;
} }
@@ -445,11 +458,11 @@
/* Modal and Form Modal Styling */ /* Modal and Form Modal Styling */
.form-horizontal.bordered-row { .form-horizontal.bordered-row {
background: var(--bg-primary, white); background: var(--bg-secondary, white);
padding: 30px; padding: 30px;
border-radius: var(--radius-xl); border-radius: var(--radius-xl);
box-shadow: var(--shadow-lg); box-shadow: 0 10px 40px var(--shadow-color, rgba(0,0,0,0.08));
border: 1px solid var(--border-color); border: 1px solid var(--border-color, #e8e9ff);
margin: 20px 0; margin: 20px 0;
} }
@@ -469,22 +482,22 @@
/* Rewrite Rules and Config Specific Styling */ /* Rewrite Rules and Config Specific Styling */
textarea[ng-model="rewriteRules"], textarea[ng-model="rewriteRules"],
textarea[ng-model="configData"] { textarea[ng-model="configData"] {
background: var(--bg-secondary, #f8fafc); background: var(--bg-code, #f8fafc);
border: 2px solid var(--border-light, #e2e8f0); border: 2px solid var(--border-color, #e8e9ff);
border-radius: var(--radius-lg); border-radius: var(--radius-lg);
padding: 16px; padding: 16px;
font-family: 'Monaco', 'Consolas', 'Courier New', monospace; font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;
color: var(--text-primary, #1e293b); color: var(--text-primary, #2f3640);
min-height: 300px; min-height: 300px;
} }
textarea[ng-model="rewriteRules"]:focus, textarea[ng-model="rewriteRules"]:focus,
textarea[ng-model="configData"]:focus { textarea[ng-model="configData"]:focus {
background: var(--bg-primary, white); background: var(--bg-secondary, white);
border-color: var(--primary-color); border-color: var(--accent-color, #5b5fcf);
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); box-shadow: 0 0 0 4px var(--accent-focus, rgba(91, 95, 207, 0.1));
} }
/* Save button styling */ /* Save button styling */
@@ -493,12 +506,12 @@
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
border-radius: var(--radius-lg); border-radius: var(--radius-lg);
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2); box-shadow: 0 4px 15px var(--accent-shadow, rgba(91, 95, 207, 0.2));
} }
.btn-primary.btn-lg:hover { .btn-primary.btn-lg:hover {
transform: translateY(-3px); transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3); box-shadow: 0 8px 25px var(--accent-shadow, rgba(91, 95, 207, 0.3));
} }
/* Form group spacing */ /* Form group spacing */