diff --git a/templates/components/header.html b/templates/components/header.html new file mode 100644 index 0000000..2ca7216 --- /dev/null +++ b/templates/components/header.html @@ -0,0 +1,29 @@ +{% macro header(title, description="", button_text="", button_url="", icon="fa-folder", button_class="", button_icon="fa-plus", button_style="") %} +
+
+
+
+

+ + {{ title }} +

+ {% if description %} +

{{ description }}

+ {% endif %} +
+ {% if button_text and button_url %} +
+ +
+ {% endif %} +
+
+
+{% endmacro %} \ No newline at end of file diff --git a/templates/contacts/contacts.html b/templates/contacts/contacts.html index 1906e2f..705f8ae 100644 --- a/templates/contacts/contacts.html +++ b/templates/contacts/contacts.html @@ -1,8 +1,15 @@ {% extends "common/base.html" %} +{% from "components/header.html" import header %} {% block title %}Contacts - DocuPulse{% endblock %} {% block content %} -

Contacts

+{{ header( + title="Contacts", + description="Manage your contacts and their information", + button_text="Add Contact", + button_url="/contacts/new", + icon="fa-address-book" +) }}

Your contacts will appear here.

{% endblock %} \ No newline at end of file diff --git a/templates/contacts/form.html b/templates/contacts/form.html index 7574a66..1acfabe 100644 --- a/templates/contacts/form.html +++ b/templates/contacts/form.html @@ -3,15 +3,22 @@ {% block content %}
-
- {% if title %} -

{{ title }}

- {% else %} -

User Form

- {% endif %} +
+
+

+ + {% if title %} + {{ title }} + {% else %} + User Form + {% endif %} +

+

Add or edit contact information

+
- ← Back to Contacts + class="btn btn-sm btn-outline-secondary"> + + Back to Contacts
diff --git a/templates/contacts/list.html b/templates/contacts/list.html index a56122f..4930afc 100644 --- a/templates/contacts/list.html +++ b/templates/contacts/list.html @@ -1,4 +1,5 @@ {% extends "common/base.html" %} +{% from "components/header.html" import header %} {% block head %} {{ super() }} @@ -10,19 +11,16 @@ {% endblock %} {% block content %} -
- +{{ header( + title="Contacts", + description="Manage your contacts and their information", + button_text="Add New Contact", + button_url=url_for('contacts.new_contact'), + icon="fa-address-book", + button_icon="fa-plus" +) }} +
diff --git a/templates/dashboard/dashboard.html b/templates/dashboard/dashboard.html index 2e3976f..162f6df 100644 --- a/templates/dashboard/dashboard.html +++ b/templates/dashboard/dashboard.html @@ -1,4 +1,5 @@ {% extends "common/base.html" %} +{% from "components/header.html" import header %} {% block title %}Dashboard - DocuPulse{% endblock %} @@ -7,15 +8,13 @@ {% endblock %} {% block content %} -
-

Welcome back, {{ current_user.username }}!

-
- - -
-
+{{ header( + title="Welcome back, " + current_user.username + "!", + description="View your document management overview and statistics", + button_text="", + button_url="", + icon="fa-home" +) }} {% from 'components/storage_overview.html' import storage_overview %} {% from 'components/storage_usage.html' import storage_usage %} diff --git a/templates/rooms/room.html b/templates/rooms/room.html index 4f3cfa8..c31dfcc 100644 --- a/templates/rooms/room.html +++ b/templates/rooms/room.html @@ -1,16 +1,21 @@ {% extends "common/base.html" %} +{% from "components/header.html" import header %} {% block title %}Room - DocuPulse{% endblock %} {% block content %} +{{ header( + title=room.name, + description=room.description or 'No description', + button_text="Back to Rooms", + button_url=url_for('rooms.rooms'), + icon="fa-door-open", + button_class="btn-outline-secondary", + button_icon="fa-arrow-left" +) }} +
-
-
-

{{ room.name }}

-
{{ room.description or 'No description' }}
-
-
diff --git a/templates/rooms/rooms.html b/templates/rooms/rooms.html index b7abe35..2ba57ce 100644 --- a/templates/rooms/rooms.html +++ b/templates/rooms/rooms.html @@ -1,20 +1,21 @@ {% extends "common/base.html" %} +{% from "components/header.html" import header %} {% block title %}Rooms - DocuPulse{% endblock %} {% block content %} -
-
-
-

Rooms

-
- -
+{{ header( + title="Rooms", + description="Manage your document rooms and collaborate with team members", + button_text="New Room", + button_url=url_for('rooms.create_room'), + icon="fa-door-open", + button_icon="fa-plus", + button_class="btn-primary", + button_style="padding: 0.4rem 1rem;" +) }} +
diff --git a/templates/starred/starred.html b/templates/starred/starred.html index db0a838..e1bedb6 100644 --- a/templates/starred/starred.html +++ b/templates/starred/starred.html @@ -1,13 +1,17 @@ {% extends "common/base.html" %} +{% from 'components/header.html' import header %} {% block title %}Starred - DocuPulse{% endblock %} {% block content %} +{{ header( + title="Starred", + description="View and manage your starred files and documents.", + icon="fa-star" +) }} +
-
-
Starred
-
{% include 'components/search_bar.html' %}
diff --git a/templates/trash/trash.html b/templates/trash/trash.html index a1f8841..b1070ab 100644 --- a/templates/trash/trash.html +++ b/templates/trash/trash.html @@ -1,16 +1,21 @@ {% extends "common/base.html" %} +{% from 'components/header.html' import header %} {% block title %}Trash - DocuPulse{% endblock %} {% block content %} +{{ header( + title="Trash", + description="View and manage deleted files. Files in trash will be permanently deleted after 30 days.", + button_text="Empty Trash", + button_url="#", + icon="fa-trash", + button_class="btn-danger", + button_icon="" +) }} +
-
-
Trash
- -
{% include 'components/search_bar.html' %}
@@ -26,4 +31,11 @@ {% block extra_js %} + {% endblock %} \ No newline at end of file