First Commit
This commit is contained in:
+751
-9
@@ -1,18 +1,760 @@
|
||||
html { scroll-behavior: smooth; }
|
||||
*{ box-sizing: border-box; margin:0; padding:0;}
|
||||
/* ==========================================================================
|
||||
SYSTEM BLOCKNOTES - MAIN CSS (VANILLA CSS WITH HSL THEME VARIABLES)
|
||||
========================================================================== */
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');
|
||||
|
||||
.main-nav{
|
||||
display:flex;
|
||||
width:100%;
|
||||
gap: 1rem;
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background-color: #0b0f19;
|
||||
color: #f1f5f9;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--secCol14, #38bdf8);
|
||||
text-decoration: none;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--secCol18, #bae6fd);
|
||||
}
|
||||
|
||||
/* --- HEADER & NAVIGATION --- */
|
||||
.navbar-header {
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
max-width: 1240px;
|
||||
margin: 0 auto;
|
||||
padding: 0.85rem 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
list-style-type: none;
|
||||
padding:1rem;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
font-weight: 700;
|
||||
font-size: 1.35rem;
|
||||
color: #ffffff;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.brand-logo .logo-icon {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.main-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.main-nav a {
|
||||
color: #94a3b8;
|
||||
font-weight: 500;
|
||||
font-size: 0.95rem;
|
||||
padding: 0.5rem 0.9rem;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.main-nav a:hover,
|
||||
.main-nav a.active {
|
||||
color: #ffffff;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.admin-link {
|
||||
color: var(--thiCol15, #c084fc) !important;
|
||||
background: rgba(192, 132, 252, 0.1) !important;
|
||||
border: 1px solid rgba(192, 132, 252, 0.25);
|
||||
}
|
||||
|
||||
.admin-link:hover,
|
||||
.admin-link.active {
|
||||
background: rgba(192, 132, 252, 0.25) !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.user-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
padding: 0.35rem 0.75rem;
|
||||
border-radius: 20px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.badge-admin {
|
||||
background: rgba(234, 179, 8, 0.15);
|
||||
border-color: rgba(234, 179, 8, 0.3);
|
||||
color: #fde047;
|
||||
}
|
||||
|
||||
.nav-logout-btn {
|
||||
color: #ef4444 !important;
|
||||
background: rgba(239, 68, 68, 0.08) !important;
|
||||
}
|
||||
|
||||
.nav-logout-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.2) !important;
|
||||
color: #fca5a5 !important;
|
||||
}
|
||||
|
||||
/* --- MAIN WRAPPER & FOOTER --- */
|
||||
.main-wrapper {
|
||||
max-width: 1240px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
background: #090d16;
|
||||
padding: 1.5rem 0;
|
||||
margin-top: auto;
|
||||
color: #64748b;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-container {
|
||||
max-width: 1240px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
/* --- PAGE HEADERS & CARDS --- */
|
||||
.page-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 2rem;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.page-title-group h1 {
|
||||
font-size: 1.85rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
.page-title-group p {
|
||||
color: #94a3b8;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #131b2e;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 14px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* --- BUTTONS --- */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.65rem 1.2rem;
|
||||
border-radius: 8px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
padding: 0.4rem 0.75rem;
|
||||
font-size: 0.82rem;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--priCol10, #22c55e);
|
||||
color: #042f13;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--priCol12, #4ade80);
|
||||
color: #042f13;
|
||||
box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--secCol8, #0284c7);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: var(--secCol10, #0ea5e9);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
|
||||
}
|
||||
|
||||
.btn-dark {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: #e2e8f0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
.btn-dark:hover {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #f87171;
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: #ef4444;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* --- BLOCKNOTE GRID & CARDS --- */
|
||||
.blocknotes-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.blocknote-card {
|
||||
background: #131b2e;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 14px;
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocknote-card:hover {
|
||||
transform: translateY(-4px);
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.blocknote-card-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.blocknote-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.blocknote-owner-tag {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
padding: 0.25rem 0.6rem;
|
||||
border-radius: 20px;
|
||||
background: rgba(14, 165, 233, 0.15);
|
||||
color: #7dd3fc;
|
||||
border: 1px solid rgba(14, 165, 233, 0.3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.blocknote-card-body {
|
||||
font-size: 0.9rem;
|
||||
color: #94a3b8;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.blocknote-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.blocknote-card-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
/* --- VIEW BLOCKNOTE DETAILED NOTE BLOCKS --- */
|
||||
.notes-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.note-block {
|
||||
background: #131b2e;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.note-header {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
padding: 1.1rem 1.5rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.note-header:hover {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
.note-title-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.collapse-icon {
|
||||
font-size: 0.85rem;
|
||||
color: var(--secCol14, #38bdf8);
|
||||
transition: transform 0.25s ease;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.note-block.collapsed .collapse-icon {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.note-block:not(.collapsed) .collapse-icon {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.subnote-count-badge {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
padding: 0.2rem 0.6rem;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
color: #94a3b8;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.note-block.collapsed .note-header {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.note-block.collapsed .note-body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-description-box {
|
||||
padding: 1rem 1.5rem 0.5rem 1.5rem;
|
||||
font-size: 0.92rem;
|
||||
color: #94a3b8;
|
||||
border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.note-title-area h3 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.note-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.subnotes-list {
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.subnote-card {
|
||||
background: #1a243a;
|
||||
border: 1px solid rgba(255, 255, 255, 0.07);
|
||||
border-radius: 12px;
|
||||
padding: 1.25rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.subnote-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
|
||||
.subnote-title-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.subnote-title {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 600;
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.type-badge {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.type-badge.text {
|
||||
background: rgba(148, 163, 184, 0.15);
|
||||
color: #cbd5e1;
|
||||
}
|
||||
|
||||
.type-badge.command {
|
||||
background: rgba(234, 179, 8, 0.15);
|
||||
color: #fde047;
|
||||
border: 1px solid rgba(234, 179, 8, 0.3);
|
||||
}
|
||||
|
||||
.subnote-content-text {
|
||||
font-size: 0.95rem;
|
||||
color: #cbd5e1;
|
||||
white-space: pre-wrap;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 8px;
|
||||
border-left: 3px solid var(--secCol10, #0ea5e9);
|
||||
}
|
||||
|
||||
/* --- COMMAND BLOCK WITH COPY BUTTON --- */
|
||||
.command-block-wrapper {
|
||||
position: relative;
|
||||
background: #050811;
|
||||
border: 1px solid rgba(234, 179, 8, 0.35);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(234, 179, 8, 0.03);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.command-block-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: rgba(234, 179, 8, 0.12);
|
||||
padding: 0.45rem 0.9rem;
|
||||
border-bottom: 1px solid rgba(234, 179, 8, 0.2);
|
||||
font-size: 0.8rem;
|
||||
font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
|
||||
color: #fde047;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.command-badge-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
font-size: 0.82rem;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #ffffff;
|
||||
border: 1px solid rgba(255, 255, 255, 0.25);
|
||||
padding: 0.3rem 0.75rem;
|
||||
border-radius: 6px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.copy-btn:hover {
|
||||
background: #eab308;
|
||||
color: #000000;
|
||||
border-color: #eab308;
|
||||
box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
|
||||
}
|
||||
|
||||
.copy-btn.copied {
|
||||
background: #22c55e !important;
|
||||
color: #042f13 !important;
|
||||
border-color: #22c55e !important;
|
||||
}
|
||||
|
||||
.command-content-code {
|
||||
font-family: 'Fira Code', 'Cascadia Code', 'Monaco', 'Consolas', monospace;
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.5;
|
||||
color: #4ade80;
|
||||
background: #03060d;
|
||||
padding: 0.85rem 1rem;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
max-height: 320px;
|
||||
white-space: pre;
|
||||
margin: 0;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.command-content-code code {
|
||||
font-family: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* --- FORMS & INPUTS --- */
|
||||
.form-group {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 600;
|
||||
color: #cbd5e1;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
width: 100%;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 8px;
|
||||
background: #090d16;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
color: #ffffff;
|
||||
font-size: 0.95rem;
|
||||
font-family: inherit;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
outline: none;
|
||||
border-color: var(--secCol10, #0ea5e9);
|
||||
box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
resize: vertical;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* --- MODAL --- */
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
backdrop-filter: blur(6px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.modal-backdrop.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.modal-card {
|
||||
background: #131b2e;
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 16px;
|
||||
width: 100%;
|
||||
max-width: 540px;
|
||||
padding: 1.75rem;
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
|
||||
transform: translateY(20px);
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
|
||||
.modal-backdrop.active .modal-card {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1.25rem;
|
||||
padding-bottom: 0.75rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.modal-close-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #94a3b8;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.modal-close-btn:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* --- ALERTS & NOTIFICATIONS --- */
|
||||
.alert {
|
||||
padding: 0.9rem 1.2rem;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 0.92rem;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background: rgba(34, 197, 94, 0.15);
|
||||
border: 1px solid rgba(34, 197, 94, 0.3);
|
||||
color: #4ade80;
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
/* --- TABLES (ADMIN) --- */
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.custom-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.custom-table th {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: #cbd5e1;
|
||||
font-weight: 600;
|
||||
padding: 0.85rem 1rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.custom-table td {
|
||||
padding: 0.85rem 1rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.custom-table tr:hover td {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
}
|
||||
|
||||
/* --- COLOR PICKER PREVIEW --- */
|
||||
.color-preview-box {
|
||||
height: 60px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 3rem 1rem;
|
||||
background: #131b2e;
|
||||
border: 1px border-dash rgba(255, 255, 255, 0.1);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.empty-state-icon {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.empty-state h3 {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.empty-state p {
|
||||
color: #94a3b8;
|
||||
max-width: 400px;
|
||||
margin: 0 auto 1.5rem auto;
|
||||
}
|
||||
|
||||
+210
-8
@@ -1,9 +1,211 @@
|
||||
/* @ default js*/
|
||||
function yearNow(textlocation) {
|
||||
//This is a function to substitutes a value into the current year.
|
||||
//Usually good for the footer.
|
||||
var data = new Date();
|
||||
var year;
|
||||
year = data.getFullYear();
|
||||
document.querySelector(textlocation).replaceWith(year);
|
||||
/**
|
||||
* Blocknotes Application Main JavaScript (Vanilla JS)
|
||||
*/
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
// --- 1. MODALS OPEN & CLOSE HANDLERS ---
|
||||
document.querySelectorAll('[data-modal-target]').forEach(function(trigger) {
|
||||
trigger.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const modalId = this.getAttribute('data-modal-target');
|
||||
const modal = document.getElementById(modalId);
|
||||
if (modal) {
|
||||
modal.classList.add('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.modal-close-btn, .modal-close-trigger').forEach(function(closeBtn) {
|
||||
closeBtn.addEventListener('click', function() {
|
||||
const modal = this.closest('.modal-backdrop');
|
||||
if (modal) {
|
||||
modal.classList.remove('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Close modal when clicking on backdrop outside modal-card
|
||||
document.querySelectorAll('.modal-backdrop').forEach(function(backdrop) {
|
||||
backdrop.addEventListener('click', function(e) {
|
||||
if (e.target === this) {
|
||||
this.classList.remove('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// --- 2. LIVE HSL THEME COLOR PREVIEW (PROFILE PAGE) ---
|
||||
const priInput = document.getElementById('theme_pri');
|
||||
const secInput = document.getElementById('theme_sec');
|
||||
const thiInput = document.getElementById('theme_thi');
|
||||
|
||||
if (priInput && secInput && thiInput) {
|
||||
function updateLiveTheme() {
|
||||
const priVal = priInput.value;
|
||||
const secVal = secInput.value;
|
||||
const thiVal = thiInput.value;
|
||||
|
||||
document.documentElement.style.setProperty('--pri', priVal);
|
||||
document.documentElement.style.setProperty('--sec', secVal);
|
||||
document.documentElement.style.setProperty('--thi', thiVal);
|
||||
|
||||
const priValDisp = document.getElementById('pri_val');
|
||||
const secValDisp = document.getElementById('sec_val');
|
||||
const thiValDisp = document.getElementById('thi_val');
|
||||
if (priValDisp) priValDisp.textContent = priVal + '°';
|
||||
if (secValDisp) secValDisp.textContent = secVal + '°';
|
||||
if (thiValDisp) thiValDisp.textContent = thiVal + '°';
|
||||
}
|
||||
|
||||
priInput.addEventListener('input', updateLiveTheme);
|
||||
secInput.addEventListener('input', updateLiveTheme);
|
||||
thiInput.addEventListener('input', updateLiveTheme);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Copy text to clipboard with fallback and localized feedback
|
||||
*/
|
||||
function copyToClipboard(btnElement, textToCopy) {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
navigator.clipboard.writeText(textToCopy).then(() => {
|
||||
handleCopySuccess(btnElement);
|
||||
}).catch(() => {
|
||||
fallbackCopyText(btnElement, textToCopy);
|
||||
});
|
||||
} else {
|
||||
fallbackCopyText(btnElement, textToCopy);
|
||||
}
|
||||
}
|
||||
|
||||
function fallbackCopyText(btnElement, textToCopy) {
|
||||
let textArea = document.createElement("textarea");
|
||||
textArea.value = textToCopy;
|
||||
textArea.style.position = "fixed";
|
||||
textArea.style.left = "-999999px";
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
handleCopySuccess(btnElement);
|
||||
} catch (err) {
|
||||
console.error('Fallback copy failed', err);
|
||||
}
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
|
||||
function handleCopySuccess(btnElement) {
|
||||
if (!btnElement) return;
|
||||
const originalHTML = btnElement.innerHTML;
|
||||
const copiedLabel = btnElement.getAttribute('data-copied-text') || '✓ Copiato!';
|
||||
btnElement.innerHTML = copiedLabel;
|
||||
btnElement.classList.add('copied');
|
||||
setTimeout(() => {
|
||||
btnElement.innerHTML = originalHTML;
|
||||
btnElement.classList.remove('copied');
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle collapse state for a specific note block
|
||||
*/
|
||||
function toggleNoteCollapse(noteId) {
|
||||
const noteBlock = document.getElementById('note-block-' + noteId);
|
||||
if (noteBlock) {
|
||||
noteBlock.classList.toggle('collapsed');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand all note blocks on page
|
||||
*/
|
||||
function expandAllNotes() {
|
||||
document.querySelectorAll('.note-block').forEach(function(nb) {
|
||||
nb.classList.remove('collapsed');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapse all note blocks on page
|
||||
*/
|
||||
function collapseAllNotes() {
|
||||
document.querySelectorAll('.note-block').forEach(function(nb) {
|
||||
nb.classList.add('collapsed');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter notes and subnotes within the current blocknote in real-time
|
||||
*/
|
||||
function filterCurrentBlocknoteNotes(query) {
|
||||
const term = query.toLowerCase().trim();
|
||||
const clearBtn = document.getElementById('clear-search-btn');
|
||||
const noResults = document.getElementById('no-search-results');
|
||||
const noteBlocks = document.querySelectorAll('.note-block');
|
||||
|
||||
if (clearBtn) {
|
||||
clearBtn.style.display = term ? 'inline-flex' : 'none';
|
||||
}
|
||||
|
||||
let totalMatches = 0;
|
||||
|
||||
noteBlocks.forEach(function(noteBlock) {
|
||||
if (!term) {
|
||||
// Reset search
|
||||
noteBlock.style.display = '';
|
||||
noteBlock.classList.add('collapsed');
|
||||
noteBlock.querySelectorAll('.subnote-card').forEach(function(sub) {
|
||||
sub.style.display = '';
|
||||
});
|
||||
totalMatches++;
|
||||
return;
|
||||
}
|
||||
|
||||
const noteTitle = (noteBlock.querySelector('.note-title-wrapper h3')?.innerText || '').toLowerCase();
|
||||
const noteDesc = (noteBlock.querySelector('.note-description-box p')?.innerText || '').toLowerCase();
|
||||
const noteTitleMatch = noteTitle.includes(term) || noteDesc.includes(term);
|
||||
|
||||
let subnoteMatchCount = 0;
|
||||
const subnoteCards = noteBlock.querySelectorAll('.subnote-card');
|
||||
|
||||
subnoteCards.forEach(function(subCard) {
|
||||
const subTitle = (subCard.querySelector('.subnote-title')?.innerText || '').toLowerCase();
|
||||
const subContent = (subCard.querySelector('.subnote-content-text, .command-code')?.innerText || '').toLowerCase();
|
||||
|
||||
if (noteTitleMatch || subTitle.includes(term) || subContent.includes(term)) {
|
||||
subCard.style.display = '';
|
||||
subnoteMatchCount++;
|
||||
} else {
|
||||
subCard.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
if (noteTitleMatch || subnoteMatchCount > 0) {
|
||||
noteBlock.style.display = '';
|
||||
noteBlock.classList.remove('collapsed'); // Auto expand on match
|
||||
totalMatches++;
|
||||
} else {
|
||||
noteBlock.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
if (noResults) {
|
||||
if (term && totalMatches === 0) {
|
||||
noResults.style.display = 'block';
|
||||
} else {
|
||||
noResults.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear search input and restore view
|
||||
*/
|
||||
function clearNoteSearch() {
|
||||
const input = document.getElementById('note-search-input');
|
||||
if (input) {
|
||||
input.value = '';
|
||||
filterCurrentBlocknoteNotes('');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user