howard / hu_general
Base Drupal 8 theme for Howard University.
Installs: 549
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 2
Open Issues: 16
Language:HTML
Type:drupal-theme
- dev-8.x-1.x
- 11.0.2
- 11.0.1
- 11.0.0
- 8.2.53
- 8.2.52
- 8.2.51
- 8.2.50
- 8.2.49
- 8.2.48
- 8.2.47
- 8.2.46
- 8.2.45
- 8.2.44
- 8.2.43
- 8.2.42
- 8.2.41
- 8.2.40
- 8.2.39
- 8.2.38
- 8.2.37
- 8.2.36
- 8.2.35
- 8.2.34
- 8.2.33
- 8.2.32
- 8.2.31
- 8.2.30
- 8.2.29
- 8.2.28
- 8.2.27
- 8.2.26
- 8.2.25
- 8.2.24
- 8.2.23
- 8.2.22
- 8.2.21
- 8.2.20
- 8.2.19
- 8.2.18
- 8.2.17
- 8.2.16
- 8.2.15
- 8.2.14
- 8.2.13
- 8.2.12
- 8.2.11
- 8.2.10
- 8.2.9
- 8.2.8
- 8.2.7
- 8.2.6
- 8.2.5
- 8.2.4
- 8.2.3
- 8.2.2
- 8.2.1
- 8.2.0
- 8.1.100
- 8.1.99
- 8.1.98
- 8.1.97
- 8.1.96
- 8.1.95
- 8.1.94
- 8.1.93
- 8.1.92
- 8.1.91
- 8.1.90
- 8.1.89
- 8.1.88
- 8.1.87
- 8.1.86
- 8.1.85
- 8.1.84
- 8.1.83
- 8.1.82
- 8.1.81
- 8.1.80
- 8.1.79
- 8.1.78
- 8.1.77
- 8.1.76
- 8.1.75
- 8.1.74
- 8.1.73
- 8.1.72
- 8.1.71
- 8.1.70
- 8.1.69
- 8.1.68
- 8.1.67
- 8.1.66
- 8.1.65
- 8.1.64
- 8.1.63
- 8.1.62
- 8.1.61
- 8.1.60
- 8.1.59
- 8.1.58
- 8.1.57
- 8.1.56
- 8.1.55
- 8.1.54
- 8.1.53
- 8.1.52
- 8.1.51
- 8.1.50
- 8.1.49
- 8.1.48
- 8.1.47
- 8.1.46
- 8.1.45
- 8.1.44
- 8.1.43
- 8.1.42
- 8.1.41
- 8.1.40
- 8.1.39
- 8.1.38
- 8.1.37
- 8.1.36
- 8.1.35
- 8.1.34
- 8.1.33
- 8.1.32
- 8.1.31
- 8.1.30
- 8.1.29
- 8.1.28
- 8.1.27
- 8.1.26
- 8.1.25
- 8.1.24
- 8.1.23
- 8.1.22
- 8.1.21
- 8.1.20
- 8.1.19
- 8.1.18
- 8.1.17
- 8.1.16
- 8.1.15
- 8.1.14
- 8.1.13
- 8.1.12
- 8.1.11
- 8.1.10
- 8.1.9
- 8.1.8
- 8.1.7
- 8.1.6
- 8.1.5
- 8.1.4
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- dev-givingdev
- dev-dependabot/npm_and_yarn/idfive-component-library/loader-utils-and-webpack-1.4.2
- dev-dependabot/npm_and_yarn/idfive-component-library/qs-and-browser-sync-6.11.1
- dev-dependabot/npm_and_yarn/idfive-component-library/ua-parser-js-and-browser-sync-1.0.35
- dev-dependabot/npm_and_yarn/idfive-component-library/nunjucks-3.2.4
- dev-dependabot/npm_and_yarn/idfive-component-library/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/idfive-component-library/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/idfive-component-library/engine.io-6.2.1
- dev-dependabot/npm_and_yarn/idfive-component-library/socket.io-parser-4.0.5
- dev-sHBE8DqA
- dev-dependabot/npm_and_yarn/idfive-component-library/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/idfive-component-library/node-sass-7.0.0
- dev-dependabot/npm_and_yarn/idfive-component-library/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/idfive-component-library/tree-kill-1.2.2
- dev-dependabot/npm_and_yarn/idfive-component-library/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/idfive-component-library/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/idfive-component-library/dns-packet-1.3.4
- dev-f-t-kC2l15Ql
- dev-hc_article_date_field
- dev-hc_article
- dev-promo_space_update
- dev-hc_article_date
- dev-dependabot/npm_and_yarn/idfive-component-library/websocket-extensions-0.1.4
- dev-parallax_update
- dev-trello-8RTReRo8
- dev-master
- dev-develop_graph
- dev-develop_timeline
- dev-resource-feed
- dev-add-license-1
This package is auto-updated.
Last update: 2025-07-03 17:43:20 UTC
README
A comprehensive Drupal theme built specifically for Howard University websites, providing a robust and customizable foundation for university departments, schools, and organizations.
Overview
The HU General theme is designed to maintain Howard University's brand identity while providing flexibility for different departments and schools. It includes extensive customization options, responsive design, and integration with various Drupal modules commonly used in university websites.
This theme is a child of the idfive Component Library D8 Theme, inheriting standard functionality while adding Howard University-specific features and customizations.
Features
Theme Variants
- Default: Standard Howard University styling
- Clean & Light: Minimalist design with lighter color scheme
- Classic Editorial: Traditional academic styling optimized for content-heavy sites
Header Configuration
- Light header menu option for better contrast
- Desktop hamburger menu support for simplified navigation
- Featured header link for promotional content
- Configurable search functionality
Footer Customization
- Social media links (Twitter, Facebook, YouTube, Instagram)
- Complete address and contact information
- Institutional branding display
School/Department Branding
- Parent school/college organization display
- Department-specific branding options
- Customizable institutional hierarchy
Administrative Features
- Site-wide script injection for tracking codes
- Theme variant switcher for authenticated users
- Comprehensive caching support
Installation
Via Composer (Recommended)
composer install howard/hu_general
Manual Installation
- Extract the theme to your Drupal themes directory:
/themes/contrib/hu_general
- Enable the theme in the Drupal admin interface
- Configure theme settings at:
Administration > Appearance > Settings > HU General
Updates
composer update howard/hu_general
Configuration
Theme Settings
The theme provides extensive configuration options accessible through the Drupal admin interface at /admin/appearance/settings/hu_general
:
Theme Variant Settings
- Select from available theme variants
- Enable theme variant switcher for authenticated users
Howard School/Department Settings
- Parent School/College/Organization: Add the parent school or college, for example "College of Arts and Sciences"
- Parent School/College/Organization URL: Add the URL to parent school or college, for example "http://coas.howard.edu"
- Department/Site: Add the department or site, for example "Department of English"
Howard Header Settings
- Show light header menu: Uses the light menu color scheme for the header menu
- Show hamburger in Desktop: Display hamburger menu on desktop for simplified navigation
- Featured Header Link: Show a featured link in the header with custom text and URL
- Hide Search: Hide search functionality if not needed
Howard Footer Settings
- Social Links: Configure links for Twitter, Facebook, YouTube, and Instagram
- Address Information: Set up complete address and contact information for the footer
Admin Settings
- Site-wide Scripts or Embeds: Add custom JavaScript snippets, tracking codes, or other embeds (Admin only)
Template Files
The theme includes customized templates for:
Layout Templates
html.html.twig
- Base HTML structure with theme variants and admin scriptspage.html.twig
- Page layout and regions with OpenID Connect integrationpage--404.html.twig
- Custom 404 error page
Content Templates
node--hc-page.html.twig
- Standard page contentnode--hc-article.html.twig
- Article content displaynode--hc-person.html.twig
- Person/faculty profilesnode--hc-resource.html.twig
- Resource contentnode--hc-standard-homepage.html.twig
- Homepage layout
Navigation Templates
menu--sidebar-navigation.html.twig
- Sidebar navigationbreadcrumb.html.twig
- Breadcrumb navigationblock--menu-block--sidebar-navigation.html.twig
- Menu block template
Field Templates
file-link.html.twig
- Custom file link display with media name support
View Templates
views-view.html.twig
- Views displayviews-view-fields.html.twig
- Individual field displayviews-view-unformatted.html.twig
- Unformatted view display
PHP Functions
Theme Hooks
hu_general_preprocess_html(&$variables)
Preprocesses HTML template variables, adding theme variant and admin scripts settings.
hu_general_preprocess_page(&$variables)
Preprocesses page template variables, extending theme settings, configuring hero images, and setting up OpenID Connect integration.
hu_general_preprocess_node(&$variables)
Preprocesses node template variables, making theme path available to node templates.
hu_general_preprocess_file_link(&$variables)
Customizes file link display, using media names when available and generating absolute URLs.
hu_general_theme_suggestions_page_alter(&$suggestions, $variables, $hook)
Adds custom page template suggestions, particularly for 404 error pages.
Helper Functions
_hu_general_extend_theme_variables(&$variables)
Extends template variables with all theme settings and handles proper caching dependencies.
Dependencies
Required Modules
- Core Drupal modules (minimal requirements)
Optional Modules
- OpenID Connect: For SSO integration and login block functionality
- Block: For custom block placement
- Views: For content listing and display
Component Library
The theme includes the idfive-component-library for consistent styling and components:
- Located in
/idfive-component-library/
- Contains build tools and assets
- Provides standardized UI components
Development Workflow
From the idfive-component-library
directory:
-
Setup Environment:
nvm use 10 npm install
-
Development Preview:
npm run fractal
-
Production Build:
npm run build:production
Customization
Adding Custom Styles
- Modify files in
/idfive-component-library/src/
- Run the build process to compile assets
- Custom styles are automatically loaded
Creating Custom Templates
- Copy template files to your theme directory
- Modify as needed
- Clear Drupal cache
Extending Theme Settings
- Modify
theme-settings.php
to add new form elements - Update
hu_general.theme
to handle new settings - Create corresponding template variables
File Structure
hu_general/
├── composer.json # Composer dependencies
├── hu_general.info.yml # Theme information
├── hu_general.libraries.yml # Asset libraries
├── hu_general.theme # Theme hooks and functions
├── theme-settings.php # Theme settings form
├── config/ # Configuration files
│ └── install/
│ └── hu_general.settings.yml
├── templates/ # Twig templates
│ ├── block/
│ ├── fields/
│ ├── forms/
│ ├── layout/
│ ├── media/
│ ├── navigation/
│ ├── node/
│ ├── page/
│ └── views/
└── idfive-component-library/ # Component library
├── build/ # Compiled assets
├── src/ # Source files
└── fractal/ # Component documentation
Best Practices
Custom Child Themes
It is HIGHLY recommended that custom child themes not be made for Howard sites unless absolutely necessary. When creating a custom child theme, only override what is absolutely necessary in order to keep standard functionality across sites.
Theme Customization
- Use the theme settings form for configuration rather than hardcoding values
- Leverage the component library for consistent styling
- Follow Drupal coding standards for any custom code
- Test across different browsers and devices
Support
For support and questions about the HU General theme:
- Check the theme documentation
- Review the component library documentation
- Contact the Howard University web development team
Contributing
When contributing to the theme:
- Follow Drupal coding standards
- Document all functions and significant code blocks
- Test across different browsers and devices
- Update documentation as needed
Documentation
- DEVELOPER.md - Developer documentation and customization guide
- TEMPLATES.md - Complete template documentation
- SECURITY.md - Security review and best practices
Resources
License
See LICENSE file for licensing information.