make reply-to link depending on screen-width

* on small/smartphone-screens show "reply to" link above the posting and
  an eventual "shared by" link in a second line.
* on middle/tablet-screens show "reply-to" and "shared-by" link in one
  line above the posting, divided by a dot.
* on large screens show reply-to-link next to the time/date-link when
  posting was posted.

the first to positions are better for users with thick fingers on
smartphones. (like me)

Change "in reply to" to "is reply to". Sounds better.
This commit is contained in:
Jakobus Schürz 2023-10-09 01:40:47 +02:00
parent bffbde4639
commit 622cdeaad6
2 changed files with 12 additions and 4 deletions

View File

@ -502,7 +502,7 @@ class Post
$tmp_item = [
'parentguid' => $parent_guid,
'isreplyto' => DI::l10n()->t('in reply to %s', $parent_username),
'isreplyto' => DI::l10n()->t('is reply to %s', $parent_username),
'template' => $this->getTemplate(),
'type' => implode('', array_slice(explode('/', $item['verb']), -1)),
'comment_firstcollapsed' => false,

View File

@ -60,9 +60,10 @@ as the value of $top_child_total (this is done at the end of this file)
{{/if}}
<div class="media {{$item.shiny}}">
{{if $item.parentguid}}
<a id="btn-{{$item.id}}" class="time" href="javascript:;" onclick="scrollToItem('item-' + '{{$item.parentguid}}');">{{$item.isreplyto}}</a>
{{if $item.reshared}}<span class="hidden-xs">&#x2022;</span>{{/if}}
<br class="visible-xs">
<span class="visible-sm-inline visible-xs wall-item-responses">
<i class="fa fa-reply" aria-hidden="true"></i> <a id="btn-{{$item.id}}" class="" href="javascript:;" onclick="scrollToItem('item-' + '{{$item.parentguid}}');">{{$item.isreplyto}}</a>
{{if $item.reshared}}<i class="hidden-xs">&#x2022;</i>{{/if}}
</span>
{{/if}}
{{if $item.reshared}}
<span class="wall-item-announce wall-item-responses" id="wall-item-announce-{{$item.id}}"><i class="fa fa-retweet" aria-hidden="true"></i> {{$item.reshared nofilter}}</span>
@ -220,6 +221,13 @@ as the value of $top_child_total (this is done at the end of this file)
<span class="text-muted">
</h5>
<small>
{{if $item.parentguid}}
<i class="hidden-xs hidden-sm">
<a id="btn-{{$item.id}}" class="time" href="javascript:;" onclick="scrollToItem('item-' + '{{$item.parentguid}}');"><i class="fa fa-reply" aria-hidden="true"></i> {{$item.isreplyto}}</a>
<span class="hidden-xs">&#x2022;</span>
<!--br class="visible-xs"-->
</i>
{{/if}}
<a href="{{$item.plink.orig}}">
<time class="time" title="{{$item.localtime}}" data-toggle="tooltip" datetime="{{$item.utc}}">{{$item.ago}}</time>
</a>