mohsin-devs commited on
Commit
508fdfd
Β·
1 Parent(s): 8b0de68

Refine links page visual hierarchy

Browse files
Files changed (2) hide show
  1. js/main.js +4 -2
  2. styles.css +117 -46
js/main.js CHANGED
@@ -521,10 +521,12 @@ class App {
521
  const hasSearch = Boolean(this.state.linksSearchQuery);
522
  linksContainer.innerHTML = `
523
  <div class="links-empty">
524
- <i class="ph-fill ph-link"></i>
 
 
525
  <h3>${hasSearch ? 'No links match your search' : 'No links saved yet'}</h3>
526
  <p>${hasSearch ? 'Try a different title, URL, or note.' : 'Add your first site to start building your link vault.'}</p>
527
- ${hasSearch ? '' : '<button class="btn-primary" id="emptyStateAddLinkBtn"><i class="ph-fill ph-link-plus"></i> Add Your First Link</button>'}
528
  </div>
529
  `;
530
 
 
521
  const hasSearch = Boolean(this.state.linksSearchQuery);
522
  linksContainer.innerHTML = `
523
  <div class="links-empty">
524
+ <div class="links-empty-illustration">
525
+ <i class="ph-fill ph-link"></i>
526
+ </div>
527
  <h3>${hasSearch ? 'No links match your search' : 'No links saved yet'}</h3>
528
  <p>${hasSearch ? 'Try a different title, URL, or note.' : 'Add your first site to start building your link vault.'}</p>
529
+ ${hasSearch ? '' : '<button class="btn-secondary btn-link-secondary" id="emptyStateAddLinkBtn"><i class="ph-fill ph-link-plus"></i> Add Your First Link</button>'}
530
  </div>
531
  `;
532
 
styles.css CHANGED
@@ -23,6 +23,13 @@
23
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
24
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
25
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
 
 
 
 
 
 
 
26
  }
27
 
28
  /* ── Reset ── */
@@ -451,50 +458,53 @@ body {
451
  .links-view {
452
  display: flex;
453
  flex-direction: column;
454
- gap: 24px;
455
- padding-top: 12px;
456
  }
457
 
458
  .links-hero {
459
  background:
460
- radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32%),
461
- linear-gradient(135deg, #0f172a, #1e293b 55%, #164e63);
462
  color: #f8fafc;
463
- border-radius: 24px;
464
- padding: 28px;
 
465
  display: flex;
466
  align-items: center;
467
  justify-content: space-between;
468
- gap: 20px;
469
  box-shadow: var(--shadow-lg);
470
  }
471
 
472
  .links-eyebrow {
473
  display: inline-flex;
474
  font-size: 11px;
475
- letter-spacing: 1.4px;
476
  text-transform: uppercase;
477
  color: rgba(255, 255, 255, 0.7);
478
- margin-bottom: 12px;
479
  }
480
 
481
  .links-hero h2 {
482
- font-size: 30px;
483
- line-height: 1.1;
484
- letter-spacing: -1px;
485
- margin-bottom: 10px;
 
486
  }
487
 
488
  .links-hero p {
489
  max-width: 560px;
490
  color: rgba(241, 245, 249, 0.82);
491
- line-height: 1.6;
492
  }
493
 
494
  .links-toolbar {
495
  display: grid;
496
  grid-template-columns: repeat(2, minmax(0, 180px)) minmax(240px, 1fr);
497
- gap: 16px;
 
498
  }
499
 
500
  .links-insights {
@@ -508,12 +518,12 @@ body {
508
  display: inline-flex;
509
  align-items: center;
510
  gap: 8px;
511
- padding: 10px 14px;
512
  border-radius: 999px;
513
  background: rgba(255, 255, 255, 0.9);
514
  border: 1px solid var(--border-color);
515
  color: var(--text-muted);
516
- font-size: 13px;
517
  font-weight: 500;
518
  box-shadow: var(--shadow-sm);
519
  }
@@ -527,27 +537,37 @@ body {
527
  .links-search {
528
  background: var(--card);
529
  border: 1px solid var(--border-color);
530
- border-radius: 18px;
531
- padding: 18px 20px;
532
- box-shadow: var(--shadow-sm);
 
533
  }
534
 
535
  .links-stat-card {
536
  display: flex;
537
  flex-direction: column;
538
  gap: 8px;
 
 
 
 
 
 
 
 
539
  }
540
 
541
  .links-stat-label {
542
  font-size: 11px;
543
  text-transform: uppercase;
544
- letter-spacing: 1px;
545
  color: var(--text-muted);
546
  font-weight: 700;
547
  }
548
 
549
  .links-stat-card strong {
550
- font-size: 28px;
 
551
  color: var(--text-main);
552
  }
553
 
@@ -555,11 +575,13 @@ body {
555
  display: flex;
556
  align-items: center;
557
  gap: 12px;
 
 
558
  }
559
 
560
  .links-search i {
561
  color: var(--text-muted);
562
- font-size: 18px;
563
  }
564
 
565
  .links-search input {
@@ -568,10 +590,15 @@ body {
568
  background: transparent;
569
  outline: none;
570
  font-family: inherit;
571
- font-size: 14px;
572
  color: var(--text-main);
573
  }
574
 
 
 
 
 
 
575
  .link-preview-panel {
576
  display: flex;
577
  align-items: center;
@@ -635,8 +662,8 @@ body {
635
  display: flex;
636
  justify-content: space-between;
637
  align-items: center;
638
- margin-bottom: 20px;
639
- padding-top: 12px;
640
  }
641
 
642
  .section-header h2 {
@@ -1166,10 +1193,10 @@ body {
1166
  /* ── BUTTONS ── */
1167
  .btn-primary {
1168
  padding: 10px 20px;
1169
- background: var(--primary-color);
1170
  color: white;
1171
  border: none;
1172
- border-radius: 10px;
1173
  font-family: inherit;
1174
  font-size: 14px;
1175
  font-weight: 600;
@@ -1177,12 +1204,14 @@ body {
1177
  display: flex;
1178
  align-items: center;
1179
  gap: 6px;
1180
- transition: all 0.15s ease;
 
1181
  }
1182
 
1183
  .btn-primary:hover {
1184
- background: var(--primary-hover);
1185
- transform: translateY(-1px);
 
1186
  }
1187
 
1188
  .btn-secondary {
@@ -1190,17 +1219,31 @@ body {
1190
  background: transparent;
1191
  color: var(--text-muted);
1192
  border: 1px solid var(--border-color);
1193
- border-radius: 10px;
1194
  font-family: inherit;
1195
  font-size: 14px;
1196
  font-weight: 600;
1197
  cursor: pointer;
1198
- transition: all 0.15s ease;
1199
  }
1200
 
1201
  .btn-secondary:hover {
1202
  background: var(--hover-bg);
1203
  color: var(--text-main);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1204
  }
1205
 
1206
  .btn-danger {
@@ -1695,6 +1738,8 @@ body {
1695
  .grid-container { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
1696
  .links-toolbar { grid-template-columns: 1fr 1fr; }
1697
  .links-search { grid-column: 1 / -1; }
 
 
1698
  }
1699
 
1700
  @media (max-width: 768px) {
@@ -1734,15 +1779,25 @@ body {
1734
  .file-preview { height: 92px; }
1735
  .links-hero {
1736
  padding: 20px;
 
1737
  flex-direction: column;
1738
  align-items: flex-start;
1739
  }
1740
- .links-hero h2 { font-size: 24px; }
1741
  .links-toolbar { grid-template-columns: 1fr; }
1742
  .links-stat-card strong { font-size: 22px; }
1743
  .links-note-chip { width: 100%; justify-content: center; }
1744
  .link-card-topline { flex-direction: column; }
1745
  .shortcut-hint { width: 100%; margin-right: 0; }
 
 
 
 
 
 
 
 
 
1746
 
1747
  /* Mobile Menu Toggle */
1748
  .menu-toggle {
@@ -1880,8 +1935,8 @@ body {
1880
  .links-container {
1881
  display: grid;
1882
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
1883
- gap: 16px;
1884
- margin-top: 16px;
1885
  }
1886
 
1887
  .link-card {
@@ -2047,29 +2102,45 @@ body {
2047
  flex-direction: column;
2048
  align-items: center;
2049
  justify-content: center;
2050
- padding: 60px 20px;
2051
  text-align: center;
2052
  color: var(--text-muted);
2053
  animation: fadeInUp 0.6s ease-out;
2054
  }
2055
 
2056
- .links-empty i {
2057
- font-size: 48px;
2058
- margin-bottom: 16px;
2059
- opacity: 0.6;
 
 
 
 
 
 
 
 
 
 
 
 
2060
  animation: bounceIn 0.8s ease-out;
2061
  }
2062
 
2063
  .links-empty h3 {
2064
- font-size: 18px;
2065
- font-weight: 600;
2066
- margin-bottom: 8px;
 
2067
  color: var(--text-main);
2068
  }
2069
 
2070
  .links-empty p {
2071
- font-size: 14px;
2072
- margin-bottom: 20px;
 
 
 
2073
  }
2074
 
2075
  .input-group textarea {
 
23
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
24
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
25
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
26
+ --radius-sm: 12px;
27
+ --radius-md: 16px;
28
+ --radius-lg: 20px;
29
+ --space-1: 8px;
30
+ --space-2: 16px;
31
+ --space-3: 24px;
32
+ --space-4: 32px;
33
  }
34
 
35
  /* ── Reset ── */
 
458
  .links-view {
459
  display: flex;
460
  flex-direction: column;
461
+ gap: var(--space-3);
462
+ padding-top: var(--space-2);
463
  }
464
 
465
  .links-hero {
466
  background:
467
+ radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 30%),
468
+ linear-gradient(135deg, #16233f, #21314b 56%, #1c5667);
469
  color: #f8fafc;
470
+ border-radius: var(--radius-lg);
471
+ padding: 22px 28px;
472
+ min-height: 196px;
473
  display: flex;
474
  align-items: center;
475
  justify-content: space-between;
476
+ gap: var(--space-3);
477
  box-shadow: var(--shadow-lg);
478
  }
479
 
480
  .links-eyebrow {
481
  display: inline-flex;
482
  font-size: 11px;
483
+ letter-spacing: 1px;
484
  text-transform: uppercase;
485
  color: rgba(255, 255, 255, 0.7);
486
+ margin-bottom: var(--space-2);
487
  }
488
 
489
  .links-hero h2 {
490
+ font-size: 28px;
491
+ line-height: 1.12;
492
+ letter-spacing: -0.6px;
493
+ margin-bottom: 12px;
494
+ max-width: 760px;
495
  }
496
 
497
  .links-hero p {
498
  max-width: 560px;
499
  color: rgba(241, 245, 249, 0.82);
500
+ line-height: 1.7;
501
  }
502
 
503
  .links-toolbar {
504
  display: grid;
505
  grid-template-columns: repeat(2, minmax(0, 180px)) minmax(240px, 1fr);
506
+ gap: var(--space-2);
507
+ align-items: stretch;
508
  }
509
 
510
  .links-insights {
 
518
  display: inline-flex;
519
  align-items: center;
520
  gap: 8px;
521
+ padding: 9px 14px;
522
  border-radius: 999px;
523
  background: rgba(255, 255, 255, 0.9);
524
  border: 1px solid var(--border-color);
525
  color: var(--text-muted);
526
+ font-size: 12px;
527
  font-weight: 500;
528
  box-shadow: var(--shadow-sm);
529
  }
 
537
  .links-search {
538
  background: var(--card);
539
  border: 1px solid var(--border-color);
540
+ border-radius: var(--radius-md);
541
+ padding: 22px 24px;
542
+ box-shadow: 0 2px 8px rgba(0,0,0,0.05);
543
+ transition: all 0.2s ease;
544
  }
545
 
546
  .links-stat-card {
547
  display: flex;
548
  flex-direction: column;
549
  gap: 8px;
550
+ min-height: 118px;
551
+ justify-content: center;
552
+ }
553
+
554
+ .links-stat-card:hover,
555
+ .links-search:hover {
556
+ transform: translateY(-2px);
557
+ box-shadow: var(--shadow-md);
558
  }
559
 
560
  .links-stat-label {
561
  font-size: 11px;
562
  text-transform: uppercase;
563
+ letter-spacing: 0.8px;
564
  color: var(--text-muted);
565
  font-weight: 700;
566
  }
567
 
568
  .links-stat-card strong {
569
+ font-size: 24px;
570
+ line-height: 1.1;
571
  color: var(--text-main);
572
  }
573
 
 
575
  display: flex;
576
  align-items: center;
577
  gap: 12px;
578
+ min-height: 118px;
579
+ border-color: #d7e2ee;
580
  }
581
 
582
  .links-search i {
583
  color: var(--text-muted);
584
+ font-size: 22px;
585
  }
586
 
587
  .links-search input {
 
590
  background: transparent;
591
  outline: none;
592
  font-family: inherit;
593
+ font-size: 15px;
594
  color: var(--text-main);
595
  }
596
 
597
+ .links-search:focus-within {
598
+ border-color: #22c55e;
599
+ box-shadow: 0 0 0 2px #22c55e;
600
+ }
601
+
602
  .link-preview-panel {
603
  display: flex;
604
  align-items: center;
 
662
  display: flex;
663
  justify-content: space-between;
664
  align-items: center;
665
+ margin-bottom: var(--space-2);
666
+ padding-top: var(--space-1);
667
  }
668
 
669
  .section-header h2 {
 
1193
  /* ── BUTTONS ── */
1194
  .btn-primary {
1195
  padding: 10px 20px;
1196
+ background: #12c989;
1197
  color: white;
1198
  border: none;
1199
+ border-radius: var(--radius-sm);
1200
  font-family: inherit;
1201
  font-size: 14px;
1202
  font-weight: 600;
 
1204
  display: flex;
1205
  align-items: center;
1206
  gap: 6px;
1207
+ transition: all 0.2s ease;
1208
+ box-shadow: 0 4px 12px rgba(0,0,0,0.1);
1209
  }
1210
 
1211
  .btn-primary:hover {
1212
+ background: #0fb67b;
1213
+ transform: translateY(-2px);
1214
+ box-shadow: 0 8px 18px rgba(16, 185, 129, 0.22);
1215
  }
1216
 
1217
  .btn-secondary {
 
1219
  background: transparent;
1220
  color: var(--text-muted);
1221
  border: 1px solid var(--border-color);
1222
+ border-radius: var(--radius-sm);
1223
  font-family: inherit;
1224
  font-size: 14px;
1225
  font-weight: 600;
1226
  cursor: pointer;
1227
+ transition: all 0.2s ease;
1228
  }
1229
 
1230
  .btn-secondary:hover {
1231
  background: var(--hover-bg);
1232
  color: var(--text-main);
1233
+ transform: translateY(-1px);
1234
+ }
1235
+
1236
+ .btn-link-secondary {
1237
+ border-color: rgba(18, 201, 137, 0.3);
1238
+ color: #0f9f70;
1239
+ background: #ffffff;
1240
+ box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
1241
+ }
1242
+
1243
+ .btn-link-secondary:hover {
1244
+ background: #ecfdf5;
1245
+ border-color: #12c989;
1246
+ color: #0d8e63;
1247
  }
1248
 
1249
  .btn-danger {
 
1738
  .grid-container { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
1739
  .links-toolbar { grid-template-columns: 1fr 1fr; }
1740
  .links-search { grid-column: 1 / -1; }
1741
+ .links-hero h2 { font-size: 24px; }
1742
+ .links-empty h3 { font-size: 28px; }
1743
  }
1744
 
1745
  @media (max-width: 768px) {
 
1779
  .file-preview { height: 92px; }
1780
  .links-hero {
1781
  padding: 20px;
1782
+ min-height: auto;
1783
  flex-direction: column;
1784
  align-items: flex-start;
1785
  }
1786
+ .links-hero h2 { font-size: 22px; }
1787
  .links-toolbar { grid-template-columns: 1fr; }
1788
  .links-stat-card strong { font-size: 22px; }
1789
  .links-note-chip { width: 100%; justify-content: center; }
1790
  .link-card-topline { flex-direction: column; }
1791
  .shortcut-hint { width: 100%; margin-right: 0; }
1792
+ .links-empty {
1793
+ padding: 72px 20px 80px;
1794
+ }
1795
+ .links-empty h3 {
1796
+ font-size: 26px;
1797
+ }
1798
+ .links-empty p {
1799
+ font-size: 15px;
1800
+ }
1801
 
1802
  /* Mobile Menu Toggle */
1803
  .menu-toggle {
 
1935
  .links-container {
1936
  display: grid;
1937
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
1938
+ gap: var(--space-2);
1939
+ margin-top: var(--space-2);
1940
  }
1941
 
1942
  .link-card {
 
2102
  flex-direction: column;
2103
  align-items: center;
2104
  justify-content: center;
2105
+ padding: 88px 24px 96px;
2106
  text-align: center;
2107
  color: var(--text-muted);
2108
  animation: fadeInUp 0.6s ease-out;
2109
  }
2110
 
2111
+ .links-empty-illustration {
2112
+ width: 92px;
2113
+ height: 92px;
2114
+ border-radius: 28px;
2115
+ display: flex;
2116
+ align-items: center;
2117
+ justify-content: center;
2118
+ margin-bottom: var(--space-3);
2119
+ background: linear-gradient(180deg, #e2fdf1, #d8f7eb);
2120
+ box-shadow: 0 12px 30px rgba(16, 185, 129, 0.12);
2121
+ }
2122
+
2123
+ .links-empty-illustration i {
2124
+ font-size: 44px;
2125
+ color: #12c989;
2126
+ opacity: 1;
2127
  animation: bounceIn 0.8s ease-out;
2128
  }
2129
 
2130
  .links-empty h3 {
2131
+ font-size: 34px;
2132
+ font-weight: 700;
2133
+ line-height: 1.1;
2134
+ margin-bottom: 12px;
2135
  color: var(--text-main);
2136
  }
2137
 
2138
  .links-empty p {
2139
+ font-size: 16px;
2140
+ line-height: 1.7;
2141
+ max-width: 420px;
2142
+ margin-bottom: var(--space-3);
2143
+ color: #7c8da5;
2144
  }
2145
 
2146
  .input-group textarea {