Difference between revisions of "General guidelines about Portlet StyleSheets"
From Gcube Wiki
(→Header) |
|||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category:TO BE REMOVED]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | '''Homogenizing the D4Science interface''' | |
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==StyleSheet Classes== | ==StyleSheet Classes== | ||
===Header=== | ===Header=== | ||
For using the diligent-header class, you should add in your html tag the following code:<br> | For using the diligent-header class, you should add in your html tag the following code:<br> | ||
− | <span style="color:navy;">class=" | + | <span style="color:navy;">class="d4science-header"</span><br> |
'''Example:'''<br> | '''Example:'''<br> | ||
In order to have the following result:<br> | In order to have the following result:<br> | ||
Line 35: | Line 13: | ||
You must write: | You must write: | ||
<pre><table> | <pre><table> | ||
− | <tr class=" | + | <tr class="d4science-header"> |
<td><img src="browse.png"></td> | <td><img src="browse.png"></td> | ||
<td>Browse</td> | <td>Browse</td> | ||
Line 43: | Line 21: | ||
===Body=== | ===Body=== | ||
− | For the body you should you the css class named " | + | For the body you should you the css class named "<span style="color:navy;">portlet-section-body</span>"<br> |
[[Image:Diligent-body.PNG]] | [[Image:Diligent-body.PNG]] | ||
+ | |||
==Importing Custom-made CSS files== | ==Importing Custom-made CSS files== | ||
There are two ways to import a custom-made css file: | There are two ways to import a custom-made css file: | ||
#In doView() method of your portlet, you write: <span style="color:navy;">response.addProperty("CSS_HREF", request.getContextPath() + "/html/'''''<css-filename>'''''.css");</span> | #In doView() method of your portlet, you write: <span style="color:navy;">response.addProperty("CSS_HREF", request.getContextPath() + "/html/'''''<css-filename>'''''.css");</span> | ||
+ | #Directly in the jsp page: <span style="color:navy;"><link rel="stylesheet" href="<%= request.getContextPath()%>/html/'''''<css-filename>'''''.css" type="text/css"></span> | ||
+ | <br><br> | ||
+ | ---- | ||
+ | |||
+ | ---- | ||
+ | --[[User:Valia|Valia]] 19:22, 25 May 2007 (EEST) |
Latest revision as of 19:15, 6 July 2016
Homogenizing the D4Science interface
StyleSheet Classes
Header
For using the diligent-header class, you should add in your html tag the following code:
class="d4science-header"
Example:
In order to have the following result:
You must write:
<table> <tr class="d4science-header"> <td><img src="browse.png"></td> <td>Browse</td> </tr> </table>
Body
For the body you should you the css class named "portlet-section-body"
Importing Custom-made CSS files
There are two ways to import a custom-made css file:
- In doView() method of your portlet, you write: response.addProperty("CSS_HREF", request.getContextPath() + "/html/<css-filename>.css");
- Directly in the jsp page: <link rel="stylesheet" href="<%= request.getContextPath()%>/html/<css-filename>.css" type="text/css">
--Valia 19:22, 25 May 2007 (EEST)