Skip to content

Commit 162a3b7

Browse files
committed
update CSS used for release maturity banner to avoid page specific classes
Rather than needing specific classes for different pages, use the surrounding tags to adjust the padding. Move the related css out of the breadcrumb related classes, since they have essentially nothing in common. Also eliminates a use of .extend(), which is a potentially confusing less feature which we should move away from.
1 parent 1cc8c49 commit 162a3b7

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

root/base/release.tx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
%% ? '/release/' ~ $release.author ~ '/' ~ $release.name
4141
%% : '/dist/' ~ $release.distribution;
4242
<li class="nav-header"><span class="relatize">[% datetime($release.date).to_http %]</span></li>
43-
%% include inc::release_status { maturity => $release.maturity, banner_class => 'release-banner' }
43+
%% include inc::release_status { maturity => $release.maturity }
4444
%% block left_nav_lead -> {
4545
<li><a href="[% $release_base %]/source"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="[% $release_base %]/source?raw=1">raw</a>)</li>
4646
%% }

root/browse.tx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
%% }
1515
%% override left_nav_content -> {
16-
%% include inc::release_status { maturity => $maturity, banner_class => 'release-banner-source' }
16+
%% include inc::release_status { maturity => $maturity }
1717
<li class="nav-header">Tools</li>
1818
<li><a data-keyboard-shortcut="g d" href="/release/[% $author %]/[% $release %]"><i class="fa fa-fw fa-info-circle black"></i>Release Info</a></li>
1919
<li><a data-keyboard-shortcut="g a" href="/author/[% $author %]"><i class="fa fa-user fa-fw black"></i>Author</a></li>

root/inc/release_status.tx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
%% if $maturity == 'developer' {
2-
<li>
3-
<span class="dist-release maturity-developer">
4-
<b class="[% $banner_class %]">Development release</b>
5-
</span>
2+
<li class="release-banner maturity-[% $maturity %]">
3+
Development release
64
</li>
75
%% }

root/source.tx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
%% }
1515
%% override left_nav_content -> {
16-
%% include inc::release_status { maturity => $maturity, banner_class => 'release-banner-source' }
16+
%% include inc::release_status { maturity => $maturity }
1717
<li class="nav-header">Tools</li>
1818
<li>
1919
<a data-keyboard-shortcut="g d" href="/release/[% $file.author %]/[% $file.release %]"><i class="fa fa-info-circle fa-fw black"></i>Release Info</a>

root/static/less/global.less

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -559,19 +559,27 @@ form#metacpan_logout {
559559
font-weight: bold;
560560
}
561561

562-
&.maturity-developer .release-banner {
562+
}
563+
564+
.release-banner {
565+
padding: 0px 4px;
566+
border-radius: 4px;
567+
display: inline-block;
568+
margin-top: 10px;
569+
margin-bottom: 10px;
570+
font-weight: bold;
571+
border-style: solid;
572+
border-width: 1px;
573+
border-color: #fff;
574+
575+
&.maturity-developer {
563576
color: #fff;
564577
background-color: #D9534F;
565-
padding: 0px 4px;
566-
border-radius: 4px;
567-
display: inline-block;
568-
margin-top: 5px;
569-
margin-bottom: 10px;
578+
border-style: none;
570579
}
580+
}
571581

572-
&.maturity-developer .release-banner-source {
573-
&:extend(.dist-release.maturity-developer .release-banner all);
574-
margin-top: 10px;
575-
margin-bottom: 5px;
576-
}
582+
.nav-list li.nav-header + li.release-banner,
583+
.nav-list li.release-banner + li.nav-header {
584+
margin-top: 5px;
577585
}

0 commit comments

Comments
 (0)