Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                html
  head
   link(href='https://fonts.googleapis.com/css?family=Bad+Script', rel='stylesheet', type='text/css')
  link(href='https://fonts.googleapis.com/css?family=Raleway:400,200', rel='stylesheet', type='text/css')
  link(href='https://fonts.googleapis.com/css?family=Lato:400,700', rel='stylesheet', type='text/css')
  body
    select(class='colorPicker')
      option(value='1')  Grass
      option(value='2')  Chill
      option(value='3')  Sky
      option(value='4')  Rose
      option(value='5')  Autumn
      option(value='6')  Cloud
      option(value="7")  Wine
      option(value="8")  Ocean
    select(class='animationPicker')
      option(value='1')  moveUp
      option(value='2')  moveDown
      option(value="3")  appear
      option(value="4")  pop
      option(value='5')  FadeIn
      option(value='6')  slide
      option(value='7')  RotateTop
      option(value='8')  Circle
    div.menu-button
      div.menu-middlebar
    div.menu-info
      P
        | DavidMenu
      span
        | 8 color x 8 animation
      p
        | click the button & feel it !
        

  
              
            
!

CSS

              
                /*===== DavidFullMenu v0.2 =====

  use DavidFullMenu Function to 
  make your own full screen menu!  

===== DavidBackground sheet =====
Grass, Chill, Sky, Rose, Autumn, Wine
===== DavidBackground sheet =====
moveUpMenu, moveDownMenu, moveLeftMenu, moveRightMenu,appearMenu, popAppearMenu, FadeInMenu , SlideInMenu, RotateMenu, CircleMenu*/

light-yellow = #F9C46A

ul,li,div
  padding 0
  margin 0
body
  padding 0
  margin 0
  max-width 100%
  height 400px
  background-color light-yellow
  .colorPicker,.animationPicker
    position absolute
    width 120px
    top 20px
    right 10px
    background-color #50514f
    color white
    outline none
    padding 5px 20px 5px 20px
    border 5px solid #50514f
    font-size 1.2em
    cursor pointer
    -webkit-appearance none
    -moz-appearance none
    option
      background-color #50514f
      color white
      transition all .3s ease
      -webkit-appearance none
      -moz-appearance none
      background none
  .animationPicker
    top 70px
  .menu-info
    position relative
    top 40%
    padding 0
    margin 0 auto
    text-align center
    font-size 3em
    p
      margin 0
      color #50514f
      font-family Bad Script
    span
      position relative
      top -45px
      font-size .5em
      font-family Lato
  .menu-button
    position absolute
    top 20px
    left 20px
    width 40px
    height 35px
    cursor pointer
    transition all .3s ease
    &:before, &:after
      content ""
      position absolute
      top 0px
      border-radius 5px
      width 100%
      height 6px
      background-color white
      transition all .25s ease
    &:after
      top calc(100% - 6px)
    &.addOnMenu
      &:before
        transform rotate(45deg)
        top calc(50% - 3px)
        transition all .3s ease
      &:after
        transform rotate(-45deg)
        top calc(50% - 3px)
        transition all .3s ease
    &.addOnMenu > .menu-middlebar
      opacity 0
      transition all .3s ease
    .menu-middlebar
      opacity 1
      position relative
      top calc(50% - 3px)
      width 100%
      height 6px
      border-radius 5px
      background-color white
      transition all .2s ease
      
.menu-container
	overflow scroll
	position fixed
	opacity 0
	top 0
	left 0
	visibility hidden
	width 100%
	height 100%
	transition all .5s ease .35s
	z-index 2
	background white
	&.showOnMenu
	  opacity 1
	  visibility visible
	  transition all .5s ease .15s
	nav
	  display flex
	  flex-direction column
	  height 100vh
	  transition all .6s ease
	  ul
	    list-style none
	    text-align center
	    li
	      font-family Raleway
	      letter-spacing 10px
	      align-items center
	      line-height 20vh
	      a
	        position relative
	        cursor pointer
	        text-decoration none
	        font-size 2em
	        color #50514f + 10%
	        transition all .35s ease
          opacity 0
	        &:before, &:after
	          content ""
	          position absolute
	          background-color light-yellow 
	          bottom 0
	          left 0
	          width 100%
	          transform scaleX(0)
	          height 2px
	          transition all .35s ease
	        &:hover, &:focus
	          transition all .3s ease
	          font-size 2.4em
	          color #50514f - 30%
	          &:before, &:after
	            transition all .5s ease
	            transform scaleX(1)
.moveUpMenu
  opacity 1
  transition all 1s ease .3s
  animation 1s moveup linear
@keyframes moveup
  0%
    opacity 0
    margin-top 100px
  100%
    opacity 1
    margin-top 0px
    
.moveDownMenu
  opacity 1
  transition all 1s ease .3s
  animation 1s movedown linear
@keyframes movedown
  0%
    opacity 0
    margin-top -100px
  100%
    opacity 1
    margin-top 0px
    
.moveLeftMenu
  opacity 1
  transition all 1s ease .3s
  animation 1s moveleft linear
@keyframes moveleft
  0%
    opacity 0
    margin-left -100px
  100%
    opacity 1
    margin-left 0px  
.moveRightMenu
  opacity 1
  transition all 1s ease .3s
  animation 1s moveright linear
@keyframes moveright
  0%
    opacity 0
    margin-right -100px
  100%
    opacity 1
    margin-right 0px  
.appearMenu
  opacity 1
  transition all 1s ease .3s
  animation 1s appear linear
@keyframes appear
  0%
    opacity 0
  35%
    opacity 0
    transform scale(0.85)
  100%
   opacity 1
   transform scale(1)
    
.popAppearMenu
  opacity 1
  transition all .8s ease .3s
  animation 1s pop linear
@keyframes pop
  0%
    opacity 0
    transform scale(0)
  50%
    opacity 0
    transform scale(0.7)
  70%
    opacity .5
    transform scale(1.35)
  85%
    opacity .85
    transform scale(0.85)
  100%
   opacity 1
   transform scale(1)
 
.SlideInMenu
  opacity 1
  transition all .8s ease
  li
    opacity 1
    for i in (1..10)
      &:nth-child({i})
        animation .5s slided ease
        animation-fill-mode both
        animation-delay: i *.25s
@keyframes slided
  0%
    opacity 0
    margin-right 70px
  60%
    opacity .5
    margin-right -70px
  100%
    opacity 1
    margin-right 0px
    
.FadeInMenu
  opacity 1
  transition all .8s ease
  li
    opacity 1
    for i in (1..10)
      &:nth-child({i})
        animation .4s fadein linear
        animation-fill-mode both
        animation-delay: i *.25s
@keyframes fadein
  0%
    opacity 0
    margin-top 30px
  100%
    opacity 1
    margin-top 0px
.RotateMenu
  opacity 1
  transition all 1s ease .3s
  transform-origin top
  animation 1s rotating linear
@keyframes rotating
  0%
    opacity 0
  20%
    opacity 0
    transform rotate3d(1, 0, 0, -140deg) scale(.6,.6)
  100%
    opacity 1
.CircleMenu
  opacity 1
  transition all 1s ease .3s
  transform-origin top left
  animation .8s cycle linear
@keyframes cycle
  0%
    opacity 0
  49%
    opacity 0
  50%
    transform rotate3d(0, 0, 1, 45deg) scale(.7,.7)
  100%
    opacity 1
    
@media(max-width:768px)
  body
    .colorPicker,.animationPicker
      top 15px
      padding 5px 10px 5px 10px
      width 100px
      font-size 1em
    .animationPicker
      right 120px
    .menu-info
      font-size 2em
      span
        top -30px
    .menu-container
      nav
        ul
          li
            a
              font-size 1.5em
              &:hover, &:focus
                font-size 1.8em
@media(max-width:480px)
  body
    .menu-info
      font-size 1.5em
      span
        font-size .6em
        top -20px
    .menu-container
      nav
        ul
          li
            a
              font-size 1.2em
              &:hover, &:focus
                font-size 1.5em
              
            
!

JS

              
                // ===== color ===== //
var Grass = "linear-gradient(135deg, #45CC93 0%, #47E593 25%,#70E989 50%,#A7E989 75%)";
var Chill = "linear-gradient(135deg, #00BFB8 0%, #3DCCC7 25%,#6EEAE8 50%,#B3EBEF 75%)";
var Sky = "linear-gradient(135deg, #1493FC 0%, #54B0FD 25%,#81D0FD 50%,#ADE8FD 75%)"; 
var Rose = "linear-gradient(135deg, #F44453 0%, #F45B69 25%,#FF8284 50%,#FFB0AA 75%)";
var Autumn = "linear-gradient(135deg, #E87153 0%, #F7825A 25%,#FFA56D 50%,#FFC77A 75%)";
var Wine = "linear-gradient(135deg, #841A53 0%, #843B62 25%,#84546E 50%,#84707B 75%)";
var Cloud = "linear-gradient(135deg, #DCDBE0 0%, #E8E8EA 25%,#EDEDF2 50%,#F4F4F8 75%)";
var Ocean = "linear-gradient(135deg, #306F93 0%, #367DA5 25%,#449DD1 50%,#38B1F7 75%)";
var animationType = "moveUpMenu";
var colorType = Grass;
/*===== DavidFullMenu v0.2 =====

  use DavidFullMenu Function to 
  make your own full screen menu!  

===== DavidBackground sheet =====
Grass, Chill, Sky, Rose, Autumn, Wine
===== DavidBackground sheet =====
moveUpMenu, moveDownMenu, moveLeftMenu, moveRightMenu,appearMenu, popAppearMenu, FadeInMenu , SlideInMenu, RotateMenu, CircleMenu*/

// vvvvv modify here vvvvvv //

DavidFullMenu({
    list: [ {title:"add",url:"https://codepen.io/lichin-lin"},
            {title:"content",url:"https://codepen.io/lichin-lin"},
            {title:"you like by",url:"http://lichin.me"},
            {title:"javascript",url:"http://lichin.me"},
           ],
    DavidMenuAnimation:"moveUpMenu",
    DavidBackground: Sky,
});

// ^^^^^ modify here ^^^^^ //



//===== Function start ===== //
function DavidFullMenu(content){
  
  $('body').append('<div class="menu-container"><nav><ul class="menu-list"></ul></nav></div>');
  
    for(var i = 0; i < content.list.length;i++){
      $('.menu-container ul').append("<li><a href=" + content.list[i].url +  ">" + content.list[i].title + "</a></li>");
    }
};
$('.menu-button').on( "click", function() {

  $(this).css("z-index", 3)
  $('.menu-button').toggleClass("addOnMenu");
  $('.menu-container').toggleClass("showOnMenu");
  $('.menu-container').css("background",colorType);
  $('.menu-container nav').toggleClass(animationType);
  
});

$('.colorPicker').on(
  { "focus": function() {
      this.selectedIndex = -1;
    }
  , "change": function() {
      if($(this).val() == 1){
        colorType = Grass;
      }else if($(this).val() == 2){
        colorType = Chill;
      }else if($(this).val() == 3){
        colorType = Sky;
      }else if($(this).val() == 4){
        colorType = Rose;
      }else if($(this).val() == 5){
        colorType = Autumn;
      }else if($(this).val() == 6){
        colorType = Cloud;
      }else if($(this).val() == 7){
        colorType = Wine;
        $('.menu-container a').css("color","white");
      }else if($(this).val() == 8){
        colorType = Ocean;
        $('.menu-container a').css("color","white");
      }
      this.blur();
    }
  });
$('.animationPicker').on(
  { "focus": function() {
      this.selectedIndex = -1;
    }
  , "change": function() {
      if($(this).val() == 1){
        animationType = "moveUpMenu";
      }else if($(this).val() == 2){
        animationType = "moveDownMenu";
      }else if($(this).val() == 3){
        animationType = "appearMenu";
      }else if($(this).val() == 4){
        animationType = "popAppearMenu";
      }else if($(this).val() == 5){
        animationType = "FadeInMenu";
      }else if($(this).val() == 6){
        animationType = "SlideInMenu";
      }else if($(this).val() == 7){
        animationType = "RotateMenu";
      }else if($(this).val() == 8){
        animationType = "CircleMenu";
      }
      this.blur();
    }
  });

              
            
!
999px

Console