From f7fce001c44d1027802efc3958b23ebb4457ec9a Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 1 Jan 2022 17:25:57 +0700 Subject: [PATCH] simplify the subscribe buttons --- tubearchivist/home/forms.py | 6 ++--- .../home/templates/home/channel.html | 17 +++++++------- .../home/templates/home/playlist.html | 17 +++++++------- tubearchivist/home/views.py | 2 +- tubearchivist/static/css/style.css | 23 +++++++++++++++---- 5 files changed, 38 insertions(+), 27 deletions(-) diff --git a/tubearchivist/home/forms.py b/tubearchivist/home/forms.py index 5eca965..8750134 100644 --- a/tubearchivist/home/forms.py +++ b/tubearchivist/home/forms.py @@ -116,7 +116,7 @@ class SubscribeToChannelForm(forms.Form): """text area form to subscribe to multiple channels""" subscribe = forms.CharField( - label=False, + label="Subscribe to channels", widget=forms.Textarea( attrs={ "rows": 3, @@ -130,11 +130,11 @@ class SubscribeToPlaylistForm(forms.Form): """text area form to subscribe to multiple playlists""" subscribe = forms.CharField( - label=False, + label="Subscribe to playlists", widget=forms.Textarea( attrs={ "rows": 3, - "placeholder": "Input playlist IDs", + "placeholder": "Input playlist IDs or URLs", } ), ) diff --git a/tubearchivist/home/templates/home/channel.html b/tubearchivist/home/templates/home/channel.html index 3198143..8a1a944 100644 --- a/tubearchivist/home/templates/home/channel.html +++ b/tubearchivist/home/templates/home/channel.html @@ -3,14 +3,12 @@ {% load humanize %} {% block content %}
-
-

Channels

-
-
-
-
- add-icon -

Subscribe to Channels

+
+
+

Channels

+
+
+ add-icon
{% csrf_token %} @@ -20,9 +18,10 @@
+
- Show only subscribed channels: + Show subscribed only:
{% if show_subed_only %} diff --git a/tubearchivist/home/templates/home/playlist.html b/tubearchivist/home/templates/home/playlist.html index 451a09a..b7ddd9b 100644 --- a/tubearchivist/home/templates/home/playlist.html +++ b/tubearchivist/home/templates/home/playlist.html @@ -2,14 +2,12 @@ {% load static %} {% block content %}
-
-

Playlists

-
-
-
-
- add-icon -

Subscribe to Playlist

+
+
+

Playlists

+
+
+ add-icon
{% csrf_token %} @@ -19,9 +17,10 @@
+
- Show only subscribed playlists: + Show subscribed only:
{% if show_subed_only %} diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py index 7b33047..d9a4e40 100644 --- a/tubearchivist/home/views.py +++ b/tubearchivist/home/views.py @@ -517,7 +517,7 @@ class PlaylistView(ArchivistResultsView): self.context.update( { "title": "Playlists", - "subscribe_form": SubscribeToChannelForm(), + "subscribe_form": SubscribeToPlaylistForm(), } ) diff --git a/tubearchivist/static/css/style.css b/tubearchivist/static/css/style.css index 26a9eff..770fc8f 100644 --- a/tubearchivist/static/css/style.css +++ b/tubearchivist/static/css/style.css @@ -275,7 +275,7 @@ button:hover { .sort { display: flex; flex-wrap: wrap; - align-content: center; + align-items: center; } .padding-box { @@ -467,6 +467,23 @@ button:hover { /* info box */ +.title-split { + display: grid; + grid-template-columns: 1fr 1fr; +} + +.title-split img { + width: 40px; + filter: var(--img-filter); + cursor: pointer; + margin: 0 10px; +} + +.title-split-form { + padding-top: 30px; + display: flex; +} + .info-box { display: grid; grid-gap: 1rem; @@ -505,10 +522,6 @@ button:hover { margin-bottom: 10px; } -.sort span { - width: 100%; -} - /* login */ .login-page { display: flex;