Update app.py
Browse files
app.py
CHANGED
|
@@ -27,6 +27,8 @@ HTML_TEMPLATE = """
|
|
| 27 |
padding: 1rem;
|
| 28 |
background-color: #f0f0f0;
|
| 29 |
margin: 0;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
.iframe-container {
|
|
@@ -44,35 +46,36 @@ HTML_TEMPLATE = """
|
|
| 44 |
border: 0;
|
| 45 |
}
|
| 46 |
|
| 47 |
-
/*
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
</style>
|
| 52 |
</head>
|
| 53 |
<body>
|
| 54 |
<h1>Замки Оптом</h1>
|
| 55 |
<div class="iframe-container">
|
|
|
|
| 56 |
<iframe
|
| 57 |
src="https://rebus.tg/site/67ab09cbd76e2/index"
|
| 58 |
frameborder="0"
|
| 59 |
allowfullscreen>
|
| 60 |
</iframe>
|
| 61 |
</div>
|
| 62 |
-
|
| 63 |
-
<script>
|
| 64 |
-
document.addEventListener("DOMContentLoaded", function() {
|
| 65 |
-
let elements = document.querySelectorAll("div a[href*='rebus.tg']");
|
| 66 |
-
elements.forEach(el => el.parentElement.style.display = 'none');
|
| 67 |
-
});
|
| 68 |
-
</script>
|
| 69 |
</body>
|
| 70 |
</html>
|
| 71 |
"""
|
| 72 |
|
| 73 |
@app.route('/')
|
| 74 |
def index():
|
| 75 |
-
"""Рендерит
|
| 76 |
return render_template_string(HTML_TEMPLATE)
|
| 77 |
|
| 78 |
if __name__ == '__main__':
|
|
|
|
| 27 |
padding: 1rem;
|
| 28 |
background-color: #f0f0f0;
|
| 29 |
margin: 0;
|
| 30 |
+
z-index: 10;
|
| 31 |
+
position: relative;
|
| 32 |
}
|
| 33 |
|
| 34 |
.iframe-container {
|
|
|
|
| 46 |
border: 0;
|
| 47 |
}
|
| 48 |
|
| 49 |
+
/* Блокируем верхнюю часть iframe, где может быть "Создано в Ребусе" */
|
| 50 |
+
.iframe-overlay {
|
| 51 |
+
position: absolute;
|
| 52 |
+
top: 0;
|
| 53 |
+
left: 0;
|
| 54 |
+
width: 100%;
|
| 55 |
+
height: 40px; /* Закрываем только верхнюю часть */
|
| 56 |
+
background: white;
|
| 57 |
+
z-index: 20;
|
| 58 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
| 59 |
}
|
| 60 |
</style>
|
| 61 |
</head>
|
| 62 |
<body>
|
| 63 |
<h1>Замки Оптом</h1>
|
| 64 |
<div class="iframe-container">
|
| 65 |
+
<div class="iframe-overlay"></div> <!-- Борд, скрывающий верхнюю часть -->
|
| 66 |
<iframe
|
| 67 |
src="https://rebus.tg/site/67ab09cbd76e2/index"
|
| 68 |
frameborder="0"
|
| 69 |
allowfullscreen>
|
| 70 |
</iframe>
|
| 71 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
</body>
|
| 73 |
</html>
|
| 74 |
"""
|
| 75 |
|
| 76 |
@app.route('/')
|
| 77 |
def index():
|
| 78 |
+
"""Рендерит страницу с бордом, скрывающим часть iframe."""
|
| 79 |
return render_template_string(HTML_TEMPLATE)
|
| 80 |
|
| 81 |
if __name__ == '__main__':
|