layout.html.twig 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!DOCTYPE html>
  2. <!--[if lte IE 8 ]> <html lang="en" class="no-js oldie"> <![endif]-->
  3. <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
  4. <head>
  5. <meta charset="UTF-8" />
  6. <title>{% block title %}Packagist{% endblock %}</title>
  7. <meta name="description" content="" />
  8. <meta name="author" content="Jordi Boggiano" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  10. <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
  11. <link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png') }}" />
  12. <!--[if lt IE 9]>
  13. <script src="{{ asset('bundles/packagistweb/js/html5.js') }}"></script>
  14. <![endif]-->
  15. <link rel="stylesheet" href="{{ asset('bundles/packagistweb/css/main.css?v=6') }}" />
  16. <link rel="stylesheet" href="{{ asset('css/humane/jackedup.css?v=2') }}" />
  17. {# {% stylesheets
  18. '@PackagistWebBundle/Resources/public/css/main.css'
  19. 'css/humane/jackedup.css'
  20. filter="yui_css" output='css/main.css' %}
  21. <link rel="stylesheet" href="{{ asset_url }}" />
  22. {% endstylesheets %} #}
  23. <script src="/js/libs/modernizr-1.7.min.js"></script>
  24. </head>
  25. <body>
  26. <div class="container">
  27. <div class="user">
  28. {% if app.user %}
  29. <a href="{{ path('fos_user_profile_show') }}">{{ app.user.username }}</a> | <a href="{{ path('fos_user_security_logout') }}">Logout</a>
  30. {% else %}
  31. <a href="{{ path('fos_user_registration_register') }}">Create a new account</a>
  32. |
  33. <a href="{{ path('fos_user_security_login') }}">Login</a>
  34. {% endif %}
  35. </div>
  36. <header>
  37. {% if page is not defined or page != 'submit' %}
  38. <a class="submit" href="{{ path('submit') }}">Submit Package</a>
  39. {% endif %}
  40. <h1><a href="{{ path('home') }}">Packagist</a></h1>
  41. <h2>The PHP package archivist.</h2>
  42. </header>
  43. <div class="main" role="main">
  44. {% if app.session.flash('success') %}
  45. <div class="flash-message success">
  46. <p>{{ app.session.flash('success') }}</p>
  47. </div>
  48. {% endif %}
  49. {% if app.session.flash('error') %}
  50. <div class="flash-message error">
  51. <p>{{ app.session.flash('error') }}</p>
  52. </div>
  53. {% endif %}
  54. {{ app.session.clearFlashes }}
  55. {% block search %}
  56. {% if searchForm is defined %}
  57. <div class="box">
  58. {% include "PackagistWebBundle:Web:searchForm.html.twig" %}
  59. <div class="search-list hidden">
  60. </div>
  61. </div>
  62. {% endif %}
  63. {% endblock %}
  64. {% block content %}
  65. {% endblock %}
  66. </div>
  67. </div>
  68. <footer>
  69. <ul>
  70. <li><a href="{{ path('about') }}">{{ 'menu.about_packagist'|trans }}</a></li>
  71. <li><a href="{{ path('home') }}">{{ 'menu.home'|trans }}</a></li>
  72. </ul>
  73. <ul>
  74. {% if app.user %}
  75. <li><a href="{{ path('fos_user_profile_show') }}">{{ 'menu.profile'|trans }}</a></li>
  76. <li><a href="{{ path('fos_user_security_logout') }}">{{ 'menu.logout'|trans }}</a></li>
  77. {% else %}
  78. <li><a href="{{ path('fos_user_registration_register') }}">{{ 'menu.register'|trans }}</a></li>
  79. <li><a href="{{ path('fos_user_security_login') }}">{{ 'menu.login'|trans }}</a></li>
  80. {% endif %}
  81. </ul>
  82. <ul>
  83. <li><a href="{{ path('browse') }}">{{ 'menu.browse_packages'|trans }}</a></li>
  84. <li><a href="{{ path('stats') }}">{{ 'menu.stats'|trans }}</a></li>
  85. </ul>
  86. <ul>
  87. <li><a href="https://twitter.com/packagist">{{ 'menu.twitter'|trans }}</a></li>
  88. <li><a href="mailto:contact@packagist.org">{{ 'menu.contact'|trans }}</a></li>
  89. </ul>
  90. <div class="clearfix"></div>
  91. </footer>
  92. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
  93. <script>!window.jQuery && document.write(unescape('%3Cscript src="/js/libs/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
  94. <script src="{{ asset('js/libs/humane.min.js') }}"></script>
  95. <script src="{{ asset('bundles/packagistweb/js/layout.js') }}"></script>
  96. <script src="{{ asset('bundles/packagistweb/js/search.js')}}"></script>
  97. {% if not app.debug and google_analytics.ga_key %}
  98. <script>
  99. var _gaq=[['_setAccount','{{ google_analytics.ga_key }}'],['_trackPageview']];
  100. (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
  101. g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
  102. s.parentNode.insertBefore(g,s)}(document,'script'));
  103. </script>
  104. {% endif %}
  105. {% block scripts %}{% endblock %}
  106. </body>
  107. </html>