From 5513f9c55d6e1495e73512bfdd2f6a8f4e9b714d Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 01:44:32 +0500 Subject: [PATCH 1/6] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=B5=D0=BB=20=D0=BA?= =?UTF-8?q?=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D0=92=D0=9A,=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=20=D1=85=D0=B0=D1=80=D0=B4=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4=D0=BE=D0=BC=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/templates/articles/new.html | 10 +++++++++- cms/templates/base.html | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index 8cb6193..6e71919 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -25,4 +25,12 @@ -{% endblock content %} \ No newline at end of file +{% endblock content %} +{% block extra_scripts %} + +{% endblock %} \ No newline at end of file diff --git a/cms/templates/base.html b/cms/templates/base.html index ce7363c..14781ed 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -7,9 +7,12 @@ {% bootstrap_css %} {% bootstrap_javascript %} {% bootstrap_messages %} + {% block content %} {% endblock content %} + {% block extra_scripts %} + {% endblock %} \ No newline at end of file From 9da6855626484f503e5fd5c14a0484271f68bb99 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 02:01:43 +0500 Subject: [PATCH 2/6] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BA?= =?UTF-8?q?=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D1=81=20=D0=BA=D0=BE=D1=80?= =?UTF-8?q?=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=D0=B9=20=D1=81=D1=81=D1=8B?= =?UTF-8?q?=D0=BB=D0=BA=D0=BE=D0=B9=20=D0=BF=D1=80=D0=B8=20=D0=B8=D0=B7?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/templates/articles/new.html | 19 +++++++++++++++---- cms/templates/base.html | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index 6e71919..6666301 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -20,6 +20,7 @@ > Продвинуть +
{% endbuttons %} @@ -28,9 +29,19 @@ {% endblock content %} {% block extra_scripts %} {% endblock %} \ No newline at end of file diff --git a/cms/templates/base.html b/cms/templates/base.html index 14781ed..ad7334f 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -8,6 +8,7 @@ {% bootstrap_javascript %} {% bootstrap_messages %} + {% block content %} From f8aa446030b02a086ee05982aa8c37b3f55bfd2d Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 02:12:01 +0500 Subject: [PATCH 3/6] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8=D0=BC?= =?UTF-8?q?=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B8=D1=82=D1=8C=D1=81=D1=8F=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=BB=D1=8E=D0=B1=D0=BE=D0=BC=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D0=B2=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=20=D0=B2=D0=B2=D0=BE=D0=B4=D0=B0=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/templates/articles/new.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index 6666301..a836664 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -38,10 +38,10 @@ const renderedButton = VK.Share.button(gen) $('#vkShare').html(renderedButton) } - - $('[name="link"]').change((e) => { - appendShare($(e.target)) - }) + const $linkInput = $('[name="link"]'); + $linkInput + .on('input', (e => appendShare($(e.target)))) + .on('paste', (e => appendShare($(e.target)))) }) {% endblock %} \ No newline at end of file From ac9c382c4713af8a6fa255d69b95f60c3cfe8cf4 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 02:22:25 +0500 Subject: [PATCH 4/6] =?UTF-8?q?=D0=92=D1=8B=D0=BF=D0=B8=D0=BB=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20jquery=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit чтобы не подключать CDN. И не возиться со статикой, если подключать локально. --- cms/templates/articles/new.html | 19 +++++++++---------- cms/templates/base.html | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index a836664..161c1b7 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -29,19 +29,18 @@ {% endblock content %} {% block extra_scripts %} {% endblock %} \ No newline at end of file diff --git a/cms/templates/base.html b/cms/templates/base.html index ad7334f..14781ed 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -8,7 +8,6 @@ {% bootstrap_javascript %} {% bootstrap_messages %} - {% block content %} From a7461c0ad68d314cc9f3130d2873f0cb96f34175 Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 02:35:19 +0500 Subject: [PATCH 5/6] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B6=D1=83=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D1=81=20=D0=BD=D1=83?= =?UTF-8?q?=D0=B6=D0=BD=D1=8B=D0=BC=20=D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=BE?= =?UTF-8?q?=D0=BC=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/templates/articles/new.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index 161c1b7..60963ae 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -35,7 +35,11 @@ const gen = { url: articleLink } - document.getElementById('vkShare').innerHTML = VK.Share.button(gen) + const buttonType = { + type: "link", + text: 'Посмотреть' + } + document.getElementById('vkShare').innerHTML = VK.Share.button(gen, buttonType) } const linkInput = document.querySelector('[name="link"]'); linkInput.addEventListener('input', appendShare) From 69cb504252eb56ffaa45f230f9d17b50ad8e3f5f Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Wed, 28 Dec 2022 02:42:53 +0500 Subject: [PATCH 6/6] =?UTF-8?q?=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D1=8F=D1=82=D1=81=D1=8F=20=D1=80?= =?UTF-8?q?=D1=8F=D0=B4=D0=BE=D0=BC=20=D0=B2=20=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=D1=83=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/templates/articles/new.html | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cms/templates/articles/new.html b/cms/templates/articles/new.html index 60963ae..6a79ee4 100644 --- a/cms/templates/articles/new.html +++ b/cms/templates/articles/new.html @@ -14,13 +14,19 @@ {% csrf_token %} {% bootstrap_form new_article_form %} {% buttons %} - -
+
+
+ +
+ +
+
+ {% endbuttons %} @@ -36,8 +42,8 @@ url: articleLink } const buttonType = { - type: "link", - text: 'Посмотреть' + type: "custom", + text: 'share icon' } document.getElementById('vkShare').innerHTML = VK.Share.button(gen, buttonType) }