this is code for layout/menu.gsp . To make a menu that needs to be viewed in every page. This code would help you. you need to take care of g tags.
<html>
<head>
<title><g:layoutTitle default="Some Title" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="${resource(dir: 'images', file: 'faviconblack.png')}" type="image/png">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.min.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap-theme.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap-theme.min.css')}" type="text/css">
<g:javascript library="jquery" plugin="jquery"/>
<r:layoutResources/>
<g:javascript src="bootstrap.min.js"/>
<g:layoutHead />
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-6" style="margin-top: 5px; margin-bottom: 10px;">
<a href="#" class="" >Women</a>
<a href="#" class="" >Men</a>
<a href="#" class="" >Jewellery</a>
<a href="#" class="" >Kids</a>
<a href="#" class="" >Weddings</a>
<a href="#" class="" >Shoes</a>
</div>
</div>
<div class="row">
<div class="col-lg-8">
%{--<h2 style="font-family: 'Comic Sans MS'">Belya</h2>--}%
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-primary" type="button">Search</button>
</span>
</div><!-- /input-group -->
</div>
<div class="col-lg-4">
<a href="#">Register</a> |
<a href="#">Sign in</a> |
<g:link action="index" controller="Shop">Open A Shop</g:link>
</div>
</div>
</div>
<g:layoutBody /></body>
</html>
<html>
<head>
<title><g:layoutTitle default="Some Title" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="${resource(dir: 'images', file: 'faviconblack.png')}" type="image/png">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.min.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap-theme.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap-theme.min.css')}" type="text/css">
<g:javascript library="jquery" plugin="jquery"/>
<r:layoutResources/>
<g:javascript src="bootstrap.min.js"/>
<g:layoutHead />
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-6" style="margin-top: 5px; margin-bottom: 10px;">
<a href="#" class="" >Women</a>
<a href="#" class="" >Men</a>
<a href="#" class="" >Jewellery</a>
<a href="#" class="" >Kids</a>
<a href="#" class="" >Weddings</a>
<a href="#" class="" >Shoes</a>
</div>
</div>
<div class="row">
<div class="col-lg-8">
%{--<h2 style="font-family: 'Comic Sans MS'">Belya</h2>--}%
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-primary" type="button">Search</button>
</span>
</div><!-- /input-group -->
</div>
<div class="col-lg-4">
<a href="#">Register</a> |
<a href="#">Sign in</a> |
<g:link action="index" controller="Shop">Open A Shop</g:link>
</div>
</div>
</div>
<g:layoutBody /></body>
</html>
0 comments:
Post a Comment