From 630b0f26fc5dc970d8634e58489c41c5a40481f1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 4 Nov 2008 05:02:37 +0000 Subject: Restructure the theme code to be more like WordPress / Habari. Now, the controller initiates a request to a top level page (eg: album.html.php) which is then free to include whatever other page chunks it wants with calls like display('header.html') ?> Variables like $item and $children are in the global space for all views. theme.php helper is now Theme.php library which lets us store the name of the theme inside the variable itself. This means that the theme does not have to know its own name because you can use $theme->url() for all urls to stuff inside the theme itself, which makes it possible to cline a theme without changing a single line. Still using the mock album UI. --- themes/default/views/album.html.php | 128 ++++++++++++++------------ themes/default/views/footer.html.php | 7 ++ themes/default/views/header.html.php | 53 +++++++++++ themes/default/views/page_footer.html.php | 4 - themes/default/views/page_header.html.php | 30 ------ themes/default/views/page_sidebar.html.php | 141 ----------------------------- themes/default/views/sidebar.html.php | 141 +++++++++++++++++++++++++++++ 7 files changed, 271 insertions(+), 233 deletions(-) create mode 100644 themes/default/views/footer.html.php create mode 100644 themes/default/views/header.html.php delete mode 100644 themes/default/views/page_footer.html.php delete mode 100644 themes/default/views/page_header.html.php delete mode 100644 themes/default/views/page_sidebar.html.php create mode 100644 themes/default/views/sidebar.html.php (limited to 'themes') diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index 10930daa..2abb810f 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -1,72 +1,84 @@ - +display('header.html') ?> -
-
-

Christmas 2007

- (interesting information about the Album) - Slideshow -
+
+
+
+ -
- photo" /> -

Album title

- -
+
+
+

title ?>

+ description ?> + Slideshow +
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Album title

+ +
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- photo" /> -

Photo title

-
+
+ photo" /> +

Photo title

+
-
- Items 1-10 of 34 - first - previous - - last +
+ photo" /> +

Photo title

+
+ +
+ Items 1-10 of 34 + first + previous + + last +
+
+ +
+ display('sidebar.html') ?>
+ +display('footer.html') ?> diff --git a/themes/default/views/footer.html.php b/themes/default/views/footer.html.php new file mode 100644 index 00000000..ab40a417 --- /dev/null +++ b/themes/default/views/footer.html.php @@ -0,0 +1,7 @@ + +
+ Powered by GalleryX | About this Gallery | ... +
+
+ + diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php new file mode 100644 index 00000000..797dcb7c --- /dev/null +++ b/themes/default/views/header.html.php @@ -0,0 +1,53 @@ + + + + + Browse Photos :: <?= $item->title ?> + + + + + + " media="screen,projection" /> + + + + + + + + + + + + +
+
+ " src="url("images/logo.png") ?>" /> + +

title ?>

+ +
+ | + +
+ + + + + +
+ "/> + +
+
diff --git a/themes/default/views/page_footer.html.php b/themes/default/views/page_footer.html.php deleted file mode 100644 index 4e15fbff..00000000 --- a/themes/default/views/page_footer.html.php +++ /dev/null @@ -1,4 +0,0 @@ - -
- Powered by GalleryX | About this Gallery | ... -
diff --git a/themes/default/views/page_header.html.php b/themes/default/views/page_header.html.php deleted file mode 100644 index 58eb8847..00000000 --- a/themes/default/views/page_header.html.php +++ /dev/null @@ -1,30 +0,0 @@ - -
- " src="" /> - -

title ?>

- -
- | - -
- - - - - -
- "/> - -
-
diff --git a/themes/default/views/page_sidebar.html.php b/themes/default/views/page_sidebar.html.php deleted file mode 100644 index 923b4e4e..00000000 --- a/themes/default/views/page_sidebar.html.php +++ /dev/null @@ -1,141 +0,0 @@ - -
- -
-

Album Navigation

- -
-
    -
  • Gallery -
      -
    • Friends & Family -
        -
      • Christmas 2006
      • -
      • Family Reunion
      • -
      • Christmas 2007
      • -
      -
    • -
    • Vactions -
        -
      • Cuba
      • -
      • Europe
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/themes/default/views/sidebar.html.php b/themes/default/views/sidebar.html.php new file mode 100644 index 00000000..923b4e4e --- /dev/null +++ b/themes/default/views/sidebar.html.php @@ -0,0 +1,141 @@ + +
+ +
+

Album Navigation

+ +
+
    +
  • Gallery +
      +
    • Friends & Family +
        +
      • Christmas 2006
      • +
      • Family Reunion
      • +
      • Christmas 2007
      • +
      +
    • +
    • Vactions +
        +
      • Cuba
      • +
      • Europe
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-- cgit v1.2.3