Browse Source

Use main layout for the 404 page

Jordi Boggiano 12 years ago
parent
commit
d30d51dea2
1 changed files with 14 additions and 79 deletions
  1. 14 79
      app/Resources/TwigBundle/views/Exception/error404.html.twig

+ 14 - 79
app/Resources/TwigBundle/views/Exception/error404.html.twig

@@ -1,82 +1,17 @@
-<!DOCTYPE html>
-<!--[if lte IE 8 ]> <html lang="en" class="no-js oldie"> <![endif]-->
-<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
-<head>
-    <meta charset="UTF-8" />
-
-    <title>{% block title %}Packagist{% endblock %}</title>
-    <meta name="description" content="" />
-    <meta name="author" content="Jordi Boggiano" />
-
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-
-    <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
-    <link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png') }}" />
-
-    <!--[if lt IE 9]>
-    <script src="{{ asset('bundles/packagistweb/js/html5.js') }}"></script>
-    <![endif]-->
-
-    <link rel="stylesheet" href="{{ asset('bundles/packagistweb/css/main.css?v=6') }}" />
-    <link rel="stylesheet" href="{{ asset('css/humane/jackedup.css?v=2') }}" />
-
-    {# {% stylesheets
-            '@PackagistWebBundle/Resources/public/css/main.css'
-            'css/humane/jackedup.css'
-            filter="yui_css" output='css/main.css' %}
-            <link rel="stylesheet" href="{{ asset_url }}" />
-        {% endstylesheets %} #}
-
-        <script src="/js/libs/modernizr-1.7.min.js"></script>
-</head>
-<body>
-<div class="container">
-    <div class="user"></div>
-    <header>
-        <h1><a href="{{ path('home') }}">Packagist</a></h1>
-        <h2>The PHP package archivist.</h2>
-    </header>
-
-    <div class="main" role="main">
-        <div class="box clearfix">
-            <h1>Whooooops!</h1>
-            <p>Looks like you requested a page that was not found. Bummer! Go back to the <a href="{{ path('home') }}">homepage</a>?</p>
+{% extends 'PackagistWebBundle::layout.html.twig' %}
+
+{% block content %}
+    <div class="box">
+         <form id="search-form" action="/search/" method="GET"  autocomplete="off">
+            <p class="submit-wrapper"><input class="submit" type="submit" value="Search" /></p>
+            <p><input type="search" id="search_query_query" name="search_query[query]" required="required"    autocomplete="off" placeholder="Search packages..." tabindex="1" /></p>
+        </form>
+        <div class="search-list hidden">
         </div>
     </div>
-</div>
-
-<footer>
-    <ul>
-        <li><a href="{{ path('about') }}">{{ 'menu.about_packagist'|trans }}</a></li>
-        <li><a href="{{ path('home') }}">{{ 'menu.home'|trans }}</a></li>
-    </ul>
-    <ul>
-        <li><a href="{{ path('browse') }}">{{ 'menu.browse_packages'|trans }}</a></li>
-        <li><a href="{{ path('stats') }}">{{ 'menu.stats'|trans }}</a></li>
-    </ul>
-    <ul>
-        <li><a href="https://twitter.com/packagist">{{ 'menu.twitter'|trans }}</a></li>
-        <li><a href="mailto:contact@packagist.org">{{ 'menu.contact'|trans }}</a></li>
-    </ul>
-    <div class="clearfix"></div>
-</footer>
-
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
-<script>!window.jQuery && document.write(unescape('%3Cscript src="/js/libs/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
-<script src="{{ asset('js/libs/humane.min.js') }}"></script>
-<script src="{{ asset('bundles/packagistweb/js/layout.js') }}"></script>
-<script src="{{ asset('bundles/packagistweb/js/search.js')}}"></script>
-
-{% if not app.debug and google_analytics.ga_key %}
-<script>
-    var _gaq=[['_setAccount','{{ google_analytics.ga_key }}'],['_trackPageview']];
-    (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
-        g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
-        s.parentNode.insertBefore(g,s)}(document,'script'));
-</script>
-{% endif %}
-
-{% block scripts %}{% endblock %}
-</body>
-</html>
 
+    <div class="box clearfix">
+        <h1>Oh noes, 404!</h1>
+        <p>It looks like you requested a page that was not found. Go back to the <a href="{{ path('home') }}">homepage</a> or use the search above to find the package you want.</p>
+    </div>
+{% endblock %}