|
| 1 | +from datetime import date |
| 2 | + |
1 | 3 | import os |
2 | 4 | import re |
3 | 5 |
|
@@ -1209,6 +1211,51 @@ def get_context_data(self, **kwargs): |
1209 | 1211 |
|
1210 | 1212 | context["demo_badges_few"] = context["demo_badges"][:3] |
1211 | 1213 |
|
| 1214 | + context["demo_posts"] = [ |
| 1215 | + { |
| 1216 | + "title": "A talk by Richard Thomson at the Utah C++ Programmers Group", |
| 1217 | + "url": "#", |
| 1218 | + "date": date(2025, 3, 3), |
| 1219 | + "category": "Issues", |
| 1220 | + "tag": "beast", |
| 1221 | + "author": { |
| 1222 | + "name": "Richard Thomson", |
| 1223 | + "profile_url": "#", |
| 1224 | + "role": "Contributor", |
| 1225 | + "avatar_url": "https://ui-avatars.com/api/?name=Richard+Thomson&size=48", |
| 1226 | + "badge_url": f"{badge_img}/badge-first-place.png", |
| 1227 | + }, |
| 1228 | + }, |
| 1229 | + { |
| 1230 | + "title": "A talk by Richard Thomson at the Utah C++ Programmers Group", |
| 1231 | + "url": "#", |
| 1232 | + "date": date(2025, 3, 3), |
| 1233 | + "category": "Issues", |
| 1234 | + "tag": "beast", |
| 1235 | + "author": { |
| 1236 | + "name": "Peter Dimov", |
| 1237 | + "profile_url": "#", |
| 1238 | + "role": "Maintainer", |
| 1239 | + "avatar_url": "https://ui-avatars.com/api/?name=Peter+Dimov&size=48", |
| 1240 | + "badge_url": f"{badge_img}/badge-bronze.png", |
| 1241 | + }, |
| 1242 | + }, |
| 1243 | + { |
| 1244 | + "title": "Boost.Bind and modern C++: a quick overview", |
| 1245 | + "url": "#", |
| 1246 | + "date": date(2025, 2, 15), |
| 1247 | + "category": "Releases", |
| 1248 | + "tag": "bind", |
| 1249 | + "author": { |
| 1250 | + "name": "Alex Morgan", |
| 1251 | + "profile_url": "#", |
| 1252 | + "role": "Contributor", |
| 1253 | + "avatar_url": "https://thispersondoesnotexist.com/", |
| 1254 | + }, |
| 1255 | + }, |
| 1256 | + ] |
| 1257 | + context["demo_post"] = context["demo_posts"][0] |
| 1258 | + |
1212 | 1259 | context["create_account_card_preview_url"] = ( |
1213 | 1260 | f"{settings.STATIC_URL}img/checker.png" |
1214 | 1261 | ) |
@@ -1342,36 +1389,40 @@ def get_context_data(self, **kwargs): |
1342 | 1389 | "quote": "I use Boost daily. I absolutely love it. It's wonderful. I could not do my job w/o it. Much of it is in the new C++11 standard too.", |
1343 | 1390 | "author": { |
1344 | 1391 | "name": "Name Surname", |
| 1392 | + "profile_url": "#", |
1345 | 1393 | "avatar_url": "/static/img/v3/demo_page/Avatar.png", |
1346 | 1394 | "role": "Contributor", |
1347 | | - "role_badge": "/static/img/v3/demo_page/Badge.svg", |
| 1395 | + "badge_url": "/static/img/v3/demo_page/Badge.svg", |
1348 | 1396 | }, |
1349 | 1397 | }, |
1350 | 1398 | { |
1351 | 1399 | "quote": "I use Boost daily. I absolutely love it. It's wonderful. I could not do my job w/o it. Much of it is in the new C++11 standard too.", |
1352 | 1400 | "author": { |
1353 | 1401 | "name": "Name Surname", |
| 1402 | + "profile_url": "#", |
1354 | 1403 | "avatar_url": "/static/img/v3/demo_page/Avatar.png", |
1355 | 1404 | "role": "Contributor", |
1356 | | - "role_badge": "/static/img/v3/demo_page/Badge.svg", |
| 1405 | + "badge_url": "/static/img/v3/demo_page/Badge.svg", |
1357 | 1406 | }, |
1358 | 1407 | }, |
1359 | 1408 | { |
1360 | 1409 | "quote": "I use Boost d1aily. I absolutely love it. It's wonderful. I could not do my job w/o it. Much of it is in the new C++11 standard too.", |
1361 | 1410 | "author": { |
1362 | 1411 | "name": "Name Surname", |
| 1412 | + "profile_url": "#", |
1363 | 1413 | "avatar_url": "/static/img/v3/demo_page/Avatar.png", |
1364 | 1414 | "role": "Contributor", |
1365 | | - "role_badge": "/static/img/v3/demo_page/Badge.svg", |
| 1415 | + "badge_url": "/static/img/v3/demo_page/Badge.svg", |
1366 | 1416 | }, |
1367 | 1417 | }, |
1368 | 1418 | { |
1369 | 1419 | "quote": "I use Boost daily. I absolutely love it. It's wonderful. I could not do my job w/o it. Much of it is in the new C++11 standard too.", |
1370 | 1420 | "author": { |
1371 | 1421 | "name": "Name Surname", |
| 1422 | + "profile_url": "#", |
1372 | 1423 | "avatar_url": "/static/img/v3/demo_page/Avatar.png", |
1373 | 1424 | "role": "Contributor", |
1374 | | - "role_badge": "/static/img/v3/demo_page/Badge.svg", |
| 1425 | + "badge_url": "/static/img/v3/demo_page/Badge.svg", |
1375 | 1426 | }, |
1376 | 1427 | }, |
1377 | 1428 | ], |
@@ -1467,6 +1518,45 @@ def get_context_data(self, **kwargs): |
1467 | 1518 | "button_style": "primary", |
1468 | 1519 | } |
1469 | 1520 |
|
| 1521 | + context["user_profile_data"] = [ |
| 1522 | + { |
| 1523 | + "name": "John Doe", |
| 1524 | + "profile_url": "#", |
| 1525 | + "role": "Author", |
| 1526 | + "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", |
| 1527 | + "badge_url": f"{settings.STATIC_URL}img/v3/badges/badge-first-place.png", |
| 1528 | + "badge": "", |
| 1529 | + "bio": "", |
| 1530 | + }, |
| 1531 | + { |
| 1532 | + "name": "Richard Thomson", |
| 1533 | + "profile_url": "#", |
| 1534 | + "role": "Contributor", |
| 1535 | + "avatar_url": "", |
| 1536 | + "badge_url": "", |
| 1537 | + "badge": "", |
| 1538 | + "bio": "", |
| 1539 | + }, |
| 1540 | + { |
| 1541 | + "name": "Richard Thomson", |
| 1542 | + "profile_url": "#", |
| 1543 | + "role": "Contributor", |
| 1544 | + "avatar_url": "", |
| 1545 | + "badge_url": f"{settings.STATIC_URL}img/v3/badges/badge-bronze.png", |
| 1546 | + "badge": "", |
| 1547 | + "bio": "Big C++ fan. Not quite kidney-donation level, but close.", |
| 1548 | + }, |
| 1549 | + { |
| 1550 | + "name": "Richard Thomson", |
| 1551 | + "profile_url": "#", |
| 1552 | + "role": "Author", |
| 1553 | + "avatar_url": "", |
| 1554 | + "badge_url": "", |
| 1555 | + "badge": "", |
| 1556 | + "bio": "Big C++ fan. Not quite kidney-donation level, but close.", |
| 1557 | + }, |
| 1558 | + ] |
| 1559 | + |
1470 | 1560 | latest = Version.objects.most_recent() |
1471 | 1561 | if latest: |
1472 | 1562 | lv = ( |
|
0 commit comments