Skip to content
Draft
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
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,25 @@ Inside the OpenCode Terminal, you can ask any question, similarly to GitHub Copi
- `/check {page}`: Check the page for common mistakes and report them. `{page}` can be the name of an operator, a country, a booking plattform, or a path to a file.

That's the recommended way. However, you can still use other frontend ends like GitHub Copilot Chat and Claude Code. We provide an [`AGENTS.md`](https://agents.md/) file for these providers in the repository, but the custom commands are not available without OpenCode.

### Content update strategy

Use the `updates` field and the small-change overview only for user-facing changes to FIP information. If one commit affects multiple pages, describe the change separately for each page and include only the FIP information changed on that page.

New country, operator, and booking pages start with an empty `updates` array. Replace it with a concise, localized message and an ISO date (`YYYY-MM-DD`) describing the substantive FIP information introduced on each page.

#### Small changes to include

- Changes to FIP validity, acceptance, discounts, or eligible operators and routes.
- Updates to reservations, supplements, FIP fares, ticket purchase options, or payment methods.
- Changes to border points, cross-border travel, ticket barriers, or breaks of journey that affect FIP travel.
- Corrections to inaccurate FIP guidance, including corrections to a translation that change the factual meaning.
- New FIP-related information on a country or operator page.

#### Changes not to include

- Internal or external link changes that do not change the FIP information.
- Formatting, markup, heading, typo, or grammar changes that do not correct factual FIP guidance.
- Adding a translation or making a stylistic translation correction without changing the FIP information.
- Technical changes to templates, layouts, CMS fields, metadata, or site functionality.
- Reorganizing or moving existing information without changing the guidance presented to readers.
1 change: 1 addition & 0 deletions archetypes/booking/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ params:
booking_link: "https://example.com" # Füge ein Link zur Buchungsplattform hinzu
additional_info_link: "https://example.com/additional-info" # Füge einen Link zu zusätzlichen Informationen hinzu
type: "onsite" # Akzeptierte Typen sind: website, online, onsite, phone, email, socialmedia und machine
updates: []
---

{{% booking-section "fip_50" %}}
Expand Down
1 change: 1 addition & 0 deletions archetypes/booking/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ params:
booking_link: "https://example.com" # Add a link to the booking platform
additional_info_link: "https://example.com/additional-info" # Add a link with additional information
type: "onsite" # Accepted types are: website, online, onsite, phone, email, socialmedia and machine
updates: []
---

{{% booking-section "fip_50" %}}
Expand Down
1 change: 1 addition & 0 deletions archetypes/booking/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ params:
booking_link: "https://example.com" # Ajoutez un lien vers la plateforme de réservation
additional_info_link: "https://example.com/additional-info" # Ajoutez un lien vers des informations supplémentaires
type: "onsite" # Types acceptés : website, online, onsite, phone, email, socialmedia et machine
updates: []
---

{{% booking-section "fip_50" %}}
Expand Down
1 change: 1 addition & 0 deletions archetypes/country/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ params:
- # Optionale Fußnoten unter der Grenzpunkt-Tabelle
content_images:
- "image.webp"
updates: []
---

<!-- Entferne das "WIP" Snippet, wenn die Inhalte der Seite vollständig sind -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/country/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ params:
- # Optional footnotes shown below the border point table
content_images:
- "image.webp"
updates: []
---

<!-- Remove the WIP snippet if the page is complete -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/country/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ params:
- # Notes de bas de page facultatives sous le tableau des points frontières
content_images:
- "image.webp"
updates: []
---

<!-- Supprimez ce message si la page est complète -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/operator/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ country:
- "country3"
content_images:
- "image.webp"
updates: []
---

<!-- Entferne das "WIP" Snippet, wenn die Inhalte der Seite vollständig sind -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/operator/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ country:
- "country3"
content_images:
- "image.webp"
updates: []
---

<!-- Remove the WIP snippet if the page is complete -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/operator/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ country:
- "country3"
content_images:
- "image.webp"
updates: []
---

<!-- Supprimez ce message si la page est complète -->
Expand Down
26 changes: 26 additions & 0 deletions assets/admin/static/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,28 @@ x_fip_validity_target_fields_reduced: &fip_validity_target_fields_reduced
group_type: "fip-reduced-ticket"
required: false

x_updates_field: &updates_field
label: "Updates"
label_singular: "Update"
name: "updates"
widget: "list"
required: false
i18n: true
collapsed: true
minimize_collapsed: true
summary: "{{fields.date}}: {{fields.message}}"
fields:
- label: "Message"
name: "message"
widget: "string"
i18n: true
- label: "Date"
name: "date"
widget: "datetime"
type: "date"
default: "{{now}}"
i18n: sync

x_border_side: &border_side
- label: "Country"
name: "country"
Expand Down Expand Up @@ -165,6 +187,7 @@ collections:
widget: "datetime"
type: "date"
i18n: sync
- *updates_field
- label: "Author"
name: "author"
widget: "string"
Expand Down Expand Up @@ -247,6 +270,7 @@ collections:
name: "title"
widget: "string"
i18n: true
- *updates_field
- label: "Parameters"
name: "params"
widget: "object"
Expand Down Expand Up @@ -325,6 +349,7 @@ collections:
name: "title"
widget: "string"
i18n: true
- *updates_field
- label: "Short Name"
name: "shortName"
widget: "string"
Expand Down Expand Up @@ -876,6 +901,7 @@ collections:
name: "title"
widget: "string"
i18n: true
- *updates_field
- label: "Description"
name: "description"
widget: "string"
Expand Down
45 changes: 45 additions & 0 deletions assets/sass/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,55 @@
flex-wrap: wrap;
}

button.o-last-updated {
border: 0;
background: transparent;
color: var(--link-default);
font: inherit;
font-size: 1.3rem;
padding: 0;
margin-left: auto;
cursor: pointer;
text-decoration: underline;
text-underline-offset: 0.2em;

&:hover,
&:focus {
color: var(--link-hovered);
}
}

.o-update-history-dialog {
display: contents;
}

.o-last-updated > .a-icon {
font-size: 1.5rem;
}

.o-update-history {
list-style: none;
padding: 0;

li {
border-bottom: var(--border);
border-color: var(--color-table-border);
padding: 1rem 0;

&:last-child {
border-bottom: 0;
}
}

time {
font-weight: 700;
}

p {
margin: 0.5rem 0 0;
}
}

code {
font-size: inherit;
font-weight: 700;
Expand Down
25 changes: 24 additions & 1 deletion assets/sass/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,27 @@
}
}

&__actions {
position: sticky;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 1rem;
padding: 1rem 2rem;
border-top: var(--border);
border-color: var(--color-table-border);
background-color: var(--bg-default);
}

&__actions-content {
display: flex;
align-items: center;
gap: 1rem;
}

&__body {
padding: 2rem;
padding: 1rem 2rem 2rem;
overflow: auto;
height: 100%;

Expand All @@ -71,4 +90,8 @@
margin-top: 0;
}
}

&__body--with-actions {
padding-bottom: 1rem;
}
}
Loading
Loading