rename topnav to navbar

This one of the parts of the change to the [look and feel
change](https://github.com/ioccc-src/temp-test-ioccc/issues/2273#issuecomment-2059754857)
wrote about.

Stay tuned ...
This commit is contained in:
Landon Curt Noll committed 2024-04-16 12:22:49 -07:00
1 parent 775acc30ab
commit a192eff9b2
422 files changed
+1810 -1810

No files matched your search

+10 -10
View File
@@ -502,12 +502,12 @@ where `phase` is the name of an HTML phase,
a non-default file may be used. For example:
``` <!---sh-->
-H topnav=up2index
-H navbar=up2index
```
will cause [inc/topnav.up2index.html](../inc/topnav.up2index.html)
instead of [inc/topnav.default.html](../inc/topnav.default.html) to be
used during the _topnav_ HTML phase.
will cause [inc/navbar.up2index.html](../inc/navbar.up2index.html)
instead of [inc/navbar.default.html](../inc/navbar.default.html) to be
used during the _navbar_ HTML phase.
If `name` is dot (i.e., `.`), then the given HTML phase is skipped.
For example:
@@ -528,7 +528,7 @@ The following HTML phase files are used to build HTML content:
1. inc/head.default.html
2. inc/body.default.html
3. inc/header.default.html
4. inc/topnav.default.html
4. inc/navbar.default.html
5. inc/begin-row.default.html
6. inc/begin-leftcolumn.default.html
7. inc/sidenav.default.html
@@ -631,7 +631,7 @@ IMPORTANT: An "output tool" will print each command line option / argument on a
So for example, if an "output tool" wishes to convey:
```
-s TITLE='IOCCC entry locations' -H topnav=top-of-site
-s TITLE='IOCCC entry locations' -H navbar=top-of-site
```
The "output tool" would output the following 4 lines:
@@ -640,7 +640,7 @@ The "output tool" would output the following 4 lines:
-s
TITLE='IOCCC entry locations'
-H
topnav=top-of-site
navbar=top-of-site
```
The command line options printed by an "output tool" are processed
@@ -685,15 +685,15 @@ different filename for a given phase.
For example when forming the HTML from
[2020/ferguson1/chocolate-cake.md](/2020/ferguson1/chocolate-cake.md),
a different `topnav` navigation bar is needed. So instead of the
a different `navbar` navigation bar is needed. So instead of the
usual top navigation bar that normally directs people to the previous
entry for the year, or go up to the year page, or to the next entry
for the year, a top navigation bar to just go up to the entry's
main page is needed. A line in the [md2html config file](../inc/md2html.cfg)
that refers to
[2020/ferguson1/chocolate-cake.md](/2020/ferguson1/chocolate-cake.md) may
specify use of `topnav.up2index.html` (as `topnav.up2index`)instead of using the
`topnav.default.html` (`topnav.default.html`) default.
specify use of `navbar.up2index.html` (as `navbar.up2index`)instead of using the
`navbar.default.html` (`navbar.default.html`) default.
The HTML phase may be skipped resulting in no HTML output during a given phase
and furthermore, forming no HTML content from a given markdown file altogether.
+13 -13
View File
@@ -50,13 +50,13 @@
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.default.html -->
<!-- START: this line starts content from: inc/navbar.default.html -->
<div class="topnav">
<div class="navbar">
&nbsp;
</div>
<!-- END: this line ends content from: inc/topnav.default.html -->
<!-- END: this line ends content from: inc/navbar.default.html -->
<!-- START: this line starts content from: inc/begin-row.default.html -->
<div class="row">
@@ -342,10 +342,10 @@ the file name form:</p>
<pre><code>-H phase=name</code></pre>
<p>where <code>phase</code> is the name of an HTML phase,
a non-default file may be used. For example:</p>
<pre><code>-H topnav=up2index</code></pre>
<p>will cause <a href="../inc/topnav.up2index.html">inc/topnav.up2index.html</a>
instead of <a href="../inc/topnav.default.html">inc/topnav.default.html</a> to be
used during the <em>topnav</em> HTML phase.</p>
<pre><code>-H navbar=up2index</code></pre>
<p>will cause <a href="../inc/navbar.up2index.html">inc/navbar.up2index.html</a>
instead of <a href="../inc/navbar.default.html">inc/navbar.default.html</a> to be
used during the <em>navbar</em> HTML phase.</p>
<p>If <code>name</code> is dot (i.e., <code>.</code>), then the given HTML phase is skipped.
For example:</p>
<pre><code>-H footer=.</code></pre>
@@ -360,7 +360,7 @@ HTML phases
<li>inc/head.default.html</li>
<li>inc/body.default.html</li>
<li>inc/header.default.html</li>
<li>inc/topnav.default.html</li>
<li>inc/navbar.default.html</li>
<li>inc/begin-row.default.html</li>
<li>inc/begin-leftcolumn.default.html</li>
<li>inc/sidenav.default.html</li>
@@ -426,12 +426,12 @@ the same <code>token</code> <em>only</em>.</p>
<p>An “output tool” may be used to add certain additional command line options to be processed.</p>
<p>IMPORTANT: An “output tool” will print each command line option / argument on a separate line.
So for example, if an “output tool” wishes to convey:</p>
<pre><code>-s TITLE=&#39;IOCCC entry locations&#39; -H topnav=top-of-site</code></pre>
<pre><code>-s TITLE=&#39;IOCCC entry locations&#39; -H navbar=top-of-site</code></pre>
<p>The “output tool” would output the following 4 lines:</p>
<pre><code>-s
TITLE=&#39;IOCCC entry locations&#39;
-H
topnav=top-of-site</code></pre>
navbar=top-of-site</code></pre>
<p>The command line options printed by an “output tool” are processed
after all command line options, and all options from a matching
line from the <code>md2html.cfg</code> file, and before any filename arguments
@@ -461,15 +461,15 @@ modified via the <a href="../inc/md2html.cfg">md2html config file</a> may change
different filename for a given phase.</p>
<p>For example when forming the HTML from
<a href="/2020/ferguson1/chocolate-cake.md">2020/ferguson1/chocolate-cake.md</a>,
a different <code>topnav</code> navigation bar is needed. So instead of the
a different <code>navbar</code> navigation bar is needed. So instead of the
usual top navigation bar that normally directs people to the previous
entry for the year, or go up to the year page, or to the next entry
for the year, a top navigation bar to just go up to the entry’s
main page is needed. A line in the <a href="../inc/md2html.cfg">md2html config file</a>
that refers to
<a href="/2020/ferguson1/chocolate-cake.md">2020/ferguson1/chocolate-cake.md</a> may
specify use of <code>topnav.up2index.html</code> (as <code>topnav.up2index</code>)instead of using the
<code>topnav.default.html</code> (<code>topnav.default.html</code>) default.</p>
specify use of <code>navbar.up2index.html</code> (as <code>navbar.up2index</code>)instead of using the
<code>navbar.default.html</code> (<code>navbar.default.html</code>) default.</p>
<p>The HTML phase may be skipped resulting in no HTML output during a given phase
and furthermore, forming no HTML content from a given markdown file altogether.</p>
<p>See comments in the <a href="../inc/md2html.cfg">md2html config file</a> for details.
+3 -3
View File
@@ -327,7 +327,7 @@ function global_variable_setup
#
unset PHASE_NAME
declare -ag PHASE_NAME
PHASE_NAME=(top head body header topnav begin-row begin-leftcolumn
PHASE_NAME=(top head body header navbar begin-row begin-leftcolumn
sidenav end-leftcolumn end-leftcolumn begin-rightcolumn before-content
after-content end-rightcolumn end-row footer bottom)
unset HTML_PHASE_NAME
@@ -1868,13 +1868,13 @@ if [[ $status -ne 0 ]]; then
fi
##########################################
# HTML phase 4: inc/topnav.__name__.html #
# HTML phase 4: inc/navbar.__name__.html #
##########################################
# NOTE: See inc/md2html.cfg for details on HTML phase numbers, HTML phase names, and HTML phase files
#
CUR_PHASE_NUM=4
CUR_PHASE_NAME="topnav"
CUR_PHASE_NAME="navbar"
BASE_EXIT_CODE=60 # possible: exit 60 or exit 61 or exit 62 or exit 63 or exit 64
#
append_html_phase "$CUR_PHASE_NUM" "$CUR_PHASE_NAME" "$BASE_EXIT_CODE" "$TMP_SED_SCRIPT" "$TMP_PHASE" "$TMP_INDEX_HTML"
+2 -2
View File
@@ -524,7 +524,7 @@ echo "KEYWORDS=IOCCC, $YEAR_DIR, IOCCC $YEAR_DIR, IOCCC entry, $ENTRY_DIR, $AWAR
echo "-s"
echo "HEADER_2=$YYYY_DIR - $AWARD"
# output topnav left hand side links
# output navbar left hand side links
#
awk -v entry_path="$YYYY_DIR" -f "$ENTRY_NAVBAR_AWK" "$DOT_YEAR"
status="$?"
@@ -533,7 +533,7 @@ if [[ $status -ne 0 ]]; then
exit 1
fi
# output topnav right hand side links
# output navbar right hand side links
#
echo "-s"
if [[ -f $YYYY_DIR/$ENTRY_DIR.c ]]; then
+5 -5
View File
@@ -26,7 +26,7 @@ BEGIN {
process_next_line = 0; # 1 ==> we found our entry_path, now process the next line
found_entry_path = 0; # 1 ==> we found our entry_path
prev_line = ""; # the previous YYYY/dir line
topnav_phase = "mid"; # topnav name to use (-H topnav=topnav_phase)
navbar_phase = "mid"; # navbar name to use (-H navbar=navbar_phase)
# error if github is not set via -v github=REPO_URL
#
@@ -74,7 +74,7 @@ $0 ~ /[^\/]+\/[^\/]+/ {
#
if (NR == 1) {
# no previous line entry_path is the 1st line
topnav_phase = "first";
navbar_phase = "first";
}
# process the previous YYYY/dir line with this match
@@ -161,11 +161,11 @@ END {
} else if (process_next_line) {
# no next line entry_path is the last line
topnav_phase = "last";
navbar_phase = "last";
}
# output the topnav phase name
# output the navbar phase name
#
print "-H";
print "topnav=" topnav_phase;
print "navbar=" navbar_phase;
}
+2 -2
View File
@@ -504,7 +504,7 @@ echo "KEYWORDS=IOCCC, $YEAR_DIR, IOCCC $YEAR_DIR, IOCCC entry, The $ORDINAL IOCC
echo "-s"
echo "HEADER_2=$YEAR_DIR - The $ORDINAL IOCCC"
# output topnav left hand side links
# output navbar left hand side links
#
awk -v year_arg="$YEAR_DIR" -f "$YEAR_NAVBAR_AWK" "$TOP_FILE"
status="$?"
@@ -513,7 +513,7 @@ if [[ $status -ne 0 ]]; then
exit 1
fi
# output topnav right hand side links
# output navbar right hand side links
#
echo "-s"
echo "INVENTORY_LINK=#inventory"
+5 -5
View File
@@ -25,7 +25,7 @@ BEGIN {
process_next_line = 0; # 1 ==> we found our year_arg, now process the next line
found_year_arg = 0; # 1 ==> we found our year_arg
prev_line = ""; # the previous YYYY line
topnav_phase = "year.mid"; # topnav name to use (-H topnav=topnav_phase)
navbar_phase = "year.mid"; # navbar name to use (-H navbar=navbar_phase)
# error if year_arg is not set via -v year_arg=YYYY
#
@@ -62,7 +62,7 @@ BEGIN {
#
if (NR == 1) {
# no previous line year_arg is the 1st line
topnav_phase = "year.first";
navbar_phase = "year.first";
}
# process the previous YYYY line with this match
@@ -120,11 +120,11 @@ END {
} else if (process_next_line) {
# no next line year_arg is the last line
topnav_phase = "year.last";
navbar_phase = "year.last";
}
# output the topnav phase name
# output the navbar phase name
#
print "-H";
print "topnav=" topnav_phase;
print "navbar=" navbar_phase;
}