summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ccc_conventions.rb10
-rw-r--r--lib/tasks/init.rake1
2 files changed, 10 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
diff --git a/lib/tasks/init.rake b/lib/tasks/init.rake
index bf7bfa6b..ec233433 100644
--- a/lib/tasks/init.rake
+++ b/lib/tasks/init.rake
@@ -51,6 +51,7 @@ namespace :cccms do
51 '[aggregate tags="update" limit="30" order_by="published_at" order_direction="DESC"]') 51 '[aggregate tags="update" limit="30" order_by="published_at" order_direction="DESC"]')
52 52
53 ensure_node.(root, "disclosure", "Disclosure", "") 53 ensure_node.(root, "disclosure", "Disclosure", "")
54 ensure_node.(root, "banner", "Banner", "")
54 55
55 club = ensure_node.(root, "club", "Chaos Computer Club", "") 56 club = ensure_node.(root, "club", "Chaos Computer Club", "")
56 ensure_node.(club, "erfas", "Erfa-Kreise", 57 ensure_node.(club, "erfas", "Erfa-Kreise",