Skip to content

Instantly share code, notes, and snippets.

@miragedeb
Created April 18, 2016 00:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miragedeb/8acacdc77969d173643d012144261519 to your computer and use it in GitHub Desktop.
Save miragedeb/8acacdc77969d173643d012144261519 to your computer and use it in GitHub Desktop.
<apex:page standardController="Opportunity">
<style type="text/css">
* {
font-family: Roboto;
}
div.message {
position: relative;
padding: 1px;
padding-left: 35px;
margin: 20px 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
background: #BBB;
color: #FFF;
}
div.message.lost {
color: white;
background: red;
}
div.message.won {
color: white;
background: green;
}
</style>
<link href="//fonts.googleapis.com/css?family=Roboto:300italic,400italic,400,300,600,700" rel="stylesheet" type="text/css" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" />
<div class="lost message" style="display: {!IF(Opportunity.Stagename = 'Closed Lost', '', 'none')}" >
<h2>Opportunity: This Opportunity is Closed Lost</h2>
</div>
<div class="won message" style="display: {!IF(Opportunity.StageName = 'Closed Won', '', 'none')}" >
<h2>Opportunity: This Opportunity is Closed Won</h2>
</div>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment