Browse Source

Кнопки выводятся рядом в строку #28

pull/30/head
Artur Galyamov 2 years ago
parent
commit
69cb504252
  1. 24
      cms/templates/articles/new.html

24
cms/templates/articles/new.html

@ -14,13 +14,19 @@
{% csrf_token %} {% csrf_token %}
{% bootstrap_form new_article_form %} {% bootstrap_form new_article_form %}
{% buttons %} {% buttons %}
<button <div class="row">
class="btn btn-primary" <div class="col">
type="submit" <button
> class="btn btn-primary"
Продвинуть type="submit"
</button> >
<div id="vkShare"></div> Продвинуть
</button>
</div>
<div id="vkShare" class="col"></div>
</div>
{% endbuttons %} {% endbuttons %}
</form> </form>
</div> </div>
@ -36,8 +42,8 @@
url: articleLink url: articleLink
} }
const buttonType = { const buttonType = {
type: "link", type: "custom",
text: 'Посмотреть' text: '<img src="https://vk.com/images/share_32_2x.png" width="32" height="32" alt="share icon" />'
} }
document.getElementById('vkShare').innerHTML = VK.Share.button(gen, buttonType) document.getElementById('vkShare').innerHTML = VK.Share.button(gen, buttonType)
} }

Loading…
Cancel
Save