Spaces:
Sleeping
Sleeping
feat: update css.py
Browse files- src/css.py +28 -25
src/css.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
# Custom CSS for fullscreen image with overlay
|
| 2 |
custom_css = """
|
| 3 |
-
/* --------
|
| 4 |
.image-container {
|
| 5 |
position: fixed !important;
|
| 6 |
top: 0 !important;
|
|
@@ -20,7 +20,9 @@ custom_css = """
|
|
| 20 |
bottom: 0 !important;
|
| 21 |
left: 0 !important;
|
| 22 |
right: 0 !important;
|
| 23 |
-
background: linear-gradient(
|
|
|
|
|
|
|
| 24 |
padding: 40px 20px 20px !important;
|
| 25 |
z-index: 10 !important;
|
| 26 |
color: white !important;
|
|
@@ -47,36 +49,32 @@ custom_css = """
|
|
| 47 |
font-size: 15px !important;
|
| 48 |
resize: none !important;
|
| 49 |
}
|
| 50 |
-
img {
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
/* --------
|
| 53 |
-
/* Общая прозрачная подложка */
|
| 54 |
.choice-area {
|
| 55 |
background: rgba(0,0,0,0.7) !important;
|
| 56 |
border-radius: 10px !important;
|
| 57 |
padding: 10px !important;
|
| 58 |
}
|
| 59 |
|
| 60 |
-
/* Убираем второе затемнение у самих кнопок — делаем прозрачными */
|
| 61 |
.choice-buttons {
|
| 62 |
-
background: transparent !important;
|
| 63 |
border-radius: 10px !important;
|
| 64 |
-
padding: 10px !important;
|
| 65 |
}
|
| 66 |
-
/* radio-контейнеры также прозрачные */
|
| 67 |
.choice-buttons > div,
|
| 68 |
.choice-buttons fieldset {
|
| 69 |
background: transparent !important;
|
| 70 |
border: none !important;
|
| 71 |
}
|
| 72 |
-
/* подписи radio */
|
| 73 |
.choice-buttons label,
|
| 74 |
.choice-buttons label span {
|
| 75 |
color: white !important;
|
| 76 |
font-size: 14px !important;
|
| 77 |
}
|
| 78 |
-
|
| 79 |
-
/* Сами radio-кнопки */
|
| 80 |
.choice-buttons input[type="radio"] {
|
| 81 |
background: transparent !important;
|
| 82 |
border: 2px solid white !important;
|
|
@@ -84,17 +82,19 @@ img { pointer-events: none; }
|
|
| 84 |
.choice-buttons input[type="radio"]:checked {
|
| 85 |
background: white !important;
|
| 86 |
}
|
| 87 |
-
.choice-buttons .form-radio {
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
.choice-buttons * {
|
|
|
|
|
|
|
| 91 |
.choice-buttons input {
|
| 92 |
background-color: transparent !important;
|
| 93 |
border: 1px solid rgba(255,255,255,0.5) !important;
|
| 94 |
color: white !important;
|
| 95 |
}
|
| 96 |
|
| 97 |
-
/*
|
| 98 |
.choice-area .form-label,
|
| 99 |
.choice-area legend {
|
| 100 |
background: transparent !important;
|
|
@@ -102,10 +102,9 @@ img { pointer-events: none; }
|
|
| 102 |
border: none !important;
|
| 103 |
}
|
| 104 |
|
| 105 |
-
/* --------
|
| 106 |
-
/* убираем второе затемнение */
|
| 107 |
.choice-input textarea {
|
| 108 |
-
background: transparent !important;
|
| 109 |
border: none !important;
|
| 110 |
color: white !important;
|
| 111 |
border-radius: 10px !important;
|
|
@@ -119,11 +118,15 @@ img { pointer-events: none; }
|
|
| 119 |
margin-top: 10px !important;
|
| 120 |
}
|
| 121 |
|
| 122 |
-
/* --------
|
| 123 |
-
.gradio-header,
|
|
|
|
|
|
|
|
|
|
| 124 |
.image-container .icon-button-wrapper,
|
| 125 |
-
.image-container .icon-buttons {
|
| 126 |
-
|
|
|
|
| 127 |
#back-btn {
|
| 128 |
position: fixed !important;
|
| 129 |
top: 10px !important;
|
|
|
|
| 1 |
+
# Custom CSS for fullscreen image with overlay and styled form components
|
| 2 |
custom_css = """
|
| 3 |
+
/* -------- FULLSCREEN BACKGROUND & NARRATIVE -------- */
|
| 4 |
.image-container {
|
| 5 |
position: fixed !important;
|
| 6 |
top: 0 !important;
|
|
|
|
| 20 |
bottom: 0 !important;
|
| 21 |
left: 0 !important;
|
| 22 |
right: 0 !important;
|
| 23 |
+
background: linear-gradient(
|
| 24 |
+
transparent, rgba(0,0,0,0.8)
|
| 25 |
+
) !important;
|
| 26 |
padding: 40px 20px 20px !important;
|
| 27 |
z-index: 10 !important;
|
| 28 |
color: white !important;
|
|
|
|
| 49 |
font-size: 15px !important;
|
| 50 |
resize: none !important;
|
| 51 |
}
|
| 52 |
+
img {
|
| 53 |
+
pointer-events: none;
|
| 54 |
+
}
|
| 55 |
|
| 56 |
+
/* -------- CHOICE SECTION -------- */
|
|
|
|
| 57 |
.choice-area {
|
| 58 |
background: rgba(0,0,0,0.7) !important;
|
| 59 |
border-radius: 10px !important;
|
| 60 |
padding: 10px !important;
|
| 61 |
}
|
| 62 |
|
|
|
|
| 63 |
.choice-buttons {
|
| 64 |
+
background: transparent !important;
|
| 65 |
border-radius: 10px !important;
|
| 66 |
+
padding: 10px !important;
|
| 67 |
}
|
|
|
|
| 68 |
.choice-buttons > div,
|
| 69 |
.choice-buttons fieldset {
|
| 70 |
background: transparent !important;
|
| 71 |
border: none !important;
|
| 72 |
}
|
|
|
|
| 73 |
.choice-buttons label,
|
| 74 |
.choice-buttons label span {
|
| 75 |
color: white !important;
|
| 76 |
font-size: 14px !important;
|
| 77 |
}
|
|
|
|
|
|
|
| 78 |
.choice-buttons input[type="radio"] {
|
| 79 |
background: transparent !important;
|
| 80 |
border: 2px solid white !important;
|
|
|
|
| 82 |
.choice-buttons input[type="radio"]:checked {
|
| 83 |
background: white !important;
|
| 84 |
}
|
| 85 |
+
.choice-buttons .form-radio {
|
| 86 |
+
background: transparent !important;
|
| 87 |
+
}
|
| 88 |
+
.choice-buttons * {
|
| 89 |
+
background-color: transparent !important;
|
| 90 |
+
}
|
| 91 |
.choice-buttons input {
|
| 92 |
background-color: transparent !important;
|
| 93 |
border: 1px solid rgba(255,255,255,0.5) !important;
|
| 94 |
color: white !important;
|
| 95 |
}
|
| 96 |
|
| 97 |
+
/* Bold legend/label, no background */
|
| 98 |
.choice-area .form-label,
|
| 99 |
.choice-area legend {
|
| 100 |
background: transparent !important;
|
|
|
|
| 102 |
border: none !important;
|
| 103 |
}
|
| 104 |
|
| 105 |
+
/* -------- CUSTOM INPUT FIELD -------- */
|
|
|
|
| 106 |
.choice-input textarea {
|
| 107 |
+
background: transparent !important;
|
| 108 |
border: none !important;
|
| 109 |
color: white !important;
|
| 110 |
border-radius: 10px !important;
|
|
|
|
| 118 |
margin-top: 10px !important;
|
| 119 |
}
|
| 120 |
|
| 121 |
+
/* -------- UI MISCELLANEOUS -------- */
|
| 122 |
+
.gradio-header,
|
| 123 |
+
.gradio-footer {
|
| 124 |
+
display: none !important;
|
| 125 |
+
}
|
| 126 |
.image-container .icon-button-wrapper,
|
| 127 |
+
.image-container .icon-buttons {
|
| 128 |
+
display: none !important;
|
| 129 |
+
}
|
| 130 |
#back-btn {
|
| 131 |
position: fixed !important;
|
| 132 |
top: 10px !important;
|