Update app.py
Browse files
app.py
CHANGED
|
@@ -101,6 +101,7 @@ BASE_STYLE = '''
|
|
| 101 |
--shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
|
| 102 |
--glass-bg: rgba(255, 245, 230, 0.15);
|
| 103 |
--transition: all 0.4s ease;
|
|
|
|
| 104 |
}
|
| 105 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 106 |
body {
|
|
@@ -137,7 +138,7 @@ BASE_STYLE = '''
|
|
| 137 |
.nav-brand {
|
| 138 |
font-size: 1.8em;
|
| 139 |
font-weight: 700;
|
| 140 |
-
background:
|
| 141 |
-webkit-background-clip: text;
|
| 142 |
color: transparent;
|
| 143 |
}
|
|
@@ -363,7 +364,7 @@ def register():
|
|
| 363 |
font-weight: 600;
|
| 364 |
text-align: center;
|
| 365 |
margin-bottom: 30px;
|
| 366 |
-
background:
|
| 367 |
-webkit-background-clip: text;
|
| 368 |
color: transparent;
|
| 369 |
}
|
|
@@ -467,7 +468,7 @@ def login():
|
|
| 467 |
font-weight: 600;
|
| 468 |
text-align: center;
|
| 469 |
margin-bottom: 30px;
|
| 470 |
-
background:
|
| 471 |
-webkit-background-clip: text;
|
| 472 |
color: transparent;
|
| 473 |
}
|
|
@@ -572,7 +573,7 @@ def feed():
|
|
| 572 |
font-size: 2.8em;
|
| 573 |
font-weight: 700;
|
| 574 |
margin-bottom: 40px;
|
| 575 |
-
background:
|
| 576 |
-webkit-background-clip: text;
|
| 577 |
color: transparent;
|
| 578 |
}
|
|
@@ -606,79 +607,73 @@ def feed():
|
|
| 606 |
}
|
| 607 |
.post-grid {
|
| 608 |
display: grid;
|
| 609 |
-
grid-template-columns: repeat(
|
| 610 |
-
gap:
|
| 611 |
}
|
| 612 |
.post-item {
|
|
|
|
|
|
|
| 613 |
background: var(--card-bg-light);
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
border-radius: 20px;
|
| 617 |
box-shadow: var(--shadow);
|
| 618 |
transition: var(--transition);
|
| 619 |
text-decoration: none;
|
| 620 |
color: var(--text-light);
|
| 621 |
-
position: relative;
|
| 622 |
-
overflow: hidden;
|
| 623 |
}
|
| 624 |
body.dark .post-item {
|
| 625 |
background: var(--card-bg-dark);
|
| 626 |
color: var(--text-dark);
|
| 627 |
}
|
| 628 |
.post-item:hover {
|
| 629 |
-
transform:
|
| 630 |
-
box-shadow: 0
|
| 631 |
}
|
| 632 |
.post-preview {
|
| 633 |
width: 100%;
|
| 634 |
-
height:
|
| 635 |
object-fit: cover;
|
| 636 |
-
border-radius: 15px;
|
| 637 |
-
margin-bottom: 15px;
|
| 638 |
transition: var(--transition);
|
| 639 |
}
|
| 640 |
.post-item:hover .post-preview {
|
| 641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 642 |
}
|
| 643 |
.post-item h2 {
|
| 644 |
-
font-size: 1.
|
| 645 |
-
margin-bottom: 10px;
|
| 646 |
font-weight: 600;
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
font-size: 1em;
|
| 650 |
-
margin-bottom: 10px;
|
| 651 |
-
display: -webkit-box;
|
| 652 |
-
-webkit-line-clamp: 3;
|
| 653 |
-
-webkit-box-orient: vertical;
|
| 654 |
overflow: hidden;
|
| 655 |
text-overflow: ellipsis;
|
| 656 |
}
|
| 657 |
-
.
|
| 658 |
font-size: 0.9em;
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
}
|
| 662 |
-
body.dark .stats {
|
| 663 |
-
color: rgba(255, 255, 255, 0.6);
|
| 664 |
}
|
| 665 |
.username-link {
|
| 666 |
-
color: var(--
|
| 667 |
-
font-weight:
|
| 668 |
text-decoration: none;
|
| 669 |
}
|
| 670 |
.username-link:hover {
|
| 671 |
text-decoration: underline;
|
| 672 |
}
|
| 673 |
-
.
|
| 674 |
-
display: flex;
|
| 675 |
-
justify-content: space-between;
|
| 676 |
-
align-items: center;
|
| 677 |
font-size: 0.9em;
|
| 678 |
-
color: rgba(
|
| 679 |
-
}
|
| 680 |
-
body.dark .post-meta {
|
| 681 |
-
color: rgba(255, 255, 255, 0.7);
|
| 682 |
}
|
| 683 |
</style>
|
| 684 |
</head>
|
|
@@ -702,15 +697,15 @@ def feed():
|
|
| 702 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 703 |
</video>
|
| 704 |
{% else %}
|
| 705 |
-
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}"
|
| 706 |
{% endif %}
|
| 707 |
-
<
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
|
|
|
|
| 712 |
</div>
|
| 713 |
-
<div class="stats">Views: {{ post['views'] }} | Likes: {{ post['likes']|length }}</div>
|
| 714 |
</a>
|
| 715 |
{% endfor %}
|
| 716 |
</div>
|
|
@@ -808,7 +803,7 @@ def post_page(post_id):
|
|
| 808 |
font-size: 2.5em;
|
| 809 |
font-weight: 700;
|
| 810 |
margin-bottom: 30px;
|
| 811 |
-
background:
|
| 812 |
-webkit-background-clip: text;
|
| 813 |
color: transparent;
|
| 814 |
}
|
|
@@ -1010,7 +1005,7 @@ def profile():
|
|
| 1010 |
.profile-info h1 {
|
| 1011 |
font-size: 2.5em;
|
| 1012 |
font-weight: 700;
|
| 1013 |
-
background:
|
| 1014 |
-webkit-background-clip: text;
|
| 1015 |
color: transparent;
|
| 1016 |
margin-bottom: 20px;
|
|
@@ -1021,14 +1016,15 @@ def profile():
|
|
| 1021 |
}
|
| 1022 |
.post-grid {
|
| 1023 |
display: grid;
|
| 1024 |
-
grid-template-columns: repeat(
|
| 1025 |
-
gap:
|
| 1026 |
}
|
| 1027 |
.post-item {
|
|
|
|
|
|
|
| 1028 |
background: var(--card-bg-light);
|
| 1029 |
-
|
| 1030 |
-
|
| 1031 |
-
border-radius: 20px;
|
| 1032 |
box-shadow: var(--shadow);
|
| 1033 |
transition: var(--transition);
|
| 1034 |
}
|
|
@@ -1036,24 +1032,37 @@ def profile():
|
|
| 1036 |
background: var(--card-bg-dark);
|
| 1037 |
}
|
| 1038 |
.post-item:hover {
|
| 1039 |
-
transform:
|
| 1040 |
-
box-shadow: 0
|
| 1041 |
}
|
| 1042 |
.post-preview {
|
| 1043 |
width: 100%;
|
| 1044 |
-
height:
|
| 1045 |
object-fit: cover;
|
| 1046 |
-
border-radius: 15px;
|
| 1047 |
-
margin-bottom: 15px;
|
| 1048 |
transition: var(--transition);
|
| 1049 |
}
|
| 1050 |
.post-item:hover .post-preview {
|
| 1051 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1052 |
}
|
| 1053 |
.post-item h3 {
|
| 1054 |
-
font-size: 1.
|
| 1055 |
-
margin-bottom: 10px;
|
| 1056 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1057 |
}
|
| 1058 |
.delete-btn {
|
| 1059 |
background: var(--secondary);
|
|
@@ -1070,7 +1079,7 @@ def profile():
|
|
| 1070 |
h2 {
|
| 1071 |
font-size: 2em;
|
| 1072 |
margin: 40px 0 20px;
|
| 1073 |
-
background:
|
| 1074 |
-webkit-background-clip: text;
|
| 1075 |
color: transparent;
|
| 1076 |
}
|
|
@@ -1114,12 +1123,12 @@ def profile():
|
|
| 1114 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 1115 |
</video>
|
| 1116 |
{% else %}
|
| 1117 |
-
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}"
|
| 1118 |
{% endif %}
|
| 1119 |
-
<
|
|
|
|
|
|
|
| 1120 |
</a>
|
| 1121 |
-
<p>{{ post['description'] }}</p>
|
| 1122 |
-
<p>{{ post['upload_date'] }}</p>
|
| 1123 |
<form method="POST">
|
| 1124 |
<input type="hidden" name="post_id" value="{{ post['id'] }}">
|
| 1125 |
<button type="submit" name="delete_post" class="btn delete-btn">Delete</button>
|
|
@@ -1231,7 +1240,7 @@ def user_profile(username):
|
|
| 1231 |
.profile-info h1 {
|
| 1232 |
font-size: 2.5em;
|
| 1233 |
font-weight: 700;
|
| 1234 |
-
background:
|
| 1235 |
-webkit-background-clip: text;
|
| 1236 |
color: transparent;
|
| 1237 |
margin-bottom: 20px;
|
|
@@ -1242,14 +1251,15 @@ def user_profile(username):
|
|
| 1242 |
}
|
| 1243 |
.post-grid {
|
| 1244 |
display: grid;
|
| 1245 |
-
grid-template-columns: repeat(
|
| 1246 |
-
gap:
|
| 1247 |
}
|
| 1248 |
.post-item {
|
|
|
|
|
|
|
| 1249 |
background: var(--card-bg-light);
|
| 1250 |
-
|
| 1251 |
-
|
| 1252 |
-
border-radius: 20px;
|
| 1253 |
box-shadow: var(--shadow);
|
| 1254 |
transition: var(--transition);
|
| 1255 |
}
|
|
@@ -1257,24 +1267,37 @@ def user_profile(username):
|
|
| 1257 |
background: var(--card-bg-dark);
|
| 1258 |
}
|
| 1259 |
.post-item:hover {
|
| 1260 |
-
transform:
|
| 1261 |
-
box-shadow: 0
|
| 1262 |
}
|
| 1263 |
.post-preview {
|
| 1264 |
width: 100%;
|
| 1265 |
-
height:
|
| 1266 |
object-fit: cover;
|
| 1267 |
-
border-radius: 15px;
|
| 1268 |
-
margin-bottom: 15px;
|
| 1269 |
transition: var(--transition);
|
| 1270 |
}
|
| 1271 |
.post-item:hover .post-preview {
|
| 1272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1273 |
}
|
| 1274 |
.post-item h3 {
|
| 1275 |
-
font-size: 1.
|
| 1276 |
-
margin-bottom: 10px;
|
| 1277 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1278 |
}
|
| 1279 |
.share-btn {
|
| 1280 |
background: #ffa07a;
|
|
@@ -1285,7 +1308,7 @@ def user_profile(username):
|
|
| 1285 |
h2 {
|
| 1286 |
font-size: 2em;
|
| 1287 |
margin: 40px 0 20px;
|
| 1288 |
-
background:
|
| 1289 |
-webkit-background-clip: text;
|
| 1290 |
color: transparent;
|
| 1291 |
}
|
|
@@ -1321,12 +1344,12 @@ def user_profile(username):
|
|
| 1321 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 1322 |
</video>
|
| 1323 |
{% else %}
|
| 1324 |
-
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}"
|
| 1325 |
{% endif %}
|
| 1326 |
-
<
|
|
|
|
|
|
|
| 1327 |
</a>
|
| 1328 |
-
<p>{{ post['description'] }}</p>
|
| 1329 |
-
<p>{{ post['upload_date'] }}</p>
|
| 1330 |
</div>
|
| 1331 |
{% endfor %}
|
| 1332 |
{% else %}
|
|
@@ -1463,7 +1486,7 @@ def upload():
|
|
| 1463 |
font-weight: 700;
|
| 1464 |
text-align: center;
|
| 1465 |
margin-bottom: 30px;
|
| 1466 |
-
background:
|
| 1467 |
-webkit-background-clip: text;
|
| 1468 |
color: transparent;
|
| 1469 |
}
|
|
@@ -1627,7 +1650,7 @@ def chat():
|
|
| 1627 |
font-size: 2.5em;
|
| 1628 |
font-weight: 700;
|
| 1629 |
margin-bottom: 20px;
|
| 1630 |
-
background:
|
| 1631 |
-webkit-background-clip: text;
|
| 1632 |
color: transparent;
|
| 1633 |
}
|
|
@@ -1638,22 +1661,24 @@ def chat():
|
|
| 1638 |
padding: 10px;
|
| 1639 |
border-radius: 15px;
|
| 1640 |
background: var(--glass-bg);
|
|
|
|
| 1641 |
}
|
| 1642 |
.message {
|
| 1643 |
display: flex;
|
| 1644 |
align-items: flex-start;
|
| 1645 |
padding: 15px;
|
| 1646 |
-
background:
|
| 1647 |
border-radius: 15px;
|
| 1648 |
margin-bottom: 15px;
|
| 1649 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 1650 |
-
|
| 1651 |
}
|
| 1652 |
body.dark .message {
|
| 1653 |
-
background:
|
| 1654 |
}
|
| 1655 |
-
|
| 1656 |
-
|
|
|
|
| 1657 |
}
|
| 1658 |
.message-avatar {
|
| 1659 |
width: 40px;
|
|
@@ -1661,6 +1686,7 @@ def chat():
|
|
| 1661 |
border-radius: 50%;
|
| 1662 |
margin-right: 15px;
|
| 1663 |
object-fit: cover;
|
|
|
|
| 1664 |
}
|
| 1665 |
.message-content {
|
| 1666 |
flex: 1;
|
|
@@ -1675,9 +1701,10 @@ def chat():
|
|
| 1675 |
font-weight: 600;
|
| 1676 |
color: var(--primary);
|
| 1677 |
text-decoration: none;
|
|
|
|
| 1678 |
}
|
| 1679 |
.message-sender:hover {
|
| 1680 |
-
|
| 1681 |
}
|
| 1682 |
.message-time {
|
| 1683 |
font-size: 0.9em;
|
|
@@ -1691,26 +1718,33 @@ def chat():
|
|
| 1691 |
padding: 5px 10px;
|
| 1692 |
font-size: 0.9em;
|
| 1693 |
border-radius: 10px;
|
|
|
|
| 1694 |
}
|
| 1695 |
.kick-btn:hover {
|
| 1696 |
background: #cc3333;
|
| 1697 |
-
transform: scale(1.
|
| 1698 |
}
|
| 1699 |
.message img, .message video {
|
| 1700 |
max-width: 250px;
|
| 1701 |
max-height: 250px;
|
| 1702 |
border-radius: 10px;
|
| 1703 |
margin-top: 10px;
|
|
|
|
| 1704 |
}
|
| 1705 |
.message a {
|
| 1706 |
-
color: var(--
|
| 1707 |
text-decoration: none;
|
|
|
|
| 1708 |
}
|
| 1709 |
.message a:hover {
|
| 1710 |
text-decoration: underline;
|
| 1711 |
}
|
| 1712 |
.message-form {
|
| 1713 |
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1714 |
}
|
| 1715 |
</style>
|
| 1716 |
</head>
|
|
@@ -1855,12 +1889,12 @@ def admin_panel():
|
|
| 1855 |
font-size: 2.8em;
|
| 1856 |
font-weight: 700;
|
| 1857 |
margin-bottom: 40px;
|
| 1858 |
-
background:
|
| 1859 |
-webkit-background-clip: text;
|
| 1860 |
color: transparent;
|
| 1861 |
}
|
| 1862 |
.search-container {
|
| 1863 |
-
max-width:
|
| 1864 |
margin: 0 auto 40px;
|
| 1865 |
position: relative;
|
| 1866 |
}
|
|
@@ -1889,14 +1923,15 @@ def admin_panel():
|
|
| 1889 |
}
|
| 1890 |
.post-grid {
|
| 1891 |
display: grid;
|
| 1892 |
-
grid-template-columns: repeat(
|
| 1893 |
-
gap:
|
| 1894 |
}
|
| 1895 |
.post-item {
|
|
|
|
|
|
|
| 1896 |
background: var(--card-bg-light);
|
| 1897 |
-
|
| 1898 |
-
|
| 1899 |
-
border-radius: 20px;
|
| 1900 |
box-shadow: var(--shadow);
|
| 1901 |
transition: var(--transition);
|
| 1902 |
}
|
|
@@ -1904,27 +1939,37 @@ def admin_panel():
|
|
| 1904 |
background: var(--card-bg-dark);
|
| 1905 |
}
|
| 1906 |
.post-item:hover {
|
| 1907 |
-
transform:
|
| 1908 |
-
box-shadow: 0
|
| 1909 |
}
|
| 1910 |
.post-preview {
|
| 1911 |
width: 100%;
|
| 1912 |
-
height:
|
| 1913 |
object-fit: cover;
|
| 1914 |
-
border-radius: 15px;
|
| 1915 |
-
margin-bottom: 15px;
|
| 1916 |
transition: var(--transition);
|
| 1917 |
}
|
| 1918 |
.post-item:hover .post-preview {
|
| 1919 |
-
|
| 1920 |
}
|
| 1921 |
-
.post-
|
| 1922 |
-
|
| 1923 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1924 |
}
|
| 1925 |
-
.post-
|
| 1926 |
-
|
| 1927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1928 |
}
|
| 1929 |
.delete-btn {
|
| 1930 |
background: var(--secondary);
|
|
@@ -1933,13 +1978,18 @@ def admin_panel():
|
|
| 1933 |
background: #45b7b0;
|
| 1934 |
}
|
| 1935 |
.username-link {
|
| 1936 |
-
color: var(--
|
| 1937 |
-
font-weight:
|
| 1938 |
text-decoration: none;
|
| 1939 |
}
|
| 1940 |
.username-link:hover {
|
| 1941 |
text-decoration: underline;
|
| 1942 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1943 |
</style>
|
| 1944 |
</head>
|
| 1945 |
<body>
|
|
@@ -1964,12 +2014,16 @@ def admin_panel():
|
|
| 1964 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 1965 |
</video>
|
| 1966 |
{% else %}
|
| 1967 |
-
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}"
|
| 1968 |
{% endif %}
|
| 1969 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1970 |
</a>
|
| 1971 |
-
<p>{{ post['description'] }}</p>
|
| 1972 |
-
<p>Uploaded by: <a href="{{ url_for('user_profile', username=post['uploader']) }}" class="username-link">{{ post['uploader'] }}</a> | {{ post['upload_date'] }}</p>
|
| 1973 |
<form method="POST">
|
| 1974 |
<input type="hidden" name="post_id" value="{{ post['id'] }}">
|
| 1975 |
<button type="submit" name="delete" class="btn delete-btn">Delete</button>
|
|
|
|
| 101 |
--shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
|
| 102 |
--glass-bg: rgba(255, 245, 230, 0.15);
|
| 103 |
--transition: all 0.4s ease;
|
| 104 |
+
--gradient: linear-gradient(135deg, #ff6b6b, #4ecdc4);
|
| 105 |
}
|
| 106 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 107 |
body {
|
|
|
|
| 138 |
.nav-brand {
|
| 139 |
font-size: 1.8em;
|
| 140 |
font-weight: 700;
|
| 141 |
+
background: var(--gradient);
|
| 142 |
-webkit-background-clip: text;
|
| 143 |
color: transparent;
|
| 144 |
}
|
|
|
|
| 364 |
font-weight: 600;
|
| 365 |
text-align: center;
|
| 366 |
margin-bottom: 30px;
|
| 367 |
+
background: var(--gradient);
|
| 368 |
-webkit-background-clip: text;
|
| 369 |
color: transparent;
|
| 370 |
}
|
|
|
|
| 468 |
font-weight: 600;
|
| 469 |
text-align: center;
|
| 470 |
margin-bottom: 30px;
|
| 471 |
+
background: var(--gradient);
|
| 472 |
-webkit-background-clip: text;
|
| 473 |
color: transparent;
|
| 474 |
}
|
|
|
|
| 573 |
font-size: 2.8em;
|
| 574 |
font-weight: 700;
|
| 575 |
margin-bottom: 40px;
|
| 576 |
+
background: var(--gradient);
|
| 577 |
-webkit-background-clip: text;
|
| 578 |
color: transparent;
|
| 579 |
}
|
|
|
|
| 607 |
}
|
| 608 |
.post-grid {
|
| 609 |
display: grid;
|
| 610 |
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
| 611 |
+
gap: 25px;
|
| 612 |
}
|
| 613 |
.post-item {
|
| 614 |
+
position: relative;
|
| 615 |
+
width: 340px;
|
| 616 |
background: var(--card-bg-light);
|
| 617 |
+
border-radius: 15px;
|
| 618 |
+
overflow: hidden;
|
|
|
|
| 619 |
box-shadow: var(--shadow);
|
| 620 |
transition: var(--transition);
|
| 621 |
text-decoration: none;
|
| 622 |
color: var(--text-light);
|
|
|
|
|
|
|
| 623 |
}
|
| 624 |
body.dark .post-item {
|
| 625 |
background: var(--card-bg-dark);
|
| 626 |
color: var(--text-dark);
|
| 627 |
}
|
| 628 |
.post-item:hover {
|
| 629 |
+
transform: scale(1.05);
|
| 630 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
| 631 |
}
|
| 632 |
.post-preview {
|
| 633 |
width: 100%;
|
| 634 |
+
height: 200px;
|
| 635 |
object-fit: cover;
|
|
|
|
|
|
|
| 636 |
transition: var(--transition);
|
| 637 |
}
|
| 638 |
.post-item:hover .post-preview {
|
| 639 |
+
transform: scale(1.1);
|
| 640 |
+
}
|
| 641 |
+
.post-info {
|
| 642 |
+
padding: 15px;
|
| 643 |
+
background: rgba(0, 0, 0, 0.7);
|
| 644 |
+
position: absolute;
|
| 645 |
+
bottom: 0;
|
| 646 |
+
left: 0;
|
| 647 |
+
right: 0;
|
| 648 |
+
color: white;
|
| 649 |
+
}
|
| 650 |
+
body.dark .post-info {
|
| 651 |
+
background: rgba(255, 255, 255, 0.1);
|
| 652 |
}
|
| 653 |
.post-item h2 {
|
| 654 |
+
font-size: 1.3em;
|
|
|
|
| 655 |
font-weight: 600;
|
| 656 |
+
margin-bottom: 5px;
|
| 657 |
+
white-space: nowrap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 658 |
overflow: hidden;
|
| 659 |
text-overflow: ellipsis;
|
| 660 |
}
|
| 661 |
+
.post-meta {
|
| 662 |
font-size: 0.9em;
|
| 663 |
+
display: flex;
|
| 664 |
+
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
| 665 |
}
|
| 666 |
.username-link {
|
| 667 |
+
color: var(--secondary);
|
| 668 |
+
font-weight: 500;
|
| 669 |
text-decoration: none;
|
| 670 |
}
|
| 671 |
.username-link:hover {
|
| 672 |
text-decoration: underline;
|
| 673 |
}
|
| 674 |
+
.stats {
|
|
|
|
|
|
|
|
|
|
| 675 |
font-size: 0.9em;
|
| 676 |
+
color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
|
|
|
|
| 677 |
}
|
| 678 |
</style>
|
| 679 |
</head>
|
|
|
|
| 697 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 698 |
</video>
|
| 699 |
{% else %}
|
| 700 |
+
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}">
|
| 701 |
{% endif %}
|
| 702 |
+
<div class="post-info">
|
| 703 |
+
<h2>{{ post['title'] }}</h2>
|
| 704 |
+
<div class="post-meta">
|
| 705 |
+
<a href="{{ url_for('user_profile', username=post['uploader']) }}" class="username-link">{{ post['uploader'] }}</a>
|
| 706 |
+
<span class="stats">{{ post['views'] }} views • {{ post['likes']|length }} likes</span>
|
| 707 |
+
</div>
|
| 708 |
</div>
|
|
|
|
| 709 |
</a>
|
| 710 |
{% endfor %}
|
| 711 |
</div>
|
|
|
|
| 803 |
font-size: 2.5em;
|
| 804 |
font-weight: 700;
|
| 805 |
margin-bottom: 30px;
|
| 806 |
+
background: var(--gradient);
|
| 807 |
-webkit-background-clip: text;
|
| 808 |
color: transparent;
|
| 809 |
}
|
|
|
|
| 1005 |
.profile-info h1 {
|
| 1006 |
font-size: 2.5em;
|
| 1007 |
font-weight: 700;
|
| 1008 |
+
background: var(--gradient);
|
| 1009 |
-webkit-background-clip: text;
|
| 1010 |
color: transparent;
|
| 1011 |
margin-bottom: 20px;
|
|
|
|
| 1016 |
}
|
| 1017 |
.post-grid {
|
| 1018 |
display: grid;
|
| 1019 |
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
| 1020 |
+
gap: 25px;
|
| 1021 |
}
|
| 1022 |
.post-item {
|
| 1023 |
+
position: relative;
|
| 1024 |
+
width: 340px;
|
| 1025 |
background: var(--card-bg-light);
|
| 1026 |
+
border-radius: 15px;
|
| 1027 |
+
overflow: hidden;
|
|
|
|
| 1028 |
box-shadow: var(--shadow);
|
| 1029 |
transition: var(--transition);
|
| 1030 |
}
|
|
|
|
| 1032 |
background: var(--card-bg-dark);
|
| 1033 |
}
|
| 1034 |
.post-item:hover {
|
| 1035 |
+
transform: scale(1.05);
|
| 1036 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
| 1037 |
}
|
| 1038 |
.post-preview {
|
| 1039 |
width: 100%;
|
| 1040 |
+
height: 200px;
|
| 1041 |
object-fit: cover;
|
|
|
|
|
|
|
| 1042 |
transition: var(--transition);
|
| 1043 |
}
|
| 1044 |
.post-item:hover .post-preview {
|
| 1045 |
+
transform: scale(1.1);
|
| 1046 |
+
}
|
| 1047 |
+
.post-info {
|
| 1048 |
+
padding: 15px;
|
| 1049 |
+
background: rgba(0, 0, 0, 0.7);
|
| 1050 |
+
position: absolute;
|
| 1051 |
+
bottom: 0;
|
| 1052 |
+
left: 0;
|
| 1053 |
+
right: 0;
|
| 1054 |
+
color: white;
|
| 1055 |
+
}
|
| 1056 |
+
body.dark .post-info {
|
| 1057 |
+
background: rgba(255, 255, 255, 0.1);
|
| 1058 |
}
|
| 1059 |
.post-item h3 {
|
| 1060 |
+
font-size: 1.3em;
|
|
|
|
| 1061 |
font-weight: 600;
|
| 1062 |
+
margin-bottom: 5px;
|
| 1063 |
+
white-space: nowrap;
|
| 1064 |
+
overflow: hidden;
|
| 1065 |
+
text-overflow: ellipsis;
|
| 1066 |
}
|
| 1067 |
.delete-btn {
|
| 1068 |
background: var(--secondary);
|
|
|
|
| 1079 |
h2 {
|
| 1080 |
font-size: 2em;
|
| 1081 |
margin: 40px 0 20px;
|
| 1082 |
+
background: var(--gradient);
|
| 1083 |
-webkit-background-clip: text;
|
| 1084 |
color: transparent;
|
| 1085 |
}
|
|
|
|
| 1123 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 1124 |
</video>
|
| 1125 |
{% else %}
|
| 1126 |
+
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}">
|
| 1127 |
{% endif %}
|
| 1128 |
+
<div class="post-info">
|
| 1129 |
+
<h3>{{ post['title'] }}</h3>
|
| 1130 |
+
</div>
|
| 1131 |
</a>
|
|
|
|
|
|
|
| 1132 |
<form method="POST">
|
| 1133 |
<input type="hidden" name="post_id" value="{{ post['id'] }}">
|
| 1134 |
<button type="submit" name="delete_post" class="btn delete-btn">Delete</button>
|
|
|
|
| 1240 |
.profile-info h1 {
|
| 1241 |
font-size: 2.5em;
|
| 1242 |
font-weight: 700;
|
| 1243 |
+
background: var(--gradient);
|
| 1244 |
-webkit-background-clip: text;
|
| 1245 |
color: transparent;
|
| 1246 |
margin-bottom: 20px;
|
|
|
|
| 1251 |
}
|
| 1252 |
.post-grid {
|
| 1253 |
display: grid;
|
| 1254 |
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
| 1255 |
+
gap: 25px;
|
| 1256 |
}
|
| 1257 |
.post-item {
|
| 1258 |
+
position: relative;
|
| 1259 |
+
width: 340px;
|
| 1260 |
background: var(--card-bg-light);
|
| 1261 |
+
border-radius: 15px;
|
| 1262 |
+
overflow: hidden;
|
|
|
|
| 1263 |
box-shadow: var(--shadow);
|
| 1264 |
transition: var(--transition);
|
| 1265 |
}
|
|
|
|
| 1267 |
background: var(--card-bg-dark);
|
| 1268 |
}
|
| 1269 |
.post-item:hover {
|
| 1270 |
+
transform: scale(1.05);
|
| 1271 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
| 1272 |
}
|
| 1273 |
.post-preview {
|
| 1274 |
width: 100%;
|
| 1275 |
+
height: 200px;
|
| 1276 |
object-fit: cover;
|
|
|
|
|
|
|
| 1277 |
transition: var(--transition);
|
| 1278 |
}
|
| 1279 |
.post-item:hover .post-preview {
|
| 1280 |
+
transform: scale(1.1);
|
| 1281 |
+
}
|
| 1282 |
+
.post-info {
|
| 1283 |
+
padding: 15px;
|
| 1284 |
+
background: rgba(0, 0, 0, 0.7);
|
| 1285 |
+
position: absolute;
|
| 1286 |
+
bottom: 0;
|
| 1287 |
+
left: 0;
|
| 1288 |
+
right: 0;
|
| 1289 |
+
color: white;
|
| 1290 |
+
}
|
| 1291 |
+
body.dark .post-info {
|
| 1292 |
+
background: rgba(255, 255, 255, 0.1);
|
| 1293 |
}
|
| 1294 |
.post-item h3 {
|
| 1295 |
+
font-size: 1.3em;
|
|
|
|
| 1296 |
font-weight: 600;
|
| 1297 |
+
margin-bottom: 5px;
|
| 1298 |
+
white-space: nowrap;
|
| 1299 |
+
overflow: hidden;
|
| 1300 |
+
text-overflow: ellipsis;
|
| 1301 |
}
|
| 1302 |
.share-btn {
|
| 1303 |
background: #ffa07a;
|
|
|
|
| 1308 |
h2 {
|
| 1309 |
font-size: 2em;
|
| 1310 |
margin: 40px 0 20px;
|
| 1311 |
+
background: var(--gradient);
|
| 1312 |
-webkit-background-clip: text;
|
| 1313 |
color: transparent;
|
| 1314 |
}
|
|
|
|
| 1344 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 1345 |
</video>
|
| 1346 |
{% else %}
|
| 1347 |
+
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}">
|
| 1348 |
{% endif %}
|
| 1349 |
+
<div class="post-info">
|
| 1350 |
+
<h3>{{ post['title'] }}</h3>
|
| 1351 |
+
</div>
|
| 1352 |
</a>
|
|
|
|
|
|
|
| 1353 |
</div>
|
| 1354 |
{% endfor %}
|
| 1355 |
{% else %}
|
|
|
|
| 1486 |
font-weight: 700;
|
| 1487 |
text-align: center;
|
| 1488 |
margin-bottom: 30px;
|
| 1489 |
+
background: var(--gradient);
|
| 1490 |
-webkit-background-clip: text;
|
| 1491 |
color: transparent;
|
| 1492 |
}
|
|
|
|
| 1650 |
font-size: 2.5em;
|
| 1651 |
font-weight: 700;
|
| 1652 |
margin-bottom: 20px;
|
| 1653 |
+
background: var(--gradient);
|
| 1654 |
-webkit-background-clip: text;
|
| 1655 |
color: transparent;
|
| 1656 |
}
|
|
|
|
| 1661 |
padding: 10px;
|
| 1662 |
border-radius: 15px;
|
| 1663 |
background: var(--glass-bg);
|
| 1664 |
+
backdrop-filter: blur(10px);
|
| 1665 |
}
|
| 1666 |
.message {
|
| 1667 |
display: flex;
|
| 1668 |
align-items: flex-start;
|
| 1669 |
padding: 15px;
|
| 1670 |
+
background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
|
| 1671 |
border-radius: 15px;
|
| 1672 |
margin-bottom: 15px;
|
| 1673 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 1674 |
+
animation: fadeIn 0.3s ease-in;
|
| 1675 |
}
|
| 1676 |
body.dark .message {
|
| 1677 |
+
background: linear-gradient(135deg, rgba(60, 40, 80, 0.2), rgba(78, 205, 196, 0.2));
|
| 1678 |
}
|
| 1679 |
+
@keyframes fadeIn {
|
| 1680 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 1681 |
+
to { opacity: 1; transform: translateY(0); }
|
| 1682 |
}
|
| 1683 |
.message-avatar {
|
| 1684 |
width: 40px;
|
|
|
|
| 1686 |
border-radius: 50%;
|
| 1687 |
margin-right: 15px;
|
| 1688 |
object-fit: cover;
|
| 1689 |
+
border: 2px solid var(--primary);
|
| 1690 |
}
|
| 1691 |
.message-content {
|
| 1692 |
flex: 1;
|
|
|
|
| 1701 |
font-weight: 600;
|
| 1702 |
color: var(--primary);
|
| 1703 |
text-decoration: none;
|
| 1704 |
+
transition: var(--transition);
|
| 1705 |
}
|
| 1706 |
.message-sender:hover {
|
| 1707 |
+
color: var(--secondary);
|
| 1708 |
}
|
| 1709 |
.message-time {
|
| 1710 |
font-size: 0.9em;
|
|
|
|
| 1718 |
padding: 5px 10px;
|
| 1719 |
font-size: 0.9em;
|
| 1720 |
border-radius: 10px;
|
| 1721 |
+
transition: var(--transition);
|
| 1722 |
}
|
| 1723 |
.kick-btn:hover {
|
| 1724 |
background: #cc3333;
|
| 1725 |
+
transform: scale(1.1);
|
| 1726 |
}
|
| 1727 |
.message img, .message video {
|
| 1728 |
max-width: 250px;
|
| 1729 |
max-height: 250px;
|
| 1730 |
border-radius: 10px;
|
| 1731 |
margin-top: 10px;
|
| 1732 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 1733 |
}
|
| 1734 |
.message a {
|
| 1735 |
+
color: var(--secondary);
|
| 1736 |
text-decoration: none;
|
| 1737 |
+
font-weight: 500;
|
| 1738 |
}
|
| 1739 |
.message a:hover {
|
| 1740 |
text-decoration: underline;
|
| 1741 |
}
|
| 1742 |
.message-form {
|
| 1743 |
margin-top: 20px;
|
| 1744 |
+
background: var(--glass-bg);
|
| 1745 |
+
padding: 20px;
|
| 1746 |
+
border-radius: 15px;
|
| 1747 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 1748 |
}
|
| 1749 |
</style>
|
| 1750 |
</head>
|
|
|
|
| 1889 |
font-size: 2.8em;
|
| 1890 |
font-weight: 700;
|
| 1891 |
margin-bottom: 40px;
|
| 1892 |
+
background: var(--gradient);
|
| 1893 |
-webkit-background-clip: text;
|
| 1894 |
color: transparent;
|
| 1895 |
}
|
| 1896 |
.search-container {
|
| 1897 |
+
max-width: 600px;
|
| 1898 |
margin: 0 auto 40px;
|
| 1899 |
position: relative;
|
| 1900 |
}
|
|
|
|
| 1923 |
}
|
| 1924 |
.post-grid {
|
| 1925 |
display: grid;
|
| 1926 |
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
| 1927 |
+
gap: 25px;
|
| 1928 |
}
|
| 1929 |
.post-item {
|
| 1930 |
+
position: relative;
|
| 1931 |
+
width: 340px;
|
| 1932 |
background: var(--card-bg-light);
|
| 1933 |
+
border-radius: 15px;
|
| 1934 |
+
overflow: hidden;
|
|
|
|
| 1935 |
box-shadow: var(--shadow);
|
| 1936 |
transition: var(--transition);
|
| 1937 |
}
|
|
|
|
| 1939 |
background: var(--card-bg-dark);
|
| 1940 |
}
|
| 1941 |
.post-item:hover {
|
| 1942 |
+
transform: scale(1.05);
|
| 1943 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
| 1944 |
}
|
| 1945 |
.post-preview {
|
| 1946 |
width: 100%;
|
| 1947 |
+
height: 200px;
|
| 1948 |
object-fit: cover;
|
|
|
|
|
|
|
| 1949 |
transition: var(--transition);
|
| 1950 |
}
|
| 1951 |
.post-item:hover .post-preview {
|
| 1952 |
+
transform: scale(1.1);
|
| 1953 |
}
|
| 1954 |
+
.post-info {
|
| 1955 |
+
padding: 15px;
|
| 1956 |
+
background: rgba(0, 0, 0, 0.7);
|
| 1957 |
+
position: absolute;
|
| 1958 |
+
bottom: 0;
|
| 1959 |
+
left: 0;
|
| 1960 |
+
right: 0;
|
| 1961 |
+
color: white;
|
| 1962 |
}
|
| 1963 |
+
body.dark .post-info {
|
| 1964 |
+
background: rgba(255, 255, 255, 0.1);
|
| 1965 |
+
}
|
| 1966 |
+
.post-item h2 {
|
| 1967 |
+
font-size: 1.3em;
|
| 1968 |
+
font-weight: 600;
|
| 1969 |
+
margin-bottom: 5px;
|
| 1970 |
+
white-space: nowrap;
|
| 1971 |
+
overflow: hidden;
|
| 1972 |
+
text-overflow: ellipsis;
|
| 1973 |
}
|
| 1974 |
.delete-btn {
|
| 1975 |
background: var(--secondary);
|
|
|
|
| 1978 |
background: #45b7b0;
|
| 1979 |
}
|
| 1980 |
.username-link {
|
| 1981 |
+
color: var(--secondary);
|
| 1982 |
+
font-weight: 500;
|
| 1983 |
text-decoration: none;
|
| 1984 |
}
|
| 1985 |
.username-link:hover {
|
| 1986 |
text-decoration: underline;
|
| 1987 |
}
|
| 1988 |
+
.post-meta {
|
| 1989 |
+
font-size: 0.9em;
|
| 1990 |
+
display: flex;
|
| 1991 |
+
justify-content: space-between;
|
| 1992 |
+
}
|
| 1993 |
</style>
|
| 1994 |
</head>
|
| 1995 |
<body>
|
|
|
|
| 2014 |
<source src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" type="video/mp4">
|
| 2015 |
</video>
|
| 2016 |
{% else %}
|
| 2017 |
+
<img class="post-preview" src="https://huggingface.co/datasets/{{ repo_id }}/resolve/main/{{ post['type'] }}s/{{ post['filename'] }}" alt="{{ post['title'] }}">
|
| 2018 |
{% endif %}
|
| 2019 |
+
<div class="post-info">
|
| 2020 |
+
<h2>{{ post['title'] }}</h2>
|
| 2021 |
+
<div class="post-meta">
|
| 2022 |
+
<a href="{{ url_for('user_profile', username=post['uploader']) }}" class="username-link">{{ post['uploader'] }}</a>
|
| 2023 |
+
<span>{{ post['upload_date'] }}</span>
|
| 2024 |
+
</div>
|
| 2025 |
+
</div>
|
| 2026 |
</a>
|
|
|
|
|
|
|
| 2027 |
<form method="POST">
|
| 2028 |
<input type="hidden" name="post_id" value="{{ post['id'] }}">
|
| 2029 |
<button type="submit" name="delete" class="btn delete-btn">Delete</button>
|