Anonymous avatar Anonymous committed 2c7f8b3

Added the Essays-specific section-menu, with all the required changes.

Comments (0)

Files changed (9)

 t2/SFresume_detailed.html.wml : lib/SFresume_base.wml
 	touch $@
 
-t2/philosophy/Index/index.html.wml : lib/article-index/article-index.dtd lib/article-index/article-index.xml lib/article-index/article-index.xsl
+PHILOSOPHY_DEPS = lib/sub-menus/essays.wml lib/MyEssaysNavData.pm
+t2/philosophy/Index/index.html.wml : lib/article-index/article-index.dtd lib/article-index/article-index.xml lib/article-index/article-index.xsl $(PHILOSOPHY_DEPS)
 	touch $@
 
 $(FORTUNES_TARGET): vipe/humour/fortunes/fortunes-index.html.wml $(DOCS_COMMON_DEPS)
 	( cd vipe && wml $(WML_FLAGS) -DLATEMP_SERVER=vipe -DLATEMP_FILENAME=humour/fortunes/index.html humour/fortunes/fortunes-index.html.wml ) > $@
 
+T2_DOCS_SRC = $(patsubst $(T2_DEST)/%,$(T2_SRC_DIR)/%.wml,$(T2_DOCS_DEST))
+T2_PHILOSOPHY_DOCS_SRC = $(filter-out $(T2_SRC_DIR)/philosophy/Index/%,$(filter $(T2_SRC_DIR)/philosophy/%,$(T2_DOCS_SRC)))
+
+$(T2_PHILOSOPHY_DOCS_SRC):: $(T2_SRC_DIR)/philosophy/%.html.wml: $(PHILOSOPHY_DEPS)
+	touch $@
+
     - mention it in the news.
     - convert to the Amazon.com Associate Program.
 
-* Fix the EvilPHish icon according to the input from the IRC.
-
 * Add a nice news items summary news box at the top with the site news. 
   Also create an RSS feed for them.
 
 
 * Link the Hebrew Errors Page to the main one.
 
-* Fix the fact that the prev/next/up buttons mozilla nav-bar links 
-(link rel=next) appear at each and every page including the first one
-and last one.
-
 * Add the puzzles I found in my drawer to the site.
 
 * Add my Wikipedia contributions into the "Contributions to FOSS projects".
     margin-top: 3pt;
     margin-bottom: 7pt;
 }
+.sub_menu
+{
+    background-color: #C0C0C0;
+    padding-top: 7pt;
+    padding-bottom: 7pt;
+    float: right;
+    margin-left: 7pt;
+    margin-right: 10pt;
+    padding-right:5pt;
+}
+.sub_menu ul
+{
+    list-style-type:disc;
+    list-style-position:inside;
+    margin-top:0;
+    margin-bottom:0;
+    padding-left:3pt;
+    font-size:80%;
+    font-family:sans-serif;
+}
+.sub_menu ul.nm_nested
+{
+   padding-left:10pt;
+}
+

lib/MyEssaysNavData.pm

+package MyEssaysNavData;
+
+my $essays_tree_contents =
+{
+    'host' => "t2",
+    'text' => "Shlomi Fish' Essays",
+    'title' => "Shlomi Fish' Essays",
+    'show_always' => 1,
+    'subs' =>
+    [
+        {
+            'text' => "Essays",
+            'url' => "philosophy/",
+            'title' => "Nav Menu for Shlomi Fish' Essays",
+        },
+        {
+            'text' => "Index to Essays",
+            'url' => "philosophy/Index/",
+            'title' => "Index to Essays and Articles I wrote.",
+        },
+        {
+            'text' => "Computing",
+            'url' => "philosophy/computers/",
+            'title' => "Computing-related Essays and Articles",
+            'subs' =>
+            [
+                {
+                    'text' => "What is Open Source?",
+                    'url' => "philosophy/foss-other-beasts/",
+                    'title' => "Free Software, Open Source and Other Beasts",
+                },
+                {
+                    'text' => "Perl & Newcomers",
+                    'url' => "philosophy/perl-newcomers/",
+                    'title' => ""Usability" of the Perl Online World for Newcomers",
+                },
+                {
+                    'text' => "When C is the Best?",
+                    'url' => "philosophy/computers/when-c-is-best/",
+                    'title' => "An Essay that Explains when the C Language should be used instead of Other Languages",
+                },  
+            ],
+        },
+        {
+            'text' => "Political Essays",
+            'url' => "philosophy/politics/",
+            'title' => "Essays about Politics and Philosophical Politics",
+            'subs' =>
+            [
+                {
+                    'text' => "Objectivism and Open Source",
+                    'url' => "philosophy/obj-oss/",
+                    'title' => "Objectivism and Open Source",
+                },
+                {
+                    'text' => "Israeli-Palestinian Conflict",
+                    'url' => "philosophy/israel-pales/",
+                    'title' => "A Solution to the Israeli Palestinian Conflict",
+                },
+            ],
+        },
+        {
+            'text' => "The Eternal Jew",
+            'url' => "philosophy/the-eternal-jew/",
+            'title' => "The Eternal Jew - An Essay about the value of Self",
+        },
+    ],
+};
+
+sub get_params
+{
+    return 
+        (
+            'hosts' => MyNavData::get_hosts(),
+            'tree_contents' => $essays_tree_contents,
+        );
+}
+
+1;
+
     },
 };
 
+sub get_hosts
+{
+    return $hosts;
+}
+
 my $tree_contents =
 {
     'host' => "t2",

lib/sub-menus/essays.wml

+<:{
+require MyEssaysNavData;
+my $filename = "<latemp_default_val "<get-var latemp_filename />" "$(LATEMP_FILE
+NAME)" />";
+$filename =~ s!index\.html$!!;
+$filename = "/$filename";
+
+use vars qw($essays_nav_bar);
+
+$essays_nav_bar = HTML::Widgets::NavMenu->new(
+    'path_info' => $filename,
+    'current_host' => "<latemp_default_val "<get-var latemp_server />" "$(LATEMP
+_SERVER)" />",
+    MyEssaysNavData::get_params(),
+    'ul_classes' => [ "nm_main", "nm_nested", "nm_subnested", "nm_subsubnested", ],
+    );
+
+my $rendered_results = $essays_nav_bar->render();
+
+use vars qw($essays_nav_html);
+
+$essays_nav_html = $rendered_results->{html};
+
+}:>
+<define-tag essays_sub_menu>
+<div class="sub_menu">
+<:{ print join("\n", @$essays_nav_html); }:>
+</div>
+</define-tag>
+

t2/philosophy/computers/index.html.wml

+#include '../template.wml'
+
+<latemp_subject "Shlomi Fish' Writings about Computing" />
+
+<p>
+Being a software developer, that is also very interested in computers and like
+to program for fun, I started conveying some of my thoughts about computing
+and this fields' social aspect in various essays I wrote. I hope to concentrate
+all of them under this section of the homepage.
+</p>
+
+<p>
+Some of these essays will require some technical knowledge, but most of them
+can be read by anyone with a pseudo-technical background. 
+</p>
+
+<h2>The Articles and Essays</h2>
+
+<h3><a href="$(ROOT)/philosophy/foss-other-beasts/">"Open Source, Free 
+Software and Other Beasts"</a></h3>
+
+<div class="indent">
+<p>
+An essay that explains what "Open Source", "Free Software" and other related
+terms are all about for people without any familiarity in this area.
+</p>
+</div>
+
+<h3><a href="$(ROOT)/philosophy/perl-newcomers">"Usability of the Perl 
+Online World to Newcomers"</a></h3>
+
+<div class="indent">
+<p>
+A controversial essay in which I pointed the various problems in the Perl
+Online world, that may make it difficult for someone learning the language to
+do so. 
+</p>
+</div>
+
+<h3><a href="$(ROOT)/philosophy/comptuers/when-c-is-best/">When C is the Best? (Tool for the Job)</a></h3>
+
+<div class="indent">
+<p>
+An essay that explains the times when the C programmign language is the best
+language to use to write an application in, and why it's still used very often.
+</p>
+</div>
+

t2/philosophy/politics/index.html.wml

+#include '../template.wml'
+
+<latemp_subject "Shlomi Fish' Writings about Politics" />
+
+<p>
+These are essays that deal with Politics, but from the Philosophical side.
+They're not more of the "Left-vs-Right" rehash, but rather aim to provide 
+fresh point-of-views and new insights. They may prove controversial on both
+Left-winged and Right-winged people.
+</p>
+
+<h2>The Articles and Essays</h2>
+
+<h3><a href="$(ROOT)/philosophy/obj-oss/">Objectivism and Open Source</a></h3>
+
+<div class="indent">
+<p>
+An essay, intended for people who adhere to Ayn Rand's Objectivism philosophy,
+that explains why the Open Source paradigm is compatible with it.
+</p>
+</div>
+
+<h3><a href="$(ROOT)/philosophy/israel-pales/">A Solution to the
+Israeli-Palestinian Conflict</a></h3>
+
+<div class="indent">
+<p>
+This is a proposed and innovative solution to the Israeli-Palestinian Conflict.
+</p>
+</div>
+
     <backtomyhp />
     />
 </latemp_foot_image>
+
+#include "sub-menus/essays.wml"
+
+<latemp_after_main_title>
+<if "<match "$(LATEMP_FILENAME)" "^philosophy/" action="report" />"
+    "<essays_sub_menu />"
+    "" />
+</latemp_after_main_title>
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.