move the item action links to the top

there must be no space between between the <p class="preview"> and the $item['content']. The CSS pseudo-class :empty does not consider a paragraph with whitespaces as empty.  The Selectors Level 4 Draft[1] as of 13 September 2015, mentions the CSS pseudo-class :blank which will do so. But it's a draft and not yet implemented by the majority of the browsers.

[1] https://drafts.csswg.org/selectors-4/#the-blank-pseudo
This commit is contained in:
Mathias Kresin 2015-12-09 20:26:21 +01:00
parent 0cd4438574
commit 0c5560cdc6
2 changed files with 8 additions and 12 deletions

View File

@ -575,13 +575,11 @@ nav .active a {
/* item preview full-content */
.preview-full-content {
overflow: auto;
margin-bottom: 10px;
color: #666;
}
.preview-full-content p {
.preview-full-content p, p.preview:not(:empty) {
margin-top: 15px;
margin-bottom: 15px;
}
.preview-full-content img {

View File

@ -22,15 +22,6 @@
><?= Helper\escape($item['title']) ?></a>
<?php endif ?>
</h2>
<?php if ($display_mode === 'full'): ?>
<div class="preview-full-content" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<?= $item['content'] ?>
</div>
<?php else: ?>
<p class="preview" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?>
</p>
<?php endif ?>
<ul class="item-menu">
<?php if ($menu !== 'feed-items'): ?>
<li>
@ -77,4 +68,11 @@
<?= \Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?>
<?= \Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?>
</ul>
<?php if ($display_mode === 'full'): ?>
<div class="preview-full-content" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>>
<?= $item['content'] ?>
</div>
<?php else: ?>
<p class="preview" <?= Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>><?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?></p>
<?php endif ?>
</article>