templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>{% block title %}Welcome!{% endblock %}</title>
  7. <link rel="icon" href="./favicon.png">
  8. {% block stylesheets %}
  9. {{ encore_entry_link_tags('app') }}
  10. {% endblock %}
  11. {% block javascripts %}
  12. <!-- Global site tag (gtag.js) - Google Analytics -->
  13. <script async src="https://www.googletagmanager.com/gtag/js?id=G-QK943CFEWC"></script>
  14. <script>
  15. window.dataLayer = window.dataLayer || [];
  16. function gtag(){dataLayer.push(arguments);}
  17. gtag('js', new Date());
  18. gtag('config', 'G-QK943CFEWC');
  19. </script>
  20. {{ encore_entry_script_tags('app') }}
  21. {% endblock %}
  22. </head>
  23. <body id="{% block pageId %}home{% endblock %}">
  24. <header class="container smaller mb-3">
  25. <div class="row">
  26. <div class="col-2 my-auto my-md-1 w-100">
  27. <div id="logo"></div>
  28. </div>
  29. <div class="col-lg-5 col-9">
  30. <h1>eHymns.org</h1>
  31. <div class="tag-line pt-1">Your online source for free hymn arrangements.</div>
  32. </div>
  33. <div class="col-lg-5 site-motto">
  34. O, let us exalt our dear Lord and proclaim,<br>
  35. In songs of true gratitude, praise to His name!<br>
  36. As songs of the angels in sweetest accord, <br>
  37. Our thanks and our praises shall rise to the Lord.<br>
  38. <div class="credits">-- Zion's Harp # 165</div>
  39. </div>
  40. </div>
  41. </header>
  42. <section class="container">
  43. <article class="row">
  44. <aside class="sticky higher col-md-3">
  45. <nav class="navbar navbar-nav navbar-expand-md sidebar card p-0" role="navigation">
  46. <div class="navbar-header card h2">
  47. <div class="h2 card-header">Main Menu</div>
  48. </div>
  49. <li class="nav-item" id="home-link">
  50. <a class="nav-link pt-2 px-3" id="home-link" data-toggle="link" href="{{ path('home') }}"
  51. role="link" aria-controls="home" aria-selected="true">Home
  52. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-home"></i>
  53. </a>
  54. </li>
  55. <li class="nav-item" id="aboutus-link">
  56. <a class="nav-link pt-2 px-3" id="aboutus-link" data-toggle="link" href="{{ path('about') }}"
  57. role="link" aria-controls="aboutus" aria-selected="true">About Us
  58. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-info-circle"></i>
  59. </a>
  60. </li>
  61. <li class="nav-item dropdown">
  62. <a href="#" class="nav-link dropdown-toggle pt-2 px-3" data-toggle="dropdown" role="button"
  63. aria-haspopup="true" aria-expanded="false">Hymns
  64. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-music"></i>
  65. </a>
  66. <ul class="dropdown-menu">
  67. <li id="hymn-mens-link" class="dropdown-item">
  68. <a href="{{ path('hymns', {hymnType: 'mens'}) }}">Mens Voices (TTBB)
  69. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-bible"></i>
  70. </a>
  71. </li>
  72. <li id="hymn-mixed-link" class="dropdown-item">
  73. <a href="{{ path('hymns', {hymnType: 'mixed'}) }}">Mixed Voices (SATB)
  74. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-bible"></i>
  75. </a>
  76. </li>
  77. <li id="hymn-bshop-link" class="dropdown-item">
  78. <a href="{{ path('hymns', {hymnType: 'bshop'}) }}">Barbershop (TTBB)
  79. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-bible"></i>
  80. </a>
  81. </li>
  82. <li class="dropdown-divider"></li>
  83. <li id="hymn-category-list-link" class="dropdown-item">
  84. <a href="{{ path('hymn_category') }}">Hymn Category Info
  85. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-folder-open"></i>
  86. </a>
  87. </li>
  88. <li class="dropdown-divider"></li>
  89. <li id="last10-list-link" class="dropdown-item">
  90. <a href="{{ path('hymnsLast10') }}">Last 10 Hymns
  91. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-bible"></i>
  92. </a>
  93. </li>
  94. <li class="dropdown-divider"></li>
  95. <li id="top5-list-link" class="dropdown-item">
  96. <a href="{{ path('hymnsTop5') }}">Top 5 Hymns
  97. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-bible"></i>
  98. </a>
  99. </li>
  100. </ul>
  101. </li>
  102. <li class="nav-item" id="search-link">
  103. <a class="nav-link pt-2 px-3" data-toggle="link" href="{{ path('hymnsSearch') }}"
  104. role="link" aria-controls="logout" aria-selected="true">Search Hymns
  105. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-search"></i>
  106. </a>
  107. </li>
  108. <li class="nav-item dropdown">
  109. <a href="#" class="nav-link dropdown-toggle pt-2 px-3" data-toggle="dropdown" role="button"
  110. aria-haspopup="true" aria-expanded="false">Bios
  111. <span style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-book"></span>
  112. </a>
  113. <ul class="dropdown-menu">
  114. <li id="authors_info-link" class="dropdown-item"><a href="{{ path('authors') }}">Authors</a>
  115. <span style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-edit"></span>
  116. </li>
  117. <li id="composers_info-link" class="dropdown-item"><a href="{{ path('composers') }}">Composers</a>
  118. <span style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-music"></span>
  119. </li>
  120. <li id="arrangers_info-link" class="dropdown-item"><a href="{{ path('arrangers') }}">Arrangers</a>
  121. <span style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-music"></span>
  122. </li>
  123. </ul>
  124. </li>
  125. {% if app.user %}
  126. <li class="nav-item">
  127. <a class="nav-link pt-2 px-3" id="logout-link" data-toggle="link"
  128. href="{{ path('app_logout') }}"
  129. role="link" aria-controls="logout" aria-selected="true">Logout
  130. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-lock-open"></i>
  131. </a>
  132. </li>
  133. {% if is_granted('ROLE_SUBSCRIBER') %}
  134. <li class="dropdown-divider"></li>
  135. <li class="nav-item">
  136. <a class="nav-link pt-2 px-3" id="admin_dashboard-link" data-toggle="link"
  137. href="{{ path('app_admin_dashboard_index') }}"
  138. role="link" aria-controls="profile" aria-selected="true">Dashboard
  139. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-dashboard"></i>
  140. </a>
  141. </li>
  142. {% endif %}
  143. {% if is_granted('IS_IMPERSONATOR') %}
  144. <li class="nav-item">
  145. <a class="nav-link pt-2 px-3" id="exitimp-link" data-toggle="link"
  146. href="{{ impersonation_exit_path(path('home') ) }}"
  147. role="link" aria-controls="exitimp" aria-selected="true">Exit impersonation
  148. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-door-open"></i>
  149. </a>
  150. </li>
  151. {% endif %}
  152. {% if is_granted('ROLE_ADMIN') %}
  153. <li class="dropdown-divider mb-0"></li>
  154. <h5 class="navbar-header w-100 py-2 px-3 font-weight-bold">All Users</h5>
  155. {% for user in all_users.AllUsers %}
  156. {% if user.id is not same as(app.user.id) and not ('ROLE_SUPER_ADMIN' in user.roles) %}
  157. <li class="nav-item pl-4">
  158. <a class="nav-link pt-2 px-3" id="imp-{{ user.id }}-link" data-toggle="link"
  159. href="{{ path('home') }}?_switch_user={{ user.username }}"
  160. role="link" aria-controls="imp" aria-selected="true">{{ user.name }}
  161. <i style="font-size:18px;"
  162. class="py-1 float-right hidden-xs fa fa-user"></i>
  163. </a>
  164. </li>
  165. {% endif %}
  166. {% endfor %}
  167. <li class="nav-item">
  168. <a class="nav-link pt-2 px-3" id="admin-hymn-category-list-link" data-toggle="link"
  169. href="{{ path('app_admin_hymn_category_index') }}"
  170. role="link" aria-controls="profile" aria-selected="true">Hymn Category List
  171. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-dashboard"></i>
  172. </a>
  173. </li>
  174. <li class="nav-item">
  175. <a class="nav-link pt-2 px-3" id="admin-hymns-list-link" data-toggle="link"
  176. href="{{ path('app_admin_hymns_index') }}"
  177. role="link" aria-controls="profile" aria-selected="true">Hymns List
  178. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-dashboard"></i>
  179. </a>
  180. </li>
  181. <li class="nav-item">
  182. <a class="nav-link pt-2 px-3" id="authcomp-list-link" data-toggle="link"
  183. href="{{ path('app_admin_authcomp_index') }}"
  184. role="link" aria-controls="profile" aria-selected="true">Auth/Comp List
  185. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-dashboard"></i>
  186. </a>
  187. <li class="nav-item">
  188. <a class="nav-link pt-2 px-3" id="hymn-artist-list-link" data-toggle="link"
  189. href="{{ path('artist_index') }}"
  190. role="link" aria-controls="profile" aria-selected="true">Artist List
  191. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-dashboard"></i>
  192. </a>
  193. </li>
  194. {% endif %}
  195. {% else %}
  196. <li class="nav-item">
  197. <a class="nav-link pt-2 px-3" id="login-link" data-toggle="link"
  198. href="{{ path('app_login') }}"
  199. role="link" aria-controls="login" aria-selected="true">Login
  200. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-user"></i>
  201. </a>
  202. </li>
  203. <li class="nav-item">
  204. <a class="nav-link pt-2 px-3" id="register-link" data-toggle="link"
  205. href="{{ path('register') }}"
  206. role="link" aria-controls="register" aria-selected="true">Register
  207. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-registered"></i>
  208. </a>
  209. </li>
  210. {% endif %}
  211. <li class="nav-item dropdown">
  212. <a href="#" class="nav-link dropdown-toggle pt-2 px-3" data-toggle="dropdown" role="button"
  213. aria-haspopup="true" aria-expanded="false">Legal
  214. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-gavel"></i>
  215. </a>
  216. <ul class="dropdown-menu">
  217. <li id="legal-privacy-policy-link" class="dropdown-item">
  218. <a href="{{ path('privacy-policy') }}">Privacy Policy
  219. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-scroll"></i>
  220. </a>
  221. </li>
  222. <li id="legal-terms-link" class="dropdown-item">
  223. <a href="{{ path('terms') }}">Terms of Service
  224. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-scroll"></i>
  225. </a>
  226. </li>
  227. </ul>
  228. </li>
  229. <li class="nav-item dropdown">
  230. <form action="https://www.paypal.com/donate" method="post" target="_blank">
  231. <input type="hidden" name="hosted_button_id" value="BGC56ZUBVF5XE" />
  232. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"
  233. name="submit" title="PayPal - The safer, easier way to pay online!"
  234. alt="Donate with PayPal button" />
  235. <img style="visibility: collapse;" alt="paypal" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
  236. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-hands-helping"></i>
  237. </form>
  238. </li>
  239. <li class="nav-item">
  240. <a class="nav-link pt-2 px-3" id="contact-link" data-toggle="link"
  241. href="mailto:admin@ehymns.org"
  242. role="link" aria-controls="register" aria-selected="true">Contact Me
  243. <i style="font-size:18px;" class="py-1 float-right hidden-xs fa fa-pen-fancy"></i>
  244. </a>
  245. </li>
  246. </nav>
  247. </aside>
  248. <div class="col-md-9 ">
  249. <section id="main_content">
  250. {% block body %}{% endblock %}
  251. </section>
  252. <section class="card last-ten">
  253. <h4 id="last_ten" class="card-header">The last 10 hymns uploaded.</h4>
  254. <div class="scroller">
  255. <ul>
  256. {% set lt = hymn_repo.getLastTen %}
  257. {% for h in lt %}
  258. {% set type = 'TTBB' %}
  259. {% if h.type_id is same as(2) %}
  260. {% set type = 'SATB' %}
  261. {% elseif h.type_id is same as(3) %}
  262. {% set type = 'Barbershop' %}
  263. {% endif %}
  264. <li>#{{ loop.index < 10 ? ' &nbsp;' : '' }}{{ loop.index }} - <a
  265. href="{{ path('hymnInfo', {'slug': h.slug}) }}">
  266. {{ h.title }}</a> ({{ type }}) &nbsp;&nbsp;(uploaded on {{ h.created_at|date('M d, Y') }})
  267. </li>
  268. {% endfor %}
  269. <li>&nbsp;</li>
  270. </ul>
  271. </div>
  272. </section>
  273. </div>
  274. </article>
  275. </section>
  276. <footer class="container">
  277. <div class="row">
  278. <div class="col-md-12">
  279. <div class="card">
  280. <p class="text-center credits">
  281. Copyright © 2002-{{ "now"|date('Y') }} eHymns.org
  282. </p>
  283. <p class="text-center credits">
  284. <a href="https://www.manzwebdesigns.com"
  285. title="Created by Manz Web Designs (Opens in new window)"
  286. target="_blank">
  287. Created by Manz Web Designs
  288. </a>
  289. </p>
  290. <p class="text-center credits">
  291. Affiliated with the <a href="https://www.apostolicchristian.org/" target="_blank">
  292. Apostolic Christian Church of America
  293. </a>
  294. </p>
  295. </div>
  296. </div>
  297. </div>
  298. </footer>
  299. </body>
  300. </html>