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

🚧 New homepage #5785

Merged
merged 30 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
767f736
:tada: Begin work on new home
lluerich Apr 26, 2021
4fe22c8
:bento: Add new logo
lluerich Apr 26, 2021
7bb712e
:construction: Add data
lluerich Apr 28, 2021
4f2f13c
:sparkles: Add new stage
lluerich Apr 28, 2021
c4f094d
:sparkles: Add new formats section
lluerich Apr 28, 2021
c773aa2
:sparkles: Add teaser carousel with intro
lluerich Apr 28, 2021
b49c855
:bug: Remove comment
lluerich Apr 28, 2021
8cfd493
:lipstick: Adjust box-shadow
lluerich Apr 30, 2021
33b217e
:recycle: Move teaser to component
lluerich Apr 30, 2021
fd598d4
:recycle: Remove variable
lluerich May 3, 2021
5bfec3b
:recycle: Rename classes
lluerich May 3, 2021
248e819
:lipstick: Add introduction component styling
lluerich May 3, 2021
d26f04a
:lipstick: Adjust section width
lluerich May 5, 2021
d19d720
:lipstick: Adjust stage sizing
lluerich May 5, 2021
619c51c
:lipstick: Add some margins
lluerich May 5, 2021
9617471
:lipstick: Enhance basic carousel arrow styles
lluerich May 5, 2021
4a92356
:lipstick: Add teaser carousel styles
lluerich May 5, 2021
ce2e092
:sparkles: Add pagination to teaser-carousel
lluerich May 6, 2021
08ed53c
:recycle: Calculate magic number with sass
lluerich May 6, 2021
eb9c119
:lipstick: Adjust breakpoints
lluerich May 6, 2021
815114f
:speech_balloon: Update copy according to localization docs
lluerich May 6, 2021
ec5b815
:truck: Move style files
lluerich May 6, 2021
432592c
:lipstick: Hide link
lluerich May 6, 2021
1fd5ba6
:lipstick: Remove duplicate class delcaration
lluerich May 7, 2021
aed43c2
:lipstick: Update stage styles
lluerich May 7, 2021
b2dd32c
:lipstick: Update carousel styles
lluerich May 7, 2021
15dad42
:lipstick: Update formats styles
lluerich May 7, 2021
40f5c5d
:dizzy: Add basic animation
lluerich May 7, 2021
7bb65f9
:lipstick: Increase specificity
lluerich May 7, 2021
0183508
Merge branch 'future' into feat/new-homepage
matthiasrohmer May 10, 2021
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
Prev Previous commit
Next Next commit
💄 Add teaser carousel styles
  • Loading branch information
lluerich committed May 6, 2021
commit 4a923565aeb7f53c50f6a17f7c1a9a3d22cfbb61
10 changes: 6 additions & 4 deletions frontend21/scss/components/teaser-2021.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
.#{prefix(null, 'teaser')} {
display: flex;
align-items: center;
justify-content: center;

&-card {
display: flex;
flex-direction: column;
width: 320px;
height: 493px;
max-width: 320px;
white-space: normal;
color: color('charade');
border-radius: 8px;
@include shadow-large;
transition: box-shadow 0.3s ease, transform 0.3s ease;

@include respond-to('medium') {
width: 390px;
max-width: 390px;
}

&:hover,
Expand Down
56 changes: 40 additions & 16 deletions frontend21/scss/components/teaser-carousel-2021.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@
.#{prefix(null, 'teaser-carousel')} {
grid-column: 1/-1;
position: relative;
display: grid;
grid-gap: 15px;
grid-template-columns: 68px 1fr 68px;
max-width: 1440px;
margin: 0 auto 100px;

.amp-carousel-slide {
position: relative;
padding-left: 20px;
margin: 0 0 80px 0;
top: 0px;
amp-base-carousel {
grid-column: 2;
grid-row: 1;
}

&-controls {
position: absolute;
top: 50%;
transform: translateY(-50%);
grid-row: 1;

&:last-child {
padding-right: 20px
&.--prev {
left: 0;
grid-column: 1;
}

@include respond-to('medium') {
padding-left: 30px;
&.--next {
right: 0;
grid-column: 3;
}

&:nth-child(even) {
margin-bottom: 40px;
top: 40px;
}
.amp-carousel-button {
width: 68px;
height: 68px;
background-size: 28px 28px;
}
}

&:last-child {
padding-right: 30px
@include respond-to('small') {
.ap-teaser {
&:nth-child(3n+1) {
align-items: center;
}
&:nth-child(3n+2) {
align-items: flex-end;
}

&:nth-child(3n+3) {
align-items: flex-start;
}
}
}
Expand Down
36 changes: 28 additions & 8 deletions pages/content/amp-dev/index-2021.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,16 @@ <h1>The latest news</h1>
<section class="ap-section --fullscreen">
[% set posts = []|importBlog %]
[% if posts|length %]
<amp-carousel
class="ap-teaser-carousel --news"
<div class="ap-teaser-carousel --news">
<div class="ap-teaser-carousel-controls --prev">
<button on="tap: teaser-carousel-news.prev()" class="amp-carousel-button amp-carousel-button-prev" aria-label="Previous"></button>
</div>
<amp-base-carousel
id="teaser-carousel-news"
height="573"
layout="fixed-height"
type="carousel"
role="region"
visible-count="(min-width: 1280px) 3, (min-width: 768px) 2, 1"
aria-label="{{ _('News') }}">
[% for post in posts %]
{% set teaser_doc = {
Expand All @@ -148,7 +152,13 @@ <h1>The latest news</h1>
} %}
{% include '/views/2021/partials/teaser.j2' %}
[% endfor %]
</amp-carousel>
<button slot="next-arrow"></button>
<button slot="prev-arrow"></button>
</amp-base-carousel>
<div class="ap-teaser-carousel-controls --next">
<button on="tap: teaser-carousel-news.next()" class="amp-carousel-button amp-carousel-button-next" aria-label="Next"></button>
</div>
</div>
[% endif %]
</section>

Expand All @@ -164,19 +174,29 @@ <h1>Explore AMP success stories</h1>
</a>
</section>
<section class="ap-section --fullscreen">
<amp-carousel
class="ap-teaser-carousel --success-stories"
<div class="ap-teaser-carousel --success-stories">
<div class="ap-teaser-carousel-controls --prev">
<button on="tap: teaser-carousel-success-stories.prev()" class="amp-carousel-button amp-carousel-button-prev" aria-label="Previous"></button>
</div>
<amp-base-carousel
id="teaser-carousel-success-stories"
height="573"
layout="fixed-height"
type="carousel"
role="region"
visible-count="(min-width: 1280px) 3, (min-width: 768px) 2, 1"
aria-label="{{ _('Success stories') }}">
{% for success_story in doc.success_stories %}
{% with %}
{% set teaser_doc = success_story %}
{% include '/views/2021/partials/teaser.j2' %}
{% endwith %}
{% endfor %}
</amp-carousel>
<button slot="next-arrow"></button>
<button slot="prev-arrow"></button>
</amp-base-carousel>
<div class="ap-teaser-carousel-controls --next">
<button on="tap: teaser-carousel-success-stories.next()" class="amp-carousel-button amp-carousel-button-next" aria-label="Next"></button>
</div>
</div>
</section>
</main>