Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll out the new exploration pages #2285

Merged
merged 1 commit into from
Oct 19, 2023
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
28 changes: 18 additions & 10 deletions style/base/cards.scss
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@

.card {
border-radius: 0.5em;
display: block;
margin-bottom: 0.5em;
padding: 0.5em;
vertical-align: top;
}
.card-default {
border: 1px solid $panel-default-border;
}
.card-primary {
border: 1px solid $panel-primary-border;
}
.card-md {
font-size: $font-size-medium;
}

@media (min-width: $screen-sm-min) {
.card {
border-radius: 0.5em;
display: inline-block;
margin-right: 1em;
vertical-align: top;
width: 450px;
}
.card-narrow {
width: 290px;
}
.card-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.card-default {
border: 1px solid $panel-default-border;
}
.card-primary {
border: 1px solid $panel-primary-border;
}
}

@media (max-width: $screen-sm-min) {
.card-xs-vanish {
@media (max-width: $screen-xs-max) {
.card-default, .card-primary {
border-radius: 0;
border-style: dashed;
border-width: 1px 0;
Expand All @@ -40,6 +45,9 @@
padding-top: 0;
}
}
.card-xs-vanish {
border-width: 0;
}
}

.card.donation {
Expand Down
5 changes: 2 additions & 3 deletions templates/macros/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@
% macro nav_explore()
{{ nav([
('/', _('Overview')),
('/teams', _('Teams')),
('/organizations', _('Organizations')),
('/individuals', _('Individuals')),
('/recipients', _('Recipients')),
('/hopefuls', _('Hopefuls')),
('/pledges', _('Unclaimed Donations')),
('/repositories', _('Repositories')),
('/elsewhere', _('Social Networks')),
Expand Down
8 changes: 4 additions & 4 deletions www/%username/giving/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ next_payday = compute_next_payday_date()
<input type="hidden" name="currency" value="{{ currency }}" />
% for tip in tips
% set tippee = tip.tippee_p
<div class="card card-default card-xs-vanish donation">
<div class="card card-default donation">
<div class="recipient">
% set username = tippee.username
<div class="col-1"><a href="/{{ username }}/">{{
Expand Down Expand Up @@ -429,7 +429,7 @@ next_payday = compute_next_payday_date()
<input type="hidden" name="currency" value="{{ currency }}" />
% for tip in pledges
% set e = tip.e_account
<div class="card card-default card-xs-vanish donation">
<div class="card card-default donation">
<div class="recipient">
<div class="col-1"><a href="{{ e.liberapay_path }}">{{
avatar_img(e.participant, size=72)
Expand Down Expand Up @@ -497,7 +497,7 @@ next_payday = compute_next_payday_date()
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
% for tip in cancelled_tips
% set tippee = tip.tippee_p
<div class="card card-default card-xs-vanish donation">
<div class="card card-default donation">
<div class="recipient">
% set username = tippee.username
<div class="col-1"><a href="/{{ username }}/">{{
Expand Down Expand Up @@ -555,7 +555,7 @@ next_payday = compute_next_payday_date()
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
% for tip in cancelled_pledges
% set e = tip.e_account
<div class="card card-default card-xs-vanish donation">
<div class="card card-default donation">
<div class="recipient">
<div class="col-1"><a href="{{ e.liberapay_path }}">{{
avatar_img(e.participant, size=72)
Expand Down
39 changes: 14 additions & 25 deletions www/explore/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,33 @@ title = _("Explore")
% extends "templates/layouts/explore.html"

% block content
<div class="text-center">

<p>{{ _(
"Liberapay provides several ways of finding great people to donate to:"
) }}</p>
<br>

<div class="card card-default card-md text-center">
<h2 class="text-info">{{ _("Teams") }}</h2>
<p>{{ _(
"A team is a group of users working on a specific project."
) }}</p>
<p><a class="btn btn-info btn-lg" href="/explore/teams">{{ _("Explore Teams") }}</a></p>
</div>

<div class="card card-default card-md text-center">
<h2 class="text-info">{{ _("Organizations") }}</h2>
<div class="card card-default card-md text-center card-xs-vanish">
<h2 class="text-info">{{ _("Recipients") }}</h2>
<p>{{ _(
"Great nonprofits and companies trying to improve the world."
"People and projects who receive donations through Liberapay."
) }}</p>
<p><a class="btn btn-info btn-lg" href="/explore/organizations">{{ _("Explore Organizations") }}</a></p>
<p><a class="btn btn-info btn-lg" href="/explore/recipients">{{ _("Explore Recipients") }}</a></p>
</div>

<div class="card card-default card-md text-center">
<h2 class="text-info">{{ _("Individuals") }}</h2>
<div class="card card-default card-md text-center card-xs-vanish">
<h2 class="text-info">{{ _("Hopefuls") }}</h2>
<p>{{ _(
"People like you who contribute to the commons (art, knowledge, software, …)."
"Users who are hoping to receive their first donations through Liberapay."
) }}</p>
<p><a class="btn btn-info btn-lg" href="/explore/individuals">{{ _("Explore Individuals") }}</a></p>
<p><a class="btn btn-info btn-lg" href="/explore/hopefuls">{{ _("Explore Hopefuls") }}</a></p>
</div>

<div class="card card-default card-md text-center">
<div class="card card-default card-md text-center card-xs-vanish card-center">
<h2 class="text-info">{{ _("Pledges") }}</h2>
<p>{{ _(
"Liberapay allows pledging to fund people who haven't joined the site yet."
) }}</p>
<p><a class="btn btn-info btn-lg" href="/explore/pledges">{{ _("Explore Pledges") }}</a></p>
</div>

<div class="card card-default card-md text-center">
<div class="card card-default card-md text-center card-xs-vanish">
<h2 class="text-info">{{ _("Repositories") }}
<small title="{{ _("A repository contains a project's data, for example the source code of an application.") }}"
data-toggle="tooltip" data-placement="top"
Expand All @@ -60,7 +48,7 @@ title = _("Explore")
<p><a class="btn btn-info btn-lg" href="/explore/repositories">{{ _("Explore Repositories") }}</a></p>
</div>

<div class="card card-default card-md text-center">
<div class="card card-default card-md text-center card-xs-vanish">
<h2 class="text-info">{{ _("Social Networks") }}</h2>
<p>{{ _(
"Browse the accounts that Liberapay users have on other platforms. "
Expand All @@ -69,7 +57,7 @@ title = _("Explore")
<p><a class="btn btn-info btn-lg" href="/explore/elsewhere">{{ _("Explore Social Networks") }}</a></p>
</div>

{#<div class="card card-default card-md text-center">
{#<div class="card card-default card-md text-center card-xs-vanish">
<h2 class="text-info">{{ _("Communities") }}</h2>
<p>{{ _(
"Communities allow you to find people that work on things you care "
Expand All @@ -78,4 +66,5 @@ title = _("Explore")
<p><a class="btn btn-info btn-lg" href="/explore/communities">{{ _("Explore Communities") }}</a></p>
</div>#}

</div>
% endblock