Forum .LRN Q&A: New theme released

Collapse
Posted by Giancarlo Luxardo on
I have commited a new theme to CVS under new-portal for the oacs-5-1 branch. The only file which has been modified is: defaults.sql (postgres and oracle).

In order to enable this theme called 'kelp-theme' you have to do the following:

1) enable it in the db (possibly with psql or sqlplus),

2) copy the following files from the directory kelp-theme:
cp packages/new-portal/www/themes/kelp-theme/kelp-theme.adp packages/new-portal/www/themes/
cp packages/new-portal/www/themes/kelp-theme/dotlrn/dotlrn-master-kelp.adp packages/dotlrn/www/
cp packages/new-portal/www/themes/kelp-theme/dotlrn/dotlrn-master-kelp.tcl packages/dotlrn/www/
cp packages/new-portal/www/themes/kelp-theme/dotlrn/resources/* packages/dotlrn/www/resources/
cp packages/new-portal/www/themes/kelp-theme/site-master-kelp.css packages/acs-subsite/www/resources/
cp packages/new-portal/www/themes/kelp-theme/site-master-kelp.adp www/
cp packages/new-portal/www/themes/kelp-theme/site-master-kelp.tcl www/
cp packages/new-portal/www/themes/kelp-theme/resources/* www/resources/

3) change the DefaultMaster parameter in the Main Site from:
/packages/dotlrn/www/dotlrn-master
to:
/packages/dotlrn/www/dotlrn-master-kelp

4) browse to: /dotlrn/admin/portal-templates
and change theme to kelp for every portal type

Thanks to Malte and Nima for their advices. Credit goes to Luis Alberto for the graphic design.

Collapse
2: Re: New theme released (response to 1)
Posted by Victor Guerra on
The new theme looks great!.
Great work
Collapse
3: Re: New theme released (response to 1)
Posted by Orzenil Silva Junior on
Congratulations Giancarlo!

This new theme is a good example how dotlrn can be very customized. Maybe we could move to get more themes inspired by this work.

Thanks for this post too so I could learn more about how to build new themes for dotlrn. Until now we were adding graphics for portlets using a UI wrote by Rodrigo Proença (see https://openacs.org/forums/message-view?message_id=213757). Your approach is very instructive for us. Now we could move quickly to get our graphics very integrated in a new theme following your approach.

Thanks

Collapse
4: Re: New theme released (response to 1)
Posted by Mark Aufflick on
Giancarlo - this theme is fantastic!

There are two issues I have found so far, both in Safari on Macos. The most serious one is that the content body hugs the right of the screen and only uses the required width (ie. not 100%). That can be fixed with the following patch (I have lost my cvs commit ability in some server upgrade, so you can apply this if you like it). Note that after you patch dotlrn-master-kelp.css, if you do a ctrl-shift-reload on a page in firefox, the rendering won't look quite right. This seems only to be an artifact in any window that had previously downloaded the previous style sheet. If you browse the same page in a new window (no need to restart) it renders perfectly.

The other issue is that the top control-strip (header-dati) floats half way between the top of the screen and the main content box. I couldn't easily see how to fix this, and it doesn't impair the usability of the theme, just the aesthetics. If my client goes with this theme I will try harder to fix it.

Here is the aformentioned patch:

$ cvs diff -u dotlrn-master-kelp.css
Index: dotlrn-master-kelp.css
===================================================================
RCS file: /cvsroot/openacs-4/packages/new-portal/www/themes/kelp-theme/dotlrn/resources/Attic/dotlrn-master-kelp.css,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 dotlrn-master-kelp.css
--- dotlrn-master-kelp.css      5 May 2005 13:22:17 -0000       1.1.2.1
+++ dotlrn-master-kelp.css      29 May 2005 12:11:46 -0000
@@ -777,6 +777,7 @@
        background-image: url(01_cont_shadow_des.png);
        background-repeat: repeat-y;
        background-position: right;
+       width: 100%;
 }
 
 div#container-gen{
@@ -865,4 +866,4 @@
        background-image:url(01_cont_foot_des.png);
        background-repeat: no-repeat;
        background-position: top  right;
-}
\ No newline at end of file
+}
Hmm - I note that the css file is now in the attic - did I catch you in the middle of committing changes?
Collapse
5: Re: New theme released (response to 1)
Posted by Mark Aufflick on
Another 2 slight problems:

One that appears in safari and ie (not firefox) is that the "my calendar" page puts the month view vertically centered and a big white space to the left of the day view.

The other only in safari, the "inactive" tabs (eg. my calendar if you are in my space) obscure the single pixel bottom. They are still obviously the inactive ones due to their colour - so no big useability issue, but the look is not quite as perfect.

Note also that (nearly) the same problems/fixes as apply to safari apply to Konqueror on linux.

As before - given time I will try to nut these issues out.

Collapse
6: Re: New theme released (response to 1)
Posted by Mark Aufflick on
Sorry for the multi-posts! A few more interesting things:

* the ctrl-shift-reload bug seems to be a firefox thing. with any view, if you do a ctrl-shift reload the header images are aligned too low. A regular reload will sort out the rendering.

* along with the MIT theme, it is as good as totally broken in netscape 4 - after a few reloads you can sometimes get myspace readable.

Collapse
7: Re: New theme released (response to 1)
Posted by Alfred Essa on
Giancarlo, Is there a test/demo site where we can take a look? Thanks..
Collapse
8: Re: New theme released (response to 1)
Posted by Malte Sussdorff on
Sure there is a demo site that contains the new theme:

http://demo.cognovis.de

Collapse
9: Re: New theme released (response to 1)
Posted by Tracy Adams on
WOW!!!!!!!!!!!!! It's beautiful and professional. A large step up in first impression.
Collapse
10: Re: New theme released (response to 1)
Posted by Anny Flores on
Let me tell you that the theme is great! Good work.

I'm using it right now and I want to move back the breadcrumbs to the template I simply added the site-master.adp code for the context_bar property to the site-master-kelp.adp file like this:

<div id="container-shadows-des">
<div id="container-shadows-sin">
<div id="context-bar">
  <if @context_bar@ not nil>
    <div id="breadcrumbs">@context_bar;noquote@</div>
  </if>
  <else>
    <if @context:rowcount@ not nil>
      <div id="breadcrumbs">
        <ul>
          <multiple name="context">
            <if @context.url@ not nil>
              <li><a href="@context.url@">@context.label@</a> &#187;</li>
            </if>
            <else>
              <li>@context.label@</li>
            </else>
          </multiple>
        </ul>
      </div>
    </if>
  </else>
  <div id="navlinks">@subnavbar_link;noquote@</div>
  <div style="clear: both;"></div>
</div>

    <slave>

but I'm getting a little problem, the context bar looks like this:  http://home.galileo.edu/~miel/openACS/img1.jpg

Maybe anyone could suggest me a solution to this problem, cause I don't really have much experience with design and I've tried everything.

Thanks in advance
Anny Flores

Collapse
11: Re: New theme released (response to 1)
Posted by Malte Sussdorff on
And while you are at making the context-bar display nicely with the new kelp theme, can you move it to the right, as the left is already crowded with the Page Navigation.
Collapse
12: Re: New theme released (response to 1)
Posted by Malte Sussdorff on
I played around with it a little bit and what I realized is that the context bar can get *very* long, unless we have a patch that limits the context bar to start from the community / class.

Furthermore, the "display on the right" was ment to be right next to the title, but with these long bars it does not make sense at all.

Collapse
Posted by Orzenil Silva Junior on
Hi Anny,

We recently added breadcrumb to kelp theme and could share with you. Here you see a screenshot with a long context bar within a class:

http://www.tekne.portalabipti.org.br/breadcumb.jpg

Collapse
14: Re: New theme released (response to 1)
Posted by Anny Flores on
It looks good and thanks, but what I need to do now is to put the context bar under the My Space tabs rather than above.

Should I add the context bar chunk in the dotlrn-master-kelp.adp?

Thanks

Collapse
15: Re: New theme released (response to 1)
Posted by Anny Flores on
Orzenil, could you tell me where and how did you add the context bar code? I think it looks better that way.

Thanks in advance

Collapse
Posted by Orzenil Silva Junior on
Anny, I created a zip file with little modifications we did.

It includes
- modified www/site-master-kelp.adp
- modified dotlrn/www/resources/dotlrn-master-kelp.css
- two image files (01_contorno_direito.png, 01_contorno_esquerdo.png) which go in dotlrn/www/resources/ directory

The file is here: http://www.tekne.portalabipti.org.br/kelp-breadcrumb.zip

Hope it helps

Collapse
17: Re: New theme released (response to 1)
Posted by Anny Flores on
Thank you Orzenil, it works great!!
Collapse
18: Re: New theme released (response to 1)
Posted by Malte Sussdorff on
I tried to install it on our site and failed. Anny, can you detail the steps that you made to get it to look like Orzenils work ?
Collapse
Posted by David Ortega on
I had a problem with the var "inst_msg". This is what was written in the log file:

can't read "inst_msg": no such variable
while executing
"lang::util::localize ${inst_msg}"
...

So I removed line 40 in file www/site-master-kelp.adp and now it works fine

40c40
<
---

  • @inst_msg;noquote@
  • Congratulations Giarcarlo for the great theme and thank you Orzenil for your instructions.

    Collapse
    20: Re: New theme released (response to 1)
    Posted by Giancarlo Luxardo on

    If you want to limit the size of the context bar, you can replace the labels with icons showing "tool tips", modifying this line in site-master-kelp.adp:
    <li><a href="@context.url@">@context.label@</a> &#187;</li>
    with something like this:
    <li><a href="@context.url@" title="@context.label@"><img border=0 src="/resources/folder.gif" class="img-header"></a> &#187;</li>

    A demo (with a slightly different version) is still running here:
    http://samoa.sii.it
    email: dotlrn@test.sii.it
    password: 1

    Collapse
    21: Re: New theme released (response to 1)
    Posted by Giancarlo Luxardo on
    Mark - The kelp theme has been tested with Firefox, Mozilla and IE. I cannot check with Safari, but I see there are problems with Konqueror and Opera. I think your comments are useful and it would be good if you or someone else can improve the CSS while keeping the compatibility with the other browsers.
    Collapse
    22: Re: New theme released (response to 1)
    Posted by Orzenil Silva Junior on
    Hi,

    Malte, David, sorry for reference to inst_msg var in site-master-kelp.adp code. It is related to a customized application we have. Thank you, Anny, for clarifies this issue - you're right: you just need comment or exclude the line.

    Another issue i found in new-portal/www/themes/kelp-theme.adp is related with changing locale. If you use Kelp and change current locale to other than English the images inside portlets just disappear.

    We are using a modified version for kelp-theme.adp here to deal with this issue. I changed switch-cause statements because i could not get it working with that scheme (i really dont know why). Maybe someone could help?

    Credit for include breadcrumb to kelp goes to Rodrigo Proença.

    Collapse
    Posted by Orzenil Silva Junior on
    sorry, it is missing in my last post: someone already played with that issue - images within portlets and locales - in kelp theme without burying tcl fragments in .ADP code as showed in the modified version i pointed out? Thanks.
    Collapse
    24: Re: New theme released (response to 1)
    Posted by Anny Flores on
    Malte, I didn't replace the files, I only copied the needed code to each file and copied the images to /dotlrn/www/resources.

    Cheers

    Collapse
    25: Re: New theme released (response to 1)
    Posted by Matthew Coupe on
    hi,
    I'm currently trying to create 2 new themes for my dotLRN site and can't seem to 'enable them in the db' as Giancarlo put it in this thread from last year.

    I've added them to the defaults.sql and ran the file using psql but that didn't seem to work. I've created the files and put them under the correct names in the new-portal/themes folder.

    The themes are called ncc-students and ncc-acp and this is what I've put in the default.sql file.

    perform portal_element_theme__new(
    ''<span>#</span>new-portal.ncc_students_theme_name#'',
    ''<span>#</span>new-portal.ncc_students_theme_description#'',
    ''themes/ncc-students-theme'',
    ''themes/ncc-students-theme''
    );
    perform portal_element_theme__new(
    ''<span>#</span>new-portal.ncc_acp_theme_name#'',
    ''<span>#</span>new-portal.ncc_acp_theme_description#'',
    ''themes/ncc-acp-theme'',
    ''themes/ncc-acp-theme''
    );

    Any ideas what I may be doing wrong or have missed out?

    Matthew