Skip to content

Commit

Permalink
Update layout to use Bootstrap 5 (LM-Commons#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
visto9259 committed Sep 4, 2024
1 parent 147383e commit 5a7215d
Showing 1 changed file with 41 additions and 28 deletions.
69 changes: 41 additions & 28 deletions view/lmc/layout/admin.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,51 @@
<html lang="en">
<head>
<meta charset="utf-8">
<?php echo $this->headTitle('LmcAdmin - Laminas MVC Framework Admin Interface')->setSeparator(' - ')->setAutoEscape(false) ?>
<?php echo $this->headTitle('LmcAdmin - LM-Commons')->setSeparator(' - ')->setAutoEscape(false) ?>

<?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0')
->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
?>

<!-- Le styles -->
<?php echo $this->headLink()->prependStylesheet('//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css') ?>
<!-- styles -->
<?php echo $this->headLink()->prependStylesheet('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css',
'screen', false, [
'integrity' => 'sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH',
'crossorigin' => 'anonymous'
]
);
?>

<!-- Scripts -->
<?php echo $this->headScript()->prependFile('//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js')
->prependFile('https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js')
->prependFile('https://oss.maxcdn.com/respond/1.4.2/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->prependFile('https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', 'text/javascript', array('conditional' => 'lt IE 9',))
?>
<?php echo $this->headScript();?>

</head>

<body style="padding-top: 70px;">
<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<nav class="navbar navbar-expand-md bg-body-tertiary mb-4" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php echo $this->url('lmcadmin') ?>">LmcAdmin</a>
</div>
<div class="collapse navbar-collapse">
<?php echo $this->navigation('admin_navigation')
->menu()
->setUlClass('nav navbar-nav')
->setMaxDepth(0)
->setRenderInvisible(false)?>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="navbar-brand">Admin</div>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<?php echo $this->navigation('admin_navigation')
->menu()
->setUlClass('nav navbar-nav')
->setMaxDepth(0)
->setRenderInvisible(false)?>
</div><!--/.nav-collapse -->
</div>
</nav>

<div class="container">

Expand All @@ -55,6 +61,13 @@

</div> <!-- /container -->

<?php echo $this->inlineScript() ?>
<?= $this->inlineScript()
->prependFile('https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js',
'text/javascript', [
'integrity' => 'sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz',
'crossorigin' => 'anonymous'
]
) ?>

</body>
</html>

0 comments on commit 5a7215d

Please sign in to comment.