Attempting to create a dynamic navigation bar in Play using the code below in my main.scala.html file:
@(title: String)(content: Html)
<!DOCTYPE html>
<html lang="en">
<head>
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/DCicon.jpg")">
<script src="@routes.Assets.versioned("javascripts/hello.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("javascripts/jquery-1.12.0.min.js")" type="text/javascript"></script>
<link rel='stylesheet' href='@routes.Assets.versioned("bootstrap/css/bootstrap.css")'>
<link rel='stylesheet' href='@routes.Assets.versioned("bootstrap/css/bootstrap.min.css")'>
<script type='text/javascript' src='@routes.WebJarAssets.at(WebJarAssets.locate("jquery.min.js"))'></script>
</head>
<body>
<script>
$(document).ready(function() {
$('[data-toggle=offcanvas]').click(function() {
$('.row-offcanvas').toggleClass('active');
});
});
</script>
<div class="page-container">
<!-- top navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="b...
Scala is still new territory for me, although I have extensive experience with Java. My current challenge lies in making this navigation bar adaptable as users navigate through different pages.