Split up settings sub pages into templates loaded by htmx to reduce initial load
This commit is contained in:
48
templates/partials/settings/export.html
Normal file
48
templates/partials/settings/export.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="bg-white shadow rounded-lg p-4 sm:p-6 lg:p-8 mb-8">
|
||||
<div class="mb-6">
|
||||
<h3 class="text-xl font-bold text-gray-900">Data & Portability</h3>
|
||||
<p class="text-sm text-gray-500">Export your data for backup or external analysis.</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
<!-- CSV Export -->
|
||||
<div class="border border-gray-200 rounded-xl p-6 hover:border-cyan-200 transition-colors bg-gray-50/50">
|
||||
<div class="flex items-center mb-4">
|
||||
<div class="p-3 bg-green-100 rounded-lg text-green-600 mr-4 shadow-sm">
|
||||
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd"
|
||||
d="M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v3.586l-1.293-1.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V8z"
|
||||
clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h4 class="text-lg font-bold text-gray-900">Workout History</h4>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 mb-6 font-medium">Download all workout records, sets, and
|
||||
performance data in CSV format.</p>
|
||||
<a href="{{ url_for('export.export_workouts_csv') }}"
|
||||
class="text-white bg-green-600 hover:bg-green-700 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center justify-center w-full shadow-sm">
|
||||
Download CSV
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- SQL Export -->
|
||||
<div class="border border-gray-200 rounded-xl p-6 hover:border-cyan-200 transition-colors bg-gray-50/50">
|
||||
<div class="flex items-center mb-4">
|
||||
<div class="p-3 bg-blue-100 rounded-lg text-blue-600 mr-4 shadow-sm">
|
||||
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3.293 1.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
|
||||
clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h4 class="text-lg font-bold text-gray-900">Database Snapshot</h4>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 mb-6 font-medium">Create a full SQL dump of your database including
|
||||
schema and all records.</p>
|
||||
<a href="{{ url_for('export.export_database_sql') }}"
|
||||
class="text-white bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center justify-center w-full shadow-sm">
|
||||
Download SQL Script
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user