Skip to content

feat: explanation & styling for highlight #149

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 6 commits into from
May 31, 2025
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
8 changes: 8 additions & 0 deletions assets/sass/textHighlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
border-left: var(--bg-neutral) solid 1rem;
}

.m-text-highlight__roofline {
font-size: 1.4rem;
margin-bottom: 1rem;
text-transform: uppercase;
font-weight: bold;
opacity: .8;
}

.m-text-highlight--tip {
background-color: #C4F2FF;
border-left: #1DB5DF solid 1rem;
Expand Down
7 changes: 4 additions & 3 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ menu-open: Menü
menu-close: Schließen
general: Übergreifendes
information-disclaimer-short: Diese Informationen sind inoffiziell und ohne Gewähr. Es besteht keine rechtliche Verbindung zu FIP oder Bahngesellschaften.
highlight-important: Wichtige Information
highlight-inofficial: Inoffizielle Information
highlight-tip: Persönlicher Tipp
highlight:
important: Wichtige Information
inofficial: Inoffizielle Information
tip: Persönlicher Tipp
news-headline: Was gibt's Neues?
_operator__list_title: Betreiber mit FIP
updateDate: Zuletzt aktualisiert
Expand Down
7 changes: 4 additions & 3 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ menu-open: Menu
menu-close: Close
general: general
information-disclaimer-short: The information provided is unofficial and without guarantee. There is no legal connection to FIP or railway companies.
highlight-important: Important Information
highlight-inofficial: Unofficial Information
highlight-tip: Personal Tip
highlight:
important: Important Information
inofficial: Unofficial Information
tip: Personal Tip
news-headline: What's new?
_operator__list_title: Operators supporting FIP
updateDate: Last updated
Expand Down
11 changes: 8 additions & 3 deletions layouts/shortcodes/highlight.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<div class="m-text-highlight m-text-highlight--{{ (.Get 0) | markdownify }}" aria-label='{{ T (printf "highlight-%s" (.Get 0)) }}'>
{{ .Inner }}
</div>
{{- $param := .Get 0 -}}
<div class="m-text-highlight m-text-highlight--{{ $param }}">
{{- if $param -}}
<div class="m-text-highlight__roofline">{{ T (printf "highlight.%s" $param) }}</div>
{{- end -}}
<div>
{{ .Inner }}
</div></div>
Loading