Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
feat: Upgrade govuk frontend to 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fibble committed Jul 29, 2024
1 parent 2eaa4e4 commit da87be1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion module/Olcs/view/layout/base.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo $this->doctype(); ?>
<head>
<?php echo $this->partial('partials/head', ['title' => $title]); ?>
</head>
<body class="internal" id="<?php echo $this->pageId(); ?>">
<body class="internal govuk-frontend-supported" id="<?php echo $this->pageId(); ?>">
<?php echo $this->version(); ?>

<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
Expand Down Expand Up @@ -104,6 +104,10 @@ echo $this->doctype(); ?>

</div><!-- .page-wrapper-->
<?php echo $this->partial('partials/body-end'); ?>
<script type="module">
import { initAll } from '<?php echo $this->assetPath('js/govuk-frontend.min.js'); ?>'
initAll()
</script>
</body>

</html>
6 changes: 5 additions & 1 deletion module/Olcs/view/layout/signin.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<?php echo $this->partial('partials/head', ['title' => $this->pageTitle()]); ?>
</head>
<body class="internal sign-in" id="<?php echo $this->pageId(); ?>">
<body class="internal sign-in govuk-frontend-supported" id="<?php echo $this->pageId(); ?>">
<?php echo $this->version(); ?>
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>

Expand All @@ -31,5 +31,9 @@
</div><!-- .page-wrapper-->

<?php echo $this->partial('partials/body-end'); ?>
<script type="module">
import { initAll } from '<?php echo $this->assetPath('js/govuk-frontend.min.js'); ?>'
initAll()
</script>
</body>
</html>

0 comments on commit da87be1

Please sign in to comment.