LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

My Documents

Folder 1

Folder 2

Folder 3

test-file-1.pdf

test-file-2.pdf

test-file-3.pdf

test-file-4.pdf

test-file-5.pdf

Folder 1

Folder 2

Folder 3

CSS
@import url('https://fonts.googleapis.com/css?family=Montserrat:300,400,700');

* {
  margin:0;
  padding:0;
  outline:none;
  list-style:none;
  text-decoration:none;
  box-sizing:border-box;
  color:#111;
  background: transparent;
  border:none;
}

body {
  background: url(http://www.thomaspodgro.com/pen/hero-bg.jpg) no-repeat center center;
  background-size: cover;
  padding: 50px;
  padding-left: 100px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
}


nav {
  position: fixed;
  top: 0;left: 0;
  height: 100vh;
  width: 100px;
  z-index: 3;
  background: rgba(0,0,0,0.7);
}
nav ul {
  position: relative;
  width: 100%;
}

nav ul li {
  height: 70px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  width: 100%;
  text-align: center;
  line-height: 70px;
  cursor: pointer;
}

nav ul li.active {
  border-bottom: none;
  background: #f95536;
}

nav ul li.disabled:hover {
  background: rgba(0,0,0,0.2);
  cursor: not-allowed;
}

nav ul li i.fa {
  color: #fff;
  font-size: 30px;
}

.main {
  width: 60%;
  float: left;
  padding-left: 50px;
}

.left {
  position: relative;
  margin-top: 30px;
}

.right {
  width: 25%;
  float: right;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
}

h1 {
  font-size: 50px;
  font-weight: 300;
  margin-bottom: 30px;
}

.input-wrap {
  position: relative;  
}

.input-wrap i {
  position: absolute;
  right: 40px;
  background: #fff;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
}

#searchbar {
  display: block;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  padding:20px 40px;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: #333;
}
#searchbar::-webkit-input-placeholder { 
  color: #b9b9b9;
}
#searchbar::-moz-placeholder {
  color: #b9b9b9;
}
#searchbar:-ms-input-placeholder {
  color: #b9b9b9;
}
#searchbar:-moz-placeholder {
  color: #b9b9b9;
}

.item  {
  height: 50px;
  line-height: 50px;
  cursor: -webkit-grab;
  transition: 0.3s width ease-out, 0.3s height ease-out;
  margin-right: 10px;
  margin-bottom: 10px;
  padding: 0 20px;
  display: block;
  border-bottom: 1px solid #ccc;
  background: rgba(255,255,255,0.3);
  position: relative;
}

.item i {
  margin-right: 10px;
}
.item i, .item p {
  display: inline-block;
  vertical-align: middle;
}

.is-dropped {
  transform: scale(0);
  transition: 0.2s all ease-out;
}


.folder {
  float: left;
  width: 130px;
  height: 130px;
  background: rgba(0,0,0,0.0);
  margin-right: 10px;
  position: relative;
  transition: 0.2s background-color ease-out;
  text-align: center;
}

.folder i.fa-folder {
  height: 90px;
  width: 100%;
  line-height: 100px;
  margin: 0 auto;
  font-size: 70px;
  transition: 0.2s all ease-out;
}

.folder i.fa-check {
  color: #fff;
  background: rgba(0,0,0,0.1);
  border-radius:50%;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  position: absolute;
  left: 0;right: 0;
  top: 38px;
  margin: auto;
  pointer-events: none;
  transform: scale(0);
  opacity: 0;
}
.folder.item-dropped i.fa-check {
  animation:animateValidation 1s linear;
}

@keyframes animateValidation {
  0%{
    transform: scale(1.5);
    opacity: 0; 
  }
  40%,80%{
    transform: scale(1);
    opacity: 1; 
  }
  100%{
    transform: scale(0);
    opacity: 0;
  }
}

.folder p {
  font-weight: 300;
}

.folder:hover .fa-folder {
  transform: scale(1.2);
  cursor: pointer;
}

#folder1 i.fa-folder, #folder1-content h2 .fa-folder {
   color: #eb4141;
}
#folder2 i.fa-folder, #folder2-content h2 .fa-folder {
   color: #4bc97a;
}
#folder3 i.fa-folder, #folder3-content h2 .fa-folder {
   color: #6fdbeb;
}


.tooltiper {
  position: relative;
  z-index: 3;
}

.tooltiper .tooltip {
  min-width: 110px;
  position: absolute;
  font-size: 0.7rem;
  text-align: left;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  display: block;
  top: 50%;left: 120px;
  transform: translateY(-50%) scale(0);
  line-height: 1.4em;
  opacity: 0;
  transform-origin: left;
  transition: transform 0.2s ease-out, opacity 0.1s ease-out 0.1s;
}
.tooltiper:hover .tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  transition: transform 0.2s ease-out, opacity 0.1s ease-out;
}

.tooltiper .tooltip:after{
	right: 100%;
	top: 50%;
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.tooltiper .tooltip:after {
	border-color: transparent;
	border-right-color: rgba(0,0,0,0.7);
	border-width: 4px;
	margin-top: -4px;
}


.folder-content {
  display: none;
  position: absolute;
  height: 320px;
  width: 1012px;
  background: rgba(255,255,255,0.9);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  left: 150px;
  top: 215px;
  border-radius: 8px;
  padding: 30px;
}
.folder-content h2 {
  font-size: 21px;
  padding-bottom: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid #ccc;
  cursor: default;
}
.folder-content h2 i {
  margin-right: 10px;
}
.easeout2 {
  transition: 0.2s all ease-out;
}
.folder-content.closed {
  transform: scale(0.8);
  opacity: 0;
}

.close-folder-content {
  position: absolute;
  right: 20px;
  top: 20px;
  background: #f3f3f3;
  padding:5px 10px;
  border-radius:5px;
}
.close-folder-content, .close-folder-content i {
  transition: 0.16s all ease-out;
}
.close-folder-content:hover {
  background: #f95536;
}
.close-folder-content:hover i{
  color: #fff;
}

.folder-content .file {
  float: left;
  margin-right: 20px;
  bottom: 20px;
  text-align: center;
  padding:20px;
}
.folder-content p {
  font-size: 14px;
}
.folder-content .file i {
  font-size: 36px;
  margin-bottom: 15px;
}

.ui-draggable-dragging {
  z-index: 999;
}
JS
$(document).ready(function() {
  $(".item").draggable({
    revert: true,
    start: function() {
      $(".folder").css({
        "background-color": "rgba(0,0,0,0.05)"
      });
    },
    stop: function() {
      $(".folder").css({
        "background-color": "rgba(0,0,0,0)"
      });
    },
    drag: function(event, ui) {
      $(this).css("z-index", "999");
    }
  });

  var targetFolder;
  var folderID;
  var zIndex;

  $(".folder").droppable({
    accept: ".item, .file",
    over: function(event, ui) {
      $(this).find("i.fa-file").css({
        transform: "scale(1.1)",
        opacity: "0.5"
      });
      $(this).find("p").css({
        opacity: "0.5"
      });
      $(this).css({
        background: "rgba(0,0,0,0.0)",
        border: "1px solid rgba(0,0,0,0.1)"
      });
      targetFolder = $(".ui-droppable-hover").attr("id") + "-content";
      folderID = $(".ui-droppable-hover").attr("id");
    },
    out: function(event, ui) {
      $(this).find("i.fa-file").css({
        transform: "scale(1)",
        opacity: "1"
      });
      $(this).find("p").css({
        opacity: "1"
      });
      $(this).css({
        background: "rgba(0,0,0,0.05)",
        border: "1px solid rgba(0,0,0,0)"
      });
    },
    drop: function() {
      dropItemToFolder(targetFolder, folderID);
    }
  });

  $(".left").sortable({
    revert: true
  });

  $(".folder-content").droppable({
    drop: function() {
      var eLtarget = $(this).attr("id");
      var eLFolder = $(this).attr("id").slice(0, -8);
      dropItemToFolder(eLtarget, eLFolder);
    }
  });
  var eLfolderindex;
  var draggieWindow = $(".folder-content").draggabilly();
  draggieWindow.on("dragStart", function(event, pointer) {
    (zIndex = $(".folder-content")
      .map(function() {
        return $(this).css("z-index");
      })
      .get()), (currentzIndex = Math.max.apply(null, zIndex));
    $(this).css({
      display: "block",
      "z-index": currentzIndex + 1
    });
  });
  $(".folder-content").resizable({
    minWidth: 250,
    minHeight: 150,
    start: function(event, ui) {
      $(".folder-content").draggabilly("disable");
    },
    stop: function(event, ui) {
      $(".folder-content").draggabilly("enable");
    }
  });

  $(".close-folder-content").click(function() {
    var eLfolder = $(this).parent();
    eLfolder.addClass("easeout2").addClass("closed");
    setTimeout(function() {
      eLfolder.css("display", "none");
    }, 500);
  });

  $(".folder").dblclick(function() {
    (zIndex = $(".folder-content")
      .map(function() {
        return $(this).css("z-index");
      })
      .get()), (currentzIndex = Math.max.apply(null, zIndex));

    var eLfolder = $(this).attr("id");

    $("#" + eLfolder + "-content").css({
      display: "block",
      "z-index": currentzIndex + 1
    });
    setTimeout(function() {
      $("#" + eLfolder + "-content").addClass("easeout2").removeClass("closed");
    }, 5);
    setTimeout(function() {
      $("#" + eLfolder + "-content").removeClass("easeout2");
    }, 300);
  });

  toolTiper();
});

function toolTiper() {
  $(".tooltiper").each(function() {
    var eLcontent = $(this).attr("data-tooltip"),
      eLtop = $(this).position().top,
      eLleft = $(this).position().left;
    $(this).append('' + eLcontent + "");
  });
}

function dragTheFiles() {
  setTimeout(function() {
    $(".file").draggable({
      revert: true,
      start: function() {
        $(".folder-content").draggabilly("disable");
        $(".folder").css({
          "background-color": "rgba(0,0,0,0.05)"
        });
        $(this).css({
          "background-color": "rgba(0,0,0,0.02)"
        });
      },
      stop: function() {
        $(".folder-content").draggabilly("enable");
        $(".folder").css({
          "background-color": "rgba(0,0,0,0)"
        });
         $(this).css({
          "background-color": "rgba(0,0,0,0.0)"
        });
      },
      drag: function(event, ui) {
        $(this).css({
          "z-index": "999"
        });
      }
    });
  }, 300);
}

function dropItemToFolder(target, folderid) {
  $(".ui-draggable-dragging").draggable({
    revert: false
  });
  $(".ui-draggable-dragging").addClass("is-dropped");
  $("#" + folderid).addClass("item-dropped");
  $(".folder").css({
    background: "rgba(0,0,0,0.05)",
    border: "1px solid rgba(0,0,0,0)"
  });
  $(".folder .fa-folder").css({
    transform: "scale(1)",
    opacity: "1"
  });
  $(".folder p").css({
    opacity: "1"
  });
  setTimeout(function() {
    $(".is-dropped").appendTo("#" + target);
    $(".is-dropped").removeClass().addClass(target + "-item").addClass("file");
    $("." + target + "-item").draggable("destroy");
    $("." + target + "-item").css({
      left: "0",
      top: "0"
    });
  }, 300);
  setTimeout(function() {
    $("#" + folderid).removeClass("item-dropped");
  }, 1000);
  dragTheFiles();
}
Term
Wed, 12/27/2017 - 07:00

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv