Skip to content

[Site] Solidarity banner #1696

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

Merged
merged 1 commit into from
Apr 8, 2024
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
Binary file added ux.symfony.com/assets/images/clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ux.symfony.com/assets/images/clock.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions ux.symfony.com/assets/images/icons/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ux.symfony.com/assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
@import "layouts/section";

// Components
@import "components/Banner";
@import "components/DataList";
@import "components/demo-container";
@import "components/DemoCard";
Expand Down
107 changes: 107 additions & 0 deletions ux.symfony.com/assets/styles/components/_Banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// -----------------------------------------------------------------
// Banner
// -----------------------------------------------------------------

.Banner {
background: #0A0A0A;
}

.BannerInner {
display: flex;
flex-direction: column;
padding: 2rem 1rem;
gap: 1rem;
position: relative;
}

.Banner + .App {
position: relative;
}

.BannerMedia {
align-self: center;
justify-self: center;
}

.BannerMedia img {
height: 92px;
width: auto;
}

.BannerContent {
flex: 1;
display: flex;
flex-direction: column;
place-content: center;
color: #fff;
font-family: var(--font-family-text);
}

.BannerTitle {
text-align: center;
font-size: 1.5rem;
font-family: var(--font-family-title);
}

.BannerText {
margin-block-end: 0.5rem;
}

.BannerText em {
text-decoration: underline;
text-underline-offset: .25rem;
text-underline-style: double;
}

.BannerAction {
display: grid;
place-content: center;
justify-content: center;
}

.BannerButton {
position: relative;
display: flex;
align-items: center;
padding: .75rem 1.5rem;
align-self: center;
color: #fffc;
font-size: 1.5rem;
font-family: var(--font-family-title);
gap: .5rem;
justify-content: center;
background: linear-gradient(#000e, #000d) padding-box,
linear-gradient(90deg, #D65831 0%, #D2D631 36.52%, #31D673 71.83%, #3aa3ff 100%) border-box;
border-radius: 2rem;
border: 4px solid transparent;
transition: all 250ms linear;
}

.BannerButton:hover {
color: #fff;
}

.BannerButton svg {
width: 1em;
height: 1em;
color: currentColor;
transition: all 250ms linear;
}

.BannerButton:hover svg {
transform: scale(1.1);
}

@media screen and (min-width: 768px) {
.BannerImage {
width: 128px;
}
.BannerInner {
flex-direction: row;
padding: 4rem 2rem;
gap: 2rem;
}
.BannerTitle {
text-align: left;
}
}
28 changes: 28 additions & 0 deletions ux.symfony.com/templates/_banner.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<aside class="Banner">
<div class="container-xxl">
<div class="BannerInner">
<div class="BannerMedia">
<picture>
<source type="image/webp" srcset="{{ asset('images/clock.webp') }}"/>
<img src="{{ asset('images/clock.png') }}" alt="Clock" class="BannerImage" width="256" height="256">
</picture>
</div>
<div class="BannerContent">
<p class="BannerTitle">Help <a href="https://twitter.com/weaverryan/">Ryan</a> Get The Treatment He
Needs!</p>
<p class="BannerText">
Ryan is the lead maintainer of Symfony UX and always gives so much to the community.
</p>
<p class="BannerText">
Now he <em>needs your help</em>. Please donate to support him in this battle.
</p>
</div>
<div class="BannerAction">
<a href="https://gofund.me/44ecdba2" class="BannerButton" rel="external">
<twig:Icon name="heart" aria-hidden="true"/>
Donate
</a>
</div>
</div>
</div>
</aside>
4 changes: 4 additions & 0 deletions ux.symfony.com/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
{% endblock %}
</head>
<body>
{% block banner %}
{{ include('_banner.html.twig') }}
{% endblock %}

{% block body %}
<div class="App">
{% block header %}
Expand Down