Skip to content

Commit ced3219

Browse files
committed
add new highlighted rewards
(cherry picked from commit 427776f)
1 parent a6ac218 commit ced3219

3 files changed

Lines changed: 80 additions & 1 deletion

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
# Show three rewards in widgets in a responsive way (mobile first)
3+
$project = $this->project;
4+
?>
5+
6+
<div class="row">
7+
<div class="highlighted-rewards">
8+
<?= $this->insert('project/partials/reward_widget', ['reward' => $this->individual_rewards[0]]) ?>
9+
<?= $this->insert('project/partials/reward_widget', ['reward' => $this->individual_rewards[1]]) ?>
10+
<?= $this->insert('project/partials/reward_widget', ['reward' => $this->individual_rewards[2]]) ?>
11+
</div>
12+
</div>
13+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
$project = $this->project;
3+
$reward = $this->reward
4+
?>
5+
6+
<article class="card reward-info">
7+
<div class="card-header">
8+
<h2 title="<?= $reward->reward ?>"><?= $reward->reward ?></h2>
9+
</div>
10+
<div class="card-body">
11+
<div class="amount-box text-center text-uppercase">
12+
<span class="amount"><?= amount_format($reward->amount) ?></span>
13+
</div>
14+
15+
<p>
16+
<?= $this->markdown($reward->description) ?>
17+
</p>
18+
</div>
19+
<div class="card-footer">
20+
<div class="reward-donate text-center">
21+
<a class="btn btn-lg btn-cyan text-uppercase" href="/invest/<?= $project->id ?>/<?= $reward->id ?>">
22+
<?= $this->text('project-regular-support') ?>
23+
</a>
24+
</div>
25+
</div>
26+
</article>

public/assets/sass/layouts/_project.scss

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,47 @@ body.project {
4040
}
4141
}
4242
}
43+
44+
div.highlighted-rewards {
45+
display: grid;
46+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
47+
grid-gap: 1rem;
48+
margin: 2rem 2rem;
49+
grid-row-gap: 2rem;
50+
51+
article.reward-info {
52+
background-color: white;
53+
border: 1px solid $color-light-grey;
54+
border-radius: 1rem;
55+
width: 100%;
56+
height: 40rem;
57+
padding: 2rem;
58+
font-size: 1.5rem;
59+
60+
.card-header {
61+
h2 {
62+
overflow: hidden;
63+
text-overflow: ellipsis;
64+
}
65+
}
66+
67+
.amount-box {
68+
color: $color-dark-green;
69+
font-size: 40px;
70+
font-weight: bold;
71+
}
72+
73+
img {
74+
width: 100%;
75+
}
76+
77+
&:hover {
78+
border: $background-light-green 2px solid;
79+
height: fit-content;
80+
transition: 0.5s;
81+
}
82+
}
83+
}
4384
}
4485

4586
}
@@ -75,7 +116,6 @@ body.project {
75116
}
76117
}
77118

78-
79119
// Impact Calculator landing
80120
&.impact-calculator {
81121
background-color: $background-light-green;

0 commit comments

Comments
 (0)