Skip to content

Instantly share code, notes, and snippets.

@hissy
Created May 19, 2018 02:06
Show Gist options
  • Save hissy/902c3ae9a528519f0d3a7b82ce9e9ec3 to your computer and use it in GitHub Desktop.
Save hissy/902c3ae9a528519f0d3a7b82ce9e9ec3 to your computer and use it in GitHub Desktop.
#concrete5 Minimum Bootstrap4 Theme
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<?php
View::element('header_required', [
'pageTitle' => isset($pageTitle) ? $pageTitle : '',
'pageDescription' => isset($pageDescription) ? $pageDescription : '',
'pageMetaKeywords' => isset($pageMetaKeywords) ? $pageMetaKeywords : ''
]);
?>
</head>
<body>
<div class="<?php echo $c->getPageWrapperClass()?>">
<?php
$a = new Area('Main');
$a->enableGridContainer();
$a->display($c);
?>
</div>
<!-- Optional JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<?php View::element('footer_required'); ?>
</body>
</html>
<?php
namespace Application\Theme\Bootstrap4;
use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme implements ThemeProviderInterface
{
protected $pThemeGridFrameworkHandle = 'bootstrap4';
public function getThemeName()
{
return t('Bootstrap 4');
}
public function getThemeDescription()
{
return t('An example theme with Bootstrap 4');
}
public function getThemeAreaLayoutPresets()
{
return [];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment