JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
.center
.case-front
.handle
each val, row in new Array(21)
- let evenRow = row % 2 === 0
.circle-row(class=(evenRow ? '' : 'shifted'))
- let circleNumber = evenRow ? 8 : 7
each val, column in new Array(circleNumber)
.circle
if (row !== 0)
.top
if (!evenRow || column !== 0)
.left
if (column !== 7)
.right
.foot.foot-left
.foot.foot-right
.case-side
img.apple-logo(src="http://pngimg.com/uploads/apple_logo/apple_logo_PNG19670.png")
.foot.foot-left
.foot.foot-right
*, *:before, *:after
box-sizing: border-box
body
width: 100vw
height: 100vh
.inspiration
position: fixed
bottom: 0
right: 0
padding: 10px
text-align: center
text-decoration: none
font-family: 'Gill Sans', sans-serif
font-size: 12px
color: rgb(127, 127, 127)
.center
position: absolute
top: 50%
left: 50%
display: flex
align-items: center
transform: translate(-50%, -50%) scale(1.1)
@media screen and (max-height: 500px)
transition: transform 0.5s
transform: translate(-50%, -50%) scale(0.8)
.case-front
background-color: #e9eaec
background: linear-gradient(to right, #b9babc, #e9eaec 5%, #e9eaec 95%, #b9babc 100%)
padding: 10px 15px
transform: scale(0.7)
.case-side
display: flex
justify-content: center
align-items: center
width: 500px
height: 460px
background: linear-gradient(to right, #b9babc, #e9eaec 5%, #e9eaec 95%, #b9babc 100%)
transform: scale(0.7)
margin-left: -60px
.apple-logo
width: 100px
filter: brightness(30%)
.handle
position: absolute
top: -62px
left: 50%
width: 250px
height: 110px
border-radius: 30px 30px 0 0
transform: translateX(-50%) scale(0.7)
box-shadow:
0 0 0 5px #c4c4c4,
0 0 0 9px #888787,
0 0 0 13px #fff,
0 0 0 16px #ddd,
0 0 0 18px #aaa
clip-path: inset(-20px -20px 45px -20px)
.circle-row
display: grid
grid-template-columns: repeat(8, 28px)
grid-template-rows: repeat(1, 20px)
height: 21px
&.shifted
transform: translateX(14px)
.circle
place-self: center
width: 100px
height: 100px
border-radius: 50%
background: radial-gradient(circle at 30% 40%, #fff 10%, #888888 50%)
box-shadow: inset 0px 0px 30px -2px #000
transform: scale(0.22)
.top
position: absolute
width: 50px
height: 35px
border-radius: 50%
background-color: black
transform: translateX(25px) translateY(1px)
.left
position: absolute
width: 50px
height: 35px
border-radius: 50%
background-color: black
transform: translateX(-1px) translateY(50px) rotate(60deg)
.right
position: absolute
width: 50px
height: 35px
border-radius: 50%
background-color: black
transform: translateX(51px) translateY(50px) rotate(-60deg)
.foot
position: absolute
bottom: -40px
width: 25px
height: 40px
border-bottom: 2px solid #777
background: linear-gradient(to right, #8a8a8a, #c4c4c4, #888787, #fff, #ddd, #828282)
&:after
content: ''
width: 60px
height: 5px
position: absolute
bottom: -6px
left: -17px
background: linear-gradient(to right, #8a8a8a, #c4c4c4, #888787, #fff, #ddd, #828282)
border-bottom: 1px solid #777
&.foot-left
left: 25px
transform: scale(-1, 1)
&.foot-right
right: 25px
// ¯\_(ツ)_/¯ \\
Also see: Tab Triggers