diff --git a/public_html/media/css/core.css b/public_html/media/css/core.css index 434696f7..650874c4 100644 --- a/public_html/media/css/core.css +++ b/public_html/media/css/core.css @@ -156,6 +156,7 @@ footer a { } #sidebar h1 { margin-top: 0; + margin-bottom: 10px; } diff --git a/public_html/media/css/post-view.css b/public_html/media/css/post-view.css index c46c7f80..b449efe0 100644 --- a/public_html/media/css/post-view.css +++ b/public_html/media/css/post-view.css @@ -55,13 +55,24 @@ embed { background-color: silver; } -#sidebar .uploader img { - vertical-align: middle; - margin: 0 0.5em 0 0; - width: 16px; - height: 16px; - background-image: url('http://www.gravatar.com/avatar/0?f=y&d=mm&s=16'); +#sidebar .uploader .date { + font-size: 9pt !important; + color: gray; + display: inline-block; + position: relative; + top: -5px; } +#sidebar .uploader img { + vertical-align: text-top; + float: left; + margin: 3px 8px 0 0; + width: 25px; + height: 25px; + background-image: url('http://www.gravatar.com/avatar/0?f=y&d=mm&s=25'); +} + +#sidebar .unit.details { margin-bottom: 1.5em; } +#sidebar .unit.hl-options { margin-top: 1.5em; } #sidebar .safety-safe { color: #43aa43; @@ -80,17 +91,19 @@ embed { i.icon-prev { background-position: -12px -1px; + margin-left: 8px; } i.icon-next { background-position: -1px -1px; + margin-right: 8px; } i.icon-prev, i.icon-next { - margin: 0 8px; vertical-align: middle; width: 8px; height: 20px; } + i.icon-dl { margin: 0; width: 20px; @@ -98,14 +111,33 @@ i.icon-dl { background-position: -22px -1px; } -.permalink { - margin: 1em 0; +i.icon-edit { + margin: 0; + width: 20px; + height: 20px; + background-position: -43px -22px; } -.permalink .icon-dl { + +i.icon-fav { + margin: 0; + width: 20px; + height: 20px; +} +.add-fav i.icon-fav { + background-position: -1px -22px; +} +.rem-fav i.icon-fav { + background-position: -22px -22px; +} + +.hl-option { + margin: 0.4em 0; +} +.hl-option i[class^='icon'] { vertical-align: middle; - margin-right: 1em; } -.permalink span { +.hl-option span { + padding-left: 0.6em; vertical-align: middle; } .permalink .ext:after { diff --git a/public_html/media/img/icons.png b/public_html/media/img/icons.png index d59b2b15..77b08015 100644 Binary files a/public_html/media/img/icons.png and b/public_html/media/img/icons.png differ diff --git a/public_html/media/js/post-view.js b/public_html/media/js/post-view.js index 7cd24e11..f6c9ce3d 100644 --- a/public_html/media/js/post-view.js +++ b/public_html/media/js/post-view.js @@ -2,7 +2,7 @@ $(function() { function onDomUpdate() { - $('#sidebar .edit a').click(function(e) + $('#sidebar a.edit-post').click(function(e) { e.preventDefault(); @@ -126,5 +126,5 @@ $(function() Mousetrap.bind('a', function() { var a = $('#sidebar .left a'); var url = a.attr('href'); if (typeof url !== 'undefined') { a.click(); window.location.href = url; } }, 'keyup'); Mousetrap.bind('d', function() { var a = $('#sidebar .right a'); var url = a.attr('href'); if (typeof url !== 'undefined') { a.click(); window.location.href = url; } }, 'keyup'); - Mousetrap.bind('e', function() { $('li.edit a').trigger('click'); return false; }, 'keyup'); + Mousetrap.bind('e', function() { $('a.edit-post').trigger('click'); return false; }, 'keyup'); }); diff --git a/src/Views/post-view.phtml b/src/Views/post-view.phtml index 60d51e99..d3348248 100644 --- a/src/Views/post-view.phtml +++ b/src/Views/post-view.phtml @@ -4,6 +4,20 @@ LayoutHelper::addStylesheet('post-view.css'); LayoutHelper::addScript('post-view.js'); LayoutHelper::addStylesheet('../lib/tagit/jquery.tagit.css'); LayoutHelper::addScript('../lib/tagit/jquery.tagit.js'); + +$editPostPrivileges = [ + Privilege::EditPostSafety, + Privilege::EditPostTags, + Privilege::EditPostThumb, + Privilege::EditPostSource, +]; +$editPostPrivileges = array_fill_keys($editPostPrivileges, false); +foreach (array_keys($editPostPrivileges) as $privilege) +{ + if (PrivilegesHelper::confirm($privilege, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))) + $editPostPrivileges[$privilege] = true; +} +$canEditAnything = count(array_filter($editPostPrivileges)) > 0; ?>