CUSP-1256 (#1)
* Complete refactor Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com> * Complete refactor Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com> --------- Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
267
templates/manpage.html
Normal file
267
templates/manpage.html
Normal file
@@ -0,0 +1,267 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header_title %}{{ header_title }}{% endblock %}
|
||||
{% block header_subtitle %}{{ package_name }} - Rocky Linux {{ version }}{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
/* Man page specific styles */
|
||||
.man-header {
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.back-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.back-button:hover {
|
||||
color: var(--accent-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.title-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.man-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.5rem;
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* Style the mandoc output */
|
||||
.man-content {
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.man-content table {
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.man-content table.head,
|
||||
.man-content table.foot {
|
||||
background-color: var(--bg-tertiary);
|
||||
}
|
||||
|
||||
.man-content td {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.man-content .head-ltitle,
|
||||
.man-content .head-vol,
|
||||
.man-content .head-rtitle {
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.man-content .head-vol {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.man-content .head-rtitle {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.man-content h1, .man-content h2 {
|
||||
color: var(--accent-primary);
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.man-content h2 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.man-content code,
|
||||
.man-content .Nm,
|
||||
.man-content .Cm,
|
||||
.man-content .Fl {
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
font-size: 0.9em;
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.man-content pre {
|
||||
background-color: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.man-content .Bl-bullet,
|
||||
.man-content .Bl-enum,
|
||||
.man-content .Bl-dash {
|
||||
margin: 1rem 0;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
.man-content .Bl-tag {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.man-content dt {
|
||||
font-weight: 600;
|
||||
color: var(--accent-primary);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.man-content dd {
|
||||
margin-left: 2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.man-content a {
|
||||
color: var(--accent-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.man-content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Table of contents */
|
||||
.man-content .Bl-compact.toc {
|
||||
background-color: var(--bg-tertiary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.man-content .toc li {
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.man-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.man-meta {
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.man-content h1, .man-content h2 {
|
||||
font-size: 1.3rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.man-content h2 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.man-content pre {
|
||||
font-size: 0.85rem;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.man-content code,
|
||||
.man-content .Nm,
|
||||
.man-content .Cm,
|
||||
.man-content .Fl {
|
||||
font-size: 0.85em;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.man-content table {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.man-content dd {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.man-content .Bl-bullet,
|
||||
.man-content .Bl-enum,
|
||||
.man-content .Bl-dash {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.back-button {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.man-content h1, .man-content h2 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.man-content h2 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.man-content {
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="man-header">
|
||||
<div class="header-left">
|
||||
<a href="/{{ version }}/index.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M19 12H5M12 19l-7-7 7-7" />
|
||||
</svg>
|
||||
Back to Search
|
||||
</a>
|
||||
<div class="title-group">
|
||||
<h2 style="margin: 0; color: var(--text-primary);">{{ header_title }}</h2>
|
||||
<div class="man-meta">
|
||||
<span class="meta-item"><strong>Package:</strong> {{ package_name }}</span>
|
||||
<span class="meta-item"><strong>Section:</strong> {{ section }}</span>
|
||||
{% if language != 'en' %}
|
||||
<span class="meta-item"><strong>Language:</strong> {{ language }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="man-content">
|
||||
{{ content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user