Skip to main content

max / makenotwork

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