UNPKG

empty-folder-manager

Version:

Interactive CLI tool for analyzing and removing empty folders from filesystem with .gitignore support and custom glob patterns

395 lines (330 loc) 6.69 kB
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: #333; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } .header { text-align: center; background: rgba(255, 255, 255, 0.95); padding: 30px; border-radius: 15px; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); backdrop-filter: blur(10px); } .header h1 { font-size: 2.5rem; margin-bottom: 10px; background: linear-gradient(45deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .header p { font-size: 1.2rem; color: #666; } .main-content { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; } @media (max-width: 768px) { .main-content { grid-template-columns: 1fr; } } section { background: rgba(255, 255, 255, 0.95); padding: 25px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); backdrop-filter: blur(10px); } section h2 { margin-bottom: 20px; color: #333; font-size: 1.5rem; } .config-item { margin-bottom: 20px; } .config-item label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; } .input-group { display: flex; gap: 10px; } .input-group input { flex: 1; } input[type="text"], select, textarea { width: 100%; padding: 12px; border: 2px solid #e1e5e9; border-radius: 8px; font-size: 14px; transition: all 0.3s ease; } input[type="text"]:focus, select:focus, textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } textarea { min-height: 80px; resize: vertical; font-family: monospace; } .checkbox-label { display: flex !important; align-items: center; gap: 8px; margin-bottom: 15px !important; cursor: pointer; } .checkbox-label input[type="checkbox"] { width: auto; } .custom-patterns { margin-top: 15px; } .btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center; } .btn:disabled { opacity: 0.6; cursor: not-allowed; } .btn-primary { background: linear-gradient(45deg, #667eea, #764ba2); color: white; } .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); } .btn-secondary { background: #6c757d; color: white; } .btn-secondary:hover:not(:disabled) { background: #5a6268; transform: translateY(-2px); } .btn-warning { background: #ffc107; color: #212529; } .btn-warning:hover:not(:disabled) { background: #e0a800; transform: translateY(-2px); } .btn-danger { background: #dc3545; color: white; } .btn-danger:hover:not(:disabled) { background: #c82333; transform: translateY(-2px); } .action-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; } .progress-section { grid-column: 1 / -1; } .progress-bar { width: 100%; height: 20px; background: #e9ecef; border-radius: 10px; overflow: hidden; margin-bottom: 10px; } .progress-fill { height: 100%; background: linear-gradient(45deg, #667eea, #764ba2); width: 0%; transition: width 0.3s ease; } .progress-text { text-align: center; color: #666; font-weight: 500; } .results-section { grid-column: 1 / -1; } .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; } .stat-card { background: linear-gradient(135deg, #f8f9fa, #e9ecef); padding: 20px; border-radius: 10px; text-align: center; border: 2px solid #e1e5e9; transition: transform 0.3s ease; } .stat-card:hover { transform: translateY(-5px); } .stat-number { font-size: 2rem; font-weight: bold; color: #667eea; margin-bottom: 5px; } .stat-label { color: #666; font-size: 0.9rem; } .folder-list-container { margin-top: 30px; } .folder-list { max-height: 400px; overflow-y: auto; border: 2px solid #e1e5e9; border-radius: 8px; padding: 15px; background: #f8f9fa; } .folder-item { padding: 8px 12px; margin-bottom: 5px; background: white; border-radius: 5px; font-family: monospace; font-size: 0.9rem; border-left: 4px solid #667eea; transition: all 0.3s ease; } .folder-item:hover { background: #e3f2fd; transform: translateX(5px); } .log-section { grid-column: 1 / -1; } .log-container { max-height: 300px; overflow-y: auto; border: 2px solid #e1e5e9; border-radius: 8px; padding: 15px; background: #f8f9fa; font-family: monospace; font-size: 0.9rem; } .log-entry { padding: 5px 0; border-bottom: 1px solid #e1e5e9; color: #555; } .log-entry:last-child { border-bottom: none; } .log-entry.success { color: #28a745; } .log-entry.error { color: #dc3545; } .log-entry.warning { color: #ffc107; } .log-entry.info { color: #17a2b8; } .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; } .modal-content { background: white; padding: 30px; border-radius: 15px; max-width: 500px; width: 90%; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); } .modal-content h3 { margin-bottom: 15px; color: #333; } .modal-content p { margin-bottom: 25px; color: #666; line-height: 1.5; } .modal-buttons { display: flex; gap: 15px; justify-content: center; } .modal-buttons .btn { min-width: 120px; } /* Animations */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } section { animation: fadeIn 0.6s ease-out; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #667eea; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #5a6fd8; }