Update app.py
Browse files
app.py
CHANGED
|
@@ -1164,6 +1164,9 @@ def profile():
|
|
| 1164 |
}
|
| 1165 |
.delete-btn {
|
| 1166 |
background: var(--secondary);
|
|
|
|
|
|
|
|
|
|
| 1167 |
}
|
| 1168 |
.delete-btn:hover {
|
| 1169 |
background: #45b7b0;
|
|
@@ -1915,36 +1918,32 @@ def chat():
|
|
| 1915 |
<img id="modalImage" src="">
|
| 1916 |
</div>
|
| 1917 |
<script>
|
| 1918 |
-
|
| 1919 |
-
|
| 1920 |
-
|
| 1921 |
-
|
| 1922 |
-
|
| 1923 |
-
|
| 1924 |
-
|
| 1925 |
-
|
| 1926 |
-
|
| 1927 |
-
|
| 1928 |
-
|
| 1929 |
-
|
| 1930 |
-
|
| 1931 |
-
|
| 1932 |
-
|
| 1933 |
-
|
| 1934 |
-
}
|
| 1935 |
-
function closeModal(event) {
|
| 1936 |
-
if (event.target.tagName !== 'IMG') {
|
| 1937 |
-
document.getElementById('imageModal').style.display = 'none';
|
| 1938 |
-
}
|
| 1939 |
}
|
| 1940 |
-
|
| 1941 |
-
|
| 1942 |
-
|
| 1943 |
-
|
| 1944 |
-
|
| 1945 |
-
|
| 1946 |
-
</
|
| 1947 |
-
|
|
|
|
| 1948 |
'''
|
| 1949 |
user_posts = [p for p in data['posts'] if p['uploader'] == username] if is_authenticated else []
|
| 1950 |
return render_template_string(html,
|
|
|
|
| 1164 |
}
|
| 1165 |
.delete-btn {
|
| 1166 |
background: var(--secondary);
|
| 1167 |
+
padding: 8px 16px;
|
| 1168 |
+
font-size: 0.9em;
|
| 1169 |
+
margin-top: 10px;
|
| 1170 |
}
|
| 1171 |
.delete-btn:hover {
|
| 1172 |
background: #45b7b0;
|
|
|
|
| 1918 |
<img id="modalImage" src="">
|
| 1919 |
</div>
|
| 1920 |
<script>
|
| 1921 |
+
function toggleSidebar() {
|
| 1922 |
+
document.getElementById('sidebar').classList.toggle('active');
|
| 1923 |
+
}
|
| 1924 |
+
function toggleTheme() {
|
| 1925 |
+
document.body.classList.toggle('dark');
|
| 1926 |
+
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
|
| 1927 |
+
}
|
| 1928 |
+
function openModal(src) {
|
| 1929 |
+
const modal = document.getElementById('imageModal');
|
| 1930 |
+
const modalImg = document.getElementById('modalImage');
|
| 1931 |
+
modal.style.display = 'flex';
|
| 1932 |
+
modalImg.src = src;
|
| 1933 |
+
}
|
| 1934 |
+
function closeModal(event) {
|
| 1935 |
+
if (event.target.tagName !== 'IMG') {
|
| 1936 |
+
document.getElementById('imageModal').style.display = 'none';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1937 |
}
|
| 1938 |
+
}
|
| 1939 |
+
window.onload = () => {
|
| 1940 |
+
if (localStorage.getItem('theme') === 'dark') document.body.classList.add('dark');
|
| 1941 |
+
const chatBox = document.querySelector('.chat-box');
|
| 1942 |
+
chatBox.scrollTop = chatBox.scrollHeight;
|
| 1943 |
+
};
|
| 1944 |
+
</script>
|
| 1945 |
+
</body>
|
| 1946 |
+
</html>
|
| 1947 |
'''
|
| 1948 |
user_posts = [p for p in data['posts'] if p['uploader'] == username] if is_authenticated else []
|
| 1949 |
return render_template_string(html,
|