-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- take advantage of @media pointer: coarse - Redirect home visitors to connect view
- Loading branch information
1 parent
a6596ec
commit 4203057
Showing
8 changed files
with
181 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,83 @@ | ||
<header id="topbar"> | ||
|
||
<span id="search"> | ||
<form action="<?= $this->url('search') ?>" method="post"> | ||
<input type="text" list="searchdatalist" name="id" id="search" placeholder="page id" required <?= $tab !== 'edit' && !$user->isvisitor() ? 'autofocus' : '' ?>> | ||
<input type="submit" name="action" value="read"> | ||
<?= $user->iseditor() ? '<input type="submit" name="action" value="edit">' : '' ?> | ||
|
||
<?php if($user->iseditor()) { ?> | ||
<datalist id="searchdatalist"> | ||
<?php foreach ($pagelist as $id) { ?> | ||
<option value="<?= $id ?>"><?= $id ?></option> | ||
<?php } ?> | ||
</datalist> | ||
<?php } ?> | ||
|
||
</form> | ||
</span> | ||
|
||
|
||
|
||
<?php if($user->iseditor()) { ?> | ||
|
||
<span id="menu"> | ||
<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-home"></i> | ||
<span>home</span> | ||
</a> | ||
<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-link"></i> | ||
<span>media</span> | ||
</a> | ||
|
||
</span> | ||
|
||
|
||
|
||
<?php } ?> | ||
|
||
<span id="search"> | ||
<form action="<?= $this->url('search') ?>" method="post"> | ||
<input type="text" list="searchdatalist" name="id" id="search" placeholder="page id" required <?= $tab !== 'edit' && !$user->isvisitor() ? 'autofocus' : '' ?>> | ||
<input type="submit" name="action" value="read"> | ||
<?= $user->iseditor() ? '<input type="submit" name="action" value="edit">' : '' ?> | ||
|
||
<?php if($user->iseditor()) { ?> | ||
<datalist id="searchdatalist"> | ||
<?php foreach ($pagelist as $id) { ?> | ||
<option value="<?= $id ?>"><?= $id ?></option> | ||
<?php } ?> | ||
</datalist> | ||
<?php } ?> | ||
|
||
</form> | ||
</span> | ||
|
||
|
||
|
||
<?php if($user->iseditor()) { ?> | ||
|
||
<span id="menu"> | ||
<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-home"></i> | ||
<span>home</span> | ||
</a> | ||
<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-link"></i> | ||
<span>media</span> | ||
</a> | ||
</span> | ||
|
||
<?php } ?> | ||
|
||
<span id="user"> | ||
|
||
<?php if($user->isvisitor()) { ?> | ||
|
||
|
||
<form action="<?= $this->url('log') ?>" method="post" id="connect"> | ||
<input type="text" name="user" id="loginuser" autofocus placeholder="user" required> | ||
<input type="password" name="pass" id="loginpass" placeholder="password" required> | ||
<input type="hidden" name="route" value="home"> | ||
<input type="hidden" name="rememberme" value="0"> | ||
<input type="checkbox" name="rememberme" id="rememberme" value="1"> | ||
<label for="rememberme">Remember me</label> | ||
<input type="submit" name="log" value="login"> | ||
</form> | ||
|
||
|
||
<?php } else { ?> | ||
|
||
<span> | ||
|
||
<?php | ||
if($user->isadmin()) { | ||
?> | ||
|
||
<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-users"></i> | ||
<span>users</span> | ||
</a> | ||
|
||
<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-cog"></i> | ||
<span>admin</span> | ||
|
||
</a> | ||
<?php | ||
} | ||
?> | ||
<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-book"></i> | ||
<span>documentation</span> | ||
</a> | ||
<span id="user"> | ||
|
||
<a | ||
href="<?= $this->url('profile') ?>" | ||
title="Edit my profile" | ||
<?= $tab == 'profile' ? 'class="currentpage"' : '' ?> | ||
> | ||
<i class="fa fa-user"></i> | ||
<span><?= $user->id() ?></span> | ||
</a> | ||
</span> | ||
<span> | ||
<?php if($user->isadmin()) { ?> | ||
|
||
<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-users"></i> | ||
<span>users</span> | ||
</a> | ||
|
||
<form action="<?= $this->url('log') ?>" method="post" id="connect"> | ||
<input type="submit" name="log" value="logout" > | ||
<?php if($tab === 'edit') { ?> | ||
<input type="hidden" name="route" value="pageread"> | ||
<input type="hidden" name="id" value="<?= $pageid ?>"> | ||
<?php } ?> | ||
<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-cog"></i> | ||
<span>admin</span> | ||
|
||
</form> | ||
</a> | ||
<?php } ?> | ||
<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="currentpage"' : '' ?>> | ||
<i class="fa fa-book"></i> | ||
<span>documentation</span> | ||
</a> | ||
|
||
<a | ||
href="<?= $this->url('profile') ?>" | ||
title="Edit my profile" | ||
<?= $tab == 'profile' ? 'class="currentpage"' : '' ?> | ||
> | ||
<i class="fa fa-user"></i> | ||
<span><?= $user->id() ?></span> | ||
</a> | ||
</span> | ||
|
||
|
||
</span> | ||
<form action="<?= $this->url('log') ?>" method="post" id="connect"> | ||
<input type="submit" name="log" value="logout" > | ||
<?php if($tab === 'edit') { ?> | ||
<input type="hidden" name="route" value="pageread"> | ||
<input type="hidden" name="id" value="<?= $pageid ?>"> | ||
<?php } ?> | ||
|
||
</form> | ||
|
||
|
||
|
||
<?php } ?> | ||
</span> | ||
|
||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
<?php $this->layout('layout', ['title' => 'Connect', 'description' => 'connect', 'stylesheets' => [$css . 'home.css']]) ?> | ||
|
||
|
||
<?php $this->layout('layout', ['title' => 'Connect', 'description' => 'connect', 'stylesheets' => [$css . 'back.css', $css . 'connect.css']]) ?> | ||
|
||
|
||
<?php $this->start('page') ?> | ||
|
||
<span> | ||
<?= $user->level() ?> | ||
</span> | ||
<div class="block connect"> | ||
<h2>Login</h2> | ||
|
||
<?php if($user->isvisitor()) { ?> | ||
<?php if($user->isvisitor()) { ?> | ||
|
||
<form action="<?= $this->url('log') ?>" method="post"> | ||
<input type="hidden" name="route" value="<?= $route ?>"> | ||
<?php | ||
if(in_array($route, ['pageedit', 'pageread', 'pageadd'])) { | ||
echo '<input type="hidden" name="id" value="'. $id .'">'; | ||
} | ||
?> | ||
<form action="<?= $this->url('log') ?>" method="post" id="connect"> | ||
<input type="text" name="user" id="loginuser" autofocus placeholder="user" required> | ||
<input type="password" name="pass" id="loginpass" placeholder="password" required> | ||
<input type="hidden" name="rememberme" value="0"> | ||
<input type="checkbox" name="rememberme" id="rememberme" value="1"> | ||
<label for="rememberme">Remember me</label> | ||
<input name="log" type="submit" value="login"> | ||
</form> | ||
<form action="<?= $this->url('log') ?>" method="post"> | ||
<input type="hidden" name="route" value="<?= $route ?>"> | ||
<?php | ||
if(in_array($route, ['pageedit', 'pageread', 'pageadd'])) { | ||
echo '<input type="hidden" name="id" value="'. $id .'">'; | ||
} | ||
?> | ||
<form action="<?= $this->url('log') ?>" method="post" id="connect"> | ||
<input type="text" name="user" id="loginuser" autofocus placeholder="user" required> | ||
<input type="password" name="pass" id="loginpass" placeholder="password" required> | ||
<input type="hidden" name="rememberme" value="0"> | ||
<span> | ||
<input type="checkbox" name="rememberme" id="rememberme" value="1"> | ||
<label for="rememberme">Remember me</label> | ||
</span> | ||
<input name="log" type="submit" value="login"> | ||
</form> | ||
|
||
|
||
<?php } else { ?> | ||
<?php } else { ?> | ||
|
||
<form action="<?= $this->url('log') ?>" method="post"> | ||
<input name="log" type="submit" value="logout"> | ||
</form> | ||
<form action="<?= $this->url('log') ?>" method="post"> | ||
<input name="log" type="submit" value="logout"> | ||
</form> | ||
|
||
|
||
|
||
<?php } ?> | ||
<?php } ?> | ||
|
||
<?php | ||
if(in_array($route, ['pageedit', 'pageread', 'pageadd'])) { | ||
echo '<p><a href="' . $this->upage('pageread', $id) . '">back to page read view</a></p>'; | ||
} | ||
?> | ||
<?php | ||
if(in_array($route, ['pageedit', 'pageread', 'pageadd'])) { | ||
echo '<p><a href="' . $this->upage('pageread', $id) . '">back to page read view</a></p>'; | ||
} | ||
?> | ||
</div> | ||
|
||
<?php $this->stop() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.