cyberai-1 commited on
Commit
4ba1c15
·
1 Parent(s): 7a8c53b

Improve responsive layout and hide scrollbars

Browse files
Files changed (2) hide show
  1. static/css/app.css +106 -24
  2. templates/predict.html +7 -3
static/css/app.css CHANGED
@@ -16,9 +16,24 @@
16
  box-sizing: border-box;
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  body {
20
  margin: 0;
21
  min-height: 100vh;
 
 
22
  color: var(--text);
23
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
24
  background:
@@ -128,8 +143,10 @@ main {
128
  position: relative;
129
  z-index: 1;
130
  width: min(1160px, calc(100% - 32px));
 
131
  margin: 0 auto;
132
- padding: 42px 0 64px;
 
133
  }
134
 
135
  .home-page main {
@@ -236,6 +253,9 @@ h2 {
236
  .button,
237
  .feedback,
238
  .neon-button {
 
 
 
239
  border: 0;
240
  border-radius: 8px;
241
  padding: 12px 16px;
@@ -519,7 +539,7 @@ table {
519
  .page-grid {
520
  display: grid;
521
  grid-template-columns: minmax(0, 1fr) 380px;
522
- gap: 20px;
523
  align-items: start;
524
  }
525
 
@@ -528,11 +548,23 @@ table {
528
  padding: 24px;
529
  }
530
 
 
 
 
 
 
 
 
 
531
  .tool-panel h1,
532
  .dashboard-head h1 {
533
  font-size: clamp(2rem, 5vw, 3.8rem);
534
  }
535
 
 
 
 
 
536
  .model-warning {
537
  margin: 18px 0;
538
  border: 1px solid rgba(255, 209, 102, 0.48);
@@ -544,7 +576,7 @@ table {
544
 
545
  .upload-form {
546
  display: grid;
547
- gap: 14px;
548
  max-width: 520px;
549
  }
550
 
@@ -598,7 +630,7 @@ table {
598
 
599
  .preview-card img {
600
  width: 100%;
601
- max-height: 260px;
602
  object-fit: contain;
603
  border-radius: 8px;
604
  background: rgba(0, 0, 0, 0.24);
@@ -606,7 +638,7 @@ table {
606
 
607
  .result-image {
608
  width: 100%;
609
- max-height: 280px;
610
  object-fit: contain;
611
  border: 1px solid rgba(255, 255, 255, 0.08);
612
  border-radius: 8px;
@@ -647,7 +679,7 @@ table {
647
  .history-strip,
648
  .table-panel,
649
  .stats-grid {
650
- margin-top: 24px;
651
  }
652
 
653
  .section-heading {
@@ -666,50 +698,61 @@ table {
666
 
667
  .history-grid {
668
  display: grid;
669
- grid-template-columns: repeat(3, 1fr);
670
- gap: 16px;
671
  }
672
 
673
  .history-card {
674
  display: grid;
675
- gap: 10px;
 
676
  }
677
 
678
  .history-card img {
679
  width: 100%;
680
- aspect-ratio: 4 / 3;
681
  object-fit: contain;
682
  border-radius: 8px;
683
  background: rgba(255, 255, 255, 0.04);
684
  }
685
 
 
 
 
 
 
 
686
  .dashboard-head {
687
  justify-content: space-between;
688
  }
689
 
 
 
 
 
690
  .stats-grid {
691
  display: grid;
692
  grid-template-columns: repeat(5, 1fr);
693
- gap: 14px;
694
  }
695
 
696
  .stats-grid strong {
697
  display: block;
698
- margin-top: 8px;
699
- font-size: 2rem;
700
  }
701
 
702
  .charts-grid {
703
  display: grid;
704
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
705
- gap: 16px;
706
- margin-top: 24px;
707
  }
708
 
709
  .chart-panel {
710
  border: 1px solid var(--line);
711
  border-radius: 8px;
712
- padding: 20px;
713
  background: var(--panel);
714
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
715
  }
@@ -723,7 +766,7 @@ table {
723
  }
724
 
725
  .chart-heading {
726
- margin-bottom: 18px;
727
  }
728
 
729
  .chart-heading h2 {
@@ -737,7 +780,7 @@ table {
737
 
738
  .bar-list {
739
  display: grid;
740
- gap: 14px;
741
  }
742
 
743
  .bar-row {
@@ -787,7 +830,9 @@ table {
787
  }
788
 
789
  .table-panel {
790
- overflow-x: auto;
 
 
791
  }
792
 
793
  table {
@@ -797,7 +842,7 @@ table {
797
 
798
  th,
799
  td {
800
- padding: 14px;
801
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
802
  text-align: left;
803
  }
@@ -861,6 +906,11 @@ th {
861
  padding: 32px 0 48px;
862
  }
863
 
 
 
 
 
 
864
  .hero,
865
  .page-grid,
866
  .feature-band,
@@ -870,7 +920,20 @@ th {
870
  }
871
 
872
  .history-grid {
873
- grid-template-columns: repeat(2, 1fr);
 
 
 
 
 
 
 
 
 
 
 
 
 
874
  }
875
  }
876
 
@@ -887,16 +950,35 @@ th {
887
  }
888
 
889
  h1 {
890
- font-size: 2.45rem;
891
  }
892
 
893
  .history-grid {
894
- grid-template-columns: 1fr;
895
  }
896
 
897
  .cyber-content,
898
  .tool-panel,
899
  .result-panel {
900
- padding: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
901
  }
902
  }
 
16
  box-sizing: border-box;
17
  }
18
 
19
+ html {
20
+ height: 100%;
21
+ scrollbar-width: none;
22
+ }
23
+
24
+ html::-webkit-scrollbar,
25
+ body::-webkit-scrollbar,
26
+ main::-webkit-scrollbar,
27
+ .table-panel::-webkit-scrollbar,
28
+ .nav::-webkit-scrollbar {
29
+ display: none;
30
+ }
31
+
32
  body {
33
  margin: 0;
34
  min-height: 100vh;
35
+ overflow: auto;
36
+ scrollbar-width: none;
37
  color: var(--text);
38
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
39
  background:
 
143
  position: relative;
144
  z-index: 1;
145
  width: min(1160px, calc(100% - 32px));
146
+ min-height: calc(100vh - 75px);
147
  margin: 0 auto;
148
+ padding: 24px 0;
149
+ scrollbar-width: none;
150
  }
151
 
152
  .home-page main {
 
253
  .button,
254
  .feedback,
255
  .neon-button {
256
+ display: inline-flex;
257
+ align-items: center;
258
+ justify-content: center;
259
  border: 0;
260
  border-radius: 8px;
261
  padding: 12px 16px;
 
539
  .page-grid {
540
  display: grid;
541
  grid-template-columns: minmax(0, 1fr) 380px;
542
+ gap: 16px;
543
  align-items: start;
544
  }
545
 
 
548
  padding: 24px;
549
  }
550
 
551
+ .tool-header {
552
+ display: flex;
553
+ align-items: flex-start;
554
+ justify-content: space-between;
555
+ gap: 16px;
556
+ margin-bottom: 8px;
557
+ }
558
+
559
  .tool-panel h1,
560
  .dashboard-head h1 {
561
  font-size: clamp(2rem, 5vw, 3.8rem);
562
  }
563
 
564
+ .tool-panel h1 {
565
+ margin-bottom: 0;
566
+ }
567
+
568
  .model-warning {
569
  margin: 18px 0;
570
  border: 1px solid rgba(255, 209, 102, 0.48);
 
576
 
577
  .upload-form {
578
  display: grid;
579
+ gap: 12px;
580
  max-width: 520px;
581
  }
582
 
 
630
 
631
  .preview-card img {
632
  width: 100%;
633
+ max-height: 210px;
634
  object-fit: contain;
635
  border-radius: 8px;
636
  background: rgba(0, 0, 0, 0.24);
 
638
 
639
  .result-image {
640
  width: 100%;
641
+ max-height: 240px;
642
  object-fit: contain;
643
  border: 1px solid rgba(255, 255, 255, 0.08);
644
  border-radius: 8px;
 
679
  .history-strip,
680
  .table-panel,
681
  .stats-grid {
682
+ margin-top: 16px;
683
  }
684
 
685
  .section-heading {
 
698
 
699
  .history-grid {
700
  display: grid;
701
+ grid-template-columns: repeat(6, 1fr);
702
+ gap: 12px;
703
  }
704
 
705
  .history-card {
706
  display: grid;
707
+ gap: 8px;
708
+ min-width: 0;
709
  }
710
 
711
  .history-card img {
712
  width: 100%;
713
+ aspect-ratio: 1 / 1;
714
  object-fit: contain;
715
  border-radius: 8px;
716
  background: rgba(255, 255, 255, 0.04);
717
  }
718
 
719
+ .history-card strong {
720
+ overflow: hidden;
721
+ text-overflow: ellipsis;
722
+ white-space: nowrap;
723
+ }
724
+
725
  .dashboard-head {
726
  justify-content: space-between;
727
  }
728
 
729
+ .dashboard-head h1 {
730
+ margin-bottom: 8px;
731
+ }
732
+
733
  .stats-grid {
734
  display: grid;
735
  grid-template-columns: repeat(5, 1fr);
736
+ gap: 12px;
737
  }
738
 
739
  .stats-grid strong {
740
  display: block;
741
+ margin-top: 6px;
742
+ font-size: 1.7rem;
743
  }
744
 
745
  .charts-grid {
746
  display: grid;
747
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
748
+ gap: 12px;
749
+ margin-top: 16px;
750
  }
751
 
752
  .chart-panel {
753
  border: 1px solid var(--line);
754
  border-radius: 8px;
755
+ padding: 16px;
756
  background: var(--panel);
757
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
758
  }
 
766
  }
767
 
768
  .chart-heading {
769
+ margin-bottom: 14px;
770
  }
771
 
772
  .chart-heading h2 {
 
780
 
781
  .bar-list {
782
  display: grid;
783
+ gap: 10px;
784
  }
785
 
786
  .bar-row {
 
830
  }
831
 
832
  .table-panel {
833
+ max-height: clamp(180px, 28vh, 320px);
834
+ overflow: auto;
835
+ scrollbar-width: none;
836
  }
837
 
838
  table {
 
842
 
843
  th,
844
  td {
845
+ padding: 10px 14px;
846
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
847
  text-align: left;
848
  }
 
906
  padding: 32px 0 48px;
907
  }
908
 
909
+ main {
910
+ min-height: calc(100vh - 117px);
911
+ padding: 18px 0;
912
+ }
913
+
914
  .hero,
915
  .page-grid,
916
  .feature-band,
 
920
  }
921
 
922
  .history-grid {
923
+ grid-template-columns: repeat(3, 1fr);
924
+ }
925
+
926
+ .tool-header,
927
+ .dashboard-head {
928
+ align-items: stretch;
929
+ flex-direction: column;
930
+ }
931
+
932
+ .dashboard-link,
933
+ .dashboard-head .button {
934
+ width: 100%;
935
+ justify-content: center;
936
+ text-align: center;
937
  }
938
  }
939
 
 
950
  }
951
 
952
  h1 {
953
+ font-size: 2rem;
954
  }
955
 
956
  .history-grid {
957
+ grid-template-columns: repeat(2, 1fr);
958
  }
959
 
960
  .cyber-content,
961
  .tool-panel,
962
  .result-panel {
963
+ padding: 16px;
964
+ }
965
+
966
+ .stats-grid {
967
+ grid-template-columns: repeat(2, 1fr);
968
+ }
969
+
970
+ .stats-grid article:last-child {
971
+ grid-column: 1 / -1;
972
+ }
973
+
974
+ .charts-grid {
975
+ grid-template-columns: minmax(0, 1fr);
976
+ }
977
+
978
+ .chart-heading,
979
+ .bar-meta {
980
+ align-items: flex-start;
981
+ flex-direction: column;
982
+ gap: 4px;
983
  }
984
  }
templates/predict.html CHANGED
@@ -5,8 +5,13 @@
5
  {% block content %}
6
  <section class="page-grid">
7
  <div class="tool-panel">
8
- <p class="eyebrow">Classifier</p>
9
- <h1>Upload a traffic sign image</h1>
 
 
 
 
 
10
  <p class="panel-copy">The prediction is saved automatically to your personal history.</p>
11
 
12
  {% if model_error %}
@@ -61,7 +66,6 @@
61
  <p class="eyebrow">Historique</p>
62
  <h2>Recent history</h2>
63
  </div>
64
- <a class="button secondary dashboard-link" href="{{ url_for('dashboard') }}">Open dashboard</a>
65
  </div>
66
  <div class="history-grid">
67
  {% for row in history %}
 
5
  {% block content %}
6
  <section class="page-grid">
7
  <div class="tool-panel">
8
+ <div class="tool-header">
9
+ <div>
10
+ <p class="eyebrow">Classifier</p>
11
+ <h1>Upload a traffic sign image</h1>
12
+ </div>
13
+ <a class="button secondary dashboard-link" href="{{ url_for('dashboard') }}">Open dashboard</a>
14
+ </div>
15
  <p class="panel-copy">The prediction is saved automatically to your personal history.</p>
16
 
17
  {% if model_error %}
 
66
  <p class="eyebrow">Historique</p>
67
  <h2>Recent history</h2>
68
  </div>
 
69
  </div>
70
  <div class="history-grid">
71
  {% for row in history %}