forked from retoor/devplacepy
chore: remove pre-locust test stubs and add daily topic, follow router, password reset, image upload, and badge awarding features
This commit is contained in:
@@ -3,42 +3,6 @@
|
||||
<link rel="stylesheet" href="/static/css/profile.css">
|
||||
<link rel="stylesheet" href="/static/css/projects.css">
|
||||
<style>
|
||||
.topnav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--nav-height);
|
||||
background: var(--bg-secondary);
|
||||
border-bottom: 1px solid var(--border);
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.topnav-inner {
|
||||
max-width: var(--max-content);
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
}
|
||||
.topnav-logo { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
|
||||
.topnav-logo span { color: var(--accent); }
|
||||
.topnav-links { display: flex; gap: 0.25rem; }
|
||||
.topnav-link { padding: 0.5rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: all 0.2s; }
|
||||
.topnav-link:hover { color: var(--text-primary); background: var(--bg-card); }
|
||||
.topnav-link.active { color: var(--accent); background: var(--accent-light); }
|
||||
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
|
||||
.topnav-icon { position: relative; padding: 0.375rem; color: var(--text-secondary); font-size: 1.25rem; transition: color 0.2s; }
|
||||
.topnav-icon:hover { color: var(--text-primary); }
|
||||
.nav-badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
|
||||
.topnav-user { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem; border-radius: var(--radius); transition: background 0.2s; }
|
||||
.topnav-user:hover { background: var(--bg-card); }
|
||||
.topnav-user-info { display: flex; flex-direction: column; line-height: 1.2; }
|
||||
.topnav-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
|
||||
.topnav-user-role { font-size: 0.6875rem; color: var(--text-muted); }
|
||||
.hidden { display: none !important; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -56,7 +20,7 @@
|
||||
|
||||
<div class="profile-stats">
|
||||
<div class="profile-stat">
|
||||
<span class="profile-stat-value">{{ profile_user.get('posts_count', 0) }}</span>
|
||||
<span class="profile-stat-value">{{ posts_count }}</span>
|
||||
<span class="profile-stat-label">Posts</span>
|
||||
</div>
|
||||
<div class="profile-stat">
|
||||
@@ -88,7 +52,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if user and user['uid'] == profile_user['uid'] %}
|
||||
{% if user and user['uid'] != profile_user['uid'] %}
|
||||
<div style="margin-top: 1rem;">
|
||||
{% if is_following %}
|
||||
<form method="POST" action="/follow/unfollow/{{ profile_user['username'] }}">
|
||||
<button type="submit" class="btn btn-secondary btn-sm" style="width: 100%;">Unfollow</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form method="POST" action="/follow/{{ profile_user['username'] }}">
|
||||
<button type="submit" class="btn btn-primary btn-sm" style="width: 100%;">Follow</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if user and user['uid'] == profile_user['uid'] %}
|
||||
<div class="profile-info">
|
||||
<form method="POST" action="/profile/update">
|
||||
<div class="profile-info-row">
|
||||
@@ -242,7 +220,22 @@
|
||||
<div class="empty-state">No projects yet.</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="empty-state">Activity coming soon.</div>
|
||||
{% for act in activities %}
|
||||
<div class="post-card fade-in" style="padding: 0.75rem 1rem;">
|
||||
<div style="display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem;">
|
||||
<span style="color: var(--text-muted);">
|
||||
{% if act['type'] == 'post' %}📝{% else %}💬{% endif %}
|
||||
</span>
|
||||
<span style="color: var(--text-secondary);">
|
||||
{% if act['type'] == 'post' %}Posted{% else %}Commented{% endif %}
|
||||
</span>
|
||||
<span style="color: var(--text-muted);">{{ act['time_ago'] }}</span>
|
||||
</div>
|
||||
<p style="font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem;">{{ act['content'] }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">No activity yet.</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user