Browse Source

re-organize markup and css

Igor Wiedler 13 years ago
parent
commit
2d0cebef6e

+ 2 - 2
app/Resources/FOSUserBundle/views/layout.html.twig

@@ -8,7 +8,7 @@
 	    </div>
     {% endfor %}
 
-    <div>
+    <div class="box clearfix">
         {% block fos_user_content %}{% endblock %}
-    </div>    
+    </div>
 {% endblock %}

+ 6 - 2
src/Packagist/WebBundle/Resources/public/css/main.css

@@ -106,7 +106,7 @@ a:hover {
   min-height: 400px;
 }
 
-.container > div, .container > header {
+.container div.user, .container div.box, .container header {
   width: 900px;
   margin: auto;
 }
@@ -134,7 +134,8 @@ header p {
   clear: both;
   margin: 0 -8px 10px;
 }
-header p, .main {
+.box {
+  width: 900px;
   font-size: 15px;
   padding: 5px 7px;
   background: #f5f5f5;
@@ -202,6 +203,9 @@ p {
   font-family: "Arial", sans-serif;
   line-height: 150%;
 }
+div.box > p:last-child {
+  margin-bottom: 0;
+}
 
 .package p {
   margin-bottom: 0;

+ 24 - 22
src/Packagist/WebBundle/Resources/views/About/about.html.twig

@@ -1,16 +1,17 @@
 {% extends "PackagistWebBundle::layout.html.twig" %}
 
 {% block content %}
-    <h1>What is Packagist?</h1>
-    <p>Packagist is a Composer package repository. It lets you find packages you want, and lets Composer know where to get the code from. You can use Composer to manage your project or libraries' dependencies - read more about it on the <a href="{{ path('about.composer') }}">Composer page</a>.</p>
-    <p>You can find the packagist.org source on <a href="https://github.com/composer/packagist">GitHub</a>.
+    <div class="box clearfix">
+        <h1>What is Packagist?</h1>
+        <p>Packagist is a Composer package repository. It lets you find packages you want, and lets Composer know where to get the code from. You can use Composer to manage your project or libraries' dependencies - read more about it on the <a href="{{ path('about.composer') }}">Composer page</a>.</p>
+        <p>You can find the packagist.org source on <a href="https://github.com/composer/packagist">GitHub</a>.
 
-    <h1>How to submit packages?</h1>
-    <h2>Naming your package</h2>
-    <p>First of all, you must pick a package name. This is a very important step since it can not change, and it should be unique enough to avoid problems in the future.</p>
-    <p>The most important part is that the first bit of the package name must be the vendor name, suffixed by a forward slash (/). This follows the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0 standard</a> for namespaces naming.</p>
-    <p>For libraries and applications, the vendor is in most cases the library name itself, and you can use any name, although it's best to avoid using common names like DB, Logger, MySQL, etc. Try to be imaginative when naming your project.</p>
-    <p>For plugins, be it TYPO3 extensions, Symfony2 bundles, Drupal modules, or whatever your project of choice calls them, you are free to handle it as you wish, but you may want to add some specific information about the target platform in the package name to avoid conflicts if you provide many plugins to integrate one lib in many frameworks. For example, if your vendor name is Acme, and your library is called Email, you could have the following names: <code>acme/email-symfony-bundle</code>, <code>acme/email-typo3-ext</code> and such. This ensures uniqueness across frameworks/applications, and clearly says what your package relates to. Here is a list of typical package names for reference:
+        <h1>How to submit packages?</h1>
+        <h2>Naming your package</h2>
+        <p>First of all, you must pick a package name. This is a very important step since it can not change, and it should be unique enough to avoid problems in the future.</p>
+        <p>The most important part is that the first bit of the package name must be the vendor name, suffixed by a forward slash (/). This follows the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0 standard</a> for namespaces naming.</p>
+        <p>For libraries and applications, the vendor is in most cases the library name itself, and you can use any name, although it's best to avoid using common names like DB, Logger, MySQL, etc. Try to be imaginative when naming your project.</p>
+        <p>For plugins, be it TYPO3 extensions, Symfony2 bundles, Drupal modules, or whatever your project of choice calls them, you are free to handle it as you wish, but you may want to add some specific information about the target platform in the package name to avoid conflicts if you provide many plugins to integrate one lib in many frameworks. For example, if your vendor name is Acme, and your library is called Email, you could have the following names: <code>acme/email-symfony-bundle</code>, <code>acme/email-typo3-ext</code> and such. This ensures uniqueness across frameworks/applications, and clearly says what your package relates to. Here is a list of typical package names for reference:
 <pre>
 // Monolog is a library, so the vendor name and package name are the same.
 monolog/monolog
@@ -23,11 +24,11 @@ monolog/monolog-drupal-module
 // As long as it's in their own vendor namespace it does not conflict with anyone else.
 acme/email
 </pre></p>
-    <p>Note that package names are case-insensitive, but it's encouraged to use a dash (-) as separator instead of CamelCased names.</p>
+        <p>Note that package names are case-insensitive, but it's encouraged to use a dash (-) as separator instead of CamelCased names.</p>
 
-    <h2>Creating a composer.json file</h2>
-    <p>The composer.json file should reside at the top of your package's git/svn/.. repository, and is the way you describe your package to both packagist and composer.</p>
-    <p>A typical composer.json file looks like this:
+        <h2>Creating a composer.json file</h2>
+        <p>The composer.json file should reside at the top of your package's git/svn/.. repository, and is the way you describe your package to both packagist and composer.</p>
+        <p>A typical composer.json file looks like this:
 <pre>
 {
     "name": "monolog/monolog",
@@ -49,13 +50,13 @@ acme/email
 }
 </pre>
 Most of this information is obvious, keywords are tags, require are list of dependencies that your package has. This can of course be packages, not only a php version. You can use ext-foo to require php extensions (e.g. ext-apc). Note that most extensions don't expose version information, so unless you know for sure it does, it's safer to use <code>"ext-apc": "*"</code> to allow any version of it. Finally the type field is in this case indicating that this is a library. If you do plugins for frameworks etc, and if they integrate composer, they may have a custom package type for their plugins that you can use to install the package with their own installer. In the absence of custom type, you can omit it or use "library".</p>
-    <p>Known package types include: symfony-bundle</p>
-    <p>Once you have this file committed in your repository root, you can <a href="{{ path('submit') }}">submit the package</a> to Packagist by entering the public repository URL.</p>
+        <p>Known package types include: symfony-bundle</p>
+        <p>Once you have this file committed in your repository root, you can <a href="{{ path('submit') }}">submit the package</a> to Packagist by entering the public repository URL.</p>
 
-    <h1>Managing package versions</h1>
-    <p>New versions of your package are automatically fetched from tags you create in your VCS repository.</p>
-    <p>There are two ways to manage version numbering. The easiest is to just omit the version field from the composer.json file. If it is missing, the version name will be parsed from the tag and branch names. The other way which offers you a bit more flexibility is to define it yourself, but that means you should update the version field in the composer.json file before creating a tag, otherwise the tag will be considered broken and not imported. If you think you're likely to forget, you probably should use the first method.</p>
-    <p>Tag/version names should match 'X.Y.Z', or 'vX.Y.Z', with an optional suffix for RC, beta, alpha or patch versions. Here are a few examples of valid tag names:
+        <h1>Managing package versions</h1>
+        <p>New versions of your package are automatically fetched from tags you create in your VCS repository.</p>
+        <p>There are two ways to manage version numbering. The easiest is to just omit the version field from the composer.json file. If it is missing, the version name will be parsed from the tag and branch names. The other way which offers you a bit more flexibility is to define it yourself, but that means you should update the version field in the composer.json file before creating a tag, otherwise the tag will be considered broken and not imported. If you think you're likely to forget, you probably should use the first method.</p>
+        <p>Tag/version names should match 'X.Y.Z', or 'vX.Y.Z', with an optional suffix for RC, beta, alpha or patch versions. Here are a few examples of valid tag names:
 <pre>
 1.0.0
 v1.0.0
@@ -64,8 +65,8 @@ v4.4.4beta2
 v2.0.0-alpha
 v2.0.4-p1
 </pre>
-    With manual versioning, in your master branch, or any other dev branch, you should change the composer.json version to the next future version that will be released from this branch (e.g. <code>1.1.0</code>), packagist will automatically add a -dev suffix to it until it is moved to a tag.</p>
-    <p>Note that dev branches should follow one of the following patterns to be recognized:
+        With manual versioning, in your master branch, or any other dev branch, you should change the composer.json version to the next future version that will be released from this branch (e.g. <code>1.1.0</code>), packagist will automatically add a -dev suffix to it until it is moved to a tag.</p>
+        <p>Note that dev branches should follow one of the following patterns to be recognized:
 <pre>
 master
 trunk
@@ -75,5 +76,6 @@ v1.x
 1.1.x
 1.1.*
 </pre>
-    Doing so will allow people to easily install pre-release versions of your code for testing or development purposes.</p>
+        Doing so will allow people to easily install pre-release versions of your code for testing or development purposes.</p>
+    </div>
 {% endblock %}

+ 25 - 23
src/Packagist/WebBundle/Resources/views/About/aboutComposer.html.twig

@@ -1,12 +1,13 @@
 {% extends "PackagistWebBundle::layout.html.twig" %}
 
 {% block content %}
-    <h1>What is Composer?</h1>
-    <p>Composer helps you manage your project or libraries' dependencies. You can find the Composer source on <a href="https://github.com/composer/composer">GitHub</a>.</p>
+    <div class="box clearfix">
+        <h1>What is Composer?</h1>
+        <p>Composer helps you manage your project or libraries' dependencies. You can find the Composer source on <a href="https://github.com/composer/composer">GitHub</a>.</p>
 
-    <h1>Declaring dependencies</h1>
-    <p>To define your project's dependencies, you can use a composer.json file, just like in a library or plugin, but you don't have to specify most of the fields.</p>
-    <p>A typical composer.json file for a project looks like this:</p>
+        <h1>Declaring dependencies</h1>
+        <p>To define your project's dependencies, you can use a composer.json file, just like in a library or plugin, but you don't have to specify most of the fields.</p>
+        <p>A typical composer.json file for a project looks like this:</p>
 <pre>
 {
     "name": "my-project",
@@ -16,13 +17,13 @@
     }
 }
 </pre>
-    <p>In this example, the project only requires the Monolog library as a dependency.</p>
+        <p>In this example, the project only requires the Monolog library as a dependency.</p>
 
-    <h2>Adding more package repositories</h2>
-    <p>You can add different repositories than Packagist, if needed, by specifying them by hand. They all sit in the "repositories" key, and each are made of a name (which is only for your use, for self-documenting purposes), a type, and then a configuration.</p>
+        <h2>Adding more package repositories</h2>
+        <p>You can add different repositories than Packagist, if needed, by specifying them by hand. They all sit in the "repositories" key, and each are made of a name (which is only for your use, for self-documenting purposes), a type, and then a configuration.</p>
 
-    <h2>Adding another Composer repository</h2>
-    <p>Packagist is a Composer repository, it contains a list of all packages under <em>/packages.json</em>. You can set one up for your own use, you will find the sources on <a href="https://github.com/composer/packagist">GitHub</a>. You can set it up in Composer like this:
+        <h2>Adding another Composer repository</h2>
+        <p>Packagist is a Composer repository, it contains a list of all packages under <em>/packages.json</em>. You can set one up for your own use, you will find the sources on <a href="https://github.com/composer/packagist">GitHub</a>. You can set it up in Composer like this:
 <pre>
 {
     "repositories": {
@@ -35,8 +36,8 @@
 }
 </pre>
 
-    <h2>Removing the default Packagist repository</h2>
-    <p>If you do not wish to work with Packagist.org packages, you can disable it like that:</p>
+        <h2>Removing the default Packagist repository</h2>
+        <p>If you do not wish to work with Packagist.org packages, you can disable it like that:</p>
 <pre>
 {
     "repositories": {
@@ -44,10 +45,10 @@
     }
 }
 </pre>
-    <p>Of course if you do that you should define an alternative repository or Composer will be pretty useless.</p>
+        <p>Of course if you do that you should define an alternative repository or Composer will be pretty useless.</p>
 
-    <h2>Adding a git repository containing a composer package</h2>
-    <p>Git repositories can be used as repositories if they contain a composer.json, even if the packages are not available on Packagist. They could also be private repositories that you don't want to make accessible to everyone. Here's how to do it:</p>
+        <h2>Adding a git repository containing a composer package</h2>
+        <p>Git repositories can be used as repositories if they contain a composer.json, even if the packages are not available on Packagist. They could also be private repositories that you don't want to make accessible to everyone. Here's how to do it:</p>
 <pre>
 {
     "name": "my-project",
@@ -66,8 +67,8 @@
 }
 </pre>
 
-    <h2>Adding code that does not support composer</h2>
-    <p>If you wish to use a repository that does not contain composer.json as a dependency, you can define its package information inline with the package repository, for example:</p>
+        <h2>Adding code that does not support composer</h2>
+        <p>If you wish to use a repository that does not contain composer.json as a dependency, you can define its package information inline with the package repository, for example:</p>
 <pre>
 {
     "repositories": {
@@ -92,10 +93,10 @@
     }
 }
 </pre>
-    <p>You only have to specify one of the two dist/source keys, but specifying both makes it more flexble.</p>
+        <p>You only have to specify one of the two dist/source keys, but specifying both makes it more flexble.</p>
 
-    <h2>Adding PEAR packages</h2>
-    <p>If a library does not have a composer package but offers PEAR packages, you can also add it to composer. You just need to specify it's PEAR channel and all the channels of it's dependencies:</p>
+        <h2>Adding PEAR packages</h2>
+        <p>If a library does not have a composer package but offers PEAR packages, you can also add it to composer. You just need to specify it's PEAR channel and all the channels of it's dependencies:</p>
 <pre>
 {
     "repositories": {
@@ -115,8 +116,9 @@
     }
 }
 </pre>
-    <p>Note that SomePackage does not take the channel name in front of it. Also be careful, this can take quite a while with large channels containing many versions.</p>
+        <p>Note that SomePackage does not take the channel name in front of it. Also be careful, this can take quite a while with large channels containing many versions.</p>
 
-    <h1>Community</h1>
-    <p>If you have questions about composer or want to help out, come and join us in the <em><a href="irc://irc.freenode.net/#composer-dev">#composer-dev</a></em> channel on irc.freenode.net.</p>
+        <h1>Community</h1>
+        <p>If you have questions about composer or want to help out, come and join us in the <em><a href="irc://irc.freenode.net/#composer-dev">#composer-dev</a></em> channel on irc.freenode.net.</p>
+    </div>
 {% endblock %}

+ 3 - 1
src/Packagist/WebBundle/Resources/views/User/packages.html.twig

@@ -1,5 +1,7 @@
 {% extends "PackagistWebBundle:Web:index.html.twig" %}
 
 {% block content_title %}
-<h1>Packages maintained by {{ user.username }}</h1>
+    <div class="box clearfix">
+        <h1>Packages maintained by {{ user.username }}</h1>
+    </div>
 {% endblock %}

+ 62 - 54
src/Packagist/WebBundle/Resources/views/Web/index.html.twig

@@ -1,62 +1,70 @@
 {% extends "PackagistWebBundle::layout.html.twig" %}
 
 {% block content %}
-    <section class="getting-started">
-        <h1>Getting Started</h1>
-        <div>
-            <h2>Define Your Dependencies</h2>
-            <p>Put a file named <em>composer.json</em> at the root of your project, containing your project dependencies:</p>
-            <pre>
-{
-    "require": {
-        "vendor/package": "1.3.2",
-        "vendor/package2": "1.*",
-        "vendor/package3": ">=2.0.3"
+    <div class="box">
+        <p>Packagist is the main <a href="{{ path('about.composer') }}">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a>.</p>
+    </div>
+
+    &nbsp;
+
+    <div class="box clearfix">
+        <section class="getting-started">
+            <h1>Getting Started</h1>
+            <div>
+                <h2>Define Your Dependencies</h2>
+                <p>Put a file named <em>composer.json</em> at the root of your project, containing your project dependencies:</p>
+                <pre>
+    {
+        "require": {
+            "vendor/package": "1.3.2",
+            "vendor/package2": "1.*",
+            "vendor/package3": ">=2.0.3"
+        }
     }
-}
-</pre>
-            <h2>Install Composer In Your Project</h2>
-            <p>Run this in your command line:</p>
-            <pre>
-wget http://getcomposer.org/composer.phar
-</pre>
-            <p>Or <a href="http://getcomposer.org/composer.phar">download composer</a> into your project root.</p>
-            <h2>Install Dependencies</h2>
-            <p>Execute this in your project root.</p>
-            <pre>
-php composer.phar install
-</pre>
-            <h2>Autoload Dependencies</h2>
-            <p>If all your packages follow the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0</a> standard, you can autoload all the dependencies by adding this to your code:</p>
-            <pre>
-require 'vendor/.composer/autoload.php';
-</pre>
+    </pre>
+                <h2>Install Composer In Your Project</h2>
+                <p>Run this in your command line:</p>
+                <pre>
+    wget http://getcomposer.org/composer.phar
+    </pre>
+                <p>Or <a href="http://getcomposer.org/composer.phar">download composer</a> into your project root.</p>
+                <h2>Install Dependencies</h2>
+                <p>Execute this in your project root.</p>
+                <pre>
+    php composer.phar install
+    </pre>
+                <h2>Autoload Dependencies</h2>
+                <p>If all your packages follow the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0</a> standard, you can autoload all the dependencies by adding this to your code:</p>
+                <pre>
+    require 'vendor/.composer/autoload.php';
+    </pre>
 
-            <p><a href="{{ path('browse') }}">Browse</a> the packages we have to find more great libraries you can use in your project.</p>
-        </div>
-    </section>
+                <p><a href="{{ path('browse') }}">Browse</a> the packages we have to find more great libraries you can use in your project.</p>
+            </div>
+        </section>
 
-    <section class="publishing-packages">
-        <h1>Publishing Packages</h1>
-        <div>
-            <h2>Define Your Package</h2>
-            <p>Put a file named <em>composer.json</em> at the root of your package, containing this information:</p>
-            <pre>
-{
-    "name": "your-vendor-name/package-name",
-    "require": {
-        "php": ">=5.3.0",
-        "another-vendor/package": "1.*",
+        <section class="publishing-packages">
+            <h1>Publishing Packages</h1>
+            <div>
+                <h2>Define Your Package</h2>
+                <p>Put a file named <em>composer.json</em> at the root of your package, containing this information:</p>
+                <pre>
+    {
+        "name": "your-vendor-name/package-name",
+        "require": {
+            "php": ">=5.3.0",
+            "another-vendor/package": "1.*",
+        }
     }
-}
-</pre>
-            <p>This is the strictly minimal information you have to give.</p>
-            <p>For more details about package naming and the fields you can use to document your package better, see the <a href="{{ path('about') }}">about</a> page.</p>
-            <h2>Commit The File</h2>
-            <p>You surely don't need help with that.</p>
-            <h2>Publish It</h2>
-            <p><a href="{{ path('fos_user_security_login') }}">Login</a> or <a href="{{ path('fos_user_registration_register') }}">register</a> on this site, then hit the big fat green button above that says <a href="{{ path('submit') }}">submit</a>.</p>
-            <p>Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date.</p>
-        </div>
-    </section>
+    </pre>
+                <p>This is the strictly minimal information you have to give.</p>
+                <p>For more details about package naming and the fields you can use to document your package better, see the <a href="{{ path('about') }}">about</a> page.</p>
+                <h2>Commit The File</h2>
+                <p>You surely don't need help with that.</p>
+                <h2>Publish It</h2>
+                <p><a href="{{ path('fos_user_security_login') }}">Login</a> or <a href="{{ path('fos_user_registration_register') }}">register</a> on this site, then hit the big fat green button above that says <a href="{{ path('submit') }}">submit</a>.</p>
+                <p>Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date.</p>
+            </div>
+        </section>
+    </div>
 {% endblock %}

+ 42 - 40
src/Packagist/WebBundle/Resources/views/Web/list.html.twig

@@ -1,45 +1,47 @@
 {% extends "PackagistWebBundle::layout.html.twig" %}
 
 {% block content %}
-    {% block content_title %}<h1>Packages</h1>{% endblock %}
-    {% if packages|length %}
-        <ul class="packages">
-            {% for package in packages %}
-                <li class="has-popup">
-                    <section>
-                        {% if package.versions|length and package.versions[0].description|length %}
-                            <h1 class="has-description"><a href="{{ url('view', { 'name' : package.name }) }}">{{ package.name }}</a></h1>
-                            <p class="package-description">{{ package.versions[0].description }}</p>
-                        {% else %}
-                            <h1><a href="{{ url('view', { 'name' : package.name }) }}">{{ package.name }}</a></h1>
-                        {% endif %}
-                        <div class="package-details"><div>
-                        {% if package.versions|length %}
-                            <p class="description">{{ package.versions[0].description }}</p>
-                            <p class="license">License: {{ package.versions[0].license ? package.versions[0].license|join(', ') : "Unknown" }}</p>
-                            <p class="links">
-                                {% if package.versions[0].homepage %}
-                                    Homepage: <a href="{{ package.versions[0].homepage }}">{{ package.versions[0].homepage|replace({'http://': ''}) }}</a><br />
-                                {% endif %}
-                                Tags: {% for tag in package.versions[0].tags %}<a href="{{ url("browse", { "tag" : tag.name }) }}">{{ tag.name }}</a>{{ loop.last ? '' : ', ' }}{% endfor %}
-                            </p>
-                        {% elseif package.crawledAt is null %}
-                            <p>This package has not been crawled yet, some information is missing.</p>
-                        {% else %}
-                            <p>This package has no released version yet, and little information is available yet.</p>
-                        {% endif %}
+    <div class="box clearfix">
+        {% block content_title %}<h1>Packages</h1>{% endblock %}
+        {% if packages|length %}
+            <ul class="packages">
+                {% for package in packages %}
+                    <li class="has-popup">
+                        <section>
+                            {% if package.versions|length and package.versions[0].description|length %}
+                                <h1 class="has-description"><a href="{{ url('view', { 'name' : package.name }) }}">{{ package.name }}</a></h1>
+                                <p class="package-description">{{ package.versions[0].description }}</p>
+                            {% else %}
+                                <h1><a href="{{ url('view', { 'name' : package.name }) }}">{{ package.name }}</a></h1>
+                            {% endif %}
+                            <div class="package-details"><div>
+                            {% if package.versions|length %}
+                                <p class="description">{{ package.versions[0].description }}</p>
+                                <p class="license">License: {{ package.versions[0].license ? package.versions[0].license|join(', ') : "Unknown" }}</p>
+                                <p class="links">
+                                    {% if package.versions[0].homepage %}
+                                        Homepage: <a href="{{ package.versions[0].homepage }}">{{ package.versions[0].homepage|replace({'http://': ''}) }}</a><br />
+                                    {% endif %}
+                                    Tags: {% for tag in package.versions[0].tags %}<a href="{{ url("browse", { "tag" : tag.name }) }}">{{ tag.name }}</a>{{ loop.last ? '' : ', ' }}{% endfor %}
+                                </p>
+                            {% elseif package.crawledAt is null %}
+                                <p>This package has not been crawled yet, some information is missing.</p>
+                            {% else %}
+                                <p>This package has no released version yet, and little information is available yet.</p>
+                            {% endif %}
 
-                        <p class="maintainers">Maintainer{{ package.maintainers|length > 1 ? 's' : '' }}:
-                        {% for maintainer in package.maintainers %}
-                            <a href="{{ url("user_packages", { "name" : maintainer.username }) }}">{{ maintainer.username }}</a>{{ loop.last ? '' : ', ' }}
-                        {% endfor %}</p>
-                        </div></div>
-                    </section>
-                </li>
-            {% endfor %}
-            {{ pagerfanta(packages, 'default', {'proximity': 2}) }}
-        </ul>
-    {% else %}
-        <p>No packages found.</p>
-    {% endif %}
+                            <p class="maintainers">Maintainer{{ package.maintainers|length > 1 ? 's' : '' }}:
+                            {% for maintainer in package.maintainers %}
+                                <a href="{{ url("user_packages", { "name" : maintainer.username }) }}">{{ maintainer.username }}</a>{{ loop.last ? '' : ', ' }}
+                            {% endfor %}</p>
+                            </div></div>
+                        </section>
+                    </li>
+                {% endfor %}
+                {{ pagerfanta(packages, 'default', {'proximity': 2}) }}
+            </ul>
+        {% else %}
+            <p>No packages found.</p>
+        {% endif %}
+    </div>
 {% endblock %}

+ 15 - 13
src/Packagist/WebBundle/Resources/views/Web/submitPackage.html.twig

@@ -5,17 +5,19 @@
 {% endblock %}
 
 {% block content %}
-    <h1>Submit package</h1>
-    <p>Please make sure you have read the package <a href="{{ path('about') }}">naming conventions</a> before submitting your package. The authoritative name of your package will be taken from the composer.json file inside the master branch of your repository, and it can not be changed after that.</p>
-    <form id="submit-package-form" action="" data-check-url="{{ path('submit.fetch_info') }}" method="POST" {{ form_enctype(form) }}>
-        <div>
-            <p>
-                {{ form_label(form.repository, "Repository URL (Git only at the moment)") }}
-                {{ form_errors(form.repository) }}
-                {{ form_widget(form.repository) }}
-            </p>
-            {{ form_rest(form) }}
-            <input id="submit" type="submit" value="Submit" />
-        </div>
-    </form>
+    <div class="box clearfix">
+        <h1>Submit package</h1>
+        <p>Please make sure you have read the package <a href="{{ path('about') }}">naming conventions</a> before submitting your package. The authoritative name of your package will be taken from the composer.json file inside the master branch of your repository, and it can not be changed after that.</p>
+        <form id="submit-package-form" action="" data-check-url="{{ path('submit.fetch_info') }}" method="POST" {{ form_enctype(form) }}>
+            <div>
+                <p>
+                    {{ form_label(form.repository, "Repository URL (Git only at the moment)") }}
+                    {{ form_errors(form.repository) }}
+                    {{ form_widget(form.repository) }}
+                </p>
+                {{ form_rest(form) }}
+                <input id="submit" type="submit" value="Submit" />
+            </div>
+        </form>
+    </div>
 {% endblock %}

+ 3 - 1
src/Packagist/WebBundle/Resources/views/Web/tag.html.twig

@@ -1,5 +1,7 @@
 {% extends "PackagistWebBundle:Web:list.html.twig" %}
 
 {% block content_title %}
-<h1>Packages tagged with {{ tag }}</h1>
+    <div class="box clearfix">
+        <h1>Packages tagged with {{ tag }}</h1>
+    </div>
 {% endblock %}

+ 71 - 69
src/Packagist/WebBundle/Resources/views/Web/view.html.twig

@@ -5,79 +5,81 @@
 {% endblock %}
 
 {% block content %}
-<div class="package">
-    <h1>{{ package.name }}</h1>
-    <p class="maintainers">Maintainer{{ package.maintainers|length > 1 ? 's' : '' }}:
-    {% for maintainer in package.maintainers %}
-        {{ maintainer.username }}{{ loop.last ? '' : ', ' }}
-    {% endfor %}</p>
+    <div class="box clearfix">
+        <div class="package">
+            <h1>{{ package.name }}</h1>
+            <p class="maintainers">Maintainer{{ package.maintainers|length > 1 ? 's' : '' }}:
+            {% for maintainer in package.maintainers %}
+                {{ maintainer.username }}{{ loop.last ? '' : ', ' }}
+            {% endfor %}</p>
 
-    {% if form is defined %}
-        <div>
-            <strong id="add-maintainer"><a href="#">Add Maintainer</a></strong>
-            <form id="add-maintainer-form" class="hidden" action="" method="POST" {{ form_enctype(form) }}>
+            {% if form is defined %}
                 <div>
-                    <p>
-                        {{ form_label(form.user, "Username") }}
-                        {{ form_errors(form.user) }}
-                        {{ form_widget(form.user) }}
-                    </p>
-                    {{ form_rest(form) }}
-                    <input id="submit" type="submit" value="Submit" />
+                    <strong id="add-maintainer"><a href="#">Add Maintainer</a></strong>
+                    <form id="add-maintainer-form" class="hidden" action="" method="POST" {{ form_enctype(form) }}>
+                        <div>
+                            <p>
+                                {{ form_label(form.user, "Username") }}
+                                {{ form_errors(form.user) }}
+                                {{ form_widget(form.user) }}
+                            </p>
+                            {{ form_rest(form) }}
+                            <input id="submit" type="submit" value="Submit" />
+                        </div>
+                    </form>
                 </div>
-            </form>
-        </div>
-    {% endif %}
+            {% endif %}
 
-    {% if package.versions|length %}
-        <ul class="packages">
-            {% for version in package.versions %}
-                <li{% if loop.index0 > 0 and not ('-dev' in version.version) %} class="has-popup"{% endif %}>
-                    <section>
-                        <h1>{{ version.version }}</h1>
-                        {% if loop.index0 > 0 and not ('-dev' in version.version) %}
-                            <div class="package-details"><div>
-                        {% else %}
-                            <div class="package-full-details"><div>
-                        {% endif %}
-                        <p class="description">{{ version.description }}</p>
-                        <p class="license">License: {{ version.license ? version.license|join(', ') : "Unknown" }}</p>
-                        <p class="release-date">Date: {{ version.releasedAt|date("Y-m-d") }}</p>
-                        <p class="links">
-                            {% if version.homepage %}
-                                Homepage: <a href="{{ version.homepage }}">{{ version.homepage|replace({'http://': ''}) }}</a><br />
-                            {% endif %}
-                        </p>
-                        <p class="links">
-                            Tags:
-                            {% for tag in version.tags -%}
-                                <a href="{{ url("browse", { "tag" : tag.name }) }}">{{ tag.name }}</a>{{ loop.last ? '' : ', ' }}
-                            {%- endfor %}
-                        </p>
-                        <p class="authors">Author{{ version.authors|length > 1 ? 's' : '' }}:
-                            {% for author in version.authors %}
-                                {% if author.homepage %}
-                                    <a href="{{ author.homepage }}">{{ author.name }}</a>
+            {% if package.versions|length %}
+                <ul class="packages">
+                    {% for version in package.versions %}
+                        <li{% if loop.index0 > 0 and not ('-dev' in version.version) %} class="has-popup"{% endif %}>
+                            <section>
+                                <h1>{{ version.version }}</h1>
+                                {% if loop.index0 > 0 and not ('-dev' in version.version) %}
+                                    <div class="package-details"><div>
                                 {% else %}
-                                    {{ author.name }}
+                                    <div class="package-full-details"><div>
                                 {% endif %}
-                                {% if author.email %}&lt;<a href="mailto:{{ author.email }}">{{ author.email }}</a>&gt;{% endif %}
-                                <br />
-                            {% endfor %}
-                        </p>
-                        <p class="requires">Requirement{{ version.require|length > 1 ? 's' : '' }}:
-                            {% for req in version.require %}
-                                {{ req.packageName }} ({{ req.packageVersion }})<br />
-                            {% endfor %}
-                        </p>
-                    </section>
-                </li>
-            {% endfor %}
-        </ul>
-    {% elseif package.crawledAt is null %}
-        <p>This package has not been crawled yet, some information is missing.</p>
-    {% else %}
-        <p>This package has no released version yet, and little information is available yet.</p>
-    {% endif %}
-</div>
+                                <p class="description">{{ version.description }}</p>
+                                <p class="license">License: {{ version.license ? version.license|join(', ') : "Unknown" }}</p>
+                                <p class="release-date">Date: {{ version.releasedAt|date("Y-m-d") }}</p>
+                                <p class="links">
+                                    {% if version.homepage %}
+                                        Homepage: <a href="{{ version.homepage }}">{{ version.homepage|replace({'http://': ''}) }}</a><br />
+                                    {% endif %}
+                                </p>
+                                <p class="links">
+                                    Tags:
+                                    {% for tag in version.tags -%}
+                                        <a href="{{ url("browse", { "tag" : tag.name }) }}">{{ tag.name }}</a>{{ loop.last ? '' : ', ' }}
+                                    {%- endfor %}
+                                </p>
+                                <p class="authors">Author{{ version.authors|length > 1 ? 's' : '' }}:
+                                    {% for author in version.authors %}
+                                        {% if author.homepage %}
+                                            <a href="{{ author.homepage }}">{{ author.name }}</a>
+                                        {% else %}
+                                            {{ author.name }}
+                                        {% endif %}
+                                        {% if author.email %}&lt;<a href="mailto:{{ author.email }}">{{ author.email }}</a>&gt;{% endif %}
+                                        <br />
+                                    {% endfor %}
+                                </p>
+                                <p class="requires">Requirement{{ version.require|length > 1 ? 's' : '' }}:
+                                    {% for req in version.require %}
+                                        {{ req.packageName }} ({{ req.packageVersion }})<br />
+                                    {% endfor %}
+                                </p>
+                            </section>
+                        </li>
+                    {% endfor %}
+                </ul>
+            {% elseif package.crawledAt is null %}
+                <p>This package has not been crawled yet, some information is missing.</p>
+            {% else %}
+                <p>This package has no released version yet, and little information is available yet.</p>
+            {% endif %}
+        </div>
+    </div>
 {% endblock %}

+ 1 - 4
src/Packagist/WebBundle/Resources/views/layout.html.twig

@@ -39,13 +39,10 @@
 
             <header>
                 {% if page is not defined or page != 'submit' %}
-                <a class="submit" href="{{ path('submit') }}">Submit Package</a>
+                    <a class="submit" href="{{ path('submit') }}">Submit Package</a>
                 {% endif %}
                 <h1><a href="{{ path('home') }}">Packagist</a></h1>
                 <h2>The PHP package archivist.</h2>
-                {% if page|default('') == 'home' %}
-                    <p>Packagist is the main <a href="{{ path('about.composer') }}">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a>.</p>
-                {% endif %}
             </header>
 
             <div class="main" role="main">