Commits

Anonymous committed ee41753

[layout] New modifications made. Trying to make it a little bit eye candy;
[infra] Creating context_processors script to make contributions to the
HttpRequest object;
[todo] fix the footer bug on the base template. Some items are breaking through.

Comments (0)

Files changed (6)

context_processors.py

+from django import get_version as django_version
+from mercurial import __version__ as hg_version
+
+def softwaresVersions(request):
+    return {"django_version": django_version(), "hg_version": hg_version.version}

htdocs/static/styles.css

 }
 
 html {
-		height: 100%;
+	height: 100%;
 }
 
 body {
 #main {
 	position: relative;
 	width: 100%; 
-	min-height: 100%;
- }
+	height: 100%;
+}
 
 * html #main {
 	height: 100%;
 	width: auto;
 	min-width: 100%;
 	background-color: #739ABD;
-	-background: transparent url("top_bg.png") repeat-x left;
 	height: 75px;
 	border-top: 6px solid #EFEFF7;
 	border-bottom: 6px solid #526671;
 }
 
 #header {
-	position: absolute;
+	position: relative;
 	width: 900px;
 	height: auto; 
 	left: 50%;
 	margin: 0px;
 	padding: 0px;
 	font-size: 28pt;
-	color: #FFFFFF;
+	color: #bbcfe1;
+	text-shadow: #333 0px -2px 0.3em;
 }
 
 #logo p strong {
-	color: #000000;
+	color: #bbcfe1;
 	font-size: 28pt;
 }
 
 	height: 40px;
 }
 
+#menu-bar a {
+	text-shadow: #333 0px 0px 0.2em;
+}
+
 #menu-bar ul {
 	float: right; 
 	list-style: none;
 #content{
 	position: relative;
 	padding: 5px;
-	padding-bottom: 80px;
 	width: 900px;
 	left: 50%; 
 	margin-left: -450px;
-	min-height: 450px !important;
+	padding-bottom: 80px;
 }
 
 #footer {
 	position: absolute;
-	bottom: 0;
+	bottom: 0px;
 	height: 75px;
 	background-color: #739ABD;
 	border-top: solid 6px #526671; 
 	border-bottom: solid 6px #EFEFF7; 
 	min-width:100%;
+	font-size: 11pt;
+}
+
+#footer div {
+	font-size: inherit;
+	margin-top: 30px;
+	margin-left: 150px;
+	margin-right: 150px;
+	color: #FFF;
+	text-align: center;
+	text-shadow: #000 0px 0px 0.3em; 
+}
+
+#footer div strong {
+	font-size: inherit;
+	color: #000;
+	text-shadow: None; 
 }
 
 #clear {
 
 .dialog ul li.body {
 	padding-top: 5px;
-	padding-left: 15px;	
+	padding-left: 5px;	
 }
 
 .dialog ul li.foot {
 
 #recent {
 	width: 490px;
-	min-height: 400px;
+	min-height: 300px;
 }
 
 #profile {
 
 #profile-edit {
 	width: 350px;
-	min-height: 170px;
+	min-height: 200px;
 }
 
 #what-is {
 }
 
 #left-side {
-	position: absolute;
+	position: relative;
 	width: 50%;
 	float: left;
 	height: 100%;
 }
 
 #right-side {
-	position: absolute;
+	position: relative;
 	width: 50%;
 	float: right;
 	height: 100%;
 from freehg.repos.models import Repo, FreeHGConf
 from django.contrib.auth.models import User
 from django.shortcuts import get_object_or_404, render_to_response
-from django.template import RequestContext
+from django.template import Context, RequestContext
 from django.contrib.auth import login, authenticate
 from django.http import HttpResponseRedirect
 from django.contrib.auth.decorators import login_required
 
 
 def frontpage(request):
-    
     if request.POST.get('reponame', False):
         repo_form = NewRepoForm(request.POST)
     else:
         return HttpResponseRedirect(repo.get_absolute_url())
 
     real_url = FreeHGConf.objects.all()[0]
-
+    
     return render_to_response('frontpage.html',
         dict(
             repo_form=repo_form,
 
 DATABASE_ENGINE = 'mysql'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
 DATABASE_NAME = 'freehg'             # Or path to database file if using sqlite3.
-DATABASE_USER = 'root'             # Not used with sqlite3.
-DATABASE_PASSWORD = 'root'         # Not used with sqlite3.
+DATABASE_USER = 'freehg'             # Not used with sqlite3.
+DATABASE_PASSWORD = 'fr33hg'         # Not used with sqlite3.
 DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
 DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
 
 HG_TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'hgtemplates')
 
 AUTHENTICATION_BACKENDS = (
-#    'django.contrib.auth.backends.ModelBackend', # default backend
-    'freehg.repos.auth.backends.LDAPBackend',
+    'django.contrib.auth.backends.ModelBackend', # default backend
+#    'freehg.repos.auth.backends.LDAPBackend',
 )
 
 MIDDLEWARE_CLASSES = (
     os.path.join(os.path.dirname(__file__), 'templates'),
 )
 
+TEMPLATE_CONTEXT_PROCESSORS = (
+    'django.core.context_processors.auth',
+    'freehg.context_processors.softwaresVersions',
+)
+
+
 INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',

templates/base.html

 		</div><!-- #content -->
 		<div id="clear"></div>
 		<div id="footer">
-			&nbsp;
+			<div>freeHg copyright 2009 by <strong>freeHg Team</strong> | Django <strong>{{django_version}}</strong> / Hg <strong>{{hg_version}}</strong></div>
 		</div><!-- #footer -->
 	</div><!-- #main -->
 </body>

templates/profile.html

 {% extends "base.html" %}
 
-{% block title %}Profile for {{request.user.username}}{% endblock %}
+{% block title %}Profile for {{user.username}}{% endblock %}
 
 {% block content %}
 <div id="left-side">
 		<ul>
 	    <li class="body"><strong>User Name:</strong> {{user.username}}</li>
 	    <li class="body"><strong>Real Name:</strong> {% if user.get_full_name %}{{user.get_full_name}}{% else %}Humanoid#001634{{user.id}} (<a href="#change-profile">Name yourself</a>){%endif%}</li>
-	    <li class="foot"><strong>Email Address:</strong> {% if user.email %}{{user.email}}{%else%}stranded@desert.island (<a href="#change-profile">Rescue yourself</a>){%endif%}</li>
+	    <li class="body"><strong>Email Address:</strong> {% if user.email %}{{user.email}}{%else%}stranded@desert.island (<a href="#change-profile">Rescue yourself</a>){%endif%}</li>
 		</ul>
 	</div>
 	<br />
 		<ul>
 			<form method="post" action=".">
 			{% for field in form %}
-			<li>{{field.label_tag}}</li>
-			<li>{{field}}</li>
+			<li class="body">{{field.label_tag}}</li>
+			<li class="body">{{field}}</li>
 			{% endfor %}
-			<input type="submit" value="Update Profile"/>
+			<li class="body"><input type="submit" value="Update Profile"/></li>
 			</form>
 		</ul>
 	</div>
 			<p class="title"><strong>Status</strong></p>
 			<ul>
 				{% if user.repo_set.count %}
-				<li class="head">You are using <em>{{disk_usage|filesizeformat}}</em> of disk space.</li>
 		    {% for repo in user.repo_set.all %}
 		    <li class="foot">
 			    <ul>
 					</ul>
 				</li>
 		    {% endfor %}
+				<li class="body">&nbsp;</li>
+				<li class="body">You are using <em>{{disk_usage|filesizeformat}}</em> of disk space.</li>
 		    {% else %}
 		    <li class="body">There's no repositories for this user.</li>
 		    {% endif %}