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.
.wrapper
.back-corner
.back-side
.back-top
.nintendo
.cam
.sound
.flash
.top-screen
.screen
.bottom-screen
.screen
.a-joystick
.inner
.d-joystick-border
.d-joystick
.sign.top
.sign.left
.sign.right
.sign.bottom
.mic
.home-btn
i.fa.fa-home
.buttons-wrapper
.btn.a
span A
span A
.btn.b
span B
span B
.btn.x
span X
span X
.btn.y
span Y
span Y
.start-btn
.select-btn
.plug-btn
i.fa.fa-plug
.pwr-btn
i.fa.fa-power-off
.led.plug
.led.pwr
.led-cover
.sleep-btn
i.fa.fa-caret-right
$color-background: #7F675B
$color-nintendo: #ca5a58
$color-back: #433739
$color-screen: #fcfcfc
$color-screen-border: #140b10
$color-cam: ( #201d28, #565759, #33333d )
$color-hole: #570d1c
$color-flash: #847b80
$color-joystick: #7c7d81
$color-home: #d0c8c8
$color-leds: ( #847b80, #a7eeff )
$color-led-cover: #ffe37a
=size($width, $height)
width: percentage($width / 100)
height: percentage($height / 100)
=position($top, $left)
position: absolute
top: percentage($top / 100)
left: percentage($left / 100)
%pseudo-init
content: ''
display: block
body
margin: 0
padding: 0
background-color: $color-background
>.wrapper
position: relative
margin: auto
width: 70vw
height: 70vw
margin-bottom: 5vh
.nintendo
+size(100, 88)
+position(12, 0)
background: linear-gradient(to bottom, $color-nintendo 95%, darken($color-nintendo, 15%))
border-radius: 14vw 14vw 5vw 5vw / 14vw 14vw 8vw 8vw
box-sizing: border-box
border: 0.5vw solid darken($color-nintendo, 10%)
.top-screen
+size(57, 41)
+position(9, 21.5)
background: linear-gradient(-45deg, darken($color-nintendo, 15%), darken($color-nintendo, 5%))
border-radius: 1vw
box-shadow: inset 0 0 1vw 0 rgba(black, 0.2)
.screen
+size(93, 90)
+position(5, 3.5)
background-color: $color-screen
box-sizing: border-box
border: 0.7vw solid $color-screen-border
border-radius: 0.5vw
box-shadow: inset 0 0 2vw 0 darken($color-screen, 50%)
.bottom-screen
+size(45, 38)
+position(51.8, 27.5)
background: linear-gradient(-45deg, darken($color-nintendo, 5%), darken($color-nintendo, 15%))
border-radius: 0.5vw
.screen
+size(97, 96)
+position(2, 1.5)
background-color: $color-screen
box-sizing: border-box
border: 0.7vw solid $color-screen-border
border-radius: 0.5vw
box-shadow: inset 0 0 2vw 0 darken($color-screen, 50%)
.cam
+size(4, 4 * 100 / 88)
+position(2, 47.5)
background-color: nth($color-cam, 3)
box-shadow: inset 0 0 0 0.6vw nth($color-cam, 1), inset 0 0 0 1.2vw nth($color-cam, 2)
border-radius: 50%
.sound
+size(1, 1 * 100 / 88)
background-color: $color-hole
+position(12, 9)
border-radius: 50%
box-shadow: 1.5vw 0 $color-hole, 3vw 0 $color-hole, 0 1.5vw $color-hole, 1.5vw 1.5vw $color-hole, 3vw 1.5vw $color-hole, 0 3vw $color-hole, 1.5vw 3vw $color-hole, 3vw 3vw $color-hole
.flash
+size(3, 2)
+position(14, 87)
background: linear-gradient(-45deg, lighten($color-flash, 20%), $color-flash)
border-radius: 1vw
box-shadow: 0 0 0 0.2vw darken($color-nintendo, 5%)
.a-joystick
+size(17, 17 * 100 / 88)
+position(25, 2.3)
background: linear-gradient(-45deg, lighten($color-nintendo, 10%), darken($color-nintendo, 10%) 60%)
border-radius: 50%
&::before
@extend %pseudo-init
+size(85, 85)
+position(7.5, 7.5)
background-color: darken($color-nintendo, 5%)
border-radius: 50%
.inner
+size(60, 60)
+position(20, 20)
background: linear-gradient(-45deg, $color-joystick 40%, lighten($color-joystick, 25%))
border-radius: 50%
&::after
@extend %pseudo-init
+size(80, 80)
+position(10, 10)
background: linear-gradient(-45deg, lighten($color-joystick, 15%), $color-joystick 60%)
border-radius: 50%
.mic
+size(1, 1 * 100 / 88)
background-color: $color-hole
+position(85, 14)
border-radius: 50%
&::after
@extend %pseudo-init
content: 'MIC'
font-family: 'Work Sans', sans-serif
+position(150, -150)
font-size: 1.5vw
font-weight: bold
color: darken($color-nintendo, 10%)
.d-joystick
+size(4, 13)
+position(50, 9)
background: linear-gradient(-45deg, lighten($color-nintendo, 3%) 50%, darken($color-nintendo, 15%))
border-radius: 0.5vw
box-shadow: inset 0.2vw 0.2vw lighten($color-nintendo, 10%), inset -0.2vw -0.2vw darken($color-nintendo, 10%)
&::before
@extend %pseudo-init
+size(100, 100)
+position(0, 0)
background: linear-gradient(45deg, lighten($color-nintendo, 3%) 50%, darken($color-nintendo, 15%))
transform: rotate(-90deg)
border-radius: 0.5vw
box-shadow: inset 0 0.2vw lighten($color-nintendo, 10%), inset 0 -0.2vw darken($color-nintendo, 10%)
.sign
+size(8, 20)
background-color: darken($color-nintendo, 10%)
box-shadow: 0.1vw 0 lighten($color-nintendo, 10%)
&.top
+position(10, 46)
&.bottom
+position(70, 46)
&.left, &.right
transform: rotate(90deg)
&.left
+position(40, -40)
&.right
+position(40, 130)
.d-joystick-border
@extend .d-joystick
box-shadow: 0 0 0.1vw 0.1vw darken($color-nintendo, 25%)
&::before
box-shadow: 0 0 0.1vw 0.1vw darken($color-nintendo, 25%)
.home-btn
+position(91, 45)
background-color: $color-nintendo
color: $color-home
font-size: 3vw
padding: 0.7vw 2vw
border-radius: 2vw
box-shadow: inset 0 0 0.1vw 0.1vw darken($color-nintendo, 25%), 0 0 0 0.4vw $color-nintendo
.buttons-wrapper
+size(17, 17 * 100 / 88)
+position(25, 80.7)
border-radius: 50%
.btn
height: calc(34% - 1vw)
width: calc(34% - 1.3vw)
border-radius: 50%
background: linear-gradient(-45deg, darken($color-nintendo, 15%), lighten($color-nintendo, 5%))
font-family: 'Work Sans', sans-serif
padding-top: 1vw
padding-left: 1.3vw
font-size: 2vw
color: lighten($color-nintendo, 5%)
box-shadow: inset 0.2vw 0.2vw 0.4vw 0 lighten($color-nintendo, 15%), 0 0 0.1vw 0.1vw darken($color-nintendo, 25%), inset -0.2vw -0.2vw 0.4vw 0 darken($color-nintendo, 15%)
&.a, &.b, &.x, &.y
letter-spacing: -1.2vw
span:last-child
position: relative
z-index: 50
span:first-child
position: relative
color: darken($color-nintendo, 15%)
z-index: 100
font-weight: bold
&.a
+position(33, 66)
&.b
+position(66, 33)
&.x
+position(0, 33)
&.y
+position(33, 0)
.start-btn
+size(3.5, 3.5 * 100 / 88)
+position(57, 83)
background: linear-gradient(-45deg, darken($color-nintendo, 15%), lighten($color-nintendo, 5%))
border-radius: 50%
box-shadow: inset 0.2vw 0.2vw 0.4vw 0 lighten($color-nintendo, 15%), 0 0 0.1vw 0.1vw darken($color-nintendo, 25%), inset -0.2vw -0.2vw 0.4vw 0 darken($color-nintendo, 15%)
&::after
@extend %pseudo-init
content: 'START'
font-family: 'Work Sans', sans-serif
+position(20, 130)
font-size: 1.5vw
font-weight: bold
color: darken($color-nintendo, 10%)
.select-btn
@extend .start-btn
+position(65, 83)
&::after
content: 'SELECT'
.plug-btn
+position(79, 83.5)
font-size: 1.5vw
color: darken($color-nintendo, 12%)
.pwr-btn
+position(84, 82)
border-radius: 50%
padding: 0.58vw 0.85vw
color: darken($color-nintendo, 12%)
box-shadow: 0 0 0.1vw 0.1vw darken($color-nintendo, 25%)
font-size: 1.5vw
.led
+size(1.2, 1.2 * 100 / 88)
border-radius: 50%
box-shadow: inset 0 0 0.2vw 0 rgba(black, 0.5)
&.plug
+position(80, 91)
background-color: nth($color-leds, 1)
&.pwr
+position(86, 91)
background-color: nth($color-leds, 2)
.led-cover
+size(0.2, 1.5)
+position(28, 100.7)
background-color: $color-led-cover
box-shadow: 0.2vw 0 0.3vw 0 $color-led-cover
.sleep-btn
+size(10, 2)
+position(97.5, 82)
background: linear-gradient(to left, rgba(black, 0.3) 30%, transparent 30%, transparent 38%, rgba(black, 0.2) 38%, transparent 44%, transparent 46%, rgba(black, 0.2) 46%, transparent 52%, transparent 54%, rgba(black, 0.2) 54%, transparent 60%, transparent 62%, rgba(black, 0.2) 62%, transparent 68%, transparent 70%, rgba(black, 0.2) 70%, transparent 76%, transparent 78%)
box-shadow: 0 0 0.1vw 0.1vw darken($color-nintendo, 25%)
&::after
@extend %pseudo-init
content: 'SLEEP'
font-family: 'Work Sans', sans-serif
font-size: 1.5vw
+position(-150, 0)
color: darken($color-nintendo, 15%)
i
+position(-150, 84)
color: darken($color-nintendo, 15%)
font-size: 1.8vw
.back-side
+size(101, 67)
+position(32, -0.5)
background-color: $color-back
border-radius: 0 0 5vw 5vw / 0 0 8vw 8vw
box-sizing: border-box
border-top: 1vw solid $color-background
.back-top
+size(60, 10)
+position(11.5, 20)
background-color: $color-back
box-sizing: border-box
border-left: 1vw solid $color-background
border-right: 1vw solid $color-background
.back-corner
+size(100, 100)
+position(0, 0)
&::after, &::before
@extend %pseudo-init
+size(40, 40)
border-radius: 50%
background-color: $color-back
&::after
+position(11.5, -0.5)
&::before
+position(11.5, 60.5)
// https://www.neckersbox.eu
Also see: Tab Triggers