diff --git a/public/assets/css/network/public.css b/public/assets/css/network/public.css index 111f107c0f..baa2da42e8 100644 --- a/public/assets/css/network/public.css +++ b/public/assets/css/network/public.css @@ -413,13 +413,52 @@ } /*actors stream*/ +.actors{ + display: flex; + flex-wrap: wrap; +} + +.notes-wrap .timeline .actors > div { + margin: var(--unit-size) var(--unit-size) 0 var(--unit-size); + border-radius: var(--unit-size); + width: 100%; +} +.notes-wrap .timeline .actors > div:last-child { + margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size); +} + +.actor{ + display: flex; + flex-wrap: wrap; + border: solid 2px var(--accent-low); + border-radius: var(--unit-size); + box-shadow: var(--shadow); + margin-bottom: var(--unit-size); +} + +.actor-content { + order: 3; + word-break: break-word; + padding: var(--small-size); + border-radius: 0 0 var(--unit-size) var(--unit-size); + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.actor-info{ + order: 3; + display: flex; + flex-wrap: wrap; +} + .actor-bio{ order: 3; word-break: break-word; padding: var(--small-size); border-radius: 0 0 var(--unit-size) var(--unit-size); - width: 70%; display: flex; flex-wrap: wrap; - justify-content: right; + justify-content: right; } \ No newline at end of file diff --git a/public/assets/css/network/public_mid.css b/public/assets/css/network/public_mid.css index 302fd57401..0f49cf2386 100644 --- a/public/assets/css/network/public_mid.css +++ b/public/assets/css/network/public_mid.css @@ -412,12 +412,51 @@ } /*actors stream*/ +.actors{ + display: flex; + flex-wrap: wrap; +} + +.notes-wrap .timeline .actors > div { + margin: var(--unit-size) var(--unit-size) 0 var(--unit-size); + border-radius: var(--unit-size); + width: 100%; +} +.notes-wrap .timeline .actors > div:last-child { + margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size); +} + +.actor{ + display: flex; + flex-wrap: wrap; + border: solid 2px var(--accent-low); + border-radius: var(--unit-size); + box-shadow: var(--shadow); + margin-bottom: var(--unit-size); +} + +.actor-content { + order: 3; + word-break: break-word; + padding: var(--small-size); + border-radius: 0 0 var(--unit-size) var(--unit-size); + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.actor-info{ + order: 3; + display: flex; + flex-wrap: wrap; +} + .actor-bio{ order: 3; word-break: break-word; padding: var(--small-size); border-radius: 0 0 var(--unit-size) var(--unit-size); - width: 70%; display: flex; flex-wrap: wrap; justify-content: right; diff --git a/public/assets/css/network/public_small.css b/public/assets/css/network/public_small.css index 37fe33a143..2c7f71611e 100644 --- a/public/assets/css/network/public_small.css +++ b/public/assets/css/network/public_small.css @@ -411,12 +411,51 @@ } /*actors stream*/ +.actors{ + display: flex; + flex-wrap: wrap; +} + +.notes-wrap .timeline .actors > div { + margin: var(--unit-size) var(--unit-size) 0 var(--unit-size); + border-radius: var(--unit-size); + width: 100%; +} +.notes-wrap .timeline .actors > div:last-child { + margin: var(--unit-size) var(--unit-size) var(--unit-size) var(--unit-size); +} + +.actor{ + display: flex; + flex-wrap: wrap; + border: solid 2px var(--accent-low); + border-radius: var(--unit-size); + box-shadow: var(--shadow); + margin-bottom: var(--unit-size); +} + +.actor-content { + order: 3; + word-break: break-word; + padding: var(--small-size); + border-radius: 0 0 var(--unit-size) var(--unit-size); + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.actor-info{ + order: 3; + display: flex; + flex-wrap: wrap; +} + .actor-bio{ order: 3; word-break: break-word; padding: var(--small-size); border-radius: 0 0 var(--unit-size) var(--unit-size); - width: 70%; display: flex; flex-wrap: wrap; justify-content: right; diff --git a/src/Controller/Network.php b/src/Controller/Network.php index 7ea60dcbf3..dd3c4c0eac 100644 --- a/src/Controller/Network.php +++ b/src/Controller/Network.php @@ -141,21 +141,10 @@ END; public function actors(Request $request) { - if (Common::isLoggedIn()) { - $user_id = Common::ensureLoggedIn()->getId(); - - return [ - '_template' => 'network/actors.html.twig', - 'actors' => DB::dql('select a from App\Entity\GSActor a ' . - 'where a.id != :id ' . - 'order by a.created DESC', ['id' => $user_id]), - ]; - } else { - return [ - '_template' => 'network/actors.html.twig', - 'actors' => DB::dql('select a from App\Entity\GSActor a ' . - 'order by a.created DESC'), - ]; - } + return [ + '_template' => 'network/actors.html.twig', + 'actors' => DB::dql('select a from App\Entity\GSActor a ' . + 'order by a.created DESC'), + ]; } } diff --git a/templates/actor/actor.html.twig b/templates/actor/actor.html.twig new file mode 100644 index 0000000000..9cf2b332ff --- /dev/null +++ b/templates/actor/actor.html.twig @@ -0,0 +1,31 @@ +
+
+
+ {% set nickname = actor.getNickname() %} +
+ {{ nickname }}'s avatar +
+
+ {{ nickname }} + {% set actor_tags = actor.getSelfTags() %} +
+ {% if actor_tags %} + {% for tag in actor_tags %} + #{{ tag }} + {% endfor %} + {% else %} + {{ '(No tags)' | trans }} + {% endif %} +
+
+
+ {% set actor_bio = actor.getBio() %} +
+ {% if actor_bio %} +

{{ actor_bio }}

+ {% else %} +

{{ '(No bio)' | trans }}

+ {% endif %} +
+
+
diff --git a/templates/network/actors.html.twig b/templates/network/actors.html.twig index 4c843b3add..bc4e6a96fd 100644 --- a/templates/network/actors.html.twig +++ b/templates/network/actors.html.twig @@ -96,10 +96,10 @@
-
+
{% if actors is defined and actors is not empty %} {% for actor in actors %} - {% include '/note/actor.html.twig' with {'actor': actor, 'have_user': have_user} only %} + {% include '/actor/actor.html.twig' with {'actor': actor, 'have_user': have_user} only %} {% endfor %} {% else %}

{% trans %}No actors here.{% endtrans %}

diff --git a/templates/note/actor.html.twig b/templates/note/actor.html.twig deleted file mode 100644 index e6c4661545..0000000000 --- a/templates/note/actor.html.twig +++ /dev/null @@ -1,29 +0,0 @@ -
-
- {% set nickname = actor.getNickname() %} -
- {{ nickname }}'s avatar -
-
- {{ nickname }} - {% set actor_tags = actor.getSelfTags() %} -
- {% if actor_tags %} - {% for tag in actor_tags %} - #{{ tag }} - {% endfor %} - {% else %} - {{ '(No tags)' | trans }} - {% endif %} -
-
- {% set actor_bio = actor.getBio() %} -
- {% if actor_bio %} -

{{ actor_bio }}

- {% else %} -

{{ '(No bio)' | trans }}

- {% endif %} -
-
-