diff options
| author | Dennis Fink | 2026-11-18 17:41:44 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-18 17:41:44 +0100 |
| commit | e3e195ea07fd57288d32c842689ebed7fba636f0 (patch) | |
| tree | da4358930bfc6bd7c855a77de2898c19e7043a84 /webmentions_ssg/templates/sent_source.html | |
| parent | 44ece87ed14c5d19bd6ceabfd023e45561b08ef3 (diff) | |
| download | webmentions-ssg-e3e195ea07fd57288d32c842689ebed7fba636f0.tar.gz webmentions-ssg-e3e195ea07fd57288d32c842689ebed7fba636f0.zip | |
style(core): improve mobile table layouts
Hide secondary received and sent table columns below the `md` breakpoint
while keeping status, primary identifiers, details, and actions
accessible.
Add responsive wrappers, mobile received timestamps, and wrapping for
long paths and URLs to improve small-screen readability.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/templates/sent_source.html | 215 |
1 files changed, 109 insertions, 106 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html index 2b7a377..6e34458 100644 --- a/webmentions_ssg/templates/sent_source.html +++ b/webmentions_ssg/templates/sent_source.html @@ -88,119 +88,122 @@ SPDX-License-Identifier: BSD-3-Clause <span class="text-body-secondary">{{ webmentions.total }} webmentions</span> </div> {% if webmentions.items %} - <table class="table table-bordered table-striped table-hover align-middle"> - <thead> - <tr> - <th scope="col" class="w-25">Target</th> - <th scope="col">Status</th> - <th scope="col">Active</th> - <th scope="col">Revisions</th> - <th scope="col">Delivery</th> - <th scope="col">Last activity</th> - <th scope="col">Actions</th> - </tr> - </thead> - <tbody> - {% for webmention in webmentions %} - {% set style = sent_status_presentation.get(webmention.status, {"row_class": "table-info", "badge_class": "text-bg-info", "label": "Pending" }) %} - <tr class="{{ style.row_class }}"> - <td class="text-break"> - <a href="{{ webmention.target }}">{{ webmention.target }}</a> - </td> - <td> - <span class="badge {{ style.badge_class }}">{{ style.label }}</span> - {% if webmention.failure_reason is not none %} - <div class="small mt-2">{{ webmention.failure_reason }}</div> - {% endif %} - </td> - <td> - {% if webmention.linked %} - <span class="badge text-bg-success">Active</span> - {% else %} - <span class="badge text-bg-danger">Removed</span> - {% endif %} - </td> - <td class="small text-nowrap"> - <div> - <strong>Desired:</strong> - {{ webmention.desired_revision }} - </div> - <div> - <strong>Processed:</strong> - {{ webmention.processed_revision - if webmention.processed_revision is not none - else "—" }} - </div> - <div> - <strong>Sent:</strong> - {{ webmention.sent_revision - if webmention.sent_revision is not none - else "—" }} - </div> - </td> - <td class="small"> - {% if webmention.webmention_endpoint is not none %} - <div class="mb-1"> - <strong>Endpoint:</strong> - <a href="{{ webmention.webmention_endpoint }}" class="text-break">{{ webmention.webmention_endpoint }}</a> + <div class="table-responsive"> + <table class="table table-bordered table-striped table-hover align-middle"> + <thead> + <tr> + <th scope="col">Target</th> + <th scope="col">Status</th> + <th scope="col" class="d-none d-md-table-cell">Active</th> + <th scope="col" class="d-none d-md-table-cell">Revisions</th> + <th scope="col" class="d-none d-md-table-cell">Delivery</th> + <th scope="col" class="d-none d-md-table-cell">Last activity</th> + <th scope="col">Actions</th> + </tr> + </thead> + <tbody> + {% for webmention in webmentions %} + {% set style = sent_status_presentation.get(webmention.status, {"row_class": "table-info", "badge_class": "text-bg-info", "label": "Pending" }) %} + <tr class="{{ style.row_class }}"> + <td class="text-break"> + <a href="{{ webmention.target }}">{{ webmention.target }}</a> + </td> + <td class="text-break"> + <span class="badge {{ style.badge_class }}">{{ style.label }}</span> + {% if webmention.failure_reason is not none %} + <div class="small mt-2">{{ webmention.failure_reason }}</div> + {% endif %} + </td> + <td class="d-none d-md-table-cell"> + {% if webmention.linked %} + <span class="badge text-bg-success">Active</span> + {% else %} + <span class="badge text-bg-danger">Removed</span> + {% endif %} + </td> + <td class="small text-nowrap d-none d-md-table-cell"> + <div> + <strong>Desired:</strong> + {{ webmention.desired_revision }} + </div> + <div> + <strong>Processed:</strong> + {{ webmention.processed_revision + if webmention.processed_revision is not none + else "—" }} + </div> + <div> + <strong>Sent:</strong> + {{ webmention.sent_revision + if webmention.sent_revision is not none + else "—" }} </div> - {% endif %} - {% if webmention.endpoint_response_status is not none %} + </td> + <td class="small d-none d-md-table-cell"> + {% if webmention.webmention_endpoint is not none %} + <div class="mb-1"> + <strong>Endpoint:</strong> + <a href="{{ webmention.webmention_endpoint }}" + class="text-break">{{ webmention.webmention_endpoint }}</a> + </div> + {% endif %} + {% if webmention.endpoint_response_status is not none %} + <div class="mb-1"> + <strong>HTTP:</strong> + {{ webmention.endpoint_response_status }} + </div> + {% endif %} + {% if webmention.status_url is not none %} + <div> + <strong>Status:</strong> + {% if webmention.status_url | is_http_url %} + <a href="{{ webmention.status_url }}" class="text-break">{{ webmention.status_url }}</a> + {% else %} + <span class="text-break">{{ webmention.status_url }}</span> + {% endif %} + </div> + {% endif %} + </td> + <td class="small text-nowrap d-none d-md-table-cell"> <div class="mb-1"> - <strong>HTTP:</strong> - {{ webmention.endpoint_response_status }} + <strong>Attempted:</strong> + <br> + {% if webmention.last_attempted_at is not none %} + <time datetime="{{ webmention.last_attempted_at.isoformat() }}"> + {{ webmention.last_attempted_at.strftime("%Y-%m-%d %H:%M:%S") }} + </time> + {% else %} + — + {% endif %} </div> - {% endif %} - {% if webmention.status_url is not none %} <div> - <strong>Status:</strong> - {% if webmention.status_url | is_http_url %} - <a href="{{ webmention.status_url }}" class="text-break">{{ webmention.status_url }}</a> + <strong>Sent:</strong> + <br> + {% if webmention.last_sent_at is not none %} + <time datetime="{{ webmention.last_sent_at.isoformat() }}"> + {{ webmention.last_sent_at.strftime("%Y-%m-%d %H:%M:%S") }} + </time> {% else %} - <span class="text-break">{{ webmention.status_url }}</span> + — {% endif %} </div> - {% endif %} - </td> - <td class="small text-nowrap"> - <div class="mb-1"> - <strong>Attempted:</strong> - <br> - {% if webmention.last_attempted_at is not none %} - <time datetime="{{ webmention.last_attempted_at.isoformat() }}"> - {{ webmention.last_attempted_at.strftime("%Y-%m-%d %H:%M:%S") }} - </time> - {% else %} - — - {% endif %} - </div> - <div> - <strong>Sent:</strong> - <br> - {% if webmention.last_sent_at is not none %} - <time datetime="{{ webmention.last_sent_at.isoformat() }}"> - {{ webmention.last_sent_at.strftime("%Y-%m-%d %H:%M:%S") }} - </time> - {% else %} - — - {% endif %} - </div> - </td> - <td> - <button type="button" - class="btn btn-sm btn-primary" - data-bs-toggle="modal" - data-bs-target="#confirmation-modal" - data-action="{{ url_for('webmentions.resend_webmention', source_uuid=source.uuid, webmention_uuid=webmention.uuid) }}" - data-title="Resend Webmention?" - data-message="This Webmention will be queued again for delivery to {{ webmention.target }}." - data-confirm-label="Resend" - data-confirm-class="btn-primary">Resend</button> - </td> - </tr> - {% endfor %} - </tbody> - </table> + </td> + <td> + <button type="button" + class="btn btn-sm btn-primary" + data-bs-toggle="modal" + data-bs-target="#confirmation-modal" + data-action="{{ url_for('webmentions.resend_webmention', source_uuid=source.uuid, webmention_uuid=webmention.uuid) }}" + data-title="Resend Webmention?" + data-message="This Webmention will be queued again for delivery to {{ webmention.target }}." + data-confirm-label="Resend" + data-confirm-class="btn-primary">Resend</button> + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> {% if webmentions.pages > 1 %} <div class="mt-3">{{ render_pagination(webmentions) }}</div> {% endif %} |
