Bläddra i källkod

feat(api-docs): enhance layout and add back to home button in API documentation

vtugulan 6 månader sedan
förälder
incheckning
2663a699a4
1 ändrade filer med 30 tillägg och 7 borttagningar
  1. 30 7
      app/api-docs/page.tsx

+ 30 - 7
app/api-docs/page.tsx

@@ -26,13 +26,36 @@ export default function ApiDocs() {
       <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
         <div className="bg-white shadow rounded-lg">
           <div className="px-4 py-5 sm:p-6">
-            <h1 className="text-2xl font-bold text-gray-900 mb-4">
-              Vtorio API Documentation
-            </h1>
-            <p className="text-gray-600 mb-6">
-              Interactive API documentation for file upload and management endpoints.
-            </p>
-            <div 
+            <div className="flex items-center justify-between mb-4">
+              <div>
+                <h1 className="text-2xl font-bold text-gray-900">
+                  Vtorio API Documentation
+                </h1>
+                <p className="text-gray-600 mt-2">
+                  Interactive API documentation for file upload and management endpoints.
+                </p>
+              </div>
+              <a
+                href="/"
+                className="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors"
+              >
+                <svg
+                  className="w-4 h-4 mr-2"
+                  fill="none"
+                  stroke="currentColor"
+                  viewBox="0 0 24 24"
+                >
+                  <path
+                    strokeLinecap="round"
+                    strokeLinejoin="round"
+                    strokeWidth={2}
+                    d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
+                  />
+                </svg>
+                Back to Home
+              </a>
+            </div>
+            <div
               id="api-reference"
               data-url="/api/openapi.json"
               data-theme="default"