diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 19:09:34 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-20 19:09:34 +0200 |
| commit | b689127a29b050b9eefac1381fe150ec0da695a8 (patch) | |
| tree | 6b30db6d01bcc3976eaa5438e1c2e1891ed38ef9 /lib/ccc_conventions.rb | |
| parent | c635b44d8139d0738d2caa6461c9946659d56c45 (diff) | |
Add banner convention to conventions file and init.rake
Diffstat (limited to 'lib/ccc_conventions.rb')
| -rw-r--r-- | lib/ccc_conventions.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ccc_conventions.rb b/lib/ccc_conventions.rb index bb7b2033..e8ed5d68 100644 --- a/lib/ccc_conventions.rb +++ b/lib/ccc_conventions.rb | |||
| @@ -2,7 +2,8 @@ module CccConventions | |||
| 2 | TRASH_SLUG = "trash" | 2 | TRASH_SLUG = "trash" |
| 3 | ERFA_PARENT_NAME = "club/erfas" | 3 | ERFA_PARENT_NAME = "club/erfas" |
| 4 | CHAOSTREFF_PARENT_NAME = "club/chaostreffs" | 4 | CHAOSTREFF_PARENT_NAME = "club/chaostreffs" |
| 5 | RESTRICTED_SUBTREES = %w[updates disclosure].freeze | 5 | BANNER_PARENT_NAME = "banner" |
| 6 | RESTRICTED_SUBTREES = %w[updates disclosure banner].freeze | ||
| 6 | 7 | ||
| 7 | NODE_KINDS = { | 8 | NODE_KINDS = { |
| 8 | "top_level" => { | 9 | "top_level" => { |
| @@ -49,6 +50,13 @@ module CccConventions | |||
| 49 | path_prefix: CHAOSTREFF_PARENT_NAME, | 50 | path_prefix: CHAOSTREFF_PARENT_NAME, |
| 50 | label: "Chaostreff", | 51 | label: "Chaostreff", |
| 51 | hint: "Automatically created under the Chaostreffs overview page, gets tag \"chaostreff-detail\", and uses the chapter detail template." | 52 | hint: "Automatically created under the Chaostreffs overview page, gets tag \"chaostreff-detail\", and uses the chapter detail template." |
| 53 | }, | ||
| 54 | "banner" => { | ||
| 55 | parent: -> { Node.find_by_unique_name!(BANNER_PARENT_NAME) }, | ||
| 56 | parent_match: ->(path) { path == ["banner"] }, | ||
| 57 | path_prefix: BANNER_PARENT_NAME, | ||
| 58 | label: "Banner", | ||
| 59 | hint: "Appears on top of every public page. Needs headline image, banner will redirect to internal redirect target or external url." | ||
| 52 | } | 60 | } |
| 53 | }.freeze | 61 | }.freeze |
| 54 | 62 | ||
