minor changes

This commit is contained in:
2024-12-04 22:23:28 +01:00
parent e70c6db10f
commit 2123b5464f
22 changed files with 1045 additions and 27 deletions

View File

@ -1,11 +1,15 @@
<tr>
<td>
<tr class="border-b">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{% if file.type == 'dir' %}
{{ ux_icon('folder:closed', {height: '32px', width: '32px'}) }}
{% else %}
{{ ux_icon('file:default', {height: '32px', width: '32px'}) }}
{% endif %}
</th>
<td class="px-6 py-4">
{{ file.name }}
</td>
<td>{{ file.name }}</td>
<td>{{ file.size }}</td>
</tr>
<td class="px-6 py-4">
{{ file.size }}
</td>
</tr>

View File

@ -1,13 +1,36 @@
<table class="table table-striped table-bordered w-75 mt-5">
<thead>
<tr>
<td>Expand</td>
<th>Name</th>
<th>Size</th>
</thead>
<tbody>
{% for dirContent in content %}
{% include '_partials/_row.html.twig' with {file: dirContent} %}
{% endfor %}
</tbody>
</table>
<div class="max-w-4xl overflow-x-auto shadow-md sm:rounded-lg ">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
<thead class="text-xs text-gray-700 uppercase bg-gray-200 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="px-6 py-3">
-
</th>
<th scope="col" class="px-6 py-3">
name
</th>
<th scope="col" class="px-6 py-3">
Size
</th>
</tr>
</thead>
<tbody>
{% for dirContent in content %}
{% include '_partials/_row.html.twig' with {file: dirContent} %}
{% endfor %}
</tbody>
</table>
</div>
{{ form_start(fileForm, {'attr': {'data-controller': 'upload-file'}}) }}
<div class="flex items-center justify-center max-w-4xl mt-5">
<label for="upload_file_form_file" class="flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600">
<div class="flex flex-col items-center justify-center pt-5 pb-6">
{{ ux_icon('file:upload', {height: '64px', width: '64px'}) }}
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Click to upload</span> or drag and drop</p>
</div>
{{ form_widget(fileForm.file) }}
<button type="submit" class="hidden"></button>
</label>
</div>
{{ form_end(fileForm) }}

View File

@ -4,7 +4,9 @@
<meta charset="UTF-8">
<title>Files | {% block title %}{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/flowbite@2.5.2/dist/flowbite.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/flowbite@2.5.2/dist/flowbite.min.js"></script>
{% block stylesheets %}
{% endblock %}
@ -12,7 +14,7 @@
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
<body data-turbo="true">
{% block body %}{% endblock %}
</body>
</html>

View File

@ -3,7 +3,7 @@
{% block title %}Home{% endblock %}
{% block body %}
<center class="mt-5">
<center class="container mt-5">
<h1>Welcome to the File Explorer</h1>
<p>Use the navigation bar to explore the files and directories.</p>
{% include '_partials/_table.html.twig' %}