Skip to main content

max / makenotwork

5.5 KB · 123 lines History Blame Raw
1 {% extends "base.html" %}
2
3 {% block title %}{{ user.display_name_or_username() }} - Makenotwork{% endblock %}
4 {% block body_attrs %} class="padded-page user-page"{% endblock %}
5
6 {% block head %}
7 {# Tier 0 creator theme: primitive-layer override; semantic layer derives from it. #}
8 <style id="creator-theme">{{ theme_css|safe }}</style>
9 <meta property="og:title" content="{{ user.display_name_or_username() }} - Makenot.work">
10 <meta property="og:description" content="{% if let Some(bio) = user.bio %}{{ bio }}{% else %}Creator on Makenot.work{% endif %}">
11 <meta property="og:type" content="profile">
12 <meta property="og:url" content="{{ host_url }}/u/{{ user.username }}">
13 <link rel="canonical" href="{{ host_url }}/u/{{ user.username }}">
14 <meta property="og:site_name" content="Makenot.work">
15 {% if user.avatar_url.is_some() %}<meta name="twitter:card" content="summary_large_image">{% else %}<meta name="twitter:card" content="summary">{% endif %}
16 <meta name="twitter:title" content="{{ user.display_name_or_username() }} - Makenot.work">
17 <meta name="twitter:description" content="{% if let Some(bio) = user.bio %}{{ bio }}{% else %}Creator on Makenot.work{% endif %}">
18 {% if let Some(img) = user.avatar_url %}
19 <meta property="og:image" content="{{ img }}">
20 <meta name="twitter:image" content="{{ img }}">
21 {% else %}
22 <meta property="og:image" content="{{ host_url }}/static/images/og-card.png">
23 <meta name="twitter:image" content="{{ host_url }}/static/images/og-card.png">
24 {% endif %}
25 <script type="application/ld+json">
26 {
27 "@context": "https://schema.org",
28 "@type": "ProfilePage",
29 "mainEntity": {
30 "@type": "Person",
31 "name": "{{ user.display_name_json()|safe }}",
32 "url": "{{ host_url }}/u/{{ user.username }}"{% if user.bio.is_some() %},
33 "description": "{{ user.bio_json()|safe }}"{% endif %}
34 }
35 }
36 </script>
37 <link rel="alternate" type="application/rss+xml" title="{{ user.display_name_or_username() }} - RSS Feed" href="/u/{{ user.username }}/rss">
38 {% endblock %}
39
40 {% block content %}
41 {% include "partials/site_header.html" %}
42
43 <div class="container">
44 {% if creator_paused %}
45 <div class="creator-paused-notice">
46 This creator is currently on break. Existing purchases remain accessible.
47 </div>
48 {% endif %}
49 <header class="profile-header">
50 <div class="profile-avatar">{{ user.avatar_initials }}</div>
51 <h1 class="profile-name">{{ user.display_name_or_username() }}</h1>
52 <div class="profile-username">{{ user.username }}</div>
53 {% if let Some(bio) = user.bio %}
54 <p class="profile-bio">{{ bio }}</p>
55 {% endif %}
56 {% if is_own_profile %}
57 <div class="profile-action-row">
58 <a href="/dashboard#tab-profile" class="btn-secondary profile-edit-btn">Edit Profile</a>
59 </div>
60 {% endif %}
61 {% if session_user.is_some() && !is_own_profile %}
62 <div class="profile-action-row">
63 {% if is_following %}
64 <button class="btn-secondary follow-btn is-selected"
65 hx-delete="/api/follow/user/{{ user_id }}"
66 hx-swap="outerHTML">Following ({{ follower_count }})</button>
67 {% else %}
68 <button class="btn-secondary follow-btn"
69 hx-post="/api/follow/user/{{ user_id }}"
70 hx-swap="outerHTML">Follow ({{ follower_count }})</button>
71 {% endif %}
72 </div>
73 {% else if follower_count > 0 %}
74 <div class="follower-count">{{ follower_count }} followers</div>
75 {% endif %}
76 {% include "partials/tip_button.html" %}
77 <div class="profile-share-row">
78 <a href="/u/{{ user.username }}/rss" class="profile-share-link">RSS Feed</a>
79 <a href="/u/{{ user.username }}" class="profile-share-link" data-copy-link>Copy link</a>
80 </div>
81 </header>
82
83 {% if !custom_links.is_empty() %}
84 <section class="links-section">
85 {% for link in custom_links %}
86 <a href="{{ link.url }}" class="card link-item" rel="ugc nofollow noopener" target="_blank">
87 <div class="link-title">{{ link.title }}</div>
88 <div class="link-description">{{ link.description }}</div>
89 </a>
90 {% endfor %}
91 </section>
92 {% endif %}
93
94 {% if !projects.is_empty() %}
95 <section class="projects-section">
96 <h2 class="section-header">Projects</h2>
97 {% for project in projects %}
98 <a href="/p/{{ project.slug }}" class="card">
99 <div class="project-title">{{ project.title }}</div>
100 <div class="project-meta">{{ project.project_type }} &middot; {{ project.item_count }} items</div>
101 </a>
102 {% endfor %}
103 </section>
104 {% endif %}
105
106 {% if !public_collections.is_empty() %}
107 <section class="collections-section">
108 <h2 class="section-header">Collections</h2>
109 {% for coll in public_collections %}
110 <a href="/c/{{ user.username }}/{{ coll.slug }}" class="card">
111 <div class="project-title">{{ coll.title }}</div>
112 <div class="project-meta">{{ coll.item_count }} items</div>
113 </a>
114 {% endfor %}
115 </section>
116 {% endif %}
117
118 <footer class="profile-footer">
119 <p>Powered by <a href="/">Makenot<span class="dot">.</span>work</a></p>
120 </footer>
121 </div>
122 {% endblock %}
123