Update configs/html_features.py
Browse files- configs/html_features.py +16 -1
configs/html_features.py
CHANGED
|
@@ -3,5 +3,20 @@ HTML_WRAPPER = """
|
|
| 3 |
"""
|
| 4 |
|
| 5 |
def set_image(url):
|
| 6 |
-
HTML_BACKGROUND_IMG = f"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
return HTML_BACKGROUND_IMG
|
|
|
|
| 3 |
"""
|
| 4 |
|
| 5 |
def set_image(url):
|
| 6 |
+
HTML_BACKGROUND_IMG = f"""
|
| 7 |
+
<style>
|
| 8 |
+
body {{
|
| 9 |
+
background-image: url('{url}');
|
| 10 |
+
background-size: cover;
|
| 11 |
+
background-repeat: no-repeat;
|
| 12 |
+
background-position: center center;
|
| 13 |
+
}}
|
| 14 |
+
|
| 15 |
+
@media (max-width: 768px) {{
|
| 16 |
+
body {{
|
| 17 |
+
background-size: auto;
|
| 18 |
+
}}
|
| 19 |
+
}}
|
| 20 |
+
</style>
|
| 21 |
+
"""
|
| 22 |
return HTML_BACKGROUND_IMG
|