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

event-card: add event label #79

Merged
merged 1 commit into from
Jul 2, 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
3 changes: 2 additions & 1 deletion src/app/core/event-card/event-card.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[backgroundImage]="buildEventImageUrl(event.image)"
[link]="buildEventLink(event.slug)"
[highlight] = "parseDate(event.start_time) > currentTime">
<span class="event-label" i18n>Event</span>
<h1>{{ event.title }}</h1>
<span><b>{{ event.start_time | relativeTime }}</b> - {{event.description}}</span>
<span><b>{{ event.start_time | relativeTime }}</b> - {{event.description}}</span>
</app-card>
25 changes: 25 additions & 0 deletions src/app/core/event-card/event-card.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import "vars";

:host {
position: relative;
display: block;

.event-label {
position: absolute;
top: 0;
right: 0;
font-size: $f-size-small;
color: $c-secondary;
font-weight: $f-weight-bold;
background-color: $c-primary-l;
border-bottom-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
transition: 150ms background-color ease-in-out;
padding: 0 0.2rem;
text-transform: uppercase;
}

&:hover .event-label {
background-color: $c-primary;
}
}
55 changes: 42 additions & 13 deletions src/locales/en_devel.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">32</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/network/network.component.html</context>
Expand Down Expand Up @@ -56,6 +56,10 @@
<context context-type="sourcefile">src/app/pages/association/association.component.html</context>
<context context-type="linenumber">100,101</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/event/event-list/event-list.component.html</context>
<context context-type="linenumber">3,4</context>
</context-group>
</trans-unit>
<trans-unit id="76537845515412840" datatype="html">
<source>Finance and Legal</source>
Expand Down Expand Up @@ -90,11 +94,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">14</context>
<context context-type="linenumber">15</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/blog/blog-list/blog-list.component.html</context>
<context context-type="linenumber">2,3</context>
<context context-type="linenumber">3,4</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/home/home.component.html</context>
Expand All @@ -109,7 +113,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">28</context>
<context context-type="linenumber">30</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/contact/contact.component.html</context>
Expand All @@ -128,7 +132,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">23</context>
<context context-type="linenumber">25</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/association/association.component.html</context>
Expand All @@ -147,7 +151,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">26</context>
<context context-type="linenumber">28</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/team/team.component.html</context>
Expand All @@ -162,7 +166,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">24</context>
<context context-type="linenumber">26</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/contact/contact.component.html</context>
Expand All @@ -177,7 +181,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">29</context>
<context context-type="linenumber">31</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/stats/stats.component.html</context>
Expand Down Expand Up @@ -214,7 +218,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">25</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="5891707175321515013" datatype="html">
Expand All @@ -229,7 +233,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">27</context>
<context context-type="linenumber">29</context>
</context-group>
</trans-unit>
<trans-unit id="7468240890677477871" datatype="html">
Expand Down Expand Up @@ -273,11 +277,22 @@
<context context-type="linenumber">3,4</context>
</context-group>
</trans-unit>
<trans-unit id="3304972143698843178" datatype="html">
<source>Event</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">16</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/event-card/event-card.component.html</context>
<context context-type="linenumber">5,6</context>
</context-group>
</trans-unit>
<trans-unit id="2649252321173430744" datatype="html">
<source>Not Found</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.routes.ts</context>
<context context-type="linenumber">33</context>
<context context-type="linenumber">35</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/not-found/not-found.component.html</context>
Expand Down Expand Up @@ -330,14 +345,14 @@
<source>now</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/pipes/relative-time.pipe.ts</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
</trans-unit>
<trans-unit id="4900796010431190714" datatype="html">
<source>invalid data</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/pipes/relative-time.pipe.ts</context>
<context context-type="linenumber">80</context>
<context context-type="linenumber">84</context>
</context-group>
</trans-unit>
<trans-unit id="1631914994548716663" datatype="html">
Expand Down Expand Up @@ -473,6 +488,13 @@
<context context-type="linenumber">122,123</context>
</context-group>
</trans-unit>
<trans-unit id="4207096470676148515" datatype="html">
<source>Events!</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/blog/blog-list/blog-list.component.html</context>
<context context-type="linenumber">4</context>
</context-group>
</trans-unit>
<trans-unit id="4058575476871566236" datatype="html">
<source>Published</source>
<context-group purpose="location">
Expand Down Expand Up @@ -536,6 +558,13 @@
<context context-type="linenumber">60,61</context>
</context-group>
</trans-unit>
<trans-unit id="5671081150775766327" datatype="html">
<source>Blog!</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/event/event-list/event-list.component.html</context>
<context context-type="linenumber">4</context>
</context-group>
</trans-unit>
<trans-unit id="8510289285271281479" datatype="html">
<source>Keep Local Traffic Local</source>
<context-group purpose="location">
Expand Down