Gossamer Forum
Home : Products : Gossamer Links : Discussions :

glinks template feedback

(Page 2 of 2)
> >
Quote Reply
Re: [HyperTherm] glinks template feedback In reply to
You can lay your templates out however you want, but my job is just to make things easier for the typical user of our products (making modifications, upgrades, etc), and that's what the splitting modifications into a separate file accomplishes.

Adrian
Quote Reply
Re: [brewt] glinks template feedback In reply to
One more question-

I have images stored on my system all named in relation to the record ID and currently call them within the HTML using <IMG SRC="http://www.mysite.com/...pix/<%ID%>.jpg" /> When checking my pages, I get told this is no longer legitimate.

I would now like to call these images using the style sheet but don't believe you can use GT tags in the .css files?

If I put <style type="text/css"> at the top of my HTML pages with the appropriate coding- will this override both the core & custom.css for this particular class?

(I did try to find a book on XHTML in the local library- will have to wait until I go to town at the weekend. Do you have any book recommendations?)
Quote Reply
Re: [Alba] glinks template feedback In reply to
In Reply To:
I have images stored on my system all named in relation to the record ID and currently call them within the HTML using <IMG SRC="http://www.mysite.com/...pix/<%ID%>.jpg" /> When checking my pages, I get told this is no longer legitimate.
In xhtml, you have to lowercase all elements/tags and the attribute names, so it should be <img src="..." />

In Reply To:
I would now like to call these images using the style sheet but don't believe you can use GT tags in the .css files?
No, you can't use GT tags in the css files because they aren't parsed by GT::Template. This is also why the files are in the static directory.

In Reply To:
If I put <style type="text/css"> at the top of my HTML pages with the appropriate coding- will this override both the core & custom.css for this particular class?
Yup, as long as you put it below where include_common_head.html is included. It's still preferable to put it in custom.css, since then it will be cached, and it will be one less template that you have modified and will have to keep track of after the next upgrade.

In Reply To:
(I did try to find a book on XHTML in the local library- will have to wait until I go to town at the weekend. Do you have any book recommendations?)
hmm, I don't have any recommendations I can think of off the top of my head. We'll try make a list of them when we get a chance.

Adrian
Quote Reply
Re: [HyperTherm] glinks template feedback In reply to
I must be missing something - where do you edit the luna template regarding graphics? For instance substituting the GT logo for my own on all the pages, etc.

Thanks a lot.

mgeyman
Quote Reply
Re: [brewt] glinks template feedback In reply to
I thought I'd just tell you how I'm doing my CSS styling since it overcomes some of the issues that you are discussing. However it does not use either core.css or custom.css since the procedure is a bit more complicated in order to cover the many differences in browsers that I think may arise with several other users.
I also think that a CSS specific forum (unrelated to a specific GT product) would be interesting instead of needing to refer people to other forums with CSS specific tips, hacks and rules etc.

In the include_common_head.html I have this code :

Code:
<link rel="stylesheet" href="<%config.db_static_url%>/<%t%>/filter.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<%config.db_static_url%>/<%t%>/fontstyles.css" type="text/css" media="screen" />
<script type="text/javascript" src="<%config.db_static_url%>/<%t%>/vnjavascript.js"></script>

I could publish all the code but I think most of it is uninteresting and site specific so I'll give illustrating examples.

In filter.css I have this to direct different browsers to different overriding stylesheets in order to modify the CSS for browsers that do not comply to the W3C guidelines properly, inconsistently or for browser specific bugs :
There are references in my CSS to where I found the relevant information, in order to thank people that share when they do and recognition is due :)

Code:
/** To hide new code from older browsers **/
@import url("w3cbrowsers.css");

/**
* IE55/Win Styles from
* http://tantek.com/CSS/Examples/midpass.html
*/
@media tty {
i{content:"\";/*" "*/}}@m; @import 'ie55.css'; /*";}
}/* */


/**
* IE5/Win Styles from
* http://tantek.com/CSS/Examples/midpass.html
*/
@media tty {
i{content:"\";/*" "*/}}; @import 'ie5.css'; {;}/*";}
}/* */


/**
* IE5/Mac Styles from
* http://stopdesign.com/examples/ie5mac-bpf/ **/
/*\*//*/
@import "iemac.css";
/**/

In fontstyles I have font specific CSS code that is either understood by browsers or they are not capable of understanding CSS anyway. For example :

Code:
/** Text styles **/

.grey {
FONT-SIZE: 11px; COLOR: #333333; FONT-FAMILY: Arial, Helvetica, sans-serif
}

Then in the core CSS file (w3cbrowsers.css) I have this type of code, where 'template_name' is like luna :

Code:
/** Layout **/

BODY {
background: #fff url(../../images/template_name/page_bck.gif) top center repeat-y;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
min-width: 750px;
TEXT-ALIGN: center;
}

Thus I have CSS files in
www/static/template_name

Images in
www/images/template_name

and my templates in

perl/admin/templates/template_name/local

This means I only have to modify the template_name in the w3cbrowsers.css and browser specific files if used.

This works pretty well for me because I have some complicated CSS styling that doesn't work in all browsers and I know Adrian has done a great job here with his CSS because I tested my beta version on IE5.1, IE5.2, IE5.5, IE6 FireFox and Opera 7. Although I haven't added alot of content I think it's pretty impressive.

Hope this helps some of you. I understand that it doesn't follow the initial beta concept but the two file system just won't work for me and I believe in sharing information when it can be relevant to certain users.
I'm not sure what Adrian thinks but I think that it could easily be modified to work with the core.css system in that you could have "w3cbrowsers.css" called "core.css". This way the core.css could be updated like expected and the template would call the filter.css in the template in order to allow for other browser specific CSS files.

John

PS for mozilla specific CSS code this usually works:
Code:
@im\port url("mozilla.css");
I just use FireFox as a basis so I haven't come across the need for hacks there yet...
Significant Media
Quote Reply
Re: [HyperTherm] glinks template feedback In reply to
When the sidebar contains content that takes more room vertically than the main content block, the main block does not fill the same space vertically.

Solution on category pages (does not work on home.html)

copy: contentwrapper & content from core.css
rename as cat_contentwrapper & cat_content and place in custom.css

add the following line to both: height: 320px; setting the px size to your own requirements.
Quote Reply
Re: [Jag] glinks template feedback In reply to
Quote:
I also think that a CSS specific forum (unrelated to a specific GT product) would be interesting instead of needing to refer people to other forums with CSS specific tips, hacks and rules etc.

Good idea, I think those of us who have not used XHTML are having to learn quickly and being able to discuss it as a separate issue would really help.

Also.. please consider a separate forum for GLinks- so as not to cause confusion.
Quote Reply
Re: [Alba] glinks template feedback In reply to
Also the idea of grouping together posts with a common theme is helpful for figuring out where you are likely to find the info.
On the other hand there are pretty specific issues that are arising for people that are wanting do get Links beta to display things in a particular manner for their site. And we all want Adrian to have all the time he needs to get Links released soon...

John
Significant Media
Quote Reply
Re: [brewt] glinks template feedback In reply to
can I suggest that it might be useful to have the following already available in custom.css so they can easily modify them and get started quickly; particularly for people who are new to both XHTML and GLinks.
/*logo size*/ /*your logo should be within the limits of... to fit the templates*/ #logo {
width: 250px;
height: 80px;
}
/*logo filename*/ #logo h1, #logo a {
background: transparent url(logo.gif) top left no-repeat;
}
/*shadow area content height*/ #content {
height: 320px;
}
perhaps people should keep to the original logo size- and it would not be needed but the logo filename is if they want to change to something like a jpeg.
Quote Reply
Re: [Alba] glinks template feedback In reply to
Thanks, we intend to write up some more howto's (like the paging and the overrides posts that I've made), when we get a chance. Changing the logo and page width and sidebar will be my next howto (maybe this weekend if I have time).

Adrian
> >