Oracle Fluid: Branding those Tiles

Ever wondered how you could restyle the tiles on the Oracle Fluid landingpage? During the summer my colleague Lukas Degens blogged here about how we applied the corporate branding of Leiden University. At first glance it reminded me of the office365 look. In this blog we cover the technical aspects of how we can brand the landing page without customizations and use a CSS only approach.

This would be the end result.

The end result - Colored tiles

Looking at the above picture we created the following features.

  • Square tiles with no dropshadow
  • Tiles have different colors.
  • Embedded logo of the university.
  • Different font-size on the tiles (Vestula).
  • Customized SVG icons.
  • Images on the tile appear in the upper-left corner while text appears on the bottom.

Note: The complete stylesheet can be found at the bottom of this page.

Getting Prepared

Lukas quickly mentioned the use of themes in his blog. So let me elaborate on that. What we want to do is create a custom theme that fires off once a person has a specific role. To do so, we need three things in place.

  1. Having a custom stylesheet in our branding objects
  2. Hook this stylesheet into a theme.
  3. Tie this theme to a Role

Go to PeopleTools > Portal > Branding > Branding Objects and create a new custom stylesheet. I called mine: CY2_SELFSERVICE_CSS
For now, just create an empty ‘shell’ and save the stylesheet. See below picture.

A shell CSS script ready to be filled

Then go to Peopletools> Portal > Branding > Assemble Themes

The screenshot below shows the theme I created, it’s called CY2_THEME. I copied the DEFAULT_THEME_FLUID and changed the Global Override StyleSheet to CY2_SELFSERVICE_CSS. Below picture shows the result.

Theme

Finally, you can use the Assign theme page to attach a role to this specific theme. Once a user has this specific role / permission list, this theme kicks off, resulting in the global overriding Stylesheet we are about to create.

CSS step1: Getting those colored tiles

If it comes to branding tiles, there is one important thing you should know. Tiles can be re-ordered into the landingpage and therefore have a dynamic id.  So it is quite a challenge to get the right ID of those tiles while their location is uncertain. Fortunately CSS does a great job!

To get a specific tile, regardless of its position, we can refer to the onclick attribute most tiles have. Almost every tile points to some kind of URL and in the DOM. This URL is visible as an onclick property. For better isolation of this project,  I added  a custom query string at the end in the URL as identifier for the project.

Take a look at the CREF screenshot below. It points to the classic Student Selfservice Class Schedule. Also note the query string ?LEI_V_SS=Y at the end of the url.

Url Info

Using the inspector we can see this tile representing the following HTML.

DOM model tile

To identify this tile with CSS, we make use of the onclick and the extra query parameter:

div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SSR_SSENRL_SCHD_W.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#f46e32;; /* your color */
}

You can repeat this behavior for the rest of the tiles that you want to have a different colour. just replace the ‘onclick’ with a different part of another URL.

CSS step2: Make it square without drop shadow

We can follow the similar approach when creating square tiles and remove their drop shadows. This time I leave out the onclick part of the main url, because I want all tiles to be square and without having a drop shadow. I leave the LEI_V_SS=Y in, so it only affects the tiles tied to our project.

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.psc_rowact.nuilp{
   %BP(border-radius: 0);
   %BP(box-shadow:none);
}

CSS step3: Image and text placement and hover

To change the image and text location, we can play around with some margins.

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp > div > img.ps_process{
  margin-left:10%;
  margin-top:0em;
  width:65px;
}

This is for the text.

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp> h2 > span{
  margin-top:65%;
  margin-left:10%;
  font: normal 22px Vestula;
  color: #fffff;
}

This is for the hover:

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp:hover{
  background-color:#7f88ab;
  opacity:0.5;
}

CSS step4: Embedded logo

One of the best design ideas I have seen on the landingpage is to embed the logo on it. Actually this idea came from the branding specialist of Leiden itself. In order to do so, we need to make a custom tile. Furthermore we need to make it non-clickable, by checking the Disable Main Hotspot.

Disable main hotspot

One disadvantage of disabling the Main Hotspot is that we lose our onclick as an attribute in the DOM. In our case the embedded logo will always be the last tile, so we could take advantage of the :last-child CSS selector.

DOM model for embedded logo

Basically the embedded logo is a combination of giving the tile a similar background- and text color as the landingpage itself. By removing the drop shadow of the tile, you won’t even notice it’s a tile anymore. The following three CSS blocks are needed to get that embedded logo.

/*Give the tile title the same color as the tile background - we don't want to see it*/
div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp > h2 > span{
   color:f0f0f0;
}
/*Give the embedded image a width and opacity*/
div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp> div > img.ps_process{
   max-width:100%;
   max-height:100%
   width:190px;
   opacity: 0.6;
}
/* Remove the dropshadow*/

div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp{
   background:f0f0f0;
   %BP(box-shadow:none);
}

Step5: Installing your font

Install your font on the webserver. I am using the PUM Image of CS with tools 8.55. Place the .woff file in the following location:

/home/pasadm2/psft/pt/8.55/webserv/peoplesoft/applications/peoplesoft/PORTAL.war/pas/fonts.

In the CSS refer to this font with the following construct:

@font-face {
 font-family: Vestula;
 src: url("../fonts/vestula-regular.woff2") format("woff2"),
 url("../fonts/vestula-regular.woff") format("woff");
 font-weight: normal;
 font-style: normal;
}

Conclusion

As you can see, rebranding can be done with pure CSS quite easily.
In a follow-up post I will show you how we could leverage the Macro Themes together with our CSS. Happy styling.

/****************************************************
Name: Fluid Tile Customizations
Version: v00.01
Created: 01.09.2017
updated: 01.09.2016
Created by: Stefan van Liempt - CY2
Comments: This CSS supports the branding of tiles
 on the Fluid homepage
****************************************************/

/* Start of Selfservice Customizations*/

/****************************************************
Our custom font. Make sure you put the font on the
weserver in the 'fonts' directory
****************************************************/

@font-face {
 font-family: Vestula;
 src: url("../fonts/vestula-regular.woff2") format("woff2"),
url("../fonts/vestula-regular.woff") format("woff");
 font-weight: normal;
 font-style: normal;
}

/****************************************************
Define All Tiles in the project LEI_V_SS
****************************************************/
div[id^="win"][id*="GROUPLET"][onclick*="SSR_RS_SELFSERV_MGMT.SSS_RS_STDNT_REQ.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#2c712d;
}
div[id^="win"][id*="GROUPLET"][onclick*="SNS_MENU_STD_FLD.SNS_SS_FLD_NOTIF.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#9eba2e;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SSS_MY_CRSEHIST.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#5cb1eb;
}
div[id^="win"][id*="GROUPLET"][onclick*="SNS_CUSTOMIZATIONS_NLD.SNS_SS_MYCOMM_CNTR.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#34a3a9;
 }
div[id^="win"][id*="GROUPLET"][onclick*="SNS_CUSTOMIZATIONS_NLD.SNS_SSENRL_CART.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#b02079;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SSR_SSENRL_DROP.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#be1908;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SSR_SSENRL_SCHD_W.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#f46e32;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SSS_GRAD_APPLY.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#2c712d;
}
div[id^="win"][id*="GROUPLET"][onclick*="CC_PORTFOLIO.SSS_PRSNLDATA_SUMM.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#9eba2e;
}
div[id^="win"][id*="GROUPLET"][onclick*="www.bibliotheek.universiteitleiden.nl"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp{
 background:#5cb1eb;
}
div[id^="win"][id*="GROUPLET"][onclick*="www.studiegids.leidenuniv.nl"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp{
 background:#34a3a9;
}
div[id^="win"][id*="GROUPLET"][onclick*="CY2_STUDENT_SS"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp{
 background:#b02079;
}
div[id^="win"][id*="GROUPLET"][onclick*="SNS_CUSTOMIZATIONS_NLD.SNS_SS_PET_REQ_MNT.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#be1908;
}
div[id^="win"][id*="GROUPLET"][onclick*="SNS_MENU_STD_FLD.SNS_FLD_STD_ADM.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#f46e32;
 }
div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS_LINKS"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp{
 background:#fcbe2a;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SNS_ACAD_CERT_STAT_W.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#9eba2e;
}

/****************************************************
Embedded Background logo of leiden University
****************************************************/
/*Give the tile the same color as the homepage background - we don't want to see it*/
div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp{
 background:#f0f0f0;
 %BP(box-shadow:none);
}
/*Give the tile title the same color as the tile background - we don't want to see it*/
div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp > h2 > span{
 color:#f0f0f0;
}
/*Give the embedded image a width and opacity*/
div.ps_grid-div.ps_grid-body > div[id*="_row_"]:last-child > * >
[id^="win"][id*="GROUPLET"]:not([onclick]):not([role]).ps_box-group.psc_layout.nuilp> div > img.ps_process{
 max-width:100%;
 max-height:100%
 width:190px;
 opacity: 0.6;
}

/****************************************************
Styling the progress Chart
****************************************************/

div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SAA_SS_DPR_ADB.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp{
 background:#ffffff;
}
div[id^="win"][id*="GROUPLET"][onclick*="SA_LEARNER_SERVICES.SAA_SS_DPR_ADB.GBL"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp
>.ps_box-grouplet > div[id*="CHART_GB"]{
 background:#ffffff;

}

/****************************************************
Hover colors on Tiles and progress Chart
****************************************************/

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp >.ps_box-grouplet > div[id*="CHART_GB"]:hover{
 background-color:#7f88ab;
 opacity:0.5
}
div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS=Y"].ps_box-group.psc_layout.nuilp:hover{
 background-color:#7f88ab;
 opacity:0.5;
}

/****************************************************
Make square tiles without drop-shadow
****************************************************/

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.psc_rowact.nuilp
{
 %BP(border-radius: 0);
 %BP(box-shadow:none);
}

/****************************************************
Place tile images in the upper-left corner
Also place the font below the images
****************************************************/

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp > div > img.ps_process{
 margin-left:10%;
 margin-top:0em;
 width:65px;
}

div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.nuilp> h2 > span{
 margin-top:65%;
 margin-left:10%;
 font: normal 22px Vestula;
 color: #ffffff;
}

/****************************************************
Homepage background - copied from Default Macro
****************************************************/

/* default homepage background */
:root:not(.psc_mode-ag):not(.psc_mode-md) .pt_homepage { /* 855-01a do not change if running with AG / MD */
 background-image:none; /* reset to allow usage of only background */
 background-color:none;/* reset to allow usage of only background */
 background:#f0f0f0;
}

/****************************************************
Other styles
****************************************************/

/* wrap-text in container */
div[id^="win"][id*="GROUPLET"][onclick*="LEI_V_SS"].ps_box-group.psc_layout.psc_rowact.nuilp > h2 > .ps-label {
 white-space:normal;
}

/* End of Selfservice Customizations*/
Showing 2 comments
  • Charandeep Singh

    Have seen that homepage layout on your previous post few weeks back, always wondered how it was achieved. Thanks for sharing!

pingbacks / trackbacks

Leave a Comment