Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mohlsen/f60828c3dfa042c8afba0bcf4ce37205 to your computer and use it in GitHub Desktop.
Save mohlsen/f60828c3dfa042c8afba0bcf4ce37205 to your computer and use it in GitHub Desktop.
Stanton Homepage with svg background mask
<div class="container">
<div class="header">
Ben's Modules
</div>
<div></div>
<div class="row">
<div class="octagon">
<div class="item">
<span class="fa fa-comments icon"></span>
<span class="name">Chat</span>
</div>
</div>
<div class="octagon">
<div class="item">
<span class="fa fa-exclamation-triangle icon"></span>
<span class="name">Incident</span>
</div>
</div>
</div>
<div class="row">
<div class="octagon">
<div class="item">
<span class="fa fa-key icon"></span>
<span class="name">Connect</span>
</div>
</div>
<div class="octagon">
<div class="item">
<span class="fa fa-pinterest icon"></span>
<span class="name">Pinboard</span>
</div>
</div>
</div>
<div class="row">
<div class="octagon">
<div class="item">
<span class="fa fa-users icon"></span>
<span class="name">Teamboard</span>
</div>
</div>
<div class="octagon">
<div class="item">
<span class="fa fa-heartbeat icon"></span>
<span class="name">Device Health</span>
</div>
</div>
</div>
<div class="row">
<div class="octagon">
<div class="item">
<span class="fa fa-line-chart icon"></span>
<span class="name">Trend</span>
</div>
</div>
<div class="octagon">
<div class="item">
<span class="fa fa-book icon"></span>
<span class="name">Knowledgebase</span>
</div>
</div>
</div>
</div>
.container {
height: 568px;
width: 320px;
display: flex;
border: 1px solid black;
flex-direction: column;
background-image: url(https://gist.githubusercontent.com/mohlsen/c67750196ebb60b720f6adf5545c5683/raw/c96a10d44704330aa33df46a20721e77728ade85/bg.jpg);
z-index: -2;
}
.header {
padding-left: 56px;
color: white;
font-size: 24px;
}
.row {
margin-top: 10px;
display: flex;
margin-left: 10px;
}
.row:nth-child(even) {
flex-direction: row-reverse;
margin-right: 10px;
margin-left: 0px;
}
.item {
height: 113px;
width: 113px;
display: flex;
flex-direction: column;
align-items: center;
opacity: 1;
}
span.icon {
padding-top: 18px;
font-size: 42px;
color: white;
}
.name {
font-size: 11px;
padding-top: 18px;
color: #00BCE4;
}
.octagon::after {
content: "";
display: block;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
background-color: white;
opacity: .28;
-webkit-mask-size: cover;
-webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIgaWQ9IkxheWVyXzEiDQogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTMwIDEyNyINCiAgICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBpZD0iWE1MSURfNjFfIiBkPSJNMTE2LjEyNywzMy40MzJMOTMuNDEsMTAuNzE1Yy0zLjM3Ni0zLjM3Ni03Ljk1NC01LjI3Mi0xMi43MjgtNS4yNzJINDguNTU2DQogICAgYy00Ljc3NCwwLTkuMzUyLDEuODk2LTEyLjcyOCw1LjI3MkwxMy4xMTIsMzMuNDMyQzkuNzM2LDM2LjgwOCw3Ljg0LDQxLjM4Niw3Ljg0LDQ2LjE2djMyLjEyNmMwLDQuNzc0LDEuODk2LDkuMzUyLDUuMjcyLDEyLjcyOA0KICAgIGwyMi43MTcsMjIuNzE3YzIuNzI5LDIuNzI5LDYuMjQ4LDQuNDcsMTAuMDE2LDUuMDQ1YzAuODk0LDAuMTM2LDEuNzk3LDAuMjI3LDIuNzEyLDAuMjI3aDMyLjEyNmMwLjkxNSwwLDEuODE5LTAuMDkxLDIuNzEyLTAuMjI3DQogICAgYzMuNzY4LTAuNTc1LDcuMjg3LTIuMzE2LDEwLjAxNi01LjA0NWwyMi43MTctMjIuNzE3YzAuMTM5LTAuMTM5LDAuMjYxLTAuMjkzLDAuMzk1LTAuNDM2YzAuMzc3LTAuNDAzLDAuNzM2LTAuODE5LDEuMDczLTEuMjUxDQog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jQ3bC0wLjQ1MywwLjQ1M2wtMS42NjgsMS42NjhsLTEuMzY2LDEuMzY2bC0wLjkwNywwLjkwNw0KICAgIGwtMTMuMTY1LDEzLjE2NUw5MC44ODgsMTEwLjI5OXoiLz4NCjwvc3ZnPg0K) no-repeat 50% 50%;
}
.octagon {
display: block;
position: relative;
height: 113px;
width: 113px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment