Drive-Space-Info
How do I make an drive-space-info?
What is a drive-space-info? How do you make a drive-space-info? This script and codes were developed by Yvan Dumont on 08 December 2022, Thursday.
Drive-Space-Info - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Drive-Space-Info</title> <link href="https://fonts.googleapis.com/css?family=Righteous|Space+Mono:400,700" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/balloon-css/0.3.0/balloon.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="drive--list"></div> <script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/193986/progressbar.js'></script> <script src="js/index.js"></script>
</body>
</html>
Drive-Space-Info - Script Codes CSS Codes
html { height: 100%;
}
body { font-family: 'Space Mono', monospace; min-height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; background: #485563; /* fallback for old browsers */ background: -webkit-linear-gradient(to left, #485563, #29323c); /* Chrome 10-25, Safari 5.1-6 */ background: -webkit-linear-gradient(right, #485563, #29323c); background: linear-gradient(to left, #485563, #29323c); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.drive--list { position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; width: calc(450px); -ms-flex-wrap: wrap; flex-wrap: wrap;
}
.drive { display: inline-block; position: relative; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; opacity: 0; -webkit-transition: opacity 1s ease-in; transition: opacity 1s ease-in;
}
.drive.showing { opacity: 0.65; -webkit-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
}
.drive.showing:hover { opacity: 1;
}
.drive.showing:hover svg path:last-child { -webkit-transition: stroke-width 0.2s ease-in-out; transition: stroke-width 0.2s ease-in-out; stroke-width: 18px;
}
[data-balloon]:after { font-size: 14px;
}
.progressbar-text { font-family: 'Space Mono', monospace; font-size: 16px; position: absolute; top: 49%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); color: white; white-space: pre; text-align: center;
}
Drive-Space-Info - Script Codes JS Codes
var driveInfos = [{"Volume":"C:","Name":"WindowsX","Total":119898370048,"Free":55760785408,"Used":64137584640,"FreePercent":46.0,"UsedPercent":53.0},{"Volume":"E:","Name":"Working","Total":119822872576,"Free":14186708992,"Used":105636163584,"FreePercent":11.0,"UsedPercent":88.0},{"Volume":"F:","Name":"Hybrid","Total":447675887616,"Free":233395757056,"Used":214280130560,"FreePercent":52.0,"UsedPercent":47.0},{"Volume":"G:","Name":"Huge","Total":3000457228288,"Free":1814504914944,"Used":1185952313344,"FreePercent":60.0,"UsedPercent":39.0},{"Volume":"I:","Name":"SubSystem2","Total":85898293248,"Free":61872934912,"Used":24025358336,"FreePercent":72.0,"UsedPercent":27.0},{"Volume":"J:","Name":"SubSystem","Total":153788346368,"Free":34398068736,"Used":119390277632,"FreePercent":22.0,"UsedPercent":77.0}];
var initDriveGraph = (el)=>{ var bar = new ProgressBar.Circle(el, { // This has to be the same size as the maximum width to // prevent clipping trailColor: '#CCC', strokeWidth: 24, trailWidth: 12, easing: 'easeInOut', duration: 1400, svgStyle: { display: 'block', width: '150px' }, text: { autoStyleContainer: false, style: { color: '#fff' } }, from: { color: '#061161', width: 1 }, to: { color: '#780206', width: 16 }, // Set default step function for all animate calls step: function(state, circle) { circle.path.setAttribute('stroke', state.color); circle.path.setAttribute('stroke-width', state.width); var gbUsed = (el.dataset.Used/Math.pow(1024,3)).toFixed(0); circle.setText(el.dataset.Volume + '\r\n' + gbUsed + ' GB'); } }); var value = (el.dataset.Percent/100); bar.animate(value); // Number from 0.0 to 1.0 el.className += ' showing';
};
for(var i = 0; i < driveInfos.length; i++)
{ var drive = driveInfos[i], list = document.querySelector('.drive--list'), li = document.createElement('div'), div = document.createElement('div'), nbGbFree = (drive.Free/Math.pow(1024,3)).toFixed(1), tolltipText = drive.Name + ': ' + nbGbFree + ' GB free'; div.className = 'drive'; div.dataset.Percent = drive.UsedPercent; div.dataset.Total = drive.Total; div.dataset.Used = drive.Used; div.dataset.Volume = drive.Volume; div.dataset.balloon = tolltipText;
console.log(i); div.dataset.balloonPos = i < 3 ? 'top' : 'down'; li.appendChild(div); list.appendChild(li); initDriveGraph(div);
}
Developer | Yvan Dumont |
Username | LeYvan |
Uploaded | December 08, 2022 |
Rating | 3 |
Size | 4,253 Kb |
Views | 18,216 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Whyutils | 3,752 Kb |
Tile Map Test | 4,860 Kb |
Prodjask-Vue Exercice | 11,220 Kb |
A Pen by Yvan Dumont | 7,322 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A vuejs widget | Chrgl86 | 2,869 Kb |
Direction-icon | Alexandremasy | 3,323 Kb |
Large canvas mousemove experiment | Jibbon | 2,885 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
Tab panels | Accessibility | 0 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
Table border-collapse property | Maxds | 1,672 Kb |
Mini Profile | Frytyler | 3,828 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
Isometric css island | Xaddict | 2,950 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!