waterloobae/cemclf is a Laravel package for cemclf - custom blade theme package for laravel.
It currently has 0 GitHub stars and 72 downloads on Packagist (latest version v1.1.4).
Install it with composer require waterloobae/cemclf.
Discover more Laravel packages by waterloobae
or browse all Laravel packages to compare alternatives.
Last updated
A comprehensive Laravel Blade theme package that provides the Centre for Education in Mathematics and Computing (CEMC) look and feel for University of Waterloo applications.
composer require waterloobae/cemclf
composer update
The package automatically publishes assets during installation, but you can manually publish them if needed:
# Publish all assets and views
php artisan vendor:publish --tag=cemclf --force
# Or for Laravel Sail
sail artisan vendor:publish --tag=cemclf --force
# Publish only views (for customization)
php artisan vendor:publish --tag=cemclf-views
# Publish only assets (CSS, JS, images)
php artisan vendor:publish --tag=cemclf-assets
packages/waterloobae/cemclf/
βββ src/
β βββ CemcLookAndFeelServiceProvider.php # Service provider
β βββ View/Components/ # Blade components
β βββ CemcHead.php # <head> section component
β βββ CemcHeader.php # Header with navigation
β βββ CemcNav.php # Navigation menu
β βββ CemcHeroBanner.php # Hero banner section
β βββ CemcFooter.php # Footer section
β βββ CemcBottom.php # Bottom scripts
βββ resources/
β βββ views/
β βββ layout.blade.php # Main layout template
β βββ components/ # Component templates
βββ public/
β βββ css/ # CEMC stylesheets
β βββ images/ # CEMC images and logos
β βββ js/ # JavaScript files
βββ composer.json
| Component | Description | Props |
|-----------|-------------|--------|
| <x-cemclf::cemc-head> | HTML head section with CEMC styles | Content for <title> |
| <x-cemclf::cemc-header> | Header with logo and navigation | nav array |
| <x-cemclf::cemc-nav> | Navigation menu | nav array |
| <x-cemclf::cemc-hero-banner> | Hero banner section | h1, image (optional) |
| <x-cemclf::cemc-footer> | Footer section | None |
| <x-cemclf::cemc-bottom> | Bottom scripts and elements | None |
Create your view file extending the CEMCLF layout:
{{-- resources/views/welcome.blade.php --}}
@extends('cemclf::layout')
@section('title', 'Welcome to CEMC')
@section('inside-head-tag')
<meta name="description" content="Centre for Education in Mathematics and Computing" />
<meta name="keywords" content="CEMC, University of Waterloo, Mathematics, Computing" />
@endsection
@section('h1', 'Problem Set Generator')
@section('image', asset('vendor/cemclf/images/guy_in_computer.jpeg'))
@section('hero-content')
Welcome to the Centre for Education in Mathematics and Computing.
Explore our educational resources and problem sets.
@endsection
@section('content')
<div class="row">
<div class="col-md-8">
<h2>Featured Content</h2>
<p>Your main page content goes here...</p>
</div>
<div class="col-md-4">
<h3>Quick Links</h3>
<ul class="list-unstyled">
<li><a href="#">Mathematics Resources</a></li>
<li><a href="#">Computing Tutorials</a></li>
<li><a href="#">Problem Sets</a></li>
</ul>
</div>
</div>
@endsection
{{-- routes/web.php --}}
Route::get('/', function () {
$nav = [
['label' => 'Home', 'url' => '/'],
['label' => 'About CEMC', 'url' => '/about'],
[
'label' => 'Resources',
'submenu' => [
['label' => 'Mathematics', 'url' => '/resources/mathematics'],
['label' => 'Computer Science', 'url' => '/resources/computing'],
['label' => 'Problem Sets', 'url' => '/resources/problems'],
]
],
['label' => 'Contests', 'url' => '/contests'],
['label' => 'Contact', 'url' => '/contact'],
];
return view('welcome', ['nav' => $nav]);
});
The navigation system supports multi-level dropdowns:
$nav = [
// Simple navigation item
['label' => 'Home', 'url' => '/'],
// Dropdown navigation with submenu
[
'label' => 'Resources',
'submenu' => [
['label' => 'Mathematics', 'url' => '/math'],
['label' => 'Computing', 'url' => '/computing'],
['label' => 'Problem Sets', 'url' => '/problems'],
]
],
// External link
['label' => 'UW Homepage', 'url' => 'https://uwaterloo.ca'],
];
{{-- Hero banner with image --}}
@section('h1', 'Welcome to CEMC')
@section('image', asset('vendor/cemclf/images/guy_in_computer.jpeg'))
@section('hero-content')
Your hero banner description text
@endsection
{{-- Hero banner without image --}}
@section('h1', 'Mathematics Resources')
@section('hero-content')
Explore our comprehensive mathematics learning materials
@endsection
You can use components individually in custom layouts:
<!DOCTYPE html>
<html lang="en">
<head>
<x-cemclf::cemc-head>My Custom Page Title</x-cemclf::cemc-head>
</head>
<body>
<x-cemclf::cemc-header :nav="$navigation" />
<main class="container">
<x-cemclf::cemc-hero-banner
h1="Custom Hero Title"
:image="asset('images/custom-hero.jpg')"
>
Custom hero content here
</x-cemclf::cemc-hero-banner>
<!-- Your content -->
</main>
<x-cemclf::cemc-footer />
<x-cemclf::cemc-bottom />
</body>
</html>
# Publish views to customize templates
php artisan vendor:publish --tag=cemclf-views
This creates files in:
resources/views/vendor/cemclf/layout.blade.phpresources/views/vendor/cemclf/components/# Publish assets to customize styles
php artisan vendor:publish --tag=cemclf-assets
This creates files in:
public/vendor/cemclf/css/ - CEMC stylesheetspublic/vendor/cemclf/images/ - CEMC logos and imagespublic/vendor/cemclf/js/ - JavaScript filesThe package includes CEMC-specific CSS classes:
/* Layout classes */
.hero-banner /* Hero section styling */
.navbar-brand /* Logo container */
.gradient-bars /* CEMC header gradient */
/* Component classes */
.field_hero_title /* Hero title styling */
.hero-banner-body /* Hero content area */
.navbar-nav /* Navigation menu */
.dropdown-menu /* Navigation dropdowns */
CEMC-logo-BW.png - CEMC logo (black & white)cemc_logo.svg - CEMC logo (vector)UniversityOfWaterloo_header_logo.png - UW header logoguy_in_computer.jpeg - Default hero imagecemc.css - Main CEMC stylesdrupal1.css, drupal2.css, drupal3.css - Drupal compatibility stylesThe package includes responsive breakpoints:
< 768px - Collapsed navigation, stacked layout768px - 992px - Responsive navigation, flexible grid> 992px - Full navigation, multi-column layoutphp artisan config:clear
php artisan view:clear
php artisan cache:clear
php artisan vendor:publish --tag=cemclf-assets --force
# Verify assets exist
ls -la public/vendor/cemclf/
Ensure you're passing the nav array to your view:
return view('your-view', ['nav' => $navArray]);
Complete example for a CEMC website:
// routes/web.php
Route::get('/', function () {
$nav = [
['label' => 'Home', 'url' => '/'],
['label' => 'About', 'url' => '/about'],
[
'label' => 'Mathematics',
'submenu' => [
['label' => 'Algebra', 'url' => '/math/algebra'],
['label' => 'Calculus', 'url' => '/math/calculus'],
['label' => 'Statistics', 'url' => '/math/statistics'],
]
],
[
'label' => 'Computing',
'submenu' => [
['label' => 'Programming', 'url' => '/cs/programming'],
['label' => 'Algorithms', 'url' => '/cs/algorithms'],
['label' => 'Data Structures', 'url' => '/cs/data-structures'],
]
],
['label' => 'Contests', 'url' => '/contests'],
];
return view('welcome', compact('nav'));
});
{{-- resources/views/welcome.blade.php --}}
@extends('cemclf::layout')
@section('title', 'CEMC - University of Waterloo')
@section('h1', 'Centre for Education in Mathematics and Computing')
@section('image', asset('vendor/cemclf/images/guy_in_computer.jpeg'))
@section('hero-content')
Enhancing mathematics and computer science education through innovative
resources, contests, and professional development opportunities.
@endsection
@section('content')
<div class="row mb-5">
<div class="col-lg-8">
<h2>Welcome to CEMC</h2>
<p class="lead">
The Centre for Education in Mathematics and Computing provides
resources and programs designed to help educators and students
explore and learn mathematics and computer science.
</p>
<div class="row">
<div class="col-md-6 mb-4">
<h3>Mathematics Resources</h3>
<p>Comprehensive materials covering algebra, calculus,
statistics, and more.</p>
<a href="/mathematics" class="btn btn-primary">Explore Math</a>
</div>
<div class="col-md-6 mb-4">
<h3>Computing Resources</h3>
<p>Programming tutorials, algorithm challenges, and
computer science fundamentals.</p>
<a href="/computing" class="btn btn-primary">Explore CS</a>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h4>Quick Links</h4>
</div>
<div class="card-body">
<ul class="list-unstyled">
<li><a href="/contests">Math Contests</a></li>
<li><a href="/workshops">Teacher Workshops</a></li>
<li><a href="/resources">Educational Resources</a></li>
<li><a href="/about">About CEMC</a></li>
</ul>
</div>
</div>
</div>
</div>
@endsection
This package provides the official CEMC (Centre for Education in Mathematics and Computing) theme for University of Waterloo Laravel applications.