Skip to content

Commit 8fea9d0

Browse files
committed
Style project description, add empty fallback.
1 parent a8c849c commit 8fea9d0

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

warehouse/static/sass/blocks/_button.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
display: inline-block;
5151
white-space: nowrap;
5252
vertical-align: center;
53-
overflow: hidden;
5453

5554
&:focus,
5655
&:hover,

warehouse/static/sass/blocks/_package-description.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919
*/
2020

2121
.package-description {
22-
font-size: 1.1rem;
23-
font-style: italic;
24-
margin: 0;
25-
padding: 0;
26-
line-height: 42px;
22+
min-height: 58px;
23+
margin-top: -10px;
24+
25+
&__summary {
26+
font-size: 1.1rem;
27+
font-style: italic;
28+
padding: 0;
29+
margin-top: 10px;
30+
}
31+
32+
&__edit-button {
33+
margin-top: 10px;
34+
}
2735
}

warehouse/templates/includes/edit-project-button.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
-#}
1414

1515
{% if request.user %}
16-
<a href="{{ request.route_path('manage.project.settings', name=project.name) }}" class="button button--highlight">Edit Project</a>
16+
<a href="{{ request.route_path('manage.project.settings', name=project.name) }}" class="button button--primary package-description__edit-button">Edit Project</a>
1717
{% endif %}

warehouse/templates/packaging/detail.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ <h1 class="package-header__name">
9898
</div>
9999
</section>
100100

101-
{% if release.summary %}
102101
<section class="horizontal-section horizontal-section--grey horizontal-section--thin">
103102
<div class="site-container">
104-
<div class="split-layout split-layout--middle">
103+
<div class="split-layout split-layout--middle package-description">
105104
{% if release.summary %}
106-
<p class="package-description">{{ release.summary }}</p>
105+
<p class="package-description__summary">{{ release.summary }}</p>
106+
{% else %}
107+
<p class="package-description__summary">No project description provided.</p>
107108
{% endif %}
108109
{% csi request.route_path("includes.edit-project-button", project_name=project.normalized_name) %}
109110
{% endcsi %}
110111
</div>
111112
</div>
112113
</section>
113-
{% endif %}
114114

115115

116116
<section>

0 commit comments

Comments
 (0)