Skip to content

Workspaces Theme

Version: 1.0.0 Parent: Blocksy Repository: derintolu/workspaces-theme

The main Hub theme implementing an app-like shell with fixed sidebar navigation for Lender Hub, Agent Hub, and Partner Hub.

Features

Hub Frame System

  • Fixed Sidebar - 320px persistent left sidebar
  • Header Bar - 60px bar with toggle, title, live clock
  • Collapsible - Toggle between expanded (320px) and collapsed (64px)
  • localStorage - Sidebar state persists across sessions

Integration Points

  • Hub Pages - Hub shortcodes and assets
  • Tutor LMS - Learning workspace with iframe template
  • Blocksy Companion - Account modal for login
  • Greenshift - Block patterns and sliders

Installation

  1. Install and activate Blocksy theme
  2. Upload workspaces theme
  3. Activate as child theme
  4. Assign menus to workspace_sidebar_menu and workspace_user_menu

Template Files

FilePurpose
workspace-sidebar-frame.phpSidebar wrapper with header bar
workspace-sidebar-content.phpMenu, profile card, widgets
taxonomy-workspace.phpWorkspace archive pages
tutor/single-course-iframe.phpCourse display (iframe mode)

Widget Areas

AreaPurpose
workspace-sidebar-header16:9 header slot for cover images/video
workspace-below-sidebarBelow sidebar content

Customizer Settings

Workspace Header Background

SettingOptions
Background TypeNone, Image, Video
Background ImageMedia upload
Background VideoURL input
Video PosterFallback image
Overlay ColorRGBA picker
Height100-1000px

Theme.json Tokens

Colors

json
{
  "primary-blue": "#2563EB",
  "rich-teal": "#20D4DA",
  "light-blue": "#7DB3E8",
  "dark-charcoal": "#171A1F",
  "navy-base": "#263042",
  "off-white": "#F8F7F9"
}

Gradients

SlugCSS
primary-gradientlinear-gradient(90deg, navy → blue → teal → light-blue)
hero-gradientlinear-gradient(135deg, #2563EB → #20D4DA)
dark-gradientlinear-gradient(180deg, #171A1F → #263042)

Custom Properties

css
--sidebar-width: 320px;
--sidebar-width-collapsed: 64px;
--sidebar-background: #020014;
--header-bar-height: 60px;
--hub-header-height: 60px;
--sidebar-z-index: 100;
--sidebar-transition: all 0.3s ease;

The function workspaces_is_workspace_page() determines when to show the sidebar:

php
// Returns true for:
// - Pages with 'workspace' taxonomy term
// - Pages assigned to workspaces
// - Course/lesson pages (Tutor LMS)
// - Hub pages

Interactivity API

javascript
// Store: workspaces/sidebar
{
  state: {
    isCollapsed: false
  },
  actions: {
    toggleSidebar() { /* toggles state */ }
  },
  callbacks: {
    initFromStorage() { /* loads from localStorage */ }
  }
}

DateTime Store

javascript
// Store: workspaces/datetime
{
  state: {
    timeString: "12:00 PM",
    dateString: "January 25, 2026"
  },
  callbacks: {
    startClock() { /* updates every second */ }
  }
}

Workspace_Nav_Walker

Renders sidebar menu with:

  • Lucide icons from _menu_item_icon meta
  • Collapsible submenus
  • Active state styling
  • Chevron animation on expand/collapse
php
// Add icon to menu item
update_post_meta($menu_item_id, '_menu_item_icon', 'home');

// Available icons: home, user, megaphone, clipboard,
// briefcase, calendar, settings, etc.

Hub Shortcodes

Content loaded via Hub shortcodes:

ShortcodePurpose
[lrh_content_welcome]Welcome message
[lrh_content_profile]Profile display
[lrh_content_marketing]Marketing tools
[lrh_content_quick_links]Quick action links

Responsive Behavior

BreakpointBehavior
≥1000pxFull sidebar visible
768-999pxSidebar as offcanvas
<768pxHidden, toggle to show

Build Commands

bash
npm run start  # Watch mode (wp-scripts)
npm run build  # Production build (wp-scripts)

CSS Architecture

style.css Sections

  1. Sidebar Edge-to-Edge (lines 31-195) - Full viewport width
  2. Fluent Booking Widgets (lines 197-388) - Dashboard cards
  3. Brand Colors - CSS custom properties

Key Classes

css
.has-workspace-sidebar { /* Body class when sidebar active */ }
.workspace-frame { /* Workspace-specific layouts */ }
.sidebar-offcanvas { /* Mobile offcanvas state */ }

Hub21 Platform Documentation