[PLUGINS][Settings] Removed unused templates. Directory plugin templates now using actual templates. Notification settings using details element now.

This commit is contained in:
Eliseu Amaro 2021-09-17 20:33:02 +01:00 committed by Diogo Peralta Cordeiro
parent d6f31d102a
commit e4b650be46
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
14 changed files with 192 additions and 326 deletions

View File

@ -1,31 +1,37 @@
<div class="actor">
<div class="actor-content">
<div class="actor-info">
{% set nickname = actor.getNickname() %}
<div class="actor-avatar">
<img class="icon icon-avatar" src="{{ actor.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">
</div>
<div class="actor-nickname-and-tags">
<b id="nick">{{ nickname }}</b>
{% set actor_tags = actor.getSelfTags() %}
<div class="tags">
{% if actor_tags %}
{% for tag in actor_tags %}
<a href='#'><i> #{{ tag }} </i></a>
{% endfor %}
{% else %}
<i> {{ '(No tags)' | trans }} </i>
{% endif %}
</div>
</div>
</div>
{% set actor_bio = actor.getBio() %}
<div class="actor-bio">
{% if actor_bio %}
<p>{{ actor_bio }}</p>
{% else %}
<p>{{ '(No bio)' | trans }}</p>
{% endif %}
{% extends 'stdgrid.html.twig' %}
{% set nickname = note.getActorNickname() %}
{% block title %}{{ nickname }}'s profile{% endblock %}
{% block body %}
<section class="section-widget section-widget-padded">
<div class="section-title">
<img class="icon icon-avatar" src="{{ actor.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">{{ nickname }}
</div>
<div class="actor-nickname-and-tags">
{% set actor_tags = actor.getSelfTags() %}
<div class="tags">
{% if actor_tags %}
{% for tag in actor_tags %}
<a href='#'><i> #{{ tag }} </i></a>
{% endfor %}
{% else %}
<i> {{ '(No tags)' | trans }} </i>
{% endif %}
</div>
</div>
</div>
{% set actor_bio = actor.getBio() %}
<div class="actor-bio">
{% if actor_bio %}
<p>{{ actor_bio }}</p>
{% else %}
<p>{{ '(No bio)' | trans }}</p>
{% endif %}
</div>
</section>
{% endblock body %}

View File

@ -1,119 +1,17 @@
{% extends 'stdgrid.html.twig' %}
{% block meta %}
{{ parent() }}
{% endblock %}
{% block title %}Actors{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public.css') }}"
media="screen and (min-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_mid.css') }}"
media="screen and (max-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_small.css') }}"
media="screen and (max-width: 750px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/directory/actors.css') }}">
{% endblock %}
{% block header %}
{{ parent() }}
{% endblock %}
{% block left %}
{{ parent() }}
{% endblock %}
{% block body %}
<div class="content">
{% if post_form is defined %}
{{ form_start(post_form) }}
<div class="create-notice">
<div class="target">
<div class="target-top">
{{ form_label(post_form.to) }}
</div>
<div class="target-bot">
{{ form_widget(post_form.to) }}
</div>
</div>
<div class="create-right">
<div class="create-top-right">
<div class="scope">
{{ form_row(post_form.visibility) }}
</div>
<div class="tabs">
{% for tab in tabs %}
<a href={{ path(tab['href']) }}>{{ tab['title'] }}</a>
{% endfor %}
</div>
</div>
<div class="input-wrapper">
<div class="content-input">
{{ form_row(post_form.content) }}
</div>
</div>
<div class="notice-options">
<div class="attachments">
{{ form_widget(post_form.attachments) }}
<label for="{{ post_form.attachments.vars.id }}">
{{ icon('attach', 'icon icon-attach') | raw }}
</label>
</div>
<div class="post">
{{ form_row(post_form.post) }}
</div>
</div>
</div>
</div>
{{ form_end(post_form) }}
<section class="section-widget section-widget-padded">
<div class="actors">
{% if actors is defined and actors is not empty %}
{% for actor in actors %}
{% include 'directory/actor.html.twig' with {'actor': actor, 'have_user': have_user} only %}
{% endfor %}
{% else %}
<h1>{% trans %}No actors here.{% endtrans %}</h1>
{% endif %}
<div class="main">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public', 'main_all', "home_all") }}'>Timeline</a>
</li>
</ul>
</nav>
<div class="nav-content">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public') }}'>Public</a>
</li>
{% if user_nickname is defined %}
<li>
<a href="{{ path("home_all", {'nickname' : user_nickname}) }}" class='hover-effect {{ active("home_all") }}'>Home</a>
</li>
{% endif %}
<li>
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
</li>
{% if main_nav_tabs is defined %}
{% for tab in main_nav_tabs %}
<li>
<a href="{{ path(tab['route']) }}" class='hover-effect {{ active(tab['route']) }}' >{{ tab['title'] }}</a>
</li>
{% endfor %}
{% endif %}
</ul>
</nav>
<div class="timeline">
<div class="actors">
{% if actors is defined and actors is not empty %}
{% for actor in actors %}
{% include 'directory/actor.html.twig' with {'actor': actor, 'have_user': have_user} only %}
{% endfor %}
{% else %}
<h1>{% trans %}No actors here.{% endtrans %}</h1>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endblock body %}
{% block javascripts %}{% endblock %}
</section>
{% endblock body %}

View File

@ -1,8 +1,15 @@
{% extends 'stdgrid.html.twig' %}
{% set nickname = group.getNickname() %}
{% block title %}{{ nickname }}'s page{% endblock %}
{% block body %}
<div class="group">
<div class="group-content">
<a href="{{ group.getHomepage() }}">
<div class="group-info">
{% set nickname = group.getNickname() %}
<div class="group-img">
<img class="icon icon-group" src="{{ group.getStreamLogo() }}" alt="{{ nickname }}'s logo">
</div>
@ -21,3 +28,4 @@
</div>
</div>
</div>
{% endblock body %}

View File

@ -1,117 +1,17 @@
{% extends 'stdgrid.html.twig' %}
{% block meta %}
{{ parent() }}
{% endblock %}
{% block title %}Actors{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public.css') }}"
media="screen and (min-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_mid.css') }}"
media="screen and (max-width: 1300px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_small.css') }}"
media="screen and (max-width: 750px)">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/directory/groups.css') }}">
{% endblock %}
{% block header %}
{{ parent() }}
{% endblock %}
{% block left %}
{{ parent() }}
{% endblock %}
{% block title %}Groups{% endblock %}
{% block body %}
<div class="content">
{% if post_form is defined %}
{{ form_start(post_form) }}
<div class="create-notice">
<div class="target">
<div class="target-top">
{{ form_label(post_form.to) }}
</div>
<div class="target-bot">
{{ form_widget(post_form.to) }}
</div>
</div>
<div class="create-right">
<div class="create-top-right">
<div class="scope">
{{ form_row(post_form.visibility) }}
</div>
<div class="tabs">
{% for tab in tabs %}
<a href={{ path(tab['href']) }}>{{ tab['title'] }}</a>
{% endfor %}
</div>
</div>
<div class="input-wrapper">
<div class="content-input">
{{ form_row(post_form.content) }}
</div>
</div>
<div class="notice-options">
<div class="attachments">
{{ form_widget(post_form.attachments) }}
<label for="{{ post_form.attachments.vars.id }}">
{{ icon('attach', 'icon icon-attach') | raw }}
</label>
</div>
<div class="post">
{{ form_row(post_form.post) }}
</div>
</div>
</div>
</div>
{{ form_end(post_form) }}
{% endif %}
<div class="main">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public', 'main_all', "home_all") }}'>Timeline</a>
</li>
</ul>
</nav>
<div class="nav-content">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public') }}'>Public</a>
</li>
{% if user_nickname is defined %}
<li>
<a href="{{ path("home_all", {'nickname' : user_nickname}) }}" class='hover-effect {{ active("home_all") }}'>Home</a>
</li>
{% endif %}
<li>
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
</li>
{% for tab in main_nav_tabs %}
<li>
<a href="{{ path(tab['route']) }}" class='hover-effect {{ active(tab['route']) }}' >{{ tab['title'] }}</a>
</li>
{% endfor %}
</ul>
</nav>
<div class="timeline">
<div class="groups">
{% if groups is defined and groups is not empty %}
{% for group in groups %}
{% include 'directory/group.html.twig' with {'group': group, 'have_user': have_user} only %}
{% endfor %}
{% else %}
<h1>{% trans %}No groups here.{% endtrans %}</h1>
{% endif %}
</div>
</div>
</div>
<div class="timeline">
<div class="groups">
{% if groups is defined and groups is not empty %}
{% for group in groups %}
{% include 'directory/group.html.twig' with {'group': group, 'have_user': have_user} only %}
{% endfor %}
{% else %}
<h1>{% trans %}No groups here.{% endtrans %}</h1>
{% endif %}
</div>
</div>
{% endblock body %}
{% block javascripts %}{% endblock %}
{% endblock body %}

File diff suppressed because one or more lines are too long

View File

@ -1,27 +0,0 @@
.main {
font-size: var(--medium-size);
border: none !important;
}
.note {
margin-bottom: 0 !important;
}
#save {
display: flex;
}
#save div:nth-of-type(1) {
padding: var(--unit-size);
}
#save div:nth-of-type(1) textarea {
padding: var(--unit-size);
border-radius: var(--unit-size);
background-color: var(--bg1);
font-size: var(--unit-size);
width: 100%;
box-sizing: border-box;
}
#save div:nth-of-type(2)

View File

@ -43,6 +43,7 @@ details summary > * {
margin: unset;
padding: unset;
}
details > summary {
list-style: none;
}
@ -100,13 +101,16 @@ p {
font-weight: 400;
margin: unset;
}
p:first-line {
padding-left: var(--small-size);
}
p:first-line {
margin-top: 0;
margin-bottom: 10px;
}
p:not(:first-line) {
margin-top: 10px;
margin-bottom: 10px;
@ -135,6 +139,7 @@ button {
float: right !important;
align-self: end !important;
}
input {
cursor: text !important;
}
@ -144,11 +149,13 @@ input {
all: unset;
padding: 5px 10px;
}
button,
select,
input:not([type=text]) {
cursor: pointer !important;
}
input:not([type=button], [type=color], [type=checkbox], [type=radio]) {
cursor: auto !important;
}
@ -159,12 +166,11 @@ input:not([type=button], [type=color], [type=checkbox], [type=radio]) {
}
input[type=checkbox] {
all: unset;
display: inline-block;
display: inline-flex;
width: 1em;
height: 1em;
}
input[type=radio] {
all: unset;
cursor: pointer !important;

View File

@ -104,6 +104,10 @@
.section-title-settings summary {
padding: var(--unit-size) var(--small-size);
}
.section-title-settings summary h3:first-letter,
.section-title-settings summary em:first-letter {
text-transform: uppercase;
}
.section-title-settings summary:focus .icon-details-open,
.section-title-settings summary:hover .icon-details-open {

View File

@ -0,0 +1,55 @@
{% extends 'stdgrid.html.twig' %}
{% set id = gsactor.id %}
{% set nick = gsactor.nickname %}
{# TODO: how to get avatar in here? Tags and rest of profile info? #}
{% set avatar = gsactor.nickname %}
{% block title %}{{ nick }}'s profile{% endblock %}
{% block body %}
<section class="section-widget section-widget-padded">
<div class="section-title">
<img class="icon icon-avatar" src="{{ avatar }}" alt="{{ nick }}'s avatar">{{ nick }}
</div>
{#
<div class="actor-nickname-and-tags">
{% set actor_tags = actor.getSelfTags() %}
<div class="tags">
{% if actor_tags %}
{% for tag in actor_tags %}
<a href='#'><i> #{{ tag }} </i></a>
{% endfor %}
{% else %}
<i> {{ '(No tags)' | trans }} </i>
{% endif %}
</div>
</div>
{% set actor_bio = actor.getBio() %}
<div class="actor-bio">
{% if actor_bio %}
<p>{{ actor_bio }}</p>
{% else %}
<p>{{ '(No bio)' | trans }}</p>
{% endif %}
</div>#}
</section>
<main class="timeline" tabindex="0" role="feed">
<div class="h-feed hfeed notes">
{% if notes is defined and notes is not empty %}
{% for conversation in notes %}
{% include '/note/view.html.twig' with {'note': conversation['note'], 'have_user': have_user, 'replies': conversation['replies']} only %}
<hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
{% endfor %}
{% else %}
<div id="empty-notes"><h1>{% trans %}No notes here.{% endtrans %}</h1></div>
{% endif %}
</div>
</main>
{% endblock body %}

View File

@ -2,11 +2,6 @@
{% block title %}{{ 'Welcome! - Public Timeline' | trans }}{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public.css') }}">
{% endblock %}
{% block body %}
{# Backwards compatibility with hAtom 0.1 #}
<main class="timeline" tabindex="0" role="feed">

View File

@ -1,17 +1,25 @@
{% block form_notify %}
<div class='form'>
<div class="separator"></div>
<ul>
{% for transport, form_transport in tabbed_forms_notify %}
<input type="radio" id="toggle-{{ transport }}" name="tabs"
value="toggle-{{ transport }}" {% if transport == "email" %} checked {% endif %}>
<label for="toggle-{{ transport }}" id='tabs'>
{{ transport }}
</label>
<div id="form_{{ transport }}" class='form'>
{{ form(form_transport) }}
</div>
{% endfor %}
</ul>
</div>
<section>
<nav class='set-nav'>
<ul>
{% for transport, form_transport in tabbed_forms_notify %}
<li>
<details class="section-title-settings">
<summary>
<h3>{{ transport }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}</h3>
<em>{{ transport }}'s notification options.</em>
</summary>
<div id="form_{{ transport }}" class='form'>
{{ form(form_transport) }}
</div>
</details>
</li>
<hr>
{% endfor %}
</ul>
</nav>
</section>
{% endblock %}