colab?!
Browse files
files_cells/python/ru/widgets_ru.py
CHANGED
@@ -43,6 +43,11 @@ args = parser.parse_args()
|
|
43 |
# ---
|
44 |
url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
container_background = f'''
|
47 |
<style>
|
48 |
:root {{
|
@@ -53,6 +58,7 @@ container_background = f'''
|
|
53 |
--image_x: {x_img}px;
|
54 |
--img_scale: {scale_img}%;
|
55 |
--img_mode: {mode_img};
|
|
|
56 |
}}
|
57 |
|
58 |
.widget-dropdown select,
|
@@ -136,13 +142,13 @@ hr {
|
|
136 |
background-position: var(--image_x) calc(-120px - var(--image_y));
|
137 |
}
|
138 |
.image_2::before {
|
139 |
-
background-position: var(--image_x) calc(-
|
140 |
}
|
141 |
.image_3::before {
|
142 |
-
background-position: var(--image_x) calc(-
|
143 |
}
|
144 |
.image_4::before {
|
145 |
-
background-position: var(--image_x) calc(
|
146 |
}
|
147 |
|
148 |
.container_custom_downlad {
|
|
|
43 |
# ---
|
44 |
url_img, opacity_img, blur_img, y_img, x_img, scale_img, mode_img = args.image, args.opacity, args.blur, args.y, args.x, args.scale, args.mode
|
45 |
|
46 |
+
# WTF COLAB - WHAT THE FUCK IS THE DIFFERENCE OF 40 PIXELS!?!?!?
|
47 |
+
fix_heigh_img = "-780px"
|
48 |
+
if env == "Google Colab": # betrayal..
|
49 |
+
fix_heigh_img = "-740px"
|
50 |
+
|
51 |
container_background = f'''
|
52 |
<style>
|
53 |
:root {{
|
|
|
58 |
--image_x: {x_img}px;
|
59 |
--img_scale: {scale_img}%;
|
60 |
--img_mode: {mode_img};
|
61 |
+
--img_height_dif: {fix_heigh_img}
|
62 |
}}
|
63 |
|
64 |
.widget-dropdown select,
|
|
|
142 |
background-position: var(--image_x) calc(-120px - var(--image_y));
|
143 |
}
|
144 |
.image_2::before {
|
145 |
+
background-position: var(--image_x) calc(-290px - var(--image_y));
|
146 |
}
|
147 |
.image_3::before {
|
148 |
+
background-position: var(--image_x) calc(-430px - var(--image_y));
|
149 |
}
|
150 |
.image_4::before {
|
151 |
+
background-position: var(--image_x) calc(var(--img_height_dif) - var(--image_y));
|
152 |
}
|
153 |
|
154 |
.container_custom_downlad {
|