Commits

Shlomi Fish committed 4996790

Add a meta-information sub-menu.

Comments (0)

Files changed (3)

 LECTURES_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Lectures.pm
 SOFTWARE_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Software.pm
 HUMOUR_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Humour.pm
+META_SUBSECT_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Meta.pm
 PUZZLES_DEPS = $(SECTION_MENU_DEPS) lib/Shlomif/Homepage/SectionMenu/Sects/Puzzles.pm
 
 $(T2_DEST)/philosophy/Index/index.html : lib/article-index/article-index.dtd lib/article-index/article-index.xml lib/article-index/article-index.xsl
 $(T2_PUZZLES_DOCS_SRC): $(T2_SRC_DIR)/%.wml: $(PUZZLES_DEPS)
 	touch $@
 
+T2_META_DOCS_DEST = $(filter $(T2_DEST)/meta/%,$(T2_DOCS_DEST))
+
+$(T2_META_DOCS_DEST): $(META_SUBSECT_DEPS)
+
+$(T2_HUMOUR_DOCS_DEST): $(HUMOUR_DEPS)
 rss:
 	perl ./bin/fetch-shlomif_hsite-feed.pl
 	touch t2/index.html.wml

lib/MySectNavData.pm

         'class' => "Humour",
         'title' => "Humour Section Menu",
     },
+    {
+        'id' => "meta",
+        'regex' => "^/meta/",
+        'class' => "Meta",
+        'title' => "Site Meta Information Section Menu",
+    },
 );
 
 sub get_nav_menu

lib/Shlomif/Homepage/SectionMenu/Sects/Meta.pm

+package Shlomif::Homepage::SectionMenu::Sects::Meta;
+
+use strict;
+use warnings;
+
+use utf8;
+
+use MyNavData;
+
+my $meta_tree_contents =
+{
+    host => "t2",
+    text => "Site Meta Information Section Menu",
+    title => "Site Meta Information Section Menu",
+    show_always => 1,
+    subs =>
+    [
+        {
+            text => "Meta Info",
+            url => "meta/",
+        },
+        {
+            text => "FAQ",
+            title => "Frequently Asked Questions",
+            url => "meta/FAQ/",
+        },
+        {
+            text => "How to help",
+            url => "meta/how-to-help/",
+            subs =>
+            [
+                {
+                    text => "Donate",
+                    url => "meta/donate/",
+                },
+                {
+                    text => "Site’s Sources",
+                    url => "meta/site-source/",
+                },
+            ],
+        },
+        {
+            text => "Copyrights Terms",
+            title => "Copyright Terms of my site",
+            url => "meta/copyrights/",
+        },
+        {
+            text => "Privacy Policy",
+            url => "meta/privacy-policy/",
+        },
+        {
+            text => "Linking Policy",
+            url => "meta/linking-policy/",
+        },
+        {
+            text => "Anti-Spam Policy",
+            url => "meta/anti-spam-policy/",
+        },
+        {
+            text => "About our Hosting Provider",
+            url => "meta/hosting/",
+        },
+    ],
+};
+
+sub get_params
+{
+    return
+        (
+            hosts => MyNavData::get_hosts(),
+            tree_contents => $meta_tree_contents,
+        );
+}
+
+1;
+