1 module uim.bootstrap.bs5.demos.layout; 2 3 import uim.bootstrap; 4 5 /// Standard Bootstrap 5 Layout 6 class BS5DemoLayout : DH5AppLayout { 7 /// Basic Constructor 8 this() { 9 super(); 10 11 this 12 .metas( 13 ["charset":"utf-8"], 14 ["http-equiv":"X-UA-Compatible", "content":"IE=edge"], 15 ["name":"viewport", "content":"width=device-width, initial-scale=1"], 16 ["http-equiv":"Content-Type", "content":"text/html; charset=utf-8"], 17 ) 18 .styles( 19 ["href":"/lib/bootstrap/5.0.0-beta1/css/bootstrap.min.css", "rel":"stylesheet"], 20 ["href":"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons", "rel":"stylesheet"], 21 ["href":"/lib/font-awesome/last/css/all.css", "rel":"stylesheet"], 22 ) 23 .scripts( 24 ["src":"/lib/bootstrap/5.0.0-beta1/js/bootstrap.bundle.min.js"], 25 ) 26 .title("Demo - Bootstrap 5"); 27 } 28 29 override string toString(DH5AppPage page, string[string] parameters = null) { 30 return super.toString(page, 31 ("navigation" in parameters ? parameters["navigation"] : navigation(parameters))~ 32 H5Div(["style": "margin-top=100px;"], this.layout ? this.layout.toString(page.content, parameters) : page.content).toString~ 33 ("footer" in parameters ? parameters["footer"] : footer(parameters)), 34 parameters); 35 } 36 37 string navigation(string[string] parameters) { 38 string result; 39 40 result = 41 `<nav class="navbar navbar-expand-lg bg-info fixed-top"> 42 <div class="container"> 43 <a class="navbar-brand" href="/">`~H5Img(["height":"40", "src":"/img/logo.png", "alt":"UI Manufaktur"]).toString~`</a> 44 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> 45 <span class="sr-only">Toggle navigation</span> 46 <span class="navbar-toggler-icon"></span> 47 <span class="navbar-toggler-icon"></span> 48 <span class="navbar-toggler-icon"></span> 49 </button> 50 <div class="collapse navbar-collapse" id="navbarNavDropdown"> 51 <ul class="navbar-nav"> 52 <li class="nav-item"> 53 <a class="nav-link" href="/">UI Manufaktur</a> 54 </li> 55 <li class="nav-item"> 56 <a class="nav-link" href="/demos/uim-bootstrap">uim-bootstrap</a> 57 </li> 58 </ul> 59 </div> 60 </div> 61 </nav>`; 62 63 return result; 64 } 65 66 string footer(string[string] parameters) { 67 string result; 68 69 result = H5Footer(["py-5 bg-dark"], ["style":"background-color:#14a1b7"], 70 BS4Container.fluid()( 71 H5P(["m-0 text-center text-white"], `Verantwortlich für den Inhalt gemäß § 6 MDStV`), 72 H5P(["m-0 text-center text-white"], `ui-manufaktur.com ist ein Einzelunternehmen:<br> 73 UI Manufaktur UG (haftungsbeschränkt).<br> 74 Inhaberin: Brigitte Straßer<br> 75 Dreimühlenstraße 30<br> 76 80469 München<br> 77 Tel.: 0159 0508 4318<br> 78 Email: contact@ui-manufaktur.com<br> 79 Amtsgericht München<br> 80 HRB: 233911<br> 81 USt-IdNr.: DE313841646`), 82 H5P(["m-0 text-center text-white"], "Copyright © 2017 - 2021 UI Manufaktur UG"))).toString; 83 84 return result; 85 } 86 }