|
From: Andres M. <amo...@ga...> - 2007-11-08 09:03:30
|
Hi Sanjay, I am writing a small blurp of the new more robust theme support that I added to NDLB. It was built using the plug-in theme_generator. The way it works is that each theme may have its own stylesheets, layouts, views, and javascripts. Please see the small article I wrote on theme support here for a brief introduction: http://www.gaugeus.com/ramblings/2007/11/4/adding-theme-support-to-a-ruby-on -rails-application These four get stored separately under the folder /ndlb/themes/name-of-theme, which makes it very neatly compartmentalized. The most relevant concept you should get from it is that in order to access theme specific stylesheets and javascripts you have to use theme helpers and in order to have customized views and layouts, you only have to follow the same folder structure and the theme's views and layouts will automatically override the default ones. Relevant to what we are doing now, the new theme support, allows for collections to have their own themes. I have created a collection called "Centenary Celebration" and have added all of the functionality Sanjay suggested in the design he sent me. I looks aweful, but works. Now it is up to Sanjay to implement well the skeletal CSS and rhtml pages that I have provided. See http://geotourism.mobi/ndlb/ And then here: http://geotourism.mobi/ndlb/collection/centenary-celebration Notice how the header is different, the links etc. It no media because no media has been added, but once it is added, it will work as it should. The articles associated with centenary collection will be displayed on right under About Bhutan. Below the xxx in the center panel a random picture, video and document will be displayed that works as a link to the image, video, and document gallery. The links above also point to the right place. Sanjay, the theme support neatly encapsulates everything. YOU ONLY NEED TO CHANGE what is under the ndlb\themes\centenary folder. Any image you add to this page, you put in ndlb\themes\centenary\images. Any template you change, you change in ndlb\themes\centenary\views, etc. I went out of my way to have the centenary page run under NDLB but at the same time to have its own home. Please follow the conventions so that changes you intend for the centenary page don't break ndlb. Sanjay, please update the CSS and rhtml with your design and commit. I will now switch back to other urgent tasks I have for THDL. I will be available for questions or consulting, but my contribution in terms of heavy development is done for now; at least until it's time to fix bugs! For the calendar, I suggest that Pema generate a calendar with the google apps he created for e-bhutan. This allows for embedding a calendar into the website (see settings -> Calendar details -> embed this calendar), linking to specific events, etc. Pema, once you create a calendar in google apps, you can assign Sanjay or whomever with read/write privileges on it and he can take it from there. Take care, Andres |