File size: 4,828 Bytes
b0fac1b
 
 
 
 
 
5e190d3
b0fac1b
 
 
 
 
 
 
 
5e190d3
b0fac1b
 
 
 
 
5e190d3
e012fea
b0fac1b
e012fea
 
 
 
5e190d3
 
 
e012fea
 
 
 
 
 
 
 
 
 
 
 
 
 
e1c490b
 
e012fea
 
 
 
 
 
 
 
 
 
 
 
 
 
b0fac1b
01b19e0
e1c490b
b0fac1b
 
 
 
 
 
 
 
 
 
 
 
 
 
5e190d3
e1c490b
b0fac1b
 
 
 
 
 
 
 
 
 
 
5e190d3
e1c490b
b0fac1b
 
 
 
 
 
 
 
e1c490b
 
5e190d3
e012fea
 
 
 
 
b0fac1b
e012fea
b0fac1b
 
 
5e190d3
58b0fdc
 
 
e012fea
 
 
 
58b0fdc
 
 
5e190d3
e1c490b
58b0fdc
 
b0fac1b
5e190d3
e012fea
 
 
 
 
 
 
 
e1c490b
b0fac1b
 
 
 
 
 
 
e1c490b
b0fac1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e1c490b
b0fac1b
 
 
 
 
 
 
e1c490b
b0fac1b
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
import gradio as gr

custom_css = """
body {
    background: linear-gradient(135deg, #020617 0%, #1e0b45 50%, #020617 100%);
}

.gradio-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", sans-serif;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 32px 32px 40px 32px !important;
    color: #f9fafb;
}

.gradio-container .block {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ── Glass card shell ── */
.glass-card {
    background: rgba(15, 23, 42, 0.96) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9) !important;
    overflow: hidden;
}

/* ── Padding via ID selectors (beats Svelte scoped styles) ── */
#input-card,
#result-card,
#hiw-intro-card,
#hiw-step1-card,
#hiw-step2-card,
#hiw-step3-card,
#about-intro-card,
#about-thesis-card,
#fb-intro-card,
#fb-form-card,
#fb-faq-card {
    padding: 20px 22px !important;
    gap: 10px !important;
}

/* ── Inner Gradio form wrapper (Svelte renders this inside every Group) ── */
#input-card > .form,
#result-card > .form,
#hiw-intro-card > .form,
#hiw-step1-card > .form,
#hiw-step2-card > .form,
#hiw-step3-card > .form,
#about-intro-card > .form,
#about-thesis-card > .form,
#fb-intro-card > .form,
#fb-form-card > .form,
#fb-faq-card > .form {
    padding: 20px 22px !important;
    gap: 10px !important;
}

/* ── Hero section ── */
.hero-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #e5e7eb;
    margin-bottom: 8px;
}
.hero-subtitle {
    font-size: 14px;
    max-width: 640px;
    opacity: 0.9;
    color: #cbd5f5;
}

/* ── Confidence bar ── */
.conf-bar-bg {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
}
.conf-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #fb923c);
}

/* ── Label badges ── */
.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.badge-fake { background: #f97316; color: #111827; }
.badge-real { background: #22c55e; color: #022c22; }

/* ── Textarea ── */
#news-textbox textarea,
#fb-textbox textarea,
#fb-email-textbox textarea,
#fb-email-textbox input {
    background: #020617 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    color: #f9fafb !important;
    font-size: 13px !important;
    padding: 16px 18px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

#news-textbox textarea::placeholder,
#fb-textbox textarea::placeholder,
#fb-email-textbox input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* ── Labels ── */
.gradio-container label {
    margin-bottom: 6px !important;
}

/* ── Prose / markdown text color inside dark cards ── */
.glass-card .prose,
.glass-card .markdown-body,
.glass-card p,
.glass-card li {
    color: #f9fafb !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .two-col {
        flex-direction: column !important;
    }
}
"""


def header():
    return gr.HTML(
        """
        <div style="max-width:1120px;margin:0 auto;">
          <header style="display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;">
            <div style="display:flex;align-items:center;gap:10px;">
              <div style="width:32px;height:32px;border-radius:999px;
                          background:radial-gradient(circle at 30% 30%, #a5b4fc, #6366f1);
                          display:flex;align-items:center;justify-content:center;
                          color:#020617;font-weight:700;font-size:16px;">
                C
              </div>
              <div>
                <div style="font-weight:600;font-size:14px;letter-spacing:0.08em;
                            text-transform:uppercase;color:#e5e7eb;">
                  CMD&#8209;BERT
                </div>
                <div style="font-size:11px;color:#9ca3af;">
                  Cebuano Misinformation Detector
                </div>
              </div>
            </div>
            <div style="display:flex;align-items:center;gap:8px;font-size:13px;color:#e5e7eb;opacity:0.9;">
              <span>About CMD&#8209;BERT</span>
              <div style="width:24px;height:24px;border-radius:999px;
                          background:rgba(148,163,184,0.35);"></div>
            </div>
          </header>
        </div>
        """
    )