Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/templates/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ mod tests {
<footer>
<hgroup>
<h1>Track 1</h1>
<p>bar</p>
<p>
<span>bar</span>
<a href=/package/{fingerprint}>
foo
</a>
Expand Down Expand Up @@ -501,8 +501,8 @@ mod tests {
<footer>
<hgroup>
<h1>Image 1</h1>
<p>bar</p>
<p>
<span>bar</span>
<a href=/package/{fingerprint}>
baz
</a>
Expand Down
21 changes: 20 additions & 1 deletion static/item.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,45 @@ footer {
background-color: var(--surface);
display: flex;
gap: var(--space-2);
overflow-wrap: anywhere;
padding: var(--space-2);

hgroup {
align-items: baseline;
column-gap: var(--space-2);
display: flex;
flex: 1;
flex-wrap: wrap;
min-width: 0;

h1 {
font-size: 1.25em;
margin: 0;
min-width: 0;
}

p {
color: var(--muted);
column-gap: var(--space-2);
display: flex;
font-size: 0.875em;
margin: 0;
min-width: 0;
white-space: nowrap;

a, span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}

a {
color: inherit;
}

span + a {
border-left: 1px solid var(--border);
padding-left: var(--space-2);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions templates/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<footer>
<hgroup>
<h1>{{ self.item().display_title(self.index) }}</h1>
<p>
%% if let Some(creator) = self.creator() {
<p>{{ creator }}</p>
<span>{{ creator }}</span>
%% }
<p>
<a href=/package/{{ self.fingerprint }}>
%% if let Some(title) = self.title() {
{{ title }}
Expand Down