jquery.follow
Этот коммит содержится в:
51
templates/follow.html.twig
Обычный файл
51
templates/follow.html.twig
Обычный файл
@@ -0,0 +1,51 @@
|
||||
{% extends "base.html.twig" %}
|
||||
{% block title %}
|
||||
Плагин follow
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<a href="{{ path('index_page') }}" class="btn btn-primary mb-5">← Главная</a>
|
||||
<p>But I must explain to you how all this mistaken idea of denouncing
|
||||
pleasure and <span class="text-info js-follow">praising</span> pain
|
||||
was born and I will give you a complete account of the system, and
|
||||
expound the actual teachings of the great explorer of the truth, the
|
||||
master-builder of human happiness. No one rejects, dislikes, or
|
||||
avoids pleasure itself, because it is pleasure, but because those
|
||||
who do not know how to pursue pleasure rationally encounter
|
||||
consequences that are extremely painful. Nor again is there anyone
|
||||
who loves or pursues or desires to obtain pain of itself, because it
|
||||
is pain, but because occasionally circumstances occur in which toil
|
||||
and pain can procure him some great pleasure. To take a trivial
|
||||
example, which of us ever undertakes laborious physical exercise,
|
||||
except to obtain some advantage from it? But who has any right to
|
||||
find fault with a man who chooses to enjoy a pleasure that has no
|
||||
annoying consequences, or one who avoids a pain that produces no
|
||||
resultant pleasure?</p>
|
||||
<p><span class="text-success js-follow">follow</span></p>
|
||||
<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui
|
||||
blanditiis <span class="text-danger js-follow">praesentium</span>
|
||||
voluptatum deleniti atque corrupti quos dolores et quas molestias
|
||||
excepturi sint occaecati cupiditate non provident, similique sunt in
|
||||
culpa qui officia deserunt mollitia animi, id est laborum et dolorum
|
||||
fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam
|
||||
libero tempore, cum soluta nobis est eligendi optio cumque nihil
|
||||
impedit quo minus id quod maxime placeat facere possimus, omnis
|
||||
voluptas assumenda est, omnis dolor repellendus. Temporibus autem
|
||||
quibusdam et aut officiis debitis aut rerum necessitatibus saepe
|
||||
eveniet ut et voluptates repudiandae sint et molestiae non
|
||||
recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut
|
||||
aut reiciendis voluptatibus maiores alias consequatur aut
|
||||
perferendis doloribus asperiores repellat.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
<script src="/js/jquery.follow.min.js"></script>
|
||||
<script>
|
||||
(function ($) {
|
||||
$(function () {
|
||||
$(".js-follow").follow();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
@@ -10,6 +10,9 @@
|
||||
<a href="{{ path('app_logout') }}" class="btn btn-primary">Выйти</a>
|
||||
{% endif %}
|
||||
<br class="mb-5">
|
||||
{% if is_granted('ROLE_USER') %}
|
||||
<a href="{{ path('follow_page') }}" class="btn btn-primary">Плагин follow</a>
|
||||
{% endif %}
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a href="{{ path('user_index') }}" class="btn btn-primary">Список пользователей</a>
|
||||
{% endif %}
|
||||
|
Ссылка в новой задаче
Block a user