DevPlace CI / test (push) Failing after 3h10m39s
Comment and post layouts stay full width on small screens. Secondary actions live in the More menu. Notifications can be grouped and throttled, and Enter can submit when that profile setting is on. Emulated-tool models accept large catalogs, with reserved names aliased on the wire and the catalog cached per owner. A dropped service-worker navigation is retried once. The test server waits 120s to finish importing before it is stopped.
200 lines
11 KiB
HTML
200 lines
11 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_macros.html" import modal %}
|
|
{% block extra_head %}
|
|
<link rel="stylesheet" href="{{ static_url('/static/css/sidebar.css') }}">
|
|
<link rel="stylesheet" href="{{ static_url('/static/css/feed.css') }}">
|
|
<link rel="stylesheet" href="{{ static_url('/static/css/post.css') }}">
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="post-page-layout">
|
|
{% if author_gists or author_projects or related_posts %}
|
|
<aside class="post-page-sidebar" role="complementary" aria-label="More to explore">
|
|
{% if author_gists %}
|
|
<div class="sidebar-card">
|
|
<div class="sidebar-heading">Gists from {{ author.get('username', '') if author else '' }}</div>
|
|
<div class="related-list">
|
|
{% for gist in author_gists %}
|
|
<a href="/gists/{{ gist['slug'] or gist['uid'] }}" class="related-link">
|
|
<strong class="related-title">{{ render_title(gist.get('title')) if gist.get('title') else 'Untitled gist' }}</strong>
|
|
<span class="related-meta">{{ content_preview(gist.get('description') or gist.get('source_code', ''), 80) }}</span>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="topic-links">
|
|
<a href="/profile/{{ author.get('username', '') if author else '' }}?tab=gists">View all</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if author_projects %}
|
|
<div class="sidebar-card">
|
|
<div class="sidebar-heading">Projects from {{ author.get('username', '') if author else '' }}</div>
|
|
<div class="related-list">
|
|
{% for project in author_projects %}
|
|
<a href="/projects/{{ project['slug'] or project['uid'] }}" class="related-link">
|
|
<strong class="related-title">{{ render_title(project.get('title')) if project.get('title') else 'Untitled project' }}</strong>
|
|
<span class="related-meta">{{ content_preview(project.get('description', ''), 80) }}</span>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="topic-links">
|
|
<a href="/profile/{{ author.get('username', '') if author else '' }}?tab=projects">View all</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if related_posts %}
|
|
<div class="sidebar-card">
|
|
<div class="sidebar-heading">Related Discussions</div>
|
|
<div class="related-list">
|
|
{% for item in related_posts %}
|
|
<a href="/posts/{{ item.post['slug'] or item.post['uid'] }}" class="related-link">
|
|
<strong class="related-title">{{ render_title(item.post['title'], author_is_admin=is_admin(item.author)) if item.post.get('title') else content_preview(item.post['content'], 60) }}</strong>
|
|
<span class="related-meta">{{ item.author['username'] }} · {{ dt_ago(item.created_at) if item.created_at else item.time_ago }}</span>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</aside>
|
|
{% endif %}
|
|
<div class="post-page">
|
|
<div class="post-nav-row">
|
|
<a href="/feed" class="back-link">← Back to Feed</a>
|
|
{% if next_post_url %}
|
|
<a href="{{ next_post_url }}" class="next-post-link">Next post →</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<article class="post-detail">
|
|
<div class="post-detail-header">
|
|
{% set _user = author %}{% set _size = 40 %}{% set _size_class = "md" %}{% include "_avatar_link.html" %}
|
|
<div>
|
|
{% set _user = author %}{% set _class = "post-detail-author" %}{% include "_user_link.html" %}
|
|
<span class="post-detail-level">· Level {{ author.get('level', 1) if author else 1 }}</span>
|
|
</div>
|
|
<span class="post-detail-time">{{ dt_ago(post.created_at) if post.get('created_at') else time_ago }}</span>
|
|
</div>
|
|
|
|
<div class="topic-wrap">
|
|
<span class="badge badge-{{ post['topic'] }}">{{ post['topic'] }}</span>
|
|
</div>
|
|
|
|
{% if post.get('title') %}
|
|
<h1 class="post-detail-title">{{ render_title(post['title'], author_is_admin=is_admin(author)) }}</h1>
|
|
{% endif %}
|
|
|
|
{% if maturity_hidden(maturity, user) %}
|
|
{% set _level = maturity %}{% include "_maturity_gate.html" %}
|
|
{% else %}
|
|
<div class="post-detail-content rendered-content">{{ render_content(post['content'], author_is_admin=is_admin(author)) }}</div>
|
|
{% endif %}
|
|
|
|
{% if project_link %}
|
|
<a href="{{ project_link.url }}" class="project-link">Project: {{ project_link.name }}</a>
|
|
{% endif %}
|
|
|
|
{% if attachments %}
|
|
{% include "_attachment_display.html" %}
|
|
{% endif %}
|
|
|
|
{% if poll %}
|
|
{% set _poll = poll %}{% include "_poll.html" %}
|
|
{% endif %}
|
|
|
|
{% if war %}
|
|
{% set _war = war %}{% include "_opinion_war.html" %}
|
|
{% endif %}
|
|
|
|
<div class="post-detail-actions">
|
|
{% set _uid = post['uid'] %}{% set _my_vote = my_vote %}{% set _count = post.get('stars', 0) %}{% include "_post_votes.html" %}
|
|
{% set _type = "post" %}{% set _uid = post['uid'] %}{% set _reactions = reactions %}{% include "_reaction_bar.html" %}
|
|
{% if user %}
|
|
{% set _type = "post" %}{% set _uid = post['uid'] %}{% set _note = note_content %}{% include "_note_button.html" %}
|
|
{% endif %}
|
|
<dp-action-menu class="post-actions-menu">
|
|
<button type="button" class="post-action-btn" data-action-menu-trigger aria-haspopup="menu" aria-expanded="false" aria-controls="post-actions-panel" aria-label="More actions"><span class="icon">⋯</span><span class="label"> More</span></button>
|
|
<div class="action-menu-panel" id="post-actions-panel" data-action-menu-panel popover hidden>
|
|
<button type="button" class="post-action-btn" data-share="/posts/{{ post['slug'] or post['uid'] }}" data-menu-action><span class="icon">🔗</span><span class="label"> Share</span></button>
|
|
{% set _type = "post" %}{% set _uid = post['uid'] %}{% set _bookmarked = bookmarked %}{% set _menu_action = true %}{% include "_bookmark_button.html" %}{% set _menu_action = false %}
|
|
{% set _type = "post" %}{% set _uid = post['uid'] %}{% set _owner = post['user_uid'] %}{% set _owner_name = (author or {}).get('username', '') %}{% set _class = "post-action-btn" %}{% set _menu_action = true %}{% include "_report_button.html" %}{% set _menu_action = false %}
|
|
{% if is_owner %}
|
|
<button type="button" class="post-action-btn" data-modal="edit-post-modal" data-menu-action><span class="icon">✏️</span><span class="label">Edit</span></button>
|
|
{% endif %}
|
|
{% if is_owner or is_admin(user) %}
|
|
<form method="POST" action="/posts/delete/{{ post['slug'] or post['uid'] }}" class="inline-form">
|
|
<button type="submit" class="post-action-btn" data-confirm="Delete this post?" data-menu-action><span class="icon">🗑️</span><span class="label">Delete</span></button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</dp-action-menu>
|
|
</div>
|
|
</article>
|
|
|
|
{% if is_owner %}
|
|
{% call modal('edit-post-modal', 'Edit Post') %}
|
|
<form id="edit-post-form" method="POST" action="/posts/edit/{{ post['slug'] or post['uid'] }}">
|
|
<div class="auth-field auth-field-gap">
|
|
<label for="edit-title">Title</label>
|
|
<input type="text" id="edit-title" name="title" maxlength="500" value="{{ post.get('title') or '' }}" data-autofocus>
|
|
</div>
|
|
{% set _topics = topics %}{% set _selected = post['topic'] %}{% include "_topic_selector.html" %}
|
|
{% set _visibility = visibility_of("posts", post) %}{% set _visibility_id = "edit-post-visibility" %}{% include "_visibility_field.html" %}
|
|
<div class="auth-field auth-field-gap">
|
|
<label for="edit-content">Content</label>
|
|
<textarea id="edit-content" name="content" required maxlength="125000" class="min-h-200" data-mention>{{ post['content'] }}</textarea>
|
|
</div>
|
|
{% include "_attachment_form.html" %}
|
|
{% if not poll %}
|
|
<div class="auth-field auth-field-gap">
|
|
<button type="button" class="btn btn-secondary btn-sm" data-poll-toggle><span class="icon">📊</span> <span data-poll-toggle-label>Add poll</span></button>
|
|
</div>
|
|
<div class="poll-builder" data-poll-builder hidden>
|
|
<input type="text" name="poll_question" maxlength="200" placeholder="Poll question" aria-label="Poll question" class="poll-builder-question" disabled>
|
|
<div class="poll-builder-options" data-poll-options>
|
|
<div class="poll-builder-row"><input type="text" name="poll_options" maxlength="100" placeholder="Option 1" aria-label="Poll option 1" disabled></div>
|
|
<div class="poll-builder-row"><input type="text" name="poll_options" maxlength="100" placeholder="Option 2" aria-label="Poll option 2" disabled></div>
|
|
</div>
|
|
<button type="button" class="btn-ghost btn-sm" data-poll-add-option>+ Add option</button>
|
|
<p class="poll-builder-error" data-poll-error hidden></p>
|
|
</div>
|
|
{% endif %}
|
|
<div class="modal-footer">
|
|
<button type="button" class="modal-close btn btn-secondary">Cancel</button>
|
|
<button type="submit" class="btn btn-primary"><span class="icon">💾</span>Save Changes</button>
|
|
</div>
|
|
</form>
|
|
{% endcall %}
|
|
{% endif %}
|
|
|
|
{% with target_uid=post['uid'], target_type="post" %}
|
|
{% include "_comment_section.html" %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
{% if featured_topics %}
|
|
<aside class="feed-right" role="complementary" aria-label="Featured">
|
|
{% for topic in featured_topics %}
|
|
<div class="daily-topic-card card-link-host">
|
|
{% if topic.get('slug') %}
|
|
{% set _href = "/news/" ~ topic['slug'] %}
|
|
{% set _label = topic.get('title', '') %}
|
|
{% include "_card_link.html" %}
|
|
{% endif %}
|
|
<div class="daily-topic-label">Featured</div>
|
|
{% if topic.get('image_url', '') %}
|
|
<img src="{{ topic['image_url'] }}" alt="{{ topic.get('title', '') }}" loading="lazy" class="daily-topic-image">
|
|
{% endif %}
|
|
<h4 class="rendered-title">{{ render_title(topic.get('title', '')) }}</h4>
|
|
<div class="rendered-content">{{ render_content(topic.get('summary', '')) }}</div>
|
|
<div class="topic-links">
|
|
<a href="/news/{{ topic.get('slug', '') }}">Read More</a>
|
|
{% if topic.get('url', '') %}
|
|
<a href="{{ topic['url'] }}" target="_blank" rel="noopener">Source</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</aside>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|