Slightly better header

This commit is contained in:
Marcin Kurczewski 2013-10-15 21:38:58 +02:00
parent 1b3ce29b46
commit f42ed135fa
2 changed files with 48 additions and 32 deletions

View file

@ -31,16 +31,17 @@ body {
color: black;
}
.main-wrapper {
margin: 0 1.5em;
}
#top-nav ul.main-nav {
margin: 0 -0.75em;
padding: 0;
list-style-type: none;
}
.main-wrapper {
margin: 0 1.5em;
}
#top-nav li.main-nav-item {
display: inline-block;
}
@ -52,12 +53,11 @@ body {
margin-bottom: 3px;
text-decoration: none;
}
#top-nav li.main-nav-item a {
padding: 0.2em 0.75em;
line-height: 35px;
padding: 0 10px;
outline: 0;
}
#top-nav li.main-nav-item a:focus,
#top-nav li.main-nav-item a:hover {
color: firebrick;
@ -65,6 +65,18 @@ body {
margin-bottom: 0;
}
#top-nav li.search {
float: right;
background: white;
margin: 0;
padding: 0 5px;
line-height: 38px;
}
#top-nav li.search input {
border: 0;
padding: 5px;
}
#top-nav li.safety {
float: right;
}
@ -74,32 +86,29 @@ body {
padding: 0;
}
#top-nav li.safety li {
display: inline-block;
display: inline;
}
#top-nav li.safety a {
display: inline-block;
width: 20px;
height: 20px;
border: 1px solid black;
float: left;
width: 25px;
line-height: 38px;
margin-right: -1px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
#top-nav li.safety span {
display: none;
visibility: hidden;
}
#top-nav li.safety .safety-safe .enabled { background: lime; }
#top-nav li.safety .safety-safe .disabled { background: green; }
#top-nav li.safety .safety-sketchy .enabled { background: yellow; }
#top-nav li.safety .safety-sketchy .disabled { background: olive; }
#top-nav li.safety .safety-unsafe .enabled { background: red; }
#top-nav li.safety .safety-unsafe .disabled { background: maroon; }
#top-nav li.safety a:hover { opacity: .7; }
#top-nav li.safety a.inactive { opacity: 1; }
#top-nav li.safety .safety-safe .enabled { background: linear-gradient(to bottom, #CFE6C2 0%, #80C670 100%); }
#top-nav li.safety .safety-safe .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); }
#top-nav li.safety .safety-sketchy .enabled { background: linear-gradient(to bottom, #F0F4C8 0%, #EBE57A 100%); }
#top-nav li.safety .safety-sketchy .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); }
#top-nav li.safety .safety-unsafe .enabled { background: linear-gradient(to bottom, #FBC6B6 0%, #F37865 100%); }
#top-nav li.safety .safety-unsafe .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); }
#top-nav li.search {
float: right;
background: white;
margin: 0 0.25em;
}
#top-nav li.search input {
border: 0;
}
footer {
text-align: center;
@ -110,10 +119,7 @@ footer {
color: silver;
}
.clear {
display: block;
clear: both;
}
#sidebar {
float: left;
@ -146,6 +152,8 @@ footer {
overflow: hidden;
}
h1, h2, h3 {
font-weight: normal;
}
@ -184,6 +192,8 @@ a:hover i[class*='icon-'] {
background-color: red;
}
form.aligned input,
form.aligned button {
vertical-align: text-top;
@ -253,6 +263,7 @@ button:hover {
}
.alert {
text-align: center;
padding: 10px;
@ -279,3 +290,8 @@ button:hover {
.inactive {
opacity: .5;
}
.clear {
display: block;
clear: both;
}

View file

@ -69,7 +69,7 @@
<?php foreach (PostSafety::getAll() as $safety): ?>
<?php if (PrivilegesHelper::confirm($this->context->user, Privilege::ListPosts, PostSafety::toString($safety))): ?>
<li class="safety-<?php echo strtolower(PostSafety::toString($safety)) ?>">
<a href="<?php echo \Chibi\UrlHelper::route('user', 'toggle-safety', ['safety' => $safety]) ?>" class="<?php echo $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>">
<a href="<?php echo \Chibi\UrlHelper::route('user', 'toggle-safety', ['safety' => $safety]) ?>" class="<?php echo $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>" title="Searching <?php echo strtolower(PostSafety::ToString($safety)) ?> posts: <?php echo $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>">
<span><?php echo PostSafety::toString($safety) ?></span>
</a>
</li>