Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Make room for package claiming workflow #4304

Merged
merged 2 commits into from
Jan 25, 2017
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
27 changes: 26 additions & 1 deletion scss/components/banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
z-index: 2;
overflow: hidden;

img {
img, p {
display: block;
position: absolute;
top: 16px;
left: 16px;
width: 160px;
height: 160px;
overflow: hidden;
border: 2px solid $white;
@include border-radius(5px);
box-shadow: 0px 0px 32px 16px rgba($black, 0.5);
Expand All @@ -34,6 +35,30 @@
}
}

&.text {
.bg {
background: transparent;
background: linear-gradient( rgba(255,255,255,0)
, rgba(255,255,255,0) 70%
, rgba(255,255,255,1) 95%
);
width: 160px;
height: 160px;
display: block;
position: absolute;
top: 16px;
left: 16px;
z-index: 3;
@include border-radius(5px);
}
p {
color: $black;
font: normal 16px/20px $Chronicle;
padding: 16px;
margin: 0;
}
}

.is-suspicious-label {
text-align: right;
font-size: 12px;
Expand Down
16 changes: 15 additions & 1 deletion scss/layouts/responsiveness.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
height: 128px;
.avatar {
height: 128px;
img {
img, p {
width: 112px;
height: 112px;
top: 8px;
Expand All @@ -39,6 +39,20 @@
box-shadow: none;
}
}
&.text {
.bg {
width: 112px;
height: 112px;
top: 8px;
left: 8px;
z-index: 3;
@include border-radius(3px);
}
p {
font: normal 12px/16px $Chronicle;
padding: 8px;
}
}
.is-suspicious-label {
font-size: 10px;
bottom: 13px;
Expand Down
12 changes: 4 additions & 8 deletions www/on/npm/%package/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ package = website.db.one("select * from packages where package_manager='npm' "
"and name=%s", (package_name,))
if package is None:
raise Response(404)
banner = 'npm'
title = package_name
banner = package_name
page_id = "on-npm-foo"
suppress_sidebar = True
url = 'https://npmjs.com/package/' + package.name
Expand All @@ -18,17 +17,14 @@ url = 'https://npmjs.com/package/' + package.name

{% block banner %}
<a class="elsewhere" href="{{ url }}">
<div class="avatar">
<img src="{{ website.asset('npm-wombat-typing.svg') }}" class="avatar">
<div class="avatar text">
<div class="bg"></div>
<p>{{ package.description }}</p>
<img class="platform" src="{{ website.asset('npm-n.png') }}" />
</div>
{{ super () }}
</a>
{% endblock %}

{% block content %}
<p><i>{{ package.description }}</i></p>
<a href="{{ url }}">{{ url }}</a>


{% endblock %}