Skip to content

Commit

Permalink
Merge pull request #1204 from alphagov/add-integration-ribbon
Browse files Browse the repository at this point in the history
Show Integration ribbon on Integration environment
  • Loading branch information
kentsanggds authored Jan 15, 2024
2 parents e7afc4d + 8e1296e commit 6318ab7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions app/views/layouts/_integration_ribbon.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="corner-ribbon top-right sticky rainbow">Integration</div>

<style>
.corner-ribbon{
width: 200px;
background: #e43;
position: absolute;
top: 25px;
left: -50px;
text-align: center;
line-height: 50px;
letter-spacing: 1px;
color: #eee;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
background: #005EA5;
font-weight:bold;
}

/* Custom styles */
.corner-ribbon.sticky{
position: fixed;
}

.corner-ribbon.shadow{
box-shadow: 0 0 3px rgba(0,0,0,.3);
}

.corner-ribbon.top-right{
top: 25px;
right: -50px;
left: auto;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
</style>
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
</div>
</header>

<%= render 'layouts/integration_ribbon' if Rails.env.integration? %>
<%= render 'layouts/staging_ribbon' if Rails.env.staging? %>

<div class="dgu-top-non-content">
Expand Down

0 comments on commit 6318ab7

Please sign in to comment.