diff --git a/plugins/ImageEncoder/templates/imageEncoder/imageEncoderView.html.twig b/plugins/ImageEncoder/templates/imageEncoder/imageEncoderView.html.twig index 8549bdd110..48af683f3b 100644 --- a/plugins/ImageEncoder/templates/imageEncoder/imageEncoderView.html.twig +++ b/plugins/ImageEncoder/templates/imageEncoder/imageEncoderView.html.twig @@ -1,8 +1,7 @@ -
-
- {{ attachment.getTitle() }} -
+ {{ attachment.getTitle() }} +
{{ attachment.getTitle() }} -
-
-
\ No newline at end of file + + diff --git a/public/assets/css/base.css b/public/assets/css/base.css index 5a2c3290f6..b041610d7c 100644 --- a/public/assets/css/base.css +++ b/public/assets/css/base.css @@ -274,26 +274,23 @@ html { .note-attachments { display: flex; } -.note-attachments > div { - margin: var(--small-size) 0 0 0; - border-radius: var(--unit-size); - background-color: var(--translucent); -} -.note-attachments > div figure { +.note-attachments > figure { display: flex; flex-direction: column; margin: 0; + border-radius: var(--unit-size); + background-color: var(--translucent); padding: var(--small-size); } -.note-attachments > div figure figcaption { +.note-attachments > figure figcaption { display: flex; padding-top: var(--small-size); } -.note-attachments > div figure img, -.note-attachments > div figure video { +.note-attachments > figure img, +.note-attachments > figure video { width: 100%; height: auto; } diff --git a/public/assets/css/settings/settings.css b/public/assets/css/settings/settings.css index 24f1986d8c..8697bd624f 100644 --- a/public/assets/css/settings/settings.css +++ b/public/assets/css/settings/settings.css @@ -10,43 +10,61 @@ background-blend-mode: multiply; } +.main-nav h1 { + margin-bottom: var(--unit-size); +} + +.main-nav hr { + all: unset; + display: block; + height: 2px; + background-image: linear-gradient(to right, var(--translucent-light), transparent 90%); + margin-top: var(--unit-size); + margin-bottom: var(--unit-size); +} + .main-nav ul { - margin-top: var(--main-size); + background-color: var(--translucent); + border: 2px solid var(--bg2); + border-radius: var(--unit-size); + padding: var(--unit-size); + box-sizing: border-box; } .main-nav ul li { font-size: var(--medium-size); - border-radius: var(--unit-size); box-sizing: border-box; padding: var(--unit-size); - margin-bottom: var(--small-size); - - background-color: var(--translucent); } .form { + display: flex; font-size: var(--main-size); border-radius: var(--unit-size); padding: var(--unit-size); box-sizing: border-box; +} - background-image: radial-gradient(ellipse at 10% 10%, var(--bg3), var(--accent-blue)), - url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAACUkpSEhoSMioyMjoyEgoRr6djFAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAU1JREFUKJEVUcl1xTAIpAVLSgECXIAYUoCAX0Bi919LlCPLm5ValiOUUe2+ZRVFuYpKXFsUX9aIp0V6GtC8VRhNL0X2fikvswhKrNDhes7pbpPkufFAtI0B76LEjfc2bgdHDk6RX4A/sjt6LCylfoYpNYYJx/9COhIugsjluzN9VGZ/Hnl51jIH2ba+Ywsy2RJCFdoDe8Obw61TXGAv+ewExMRJs7gd7YcimPuk42uMqY2VJ1fK+bDL32rb7kwok/la/u7Mrz7Xf0DTssSP2Btp1ZS0zw35tM/SsJKgWNLcRh+/th1QqntwtM3Tx0LNosoBYbM3qjJFiMeLsMH2i5BcQdU3n9sJHOE1Hoqn1GA/bm4s0YkVB/y4r0PbltF32FpljXmdlOOwbDvFWkoDYLppSG4pnM6UxX3Src1lhXeU36FOu3o+R2vNaHME/wESUl9/3zMniwAAAABJRU5ErkJggg==); - background-blend-mode: multiply; +.form .separator { + all: unset; + display: flex; + width: 2px; + background-image: linear-gradient(to bottom, var(--accent-blue), transparent 90%); + margin-right: var(--unit-size); +} + +.form form { + width: 100%; } .form #save { - margin-top: var(--main-size); - display: flex; flex-direction: column; font-size: var(--medium-size); - border-radius: var(--unit-size); padding: var(--unit-size); box-sizing: border-box; - background-color: var(--translucent); } .form #save div { @@ -68,6 +86,7 @@ border-radius: var(--unit-size); padding: var(--unit-size); box-sizing: border-box; + border: 2px solid var(--bg2); background-color: var(--translucent); } @@ -87,16 +106,17 @@ fill: var(--white); } +.section-title-settings section { + margin-top: var(--unit-size); +} + .section-title-settings summary:focus, .section-title-settings summary:hover { border-radius: var(--unit-size) !important; background: var(--white) !important; color: var(--bg1) !important; - transition: var(--cubic-transition); -} - -.section-title-settings summary:focus { padding: var(--unit-size) var(--small-size) var(--unit-size) var(--small-size) !important; + transition: var(--cubic-transition); } .section-title-settings summary:focus .icon-details-open, @@ -112,7 +132,6 @@ } .section-title-settings[open] .set-nav li:first-of-type { - margin-top: var(--unit-size); } .section-title-settings[open] .set-nav li:last-of-type { diff --git a/src/Controller/UserPanel.php b/src/Controller/UserPanel.php index 1526a6b4de..63dbad63c8 100644 --- a/src/Controller/UserPanel.php +++ b/src/Controller/UserPanel.php @@ -57,6 +57,28 @@ use Symfony\Component\HttpFoundation\Request; class UserPanel extends AbstractController { + /** + * Return main settings page forms + * + * @param Request $request + * + * @throws Exception + * + * @return array + */ + public function all_settings(Request $request) + { + $personal_form = $this->personal_info($request); + $account_form = $this->account($request); + $notifications_form = $this->notifications($request); + + return ['_template' => 'settings/base.html.twig', + 'prof' => $personal_form->createView(), + 'acc' => $account_form->createView(), + 'tabbed_forms_notify' => $notifications_form, + ]; + } + /** * Local user personal information panel */ @@ -67,17 +89,20 @@ class UserPanel extends AbstractController $extra = ['self_tags' => $user->getSelfTags()]; $form_definition = [ ['nickname', TextType::class, ['label' => _m('Nickname'), 'required' => true, 'help' => _m('1-64 lowercase letters or numbers, no punctuation or spaces.')]], - ['full_name', TextType::class, ['label' => _m('Full Name'), 'required' => false, 'help' => _m('A full name is required, if empty it will be set to your nickname.')]], - ['homepage', TextType::class, ['label' => _m('Homepage'), 'required' => false, 'help' => _m('URL of your homepage, blog, or profile on another site.')]], - ['bio', TextareaType::class, ['label' => _m('Bio'), 'required' => false, 'help' => _m('Describe yourself and your interests.')]], - ['location', TextType::class, ['label' => _m('Location'), 'required' => false, 'help' => _m('Where you are, like "City, State (or Region), Country".')]], - ['self_tags', TextType::class, ['label' => _m('Self Tags'), 'required' => false, 'transformer' => ArrayTransformer::class, 'help' => _m('Tags for yourself (letters, numbers, -, ., and _), comma- or space-separated.')]], - ['save', SubmitType::class, ['label' => _m('Save')]], + ['full_name', TextType::class, ['label' => _m('Full Name'), 'required' => false, 'help' => _m('A full name is required, if empty it will be set to your nickname.')]], + ['homepage', TextType::class, ['label' => _m('Homepage'), 'required' => false, 'help' => _m('URL of your homepage, blog, or profile on another site.')]], + ['bio', TextareaType::class, ['label' => _m('Bio'), 'required' => false, 'help' => _m('Describe yourself and your interests.')]], + ['location', TextType::class, ['label' => _m('Location'), 'required' => false, 'help' => _m('Where you are, like "City, State (or Region), Country".')]], + ['self_tags', TextType::class, ['label' => _m('Self Tags'), 'required' => false, 'transformer' => ArrayTransformer::class, 'help' => _m('Tags for yourself (letters, numbers, -, ., and _), comma- or space-separated.')]], + ['save', SubmitType::class, ['label' => _m('Save')]], ]; - $extra_step = function ($data, $extra_args) use ($user) { $user->setNickname($data['nickname']); }; + $extra_step = function ($data, $extra_args) use ($user) { + $user->setNickname($data['nickname']); + }; $form = Form::handle($form_definition, $request, $user, $extra, $extra_step, [['self_tags' => $extra['self_tags']]]); - return ['_template' => 'settings/profile.html.twig', 'prof' => $form->createView()]; + return $form; + //return ['_template' => 'settings/profile.html.twig', 'prof' => $form->createView()]; } /** @@ -88,17 +113,18 @@ class UserPanel extends AbstractController $user = Common::user(); $form_definition = [ ['outgoing_email', TextType::class, ['label' => _m('Outgoing email'), 'required' => true, 'help' => _m('Change the email we use to contact you')]], - ['incoming_email', TextType::class, ['label' => _m('Incoming email'), 'required' => true, 'help' => _m('Change the email you use to contact us (for posting, for instance)')]], - ['password', TextType::class, ['label' => _m('Password'), 'required' => false, 'help' => _m('Change your password'), 'attr' => ['placeholder' => '********']]], - ['old_password', TextType::class, ['label' => _m('Old password'), 'required' => false, 'help' => _m('Enter your old password for verification'), 'attr' => ['placeholder' => '********']]], - ['language', LanguageType::class, ['label' => _m('Language'), 'required' => false, 'help' => _m('Your preferred language')]], - ['phone_number', PhoneNumberType::class, ['label' => _m('Phone number'), 'required' => false, 'help' => _m('Your phone number'), 'data_class' => null]], - ['save', SubmitType::class, ['label' => _m('Save')]], + ['incoming_email', TextType::class, ['label' => _m('Incoming email'), 'required' => true, 'help' => _m('Change the email you use to contact us (for posting, for instance)')]], + ['password', TextType::class, ['label' => _m('Password'), 'required' => false, 'help' => _m('Change your password'), 'attr' => ['placeholder' => '********']]], + ['old_password', TextType::class, ['label' => _m('Old password'), 'required' => false, 'help' => _m('Enter your old password for verification'), 'attr' => ['placeholder' => '********']]], + ['language', LanguageType::class, ['label' => _m('Language'), 'required' => false, 'help' => _m('Your preferred language')]], + ['phone_number', PhoneNumberType::class, ['label' => _m('Phone number'), 'required' => false, 'help' => _m('Your phone number'), 'data_class' => null]], + ['save', SubmitType::class, ['label' => _m('Save')]], ]; $form = Form::handle($form_definition, $request, $user); - return ['_template' => 'settings/account.html.twig', 'acc' => $form->createView()]; + return $form; + //return ['_template' => 'settings/account.html.twig', 'acc' => $form->createView()]; } /** @@ -157,10 +183,13 @@ class UserPanel extends AbstractController $tabbed_forms[$transport_name] = Form::create($f); } - $tabbed_forms = F\map($tabbed_forms, function ($f) { return $f->createView(); }); - return [ + $tabbed_forms = F\map($tabbed_forms, function ($f) { + return $f->createView(); + }); + return $tabbed_forms; + /*return [ '_template' => 'settings/notifications.html.twig', 'tabbed_forms' => $tabbed_forms, - ]; + ];*/ } } diff --git a/src/Routes/Main.php b/src/Routes/Main.php index 37ab68477c..1118ee7496 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -65,9 +65,10 @@ abstract class Main } // Settings pages - $r->connect('settings', '/settings', RedirectController::class, ['defaults' => ['route' => 'settings_personal_info']]); - foreach (['personal_info', 'notifications', 'account'] as $s) { - $r->connect('settings_' . $s, '/settings/' . $s, [C\UserPanel::class, $s]); - } + //$r->connect('settings', '/settings', RedirectController::class, ['defaults' => ['route' => 'settings']]); + $r->connect('settings', '/settings/', [C\UserPanel::class, 'all_settings']); + /*foreach (['personal_info', 'notifications', 'account'] as $s) { + $r->connect('settings', '/settings/', [C\UserPanel::class, $s]); + }*/ } } diff --git a/templates/actor/actor.html.twig b/templates/actor/actor.html.twig deleted file mode 100644 index 9cf2b332ff..0000000000 --- a/templates/actor/actor.html.twig +++ /dev/null @@ -1,31 +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 %} -
-
-
diff --git a/templates/attachments/show.html.twig b/templates/attachments/show.html.twig index 72f7178776..0ef4d35f95 100644 --- a/templates/attachments/show.html.twig +++ b/templates/attachments/show.html.twig @@ -12,10 +12,7 @@ {% block body %}
-
-

{{ title | escape }}

- {{ 'Download link' | trans }} - {% include '/attachments/view.html.twig' with {'attachment': attachment} only %} -
+ {{ 'Download link' | trans }} + {% include '/attachments/view.html.twig' with {'attachment': attachment} only %}
{% endblock body %} \ No newline at end of file diff --git a/templates/network/actors.html.twig b/templates/network/actors.html.twig deleted file mode 100644 index 9d022bcf90..0000000000 --- a/templates/network/actors.html.twig +++ /dev/null @@ -1,117 +0,0 @@ -{% extends 'stdgrid.html.twig' %} - -{% block meta %} - {{ parent() }} -{% endblock %} - -{% block title %}Actors{% endblock %} - -{% block stylesheets %} - {{ parent() }} - - - -{% endblock %} - -{% block header %} - {{ parent() }} -{% endblock %} - -{% block left %} - {{ parent() }} -{% endblock %} - -{% block body %} -
- {% if post_form is defined %} - {{ form_start(post_form) }} -
-
-
- {{ form_label(post_form.to) }} -
-
- {{ form_widget(post_form.to) }} -
-
-
-
-
- {{ form_row(post_form.visibility) }} -
-
- {% for tab in tabs %} - {{ tab['title'] }} - {% endfor %} -
-
-
-
- {{ form_row(post_form.content) }} -
-
-
-
- {{ form_widget(post_form.attachments) }} - -
-
- {{ form_row(post_form.post) }} -
-
-
-
- {{ form_end(post_form) }} - {% endif %} -
- - -
-
-{% endblock body %} - -{% block javascripts %}{% endblock %} \ No newline at end of file diff --git a/templates/network/public.html.twig b/templates/network/public.html.twig index 0d29656c9f..5674c2a690 100644 --- a/templates/network/public.html.twig +++ b/templates/network/public.html.twig @@ -1,9 +1,5 @@ {% extends 'stdgrid.html.twig' %} -{% block meta %} - {{ parent() }} -{% endblock %} - {% block title %}Welcome!{% endblock %} {% block stylesheets %} @@ -11,14 +7,6 @@ {% endblock %} -{% block header %} - {{ parent() }} -{% endblock %} - -{% block left %} - {{ parent() }} -{% endblock %} - {% block body %}
diff --git a/templates/settings/account.html.twig b/templates/settings/account.html.twig index e40271e579..6f35d45110 100644 --- a/templates/settings/account.html.twig +++ b/templates/settings/account.html.twig @@ -1,12 +1,6 @@ -{% extends 'settings/base.html.twig' %} - -{% block title %}Account Settings{% endblock %} - -{% block page_name %}Account{% endblock %} - -{% block form %} +{% block form_account %}
-

Settings / Account

+
{{ form(acc) }}
-{% endblock form %} +{% endblock %} diff --git a/templates/settings/account/bak.html.twig b/templates/settings/account/bak.html.twig deleted file mode 100644 index 2e81972bb2..0000000000 --- a/templates/settings/account/bak.html.twig +++ /dev/null @@ -1,53 +0,0 @@ -{% extends 'base.html.twig' %} -{% block stylesheets %} - {{ parent() }} - - - -{% endblock %} - -{% block nav %} - - - -{% endblock %} - -{% block body %} -
- {{ form(form) }} -
-{% endblock %} \ No newline at end of file diff --git a/templates/settings/account/email.html.twig b/templates/settings/account/email.html.twig deleted file mode 100644 index 2e81972bb2..0000000000 --- a/templates/settings/account/email.html.twig +++ /dev/null @@ -1,53 +0,0 @@ -{% extends 'base.html.twig' %} -{% block stylesheets %} - {{ parent() }} - - - -{% endblock %} - -{% block nav %} - - - -{% endblock %} - -{% block body %} -
- {{ form(form) }} -
-{% endblock %} \ No newline at end of file diff --git a/templates/settings/account/pass.html.twig b/templates/settings/account/pass.html.twig deleted file mode 100644 index 2e81972bb2..0000000000 --- a/templates/settings/account/pass.html.twig +++ /dev/null @@ -1,53 +0,0 @@ -{% extends 'base.html.twig' %} -{% block stylesheets %} - {{ parent() }} - - - -{% endblock %} - -{% block nav %} - - - -{% endblock %} - -{% block body %} -
- {{ form(form) }} -
-{% endblock %} \ No newline at end of file diff --git a/templates/settings/base.html.twig b/templates/settings/base.html.twig index 1fb2354e5d..2e1d3910da 100644 --- a/templates/settings/base.html.twig +++ b/templates/settings/base.html.twig @@ -1,4 +1,4 @@ -{% extends 'stdgrid.html.twig' %} +{% extends '/stdgrid.html.twig' %} {% block meta %} {{ parent() }} @@ -18,6 +18,7 @@ {% block body %}
+ - -
- - {% block form %} - {% endblock %}
{% endblock body %} diff --git a/templates/settings/notifications.html.twig b/templates/settings/notifications.html.twig index b86de83a20..600e3b84df 100644 --- a/templates/settings/notifications.html.twig +++ b/templates/settings/notifications.html.twig @@ -1,26 +1,17 @@ -{% extends 'settings/base.html.twig' %} - -{% block title %}Notification Settings{% endblock %} - -{% block stylesheets %} - {{ parent() }} -{% endblock %} - -{% block form %} +{% block form_notify %}
-

Settings / Notifications

- +
-{% endblock form %} \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/settings/profile.html.twig b/templates/settings/profile.html.twig index 611f3f14cc..14e0d9c189 100644 --- a/templates/settings/profile.html.twig +++ b/templates/settings/profile.html.twig @@ -1,12 +1,6 @@ -{% extends 'settings/base.html.twig' %} - -{% block title %}Profile Settings{% endblock %} - -{% block form %} +{% block form_profile %}
-

Settings / Profile

- +
{{ form(prof) }}
-{% endblock form %} - +{% endblock %} \ No newline at end of file diff --git a/templates/sidepanel/left/left.html.twig b/templates/sidepanel/left/left.html.twig index 3074b1a6d2..0ae0a1727c 100644 --- a/templates/sidepanel/left/left.html.twig +++ b/templates/sidepanel/left/left.html.twig @@ -4,12 +4,12 @@ {% if app.user %}