From f025a9f65ecd76e4442ce62684218ecb81506c9b Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 4 Feb 2007 04:31:39 -0800 Subject: basic html design roughed in, django project run and admin started TODO: ie testing (ugh, fuck that) TODO: get photos section working TODO: ... etc --- .gitignore | 1 + bn_django/bn_wiki/__init__.py | 0 bn_django/bn_wiki/models.py | 3 - bn_django/bn_wiki/views.py | 1 - bn_django/git_wiki/__init__.py | 0 bn_django/git_wiki/models.py | 3 + bn_django/git_wiki/views.py | 1 + bn_django/settings.py | 6 ++ bn_django/templates/.about.html.swp | Bin 0 -> 12288 bytes bn_django/templates/about.html | 31 ++++++++ bn_django/templates/base.html | 51 +++++++++++++ bn_django/templates/copyright.html | 12 +++ bn_django/templates/credits.html | 19 +++++ bn_django/templates/flatpages/default.html | 7 ++ bn_django/templates/frontpage.html | 31 ++++++++ bn_django/templates/static/directory_index.html | 13 ++++ bn_django/urls.py | 14 +++- knowledge/dummy_stub | 3 + static/img/orange_small.jpg | Bin 0 -> 19479 bytes static/style/default.css | 94 +++++++++++++++++++++--- 20 files changed, 274 insertions(+), 16 deletions(-) delete mode 100644 bn_django/bn_wiki/__init__.py delete mode 100644 bn_django/bn_wiki/models.py delete mode 100644 bn_django/bn_wiki/views.py create mode 100644 bn_django/git_wiki/__init__.py create mode 100644 bn_django/git_wiki/models.py create mode 100644 bn_django/git_wiki/views.py create mode 100644 bn_django/templates/.about.html.swp create mode 100644 bn_django/templates/about.html create mode 100644 bn_django/templates/base.html create mode 100644 bn_django/templates/copyright.html create mode 100644 bn_django/templates/credits.html create mode 100644 bn_django/templates/flatpages/default.html create mode 100644 bn_django/templates/frontpage.html create mode 100644 bn_django/templates/static/directory_index.html create mode 100644 knowledge/dummy_stub create mode 100644 static/img/orange_small.jpg diff --git a/.gitignore b/.gitignore index 354894d..d4d8848 100644 --- a/.gitignore +++ b/.gitignore @@ -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/bn_wiki/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bn_django/bn_wiki/models.py b/bn_django/bn_wiki/models.py deleted file mode 100644 index 71a8362..0000000 --- a/bn_django/bn_wiki/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/bn_django/bn_wiki/views.py b/bn_django/bn_wiki/views.py deleted file mode 100644 index 60f00ef..0000000 --- a/bn_django/bn_wiki/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/bn_django/git_wiki/__init__.py b/bn_django/git_wiki/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/bn_django/git_wiki/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/bn_django/git_wiki/views.py b/bn_django/git_wiki/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/bn_django/git_wiki/views.py @@ -0,0 +1 @@ +# Create your views here. 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 new file mode 100644 index 0000000..40f88fd Binary files /dev/null and b/bn_django/templates/.about.html.swp differ 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 %} +

+

+ +
+
the perp
+
+This website is the web presence of Bryan Newbold. It serves as a: +
+
brain dump +
so I won't forget +
photo gallery +
browsable code repository +
so people (including myself!) don't have to rewrite +
home for other projects +
like... mmmmm +
waste of time +
(most importantly!) +
+

+If you're curious about the technology that runs the site, see the credits. +{% 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 @@ + + + + + +bryannewbold.com + + +

+ +
+
+ +{% block path %}{% endblock %} + +

{% block title %}Hey Hey Hey!{% endblock %}

+
+{% 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 %} +
+
+ + +
+{% block content %} +Here lies content! +{% endblock %} +
+ + + 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 %} +

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. +

If I had to chose a licence it would probably be MIT or BSD style. +

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! +

operating system

+

It's freeBSD under the hood when not hosted elsewhere. +

web framework

+

The site is powered by the django toolkit (which runs on python). +

I use the stockphoto app written by Jason McBrayer for the photos section. +

text editor

+

vim! fuck emacs! +

versioning system

+

I use git as a revisioning system for the knowledge wiki and my software (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: : : : : : : : : : : : : : +

+{% 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 %} +

Index of {{ directory }}

+{% endblock %} + +{% block content %} + +{% 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.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}), + (r'^style/(?P.*)$', '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 new file mode 100644 index 0000000..6ec36d5 Binary files /dev/null and b/static/img/orange_small.jpg differ 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; } -- cgit v1.2.3