diff options
author | bnewbold <bnewbold@manus.(none)> | 2007-02-04 04:31:39 -0800 |
---|---|---|
committer | bnewbold <bnewbold@manus.(none)> | 2007-02-04 04:31:39 -0800 |
commit | f025a9f65ecd76e4442ce62684218ecb81506c9b (patch) | |
tree | b303b156110167249c033751fa1c14ede2f75dc4 | |
parent | 08ef0f8e464fed2fe8ec20b6c53220aecc025f2d (diff) | |
download | bnewnet-f025a9f65ecd76e4442ce62684218ecb81506c9b.tar.gz bnewnet-f025a9f65ecd76e4442ce62684218ecb81506c9b.zip |
basic html design roughed in, django project run and admin started
TODO: ie testing (ugh, fuck that)
TODO: get photos section working
TODO: ... etc
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | bn_django/git_wiki/__init__.py (renamed from bn_django/bn_wiki/__init__.py) | 0 | ||||
-rw-r--r-- | bn_django/git_wiki/models.py (renamed from bn_django/bn_wiki/models.py) | 0 | ||||
-rw-r--r-- | bn_django/git_wiki/views.py (renamed from bn_django/bn_wiki/views.py) | 0 | ||||
-rw-r--r-- | bn_django/settings.py | 6 | ||||
-rw-r--r-- | bn_django/templates/.about.html.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | bn_django/templates/about.html | 31 | ||||
-rw-r--r-- | bn_django/templates/base.html | 51 | ||||
-rw-r--r-- | bn_django/templates/copyright.html | 12 | ||||
-rw-r--r-- | bn_django/templates/credits.html | 19 | ||||
-rw-r--r-- | bn_django/templates/flatpages/default.html | 7 | ||||
-rw-r--r-- | bn_django/templates/frontpage.html | 31 | ||||
-rw-r--r-- | bn_django/templates/static/directory_index.html | 13 | ||||
-rw-r--r-- | bn_django/urls.py | 14 | ||||
-rw-r--r-- | knowledge/dummy_stub | 3 | ||||
-rw-r--r-- | static/img/orange_small.jpg | bin | 0 -> 19479 bytes | |||
-rw-r--r-- | static/style/default.css | 94 |
17 files changed, 270 insertions, 12 deletions
@@ -1,5 +1,6 @@ photos media code +bn_django/bn_django.db *.pyc *.pyo diff --git a/bn_django/bn_wiki/__init__.py b/bn_django/git_wiki/__init__.py index e69de29..e69de29 100644 --- a/bn_django/bn_wiki/__init__.py +++ b/bn_django/git_wiki/__init__.py diff --git a/bn_django/bn_wiki/models.py b/bn_django/git_wiki/models.py index 71a8362..71a8362 100644 --- a/bn_django/bn_wiki/models.py +++ b/bn_django/git_wiki/models.py diff --git a/bn_django/bn_wiki/views.py b/bn_django/git_wiki/views.py index 60f00ef..60f00ef 100644 --- a/bn_django/bn_wiki/views.py +++ b/bn_django/git_wiki/views.py diff --git a/bn_django/settings.py b/bn_django/settings.py index 10144d0..282f4c9 100644 --- a/bn_django/settings.py +++ b/bn_django/settings.py @@ -59,6 +59,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'django.middleware.doc.XViewMiddleware', ) @@ -68,6 +69,7 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + '/home/bnewbold/bn-project/bn_django/templates', ) INSTALLED_APPS = ( @@ -75,4 +77,8 @@ INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', + 'django.contrib.admin', + 'django.contrib.flatpages', + 'bn_django.photos', + 'bn_django.git_wiki', ) diff --git a/bn_django/templates/.about.html.swp b/bn_django/templates/.about.html.swp Binary files differnew file mode 100644 index 0000000..40f88fd --- /dev/null +++ b/bn_django/templates/.about.html.swp diff --git a/bn_django/templates/about.html b/bn_django/templates/about.html new file mode 100644 index 0000000..eb03970 --- /dev/null +++ b/bn_django/templates/about.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block path %}{% endblock %} + +{% block title %}About bryannewbold.com{% endblock %} + +{% block right_stuff %} +{% endblock %} + +{% block content %} +<p /> +<div class="lefty_content"> + <img src="/static/img/orange_small.jpg" /> + <br /> + <div class="content_caption">the perp</div> +</div> +This website is the web presence of <a href="k/BryanNewbold">Bryan Newbold</a>. It serves as a: +<dl> + <dt /><a href="/knowledge">brain dump</a> + <dd /> so I won't forget + <dt /><a href="/photos">photo gallery</a> + <dt /><a href="/code">browsable code repository</a> + <dd /> so people (including myself!) don't have to rewrite + <dt />home for other projects + <dd /> like... mmmmm + <dt />waste of time + <dd /> (most importantly!) +</dl> +<p /> +If you're curious about the technology that runs the site, see the <a href="/credits">credits</a>. +{% endblock %} diff --git a/bn_django/templates/base.html b/bn_django/templates/base.html new file mode 100644 index 0000000..a87d0a5 --- /dev/null +++ b/bn_django/templates/base.html @@ -0,0 +1,51 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<link rel="STYLESHEET" type="text/css" href="style/default.css"> +<link rel="STYLESHEET" type="text/css" href="/style/default.css"> +<title>bryannewbold.com</title> +</head> +<body> +<div id="top_bar"> + <div id="top_bar_content"> + <span class="lefty"><a href="/">bryannewbold.com</a></span> + <span class="righty"><a href="/knowledge">knowledge</a> + <a href="/photos">photos</a> + <a href="/code">code</a> + <a href="/projects">projects</a> + </div> +</div> +<div class="content" id="main_title"> +<span class="path"> +{% block path %}{% endblock %} +</span> +<h1>{% block title %}Hey Hey Hey!{% endblock %}</h1> +<div class="right_stuff"> +{% block right_stuff %} + +hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey hey +hey hey hey +{% endblock %} +</div> +</div> + + +<div class="content" id="main_content"> +{% block content %} +Here lies content! +{% endblock %} +</div> +<div class="content_footer" id="footer" name="footer"> +<b> +<a href="/">home</a> +<a href="/about">about</a> +<a href="/credits">credits</a> +<a href="mailto:webmeisterATbryannewbold.com">email the webmaster</a> +<a href="http://web.mit.edu/">hosted by MIT</a> +</b> +<br /> +produced in 2007 by <a href="/k/BryanNewbold">bryan newbold</a>, <a href="/copyright">all rights ignored</a> +</div> +</body> +</html> diff --git a/bn_django/templates/copyright.html b/bn_django/templates/copyright.html new file mode 100644 index 0000000..142cdc6 --- /dev/null +++ b/bn_django/templates/copyright.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}Fuck Copyrights{% endblock %} + +{% block right_stuff %} +{% endblock %} + +{% block content %} +<p />I'm not a big fan of copyrights or licensing. Feel free to use the content and code from this website however you please. I would appreciate attribution or at least letting me know if you're doing something cool, but it's not required. +<p />If I had to chose a licence it would probably be MIT or BSD style. +<p />I don't think i've violated any other person's rights, but if you think something is a copied and/or unattributed drop a dime! +{% endblock %} diff --git a/bn_django/templates/credits.html b/bn_django/templates/credits.html new file mode 100644 index 0000000..b96d2a9 --- /dev/null +++ b/bn_django/templates/credits.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}Software credits{% endblock %} + +{% block right_stuff %} +{% endblock %} + +{% block content %} +This site uses a variety of delicious software! +<h3>operating system</h3> +<p />It's <a href="http://freebsd.org">freeBSD</a> under the hood when not hosted elsewhere. +<h3>web framework</h3> +<p />The site is powered by the <a href="http://djangoproject.com/">django</a> toolkit (which runs on <a href="http://python.org">python</a>). +<p />I use the <a href="http://www.carcosa.net/jason/software/django/stockphoto/">stockphoto</a> app written by Jason McBrayer for the photos section. +<h3>text editor</h3> +<p /><a href="http://vim.org">vim</a>! fuck emacs! +<h3>versioning system</h3> +<p />I use git as a revisioning system for the <a href="knowledge">knowledge wiki</a> and my <a href="code">software</a> (including this site!). +{% endblock %} diff --git a/bn_django/templates/flatpages/default.html b/bn_django/templates/flatpages/default.html new file mode 100644 index 0000000..49c773a --- /dev/null +++ b/bn_django/templates/flatpages/default.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block title %}{{ flatpage.title }}{% endblock %} + +{% block content %} +{{ flatpage.content }} +{% endblock %} diff --git a/bn_django/templates/frontpage.html b/bn_django/templates/frontpage.html new file mode 100644 index 0000000..47a55dd --- /dev/null +++ b/bn_django/templates/frontpage.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block path %}{% endblock %} + +{% block title %}Welcome to a brave new bold world!{% endblock %} + +{% block right_stuff %} +Other sites: : : : : : : : : : : : : : +<ul> + <li /><a href="http://web.mit.edu/bnewbold/www">athena locker</a> +</ul> +{% endblock %} + +{% block content %} + There will be more forthcoming ... + There will be more stuff forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + There will be more forthcoming ... + + +{% endblock %} diff --git a/bn_django/templates/static/directory_index.html b/bn_django/templates/static/directory_index.html new file mode 100644 index 0000000..6df279d --- /dev/null +++ b/bn_django/templates/static/directory_index.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %} +<h1>Index of {{ directory }}</h1> +{% endblock %} + +{% block content %} +<ul> +{% for f in file_list %} +<li><a href="{{ f }}">{{ f }}</a></li> +{% endfor %} +</ul> +{% endblock %} diff --git a/bn_django/urls.py b/bn_django/urls.py index 35b9796..f8b1b62 100644 --- a/bn_django/urls.py +++ b/bn_django/urls.py @@ -3,10 +3,18 @@ from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^bn_django/', include('bn_django.foo.urls')), - (r'^knowledge/', include('bn_django.bn_wiki.urls')), - (r'^code/', include('bn_django.code_browser.urls')), - (r'^photos/', include('bn_django.photo_gallery.urls')), + (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'frontpage.html'}), + (r'^about/$', 'django.views.generic.simple.direct_to_template', {'template': 'about.html'}), + (r'^credits/$', 'django.views.generic.simple.direct_to_template', {'template': 'credits.html'}), + (r'^copyright/$', 'django.views.generic.simple.direct_to_template', {'template': 'copyright.html'}), + + + (r'^knowledge/', include('bn_django.git_wiki.urls')), + (r'^code/', include('bn_django.git_browse.urls')), + (r'^photos/', include('bn_django.photos.urls')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), + (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}), + (r'^style/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static/style'}), ) diff --git a/knowledge/dummy_stub b/knowledge/dummy_stub new file mode 100644 index 0000000..b95de2d --- /dev/null +++ b/knowledge/dummy_stub @@ -0,0 +1,3 @@ +this is a dummy file for the knowledge dir... + +i don't know much yet! diff --git a/static/img/orange_small.jpg b/static/img/orange_small.jpg Binary files differnew file mode 100644 index 0000000..6ec36d5 --- /dev/null +++ b/static/img/orange_small.jpg diff --git a/static/style/default.css b/static/style/default.css index 871e072..f18911e 100644 --- a/static/style/default.css +++ b/static/style/default.css @@ -7,6 +7,7 @@ body { font-family: serif; margin: 0px; padding: 0px; + background-color: #EEEEEE; } a { @@ -14,15 +15,51 @@ a { } h1 { + font-size: 16pt; + font-weight: bold; text-align: center; } +h3 { + margin: 0px; + padding-top: 8px; + padding-bottom: 4px; + padding-left: 30px; + padding-right: 30px; +} + +p { + margin: 0px; +} + hr { - height: 2px; + height: 12px; + padding: 2px; background-color: black; padding: 0px; width: 100%; border: none; + margin: 0px; + border-top: 5px solid #FFFFFF; + border-bottom: 5px solid #FFFFFF; + border-left: 55px solid #FFFFFF; + border-right: 55px solid #FFFFFF; +} + +dt { + font-weight: bold; +} + +dd { + position: relative; + left: 25px; +} + +.path { + font-family: courier; + font-size: smaller; + color: #555555; + margin-left: 8px; } .righty_content { @@ -33,10 +70,25 @@ hr { } .lefty_content { - margin: 3px; + text-align: center; + margin-right: 5px; padding: 1px; float: left; width: 30%; + overflow: hidden; +} + +.lefty_content img { + border: 1px solid black; + width: 90%; +} + +.content_caption { + text-align: center; + font-style: italic; + width: 100%; + font-size: smaller; + font-family: courier; } .lefty { @@ -48,21 +100,42 @@ hr { } .content { + background-color: #FFFFFF; margin-left: 4%; - width: 700px; + width: 680px; + margin-top: 0px; + margin-bottom: 0px; + padding-left: 5px; + padding-right: 5px; + padding-bottom: 5px; } .content_footer { margin-left: 4%; - width: 700px; + width: 685px; font-size: small; font-style: italic; font-family: courier; text-align: center; - width: 700px; + width: 680px; margin-bottom: 5px; margin-top: 0px; - padding-top: 0px; + border-top: 2px solid #000000; + padding-top: 6px; + padding-left: 5px; + padding-right: 5px; +} + +.right_stuff { + font-size: small; + margin-left: 4px; + width: 190px; + height: 0px; + overflow: visible; + float: right; + position: relative; + left: 206px; + top: -11px; } #top_bar { @@ -79,10 +152,12 @@ hr { font-size: smaller; color: #EEEEEE; float: center; - width: 700px; - margin-left: 4%; + width: 684px; padding-top: 2px; padding-bottom: 0px; + padding-left: 3px; + padding-right: 3px; + margin-left: 4%; margin-bottom: 0px; margin-top:0px; } @@ -93,5 +168,6 @@ hr { text-decoration: none; } -#main_content { +#main_title { + border-top: 5px solid #FFFFFF; } |