Skip to content

Commit

Permalink
Fix: put <nav> after <header> on all pages (#222)
Browse files Browse the repository at this point in the history
Currently only "view" pages were like that, and all other had
the "search" between them. This made styling a real challenge.

Instead now, make sure all pages follow the same flow:
  nav, header, search
  • Loading branch information
TrueBrain authored Nov 13, 2021
1 parent dcd3011 commit a8aebd6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions static/truewiki/truewiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ main {
#pagename {
color: white;
font-size: 200%;
min-height: 47px;
max-width: 700px;
padding: 5px 0 0 10px;
}
Expand Down
28 changes: 14 additions & 14 deletions templates/Edit.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@
</div>
}}
</header>
{{#if: {{{has_search|}}}|
<div id="search">
<form action="/search" target="_new">
{{#if: {{{language|}}}|
<input type="hidden" name="language" value="{{{language}}}" />
}}
<input type="text" autocomplete="off" name="query" value="" placeholder="Search wiki" />
<div id="search-submit">
<input type="submit" value="" />
<div></div>
</div>
</form>
</div>
}}
<nav>
<ul id="navigation-bar">
{{breadcrumbs}}
Expand All @@ -60,6 +46,20 @@
}}
</ul>
</nav>
{{#if: {{{has_search|}}}|
<div id="search">
<form action="/search" target="_new">
{{#if: {{{language|}}}|
<input type="hidden" name="language" value="{{{language}}}" />
}}
<input type="text" autocomplete="off" name="query" value="" placeholder="Search wiki" />
<div id="search-submit">
<input type="submit" value="" />
<div></div>
</div>
</form>
</div>
}}
<main>
{{#if:{{{page_error|}}}|
<h3><font color="red">Error saving page</font></h3>
Expand Down
14 changes: 7 additions & 7 deletions templates/Login.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
</div>
}}
</header>
<nav>
<ul id="navigation-bar" class="right">
<li>
<a href="/user/login">Login</a>
</li>
</ul>
</nav>
{{#if: {{{has_search|}}}|
<div id="search">
<form action="/search" target="_new">
Expand All @@ -36,13 +43,6 @@
</form>
</div>
}}
<nav>
<ul id="navigation-bar" class="right">
<li>
<a href="/user/login">Login</a>
</li>
</ul>
</nav>
<main>
<p>{{{project_name}}}'s wiki relies on external authentication providers.</p>
<form method="post">
Expand Down
28 changes: 14 additions & 14 deletions templates/Source.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@
</div>
}}
</header>
{{#if: {{{has_search|}}}|
<div id="search">
<form action="/search" target="_new">
{{#if: {{{language|}}}|
<input type="hidden" name="language" value="{{{language}}}" />
}}
<input type="text" autocomplete="off" name="query" value="" placeholder="Search wiki" />
<div id="search-submit">
<input type="submit" value="" />
<div></div>
</div>
</form>
</div>
}}
<nav>
<ul id="navigation-bar">
{{breadcrumbs}}
Expand All @@ -60,6 +46,20 @@
}}
</ul>
</nav>
{{#if: {{{has_search|}}}|
<div id="search">
<form action="/search" target="_new">
{{#if: {{{language|}}}|
<input type="hidden" name="language" value="{{{language}}}" />
}}
<input type="text" autocomplete="off" name="query" value="" placeholder="Search wiki" />
<div id="search-submit">
<input type="submit" value="" />
<div></div>
</div>
</form>
</div>
}}
<main>
{{#if:{{{has_errors|}}}|
<h3>Problems</h3>
Expand Down

0 comments on commit a8aebd6

Please sign in to comment.