Commits

Brantley Harris committed f7771b7

Style changes.

Comments (0)

Files changed (11)

onpython3yet/media/css/base.css

+* { margin: 0; padding: 0;}
+
+img { border: none; outline: none; }
+
+body, td {
+    font-family: Helvetica, Arial, "MS Trebuchet", sans-serif;
+    font-size: 14px;
+}
+
+body {
+    text-align: center;
+}
+
+/* Colors */
+body        { color: #666; }
+a           { color: #6ba72a }
+h1, h2, h3  { font-weight: normal; color: #777; }
+h4          { font-weight: normal; font-size: 12px; }
+input.empty { color: #999; }
+hr          { color: #FFF; }
+
+/* Images */
+body {
+    background: url('../img/footer-bg.png');
+}
+
+/* Block */
+h1, h2, h3, h4, p, hr, ol, ul {
+    margin-top: 1em;
+}
+
+h2 { font-size: 22px; }
+h3 { font-size: 18px; }
+
+li {
+    margin-left: 20px;
+}
+
+/* Links */
+a {
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+/* Content */
+#page {
+    background: transparent url('../img/bg.png');
+    padding: 0px 0px 80px;
+}
+
+#logo {
+    position: absolute;
+    left: 48px;
+    top: 26px;
+}
+
+.panel {
+    width: 440px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    color: #666;
+    background: white;
+    text-align: left;
+    -moz-box-shadow: 1px 1px 4px #444;
+    -webkit-box-shadow: 1px 1px 4px #444;
+    box-shadow: 1px 1px 4px #444;
+    padding: 4px 0px 30px;
+}
+
+.panel h2 {
+    margin-top: 0px;
+    padding: 10px 20px;
+    text-align: center;
+}
+
+.panel p, .panel ul, .panel form {
+    margin: 0px 0px 10px;
+    padding: 0px 16px;
+    clear: both;
+}
+
+.panel * + h2 {
+    border-top: 1px solid #EEE;
+}
+
+.panel ul.no-bullets {
+    list-style: none;
+}
+
+.panel ul li {
+    margin-bottom: 8px;
+}
+
+.panel textarea {
+    width: 358px;
+    height: 100px;
+    padding: 4px;
+    border: 1px solid #AAA;
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+.panel input.submit {
+    float: right;
+    margin: 8px 10px;
+}
+
+.panel .info {
+    padding: 0px 10px;
+    font-style: italic;
+    color: #888;
+    text-align: right;
+}
+
+.panel h1, .panel h3 {
+    margin: 0px 10px 10px;
+    margin-top: 0px;
+}
+
+.panel div.summary {
+    margin: 10px;
+}
+
+.panel div.supports {
+    margin: 10px;
+}
+
+a.package + a.package {
+    border-top: 1px solid #EEE;
+}
+
+a.package {
+    padding: 6px 10px;
+    display: block;
+    color: #666;
+    text-decoration: none;
+}
+
+a.package:hover {
+    background-color: #F5F5F5;
+}
+
+a.package .name {
+    font-size: 18px;
+    font-weight: bold;
+    color: #777;
+    text-transform: lowercase;
+}
+
+a.package .dependants {
+    margin-left: 4px;
+    font-size: 12px;
+    color: #888;
+}
+
+a.package-py3k .name {
+    color: #6ba72a;
+}
+
+a.package-py3k {
+    background: transparent url('../img/ok.png') no-repeat center right;
+}
+
+#space {
+    position: relative;
+    width: 900px;
+    margin-left: auto;
+    margin-right: auto;
+    padding-top: 160px;
+}
+
+#left {
+    float: left;
+    margin-top: 80px;
+    width: 400px;
+    border-top-right-radius: 0px;
+    -moz-border-radius-topright: 0px;
+    border-bottom-right-radius: 0px;
+    -moz-border-radius-bottomright: 0px;
+}
+
+.clear {
+    clear: both;
+}
+
+#right {
+    float: right;
+    width: 500px;
+    min-height: 500px;
+}
+
+#footer {
+    border-top: 1px solid white;
+    clear: both;
+    padding: 30px 0px;
+    background: transparent url('../img/footer-bg.png');
+    color: #444;
+}
+
+#footer a {
+    color: #246;
+}

onpython3yet/media/img/bg.png

Added
New image

onpython3yet/media/img/footer-bg.png

Added
New image

onpython3yet/media/img/logo.png

Added
New image

onpython3yet/media/img/ok.png

Added
New image

onpython3yet/settings.py

     # 'django.contrib.admin',
     'home',
     'packages',
-    'django_nose',
+    #'django_nose',
 )
 
 TEST_RUNNER = 'django_nose.runner.NoseTestSuiteRunner'
 
 try:
-    from settings_local.py import *
-except ImportError:
-    pass
+    from settings_local import *
+except ImportError, e:
+    print e

onpython3yet/templates/base.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
-<head>
-<link rel="stylesheet" type="text/css" href="/media/styles/style.css">
-{% block extrastyle %}{% endblock %}
-{% block extrahead %}{% endblock %}
-<title>Are You On Python 3 Yet?</title>
-
-</head>
-<body>
-
-<div id="header">
-	<p><a href="http://python.org">&laquo; Python.org</a></p>
-    <h1>Are You <span class="on-python-3-yet">On Python 3 Yet?</span></h1>
-    <p class="preamble">
-    Probably not!  <a href="http://python.org/download/">Python 3</a> introduced much needed improvements to the Python language but as a result, all code written for Python 2 will not run in version 3 without <a href="http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition">first being ported</a>.  Wait, with so many dependencies how do you know <em>when your code</em> can be ported to Python 3?
-    </p>
-	<h2>This is a website to help the community migrate to Python 3</h2>
-
-</div>
-<div class="colmask threecol">
-	<div class="colmid">
-		<div class="colleft">
-			<div class="col1">
-
-{% block content %}
-{% endblock %}
-
-				<!-- Column 1 end -->
-			</div>
-			<div class="col2">
-			    
-<h3>Are you ready to port?</h3>
-<p>Enter the name of each module, separated by commas:</p>
-
-<form method="get" action="{% url packages.requirements %}">
-<div>
-    <textarea name="r">{{ requirements_input }}</textarea>
-</div>
-<div>
-    <input type="submit" value="Check Dependencies"></form>
-</div>
-</form>
-    
-				<!-- Column 2 end -->
-			</div>
-			<div class="col3">
-
-<h3>Tips</h3>
-<div class="home-tips">
-<ul>
-    <li><a href="http://wiki.python.org/moin/PortingToPy3k">How to port to Python 3</a></li>
-    <li>In your setup.py file add this <a href="http://docs.python.org/py3k/distutils/apiref.html">classifier</a> when your package is Python 3 compatible: <em>Programming Language :: Python :: 3</em></li>
-</ul>
-</div>
-				<!-- Column 3 end -->
-			</div>
-		</div>
-	</div>
-</div>
-<div id="footer">
-</div>
-
-</body>
+<!DOCTYPE html>
+<html>
+    <head>
+        <link rel="stylesheet" type="text/css" href="/media/css/base.css">
+        {% block extrastyle %}{% endblock %}
+        {% block extrahead %}{% endblock %}
+        <title>On Python 3 Yet?</title>
+        
+        <link rel="stylesheet" href="css/base.css" type="text/css" title="no title" charset="utf-8">
+    </head>
+    <body>
+        <div id="page">
+            <a href="/" id="logo"><img src="/media/img/logo.png"/></a>
+        
+            <div id="space">
+                <div id="left" class="panel">
+                    <h2>find the status of your dependancies</h2>
+                    <p>
+                        <form method="get" action="{% url packages.requirements %}">
+                            <textarea name="r">{{ requirements_input }}</textarea>
+                            <input type="submit" value="Check Dependencies" class="submit"></form>
+                            <div class="clear"></div>
+                        </form>
+                    </p>
+                
+                    <h2>Questions</h2>
+                    <ul class="no-bullets">
+                        <li> <a href="">How do I mark my package as on Python 3?</a> </li>
+                        <li> <a href="">What are some tools for porting to Python 3?</a> </li>
+                        <li> <a href="">How do I port to Python 3?</a> </li>
+                        <li> <a href="">What is the status of Python 3?</a> </li>
+                    </ul>
+                </div>
+        
+                <div id="right" class="panel">
+                    {% block content %}
+                    {% endblock %}
+                </div>
+            
+                <div class="clear"></div>
+            </div>
+        </div>
+            
+        <div id="footer">
+            This service brought to you by the letters: <a href="http://farmdev.com/">KM</a> &amp; <a href="http://brantley-harris.com">BH</a>
+        </div>
+    </body>
 </html>

onpython3yet/templates/home/index.html

 {% extends 'base.html' %}
 
-{% block content %}
-			    
-<h3>2.x Packages Most Depended On</h3>
-<div>{{ dependend_on_total }} packages out of {{ total }}</div>
-<ul>
-{% for pkg in most_depended_on  %}
-  <li><span class="required_package_{{ pkg.required_count }}">
-      <a href="{% url packages.show pkg.name %}" 
-         title="{{ pkg.name }}, {{ pkg.required_count }} dependents">
-         {{ pkg.name }}</a>
-      </span>
-  </li>
-{% endfor %}
-</ul>
-
+{% block content %}	    
+    <h2>2.x Packages Most Depended On</h2>
+    <div class="info">{{ dependend_on_total }} packages out of {{ total }}</div>
+    {% for pkg in most_depended_on %}
+        {% include "pkg_link.html" %}
+    {% endfor %}
 {% endblock %}

onpython3yet/templates/packages/requirements.html

 
 {% block content %}
 
-<div id="requirements-results"
-     data-requirements="{{ requirements }}"
-     data-url="{% url packages.query %}">
-  <h3>Your required packages</h3>
-  <div class="results"></div>
-</div>
+    <div id="requirements-results"
+         data-requirements="{{ requirements }}"
+         data-url="{% url packages.query %}">
+      <h3>Your required packages</h3>
+      <div class="results"></div>
+    </div>
 
 {% endblock %}

onpython3yet/templates/packages/show.html

-<h1>{{ package.name }}</h1>
-<h4>{{ package.summary }}</h4>
-<p>
-    <b>Supports Python 3?</b>
-    {% if package.supports_python_3 %}
-        Yes
-    {% else %}
-        No
+{% extends "base.html"%}
+
+{% block content %}
+    <h1>{{ package.name }}</h1>
+
+    <div class="summary">{{ package.summary }}</div>
+
+    <div class="supports">
+        Supports Python 3?
+        <b>{% if package.supports_python_3 %}
+            Yes
+        {% else %}
+            No
+        {% endif %}</b>
+    </div>
+    
+    {% if package.description %}
+    <p>
+        {{ package.description }}
+    </p>
     {% endif %}
-</p>
-<p>
-    {{ package.description }}
-</p>
-<h4>Required Packages</h4>
-<ul>
-{% for req in package.requirements.all %}
-    <li><a href="{% url packages.show req.required_package.name %}">{{ req.required_package.name }}</a></li>
-{% endfor %}
-</ul>
+    
+    {% if package.requirements.count %}
+    <h3>Required Packages</h3>
+    {% for req in package.requirements.all %}
+        {% with req.required_package as pkg %}
+            {% include "pkg_link.html" %}
+        {% endwith %}
+    {% endfor %}
+    {% endif %}
 
-<h4>Packages that depend on {{ package.name }}</h4>
-<ul>
-{% for req in package.dependents.all %}
-    <li><a href="{% url packages.show req.package.name %}">{{ req.package.name }}</a></li>
-{% endfor %}
-</ul>
+    {% if package.dependents.count %}
+    <h3>Dependants</h3>
+    {% for req in package.dependents.all %}
+        {% with req.package as pkg %}
+            {% include "pkg_link.html" %}
+        {% endwith %}
+    {% endfor %}
+    {% endif %}
+{% endblock %}

onpython3yet/templates/pkg_link.html

+<a href="{% url packages.show pkg.name %}" class="package">
+    <div class="name">{{ pkg.name }}</div>
+    <div class="dependants">{{ pkg.required_count }} dependant{{ pkg.required_count|pluralize }}</div>
+</a>