diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 00000000..9334ca73 Binary files /dev/null and b/assets/logo.png differ diff --git a/assets/profilePic.png b/assets/profilePic.png new file mode 100644 index 00000000..7c6f8103 Binary files /dev/null and b/assets/profilePic.png differ diff --git a/index.php b/index.php new file mode 100644 index 00000000..ee9afad3 --- /dev/null +++ b/index.php @@ -0,0 +1,333 @@ + + + + + + + + + + + + Files Explorer + + + + + +
+
+
+ '; + foreach ($files as $file) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + switch ($extension) { + case "txt": + $icono = "notes"; + break; + case "doc": + case "docx": + $icono = "description"; + break; + case "pdf": + $icono = "picture_as_pdf"; + break; + case "csv": + $icono = "border_all"; + break; + case "jpg": + case "png": + $icono = "image"; + break; + case "ppt": + $icono = "co_present"; + break; + case "odt": + $icono = "description"; + break; + case "zip": + case "rar": + $icono = "folder_zip"; + break; + case "exe": + $icono = "terminal"; + break; + case "svg": + $icono = "polyline"; + break; + case "mp3": + $icono = "graphic_eq"; + break; + case "mp4": + $icono = "smart_display"; + break; + default: + $icono = "draft"; + }; + echo ''; + }; + echo '
' + ?> +
+
+ '; + foreach ($files as $file) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + switch ($extension) { + case "txt": + $icono = "notes"; + break; + case "doc": + case "docx": + $icono = "description"; + break; + case "pdf": + $icono = "picture_as_pdf"; + break; + case "csv": + $icono = "border_all"; + break; + case "jpg": + case "png": + $icono = "image"; + break; + case "ppt": + $icono = "co_present"; + break; + case "odt": + $icono = "description"; + break; + case "zip": + case "rar": + $icono = "folder_zip"; + break; + case "exe": + $icono = "terminal"; + break; + case "svg": + $icono = "polyline"; + break; + case "mp3": + $icono = "graphic_eq"; + break; + case "mp4": + $icono = "smart_display"; + break; + default: + $icono = "draft"; + }; + echo ''; + }; + echo '
' + ?> +
+
+ '; + foreach ($files as $file) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + switch ($extension) { + case "txt": + $icono = "notes"; + break; + case "doc": + case "docx": + $icono = "description"; + break; + case "pdf": + $icono = "picture_as_pdf"; + break; + case "csv": + $icono = "border_all"; + break; + case "jpg": + case "png": + $icono = "image"; + break; + case "ppt": + $icono = "co_present"; + break; + case "odt": + $icono = "description"; + break; + case "zip": + case "rar": + $icono = "folder_zip"; + break; + case "exe": + $icono = "terminal"; + break; + case "svg": + $icono = "polyline"; + break; + case "mp3": + $icono = "graphic_eq"; + break; + case "mp4": + $icono = "smart_display"; + break; + default: + $icono = "draft"; + }; + echo ''; + }; + echo '
' + ?> + +
+ '; + foreach ($files as $file) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + switch ($extension) { + case "txt": + $icono = "notes"; + break; + case "doc": + case "docx": + $icono = "description"; + break; + case "pdf": + $icono = "picture_as_pdf"; + break; + case "csv": + $icono = "border_all"; + break; + case "jpg": + case "png": + $icono = "image"; + break; + case "ppt": + $icono = "co_present"; + break; + case "odt": + $icono = "description"; + break; + case "zip": + case "rar": + $icono = "folder_zip"; + break; + case "exe": + $icono = "terminal"; + break; + case "svg": + $icono = "polyline"; + break; + case "mp3": + $icono = "graphic_eq"; + break; + case "mp4": + $icono = "smart_display"; + break; + default: + $icono = "draft"; + }; + echo ''; + }; + echo '
' + ?> + +
+ '; + foreach ($files as $file) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + switch ($extension) { + case "txt": + $icono = "notes"; + break; + case "doc": + case "docx": + $icono = "description"; + break; + case "pdf": + $icono = "picture_as_pdf"; + break; + case "csv": + $icono = "border_all"; + break; + case "jpg": + case "png": + $icono = "image"; + break; + case "ppt": + $icono = "co_present"; + break; + case "odt": + $icono = "description"; + break; + case "zip": + case "rar": + $icono = "folder_zip"; + break; + case "exe": + $icono = "terminal"; + break; + case "svg": + $icono = "polyline"; + break; + case "mp3": + $icono = "graphic_eq"; + break; + case "mp4": + $icono = "smart_display"; + break; + default: + $icono = "draft"; + }; + echo ''; + }; + echo '
' + ?> + + +
+

hola

+
+ + + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 00000000..db84a5db --- /dev/null +++ b/script.js @@ -0,0 +1,10 @@ +function checkDirFile(e) { + console.log(e) +} + +var items = document.querySelectorAll(".dirItem"); + for (var i = 0; i < items.length; i++) { + items[i].addEventListener("click", function() { + checkDirFile(this.getAttribute("data-archivo")); + }); + } \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 00000000..a9663b83 --- /dev/null +++ b/style.css @@ -0,0 +1,55 @@ +#header { + border: 1px black solid; + display: grid; + grid-template-columns: auto auto auto auto; + justify-items: center; + align-items: center; + padding: 10px; +} + +#profilePic { + width: 50px; + grid-column: 4/5; +} + +#logo { + width: 250px; +} + +#searchBar { + justify-content: center; +} + +.dirItem { + display: flex; + gap: 15px; + cursor: pointer; +} + +#directoryZone { + display: grid; + grid-template-columns: 600px 600px 600px 600px 600px; + overflow-x: scroll; + height: 200px; +} + +#mainPage { + display: grid; + + grid-template-columns: 75% 25%; +} + +#uploadBtn { + position: absolute; + left: 0; + margin-left: 20px; +} + +#upBar { + justify-content: center; +} + +#itemInfo { + background-color: bisque; + z-index: 2; +} \ No newline at end of file diff --git a/upload.php b/upload.php new file mode 100644 index 00000000..46156821 --- /dev/null +++ b/upload.php @@ -0,0 +1,52 @@ + diff --git a/uploads/mickey-mouse.png b/uploads/mickey-mouse.png new file mode 100644 index 00000000..27b12b56 Binary files /dev/null and b/uploads/mickey-mouse.png differ