Framework7 Toolbar Design
August 7, 2025 · AI Conversations
### ✅ **HTML + Framework7 Toolbar Code**
<!-- In your main page (e.g., home.html or index.html) -->
<div class="toolbar custom-toolbar">
<div class="toolbar-inner">
<div class="logo-title">
<img src="img/fossetts-logo.png" alt="Fossett's Circus" class="logo" />
<div class="title-group">
<div class="main-title">FOSSETT'S CIRCUS</div>
<div class="subtitle">Staff Management System</div>
</div>
</div>
</div>
</div>
### ✅ **CSS**
.custom-toolbar {
background: linear-gradient(to right, #3f00ff, #5f0aff); /* Purple gradient */
color: #fff;
padding: 10px 20px;
border-radius: 10px;
margin: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.logo-title {
display: flex;
align-items: center;
gap: 15px;
}
.logo {
height: 50px;
}
.title-group {
display: flex;
flex-direction: column;
}
.main-title {
font-size: 20px;
font-weight: bold;
color: yellow;
}
.subtitle {
font-size: 14px;
color: #dcdcdc;
}
### ✅ **Notes**
– Place the `fossetts-logo.png` inside the `img/` directory of your app.
– You can add this toolbar in your `pages/home.html`, or if you want it app-wide, inject it inside your `index.html` inside the “ after `#app`.
Let me know if you want to include navigation links or buttons too.
– Use `position: fixed` or place it inside the “ at the top.
– Remove the `margin` and `border-radius` so it spans the full screen edge-to-edge.
– Ensure it overlays content if needed.
Here’s the updated full code:
—
### ✅ **HTML**
<!-- Place inside your index.html or main page HTML -->
<div class="custom-toolbar fullscreen-toolbar">
<div class="toolbar-inner">
<div class="logo-title">
<img src="img/fossetts-logo.png" alt="Fossett's Circus" class="logo" />
<div class="title-group">
<div class="main-title">FOSSETT'S CIRCUS</div>
<div class="subtitle">Staff Management System</div>
</div>
</div>
</div>
</div>
—
### ✅ **CSS**
.fullscreen-toolbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
background: linear-gradient(to right, #3f00ff, #5f0aff);
color: #fff;
padding: 12px 20px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.logo-title {
display: flex;
align-items: center;
gap: 15px;
max-width: 100%;
}
.logo {
height: 50px;
max-width: 100%;
}
.title-group {
display: flex;
flex-direction: column;
}
.main-title {
font-size: 22px;
font-weight: bold;
color: yellow;
}
.subtitle {
font-size: 14px;
color: #dcdcdc;
}
—
### ✅ **Extra Notes**
– Add padding-top (`60px` or so) to the content below this banner to avoid it being hidden under the fixed toolbar.
– Add this in your `app.css` or “ block if inline.
– Optional: add media queries to adjust font size/logo for smaller screens.
—
Let me know if you want it inside a Framework7 `navbar` component instead!
—
### ✅ Step 1: **Create a Reusable Navbar File**
Create a file called `staff-navbar.html` in your `pages/includes/` or `components/` directory:
<!-- pages/includes/staff-navbar.html -->
<div class="custom-toolbar fullscreen-toolbar">
<div class="toolbar-inner">
<div class="logo-title">
<img src="img/fossetts-logo.png" alt="Fossett's Circus" class="logo" />
<div class="title-group">
<div class="main-title">FOSSETT'S CIRCUS</div>
<div class="subtitle">Staff Management System</div>
</div>
</div>
</div>
</div>
—
### ✅ Step 2: **Include This Navbar in All Staff Pages**
On each **staff-related page** (like `staff.html`, `staff-login.html`, `staff-dashboard.html`, etc.), load the navbar using jQuery + `$.get()` or Framework7 template router if you're using components.
#### Option 1: jQuery Way (easiest for Core + jQuery flavor)
In each staff page, at the top of the page (inside “), add:
<!-- pages/staff.html -->
<div class="page" data-name="staff">
<div class="page-content">
<div id="staff-navbar"></div>
<!-- Rest of your content -->
</div>
</div>
<script>
$(document).ready(function () {
$('#staff-navbar').load('pages/includes/staff-navbar.html');
});
</script>
#### Option 2: If you use Framework7 router components:
Instead of using `url: 'pages/staff.html'`, define a **componentUrl** and import the banner in the `.html` file.
—
### ✅ Step 3: **CSS (Global)**
Add this once in your `app.css` or global “:
.fullscreen-toolbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
background: linear-gradient(to right, #3f00ff, #5f0aff);
color: #fff;
padding: 12px 20px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.logo-title {
display: flex;
align-items: center;
gap: 15px;
max-width: 100%;
}
.logo {
height: 50px;
max-width: 100%;
}
.title-group {
display: flex;
flex-direction: column;
}
.main-title {
font-size: 22px;
font-weight: bold;
color: yellow;
}
.subtitle {
font-size: 14px;
color: #dcdcdc;
}
.page-content {
padding-top: 80px; /* To offset fixed toolbar */
}
—
### ✅ Done!
Now your custom Fossett's Circus banner will appear on all staff-related pages without duplicating the HTML.
Let me know if you're using component routing instead of static HTML pages.
—
### ✅ Goal:
You want to show a **common full-width banner/navbar (like the screenshot)** on **all staff-related pages**, using Framework7 (Core + jQuery flavor).
—
### ✅ Step-by-Step Working Approach
—
#### ✅ **1. Move Banner to `staff-navbar.html`**
Create this file inside your project:
/www/pages/includes/staff-navbar.html
Content of `staff-navbar.html`:
<div class="custom-toolbar fullscreen-toolbar">
<div class="toolbar-inner">
<div class="logo-title">
<img src="img/fossetts-logo.png" alt="Fossett's Circus" class="logo" />
<div class="title-group">
<div class="main-title">FOSSETT'S CIRCUS</div>
<div class="subtitle">Staff Management System</div>
</div>
</div>
</div>
</div>
—
#### ✅ **2. Add This in Any Staff Page (e.g., staff.html)**
<div class="page" data-name="staff">
<div class="page-content">
<div id="staff-navbar"></div>
<!-- your content below -->
<div class="block">
<p>This is staff page content</p>
</div>
</div>
</div>
<script>
$(document).on('page:init', '.page[data-name="staff"]', function () {
$('#staff-navbar').load('pages/includes/staff-navbar.html');
});
</script>
> ✅ This uses Framework7’s `page:init` event so the code runs **after page is mounted** in the DOM.
—
#### ✅ **3. Add CSS Globally in `app.css`**
Make sure this CSS is in your `css/app.css` file:
.fullscreen-toolbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
background: linear-gradient(to right, #3f00ff, #5f0aff);
color: #fff;
padding: 12px 20px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.logo-title {
display: flex;
align-items: center;
gap: 15px;
}
.logo {
height: 50px;
}
.title-group {
display: flex;
flex-direction: column;
}
.main-title {
font-size: 22px;
font-weight: bold;
color: yellow;
}
.subtitle {
font-size: 14px;
color: #dcdcdc;
}
/* Make space for fixed header */
.page-content {
padding-top: 90px;
}
—
#### ✅ **4. Confirm File Structure**
Your structure should be like:
www/
├── pages/
│ ├── staff.html
│ └── includes/
│ └── staff-navbar.html
├── css/
│ └── app.css
├── img/
│ └── fossetts-logo.png
—
#### ✅ 5. Reload Cordova App
After saving all files:
cordova clean
cordova build android
cordova run android
Or use `cordova prepare` and re-run APK.
—
### ✅ Confirm Checklist
– [ ] `staff-navbar.html` is present and path is correct.
– [ ] You are using `page:init` to load the navbar dynamically.
– [ ] Logo image is placed in `www/img/fossetts-logo.png`.
– [ ] CSS is in `app.css` and is loading.
– [ ] You gave space (`padding-top`) in `.page-content` for fixed banner.
—
Let me know which part still fails — I’ll debug it immediately.
arrow_left_circle_fill
FOSSETT'S CIRCUSStaff Management System
power
– Purple gradient background
– Responsive logo
– Title and subtitle in proper layout
– Left “Back” icon
– Right “Logout” icon
—
### ✅ Final Adjusted Code for Framework7 Navbar
<div class="navbar custom-navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link back-to-access">
<i class="icon f7-icons">arrow_left_circle_fill</i>
</a>
</div>
<div class="title nav-title display-flex align-items-center">
<img src="img/logo.png" alt="logo" class="responsive-logo" />
<div class="title-text ml-10">
<div class="main-title">FOSSETT'S CIRCUS</div>
<div class="subtitle">Staff Management System</div>
</div>
</div>
<div class="right">
<a href="#" class="link logout-staff">
<i class="icon f7-icons">power</i>
</a>
</div>
</div>
</div>
—
### ✅ CSS to Match Screenshot
/* Purple gradient background */
.custom-navbar .navbar-bg {
background: linear-gradient(to right, #3f00ff, #5f0aff);
}
/* Adjust title section layout */
.nav-title {
gap: 10px;
display: flex;
flex-direction: row;
}
/* Logo sizing */
.responsive-logo {
height: 45px;
width: auto;
}
/* Text next to logo */
.title-text {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.main-title {
font-size: 18px;
font-weight: bold;
color: yellow;
}
.subtitle {
font-size: 13px;
color: #dcdcdc;
}
/* Optional spacing between logo and text */
.ml-10 {
margin-left: 10px;
}
—
### ✅ Tips
– Add this CSS to your main `app.css`.
– Place this “ at the top of **every staff page**, or make it common by including in a shared layout or loading via jQuery.
– If the logo breaks layout on mobile, use media queries to reduce logo or font size.
—
Let me know if you want to **hide the back icon or logout** on certain pages conditionally, or make it a reusable component.