True variable width theme

izvir

Joined: 2009-07-28
Posts: 5
Posted: Tue, 2009-07-28 20:03

Hi guys,
I would like to know, if there is anyway you can make a true variable-width theme for G3. In the theme settings you set how many images are per page, but there are always three in one row. I would like the theme to place images in rows according to screen size, just like in Google Picasaweb. Is there anyway I can make this happen?

Thanks!
izvir

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-07-28 20:10

Go for it. So far there is only the default theme and I've seen one other other person create a theme.

Copy /gallery3/themes/default into a new directory like /gallery3/themes/MyTheme and start hacking away at the theme files under the views directory /gallery3/themes/MyTheme/views/

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-07-28 20:58

Create your own theme like nivekiam said and just change:
themes/default/views/page.html.php

    <div id="doc4" class="yui-t5 gView">

to:

    <div id="doc3" class="yui-t5 gView">

That will give you 100% page width.
Read up on grids:
http://developer.yahoo.com/yui/examples/grids/grids-doc.html for other widths.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
izvir

Joined: 2009-07-28
Posts: 5
Posted: Wed, 2009-07-29 07:13

Thanks! Looks like I should get myself more familiarized with YUI. Anyways, I tried the above; and it indeed does give the page 100% width. Here's the test gallery:
http://izvir-klub.homeip.net/gallery3/index.php/Ultegra_6700

The problem is, there are still only three images in one row. So, which file (or where is the parameter?) should I go to change that?

Thanks again!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-07-29 15:06

OK, now you have a fluid width page but have a fixed width containers inside.
Edit the css:

#gContent {
  font-size: 1.2em;
  padding-left: 20px;
  position: relative;
  width: 696px;
}

#gSidebar {
  background-color: #fff;
  font-size: .9em;
  padding: 0 20px;
  width: 220px;
}

and adjust the width of gContent to something like 95% and see if that works out.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
izvir

Joined: 2009-07-28
Posts: 5
Posted: Wed, 2009-07-29 23:27

Thanks! Works like a dream. Really appreciate your help!

Best regards.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-30 01:03

How does it feel to be a theme developer now? :-) not too bad was it?
Would be nice if to copied the orgianl theme and created a new one. Then you could zip up the theme, post it here for others that would like the full width.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2010-07-08 22:36

Well nobody stepped up to the plate so I offer my version of the wide wind theme.

Attached.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-09-29 21:44

Updated for the current code base?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2010-09-29 21:49

http://codex.gallery2.org/Gallery3:Themes:widewind

Updated. Had some issues with file attachments so just used the codex.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-09-29 21:54

Sweet! Thanks Dave!
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here