How jagadeesandev/portal-theme works
Portal Theme is a Frappe app for configuring portal-wide colors and a customized login-page appearance. Administrators edit the Portal Theme Setting; the desk script reloads after saves, while the desk-wide script fetches enabled settings and applies CSS variables and rules. The login controller separately reads login-specific settings to populate the page context, including optional background-slider data. The README gives only a high-level theme description; settings fields and runtime behavior are clearer in the sampled source. The setting controller and DocType definitions were not sampled, so persistence details and the precise rendering link are not asserted.
Main entry points: login.py Login context and auth · portal_theme_setting Theme settings · portal_theme_setting.js Settings form · portal_theme.js Desk theme script
Components 12
Theme configuration
- Settings form
portal_theme/portal_theme/doctype/portal_theme_setting/portal_theme_setting.js - Theme settings
portal_theme/portal_theme/doctype/portal_theme_setting - Background image records
portal_theme/portal_theme/doctype/background_images/background_images.py
Theme application
- Desk asset hook
portal_theme/hooks.py - Desk theme script
portal_theme/public/js/portal_theme.js
Login experience
- Login context and auth
portal_theme/www/login.py - Login page
portal_theme/www/login.html - Social login providers
- LDAP settings
Other components
- Administrator
- Frappe settings API
- Portal visitor
Connections 10
- Administrator → Settings form: edits
portal_theme/portal_theme/doctype/portal_theme_setting/portal_theme_setting.js - Settings form → Theme settings: updates
- Desk asset hook → Desk theme script: includes script
portal_theme/hooks.py - Desk theme script → Frappe settings API: fetches settings
portal_theme/public/js/portal_theme.js - Frappe settings API → Theme settings: reads
- Portal visitor → Login context and auth: requests login
- Login context and auth → Theme settings: reads login options
portal_theme/www/login.py - Login context and auth → Social login providers: loads providers
portal_theme/www/login.py - Login context and auth → LDAP settings: loads LDAP config
portal_theme/www/login.py - Login context and auth → Login page: supplies context