Skip to content

Commit

Permalink
Update index
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Jun 4, 2024
1 parent e747f86 commit b2a5fd3
Showing 1 changed file with 21 additions and 49 deletions.
70 changes: 21 additions & 49 deletions app/views/index.gsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<%@ page import="grace.demos.ButtonComponent; grace.demos.CardComponent" %>

<!doctype html>
<html>
<head>
Expand All @@ -8,61 +6,35 @@
</head>
<body>

<div class="svg" role="presentation">
<div class="grace-logo-container">
<asset:image src="grace-launch.svg" class="grace-logo"/>
</div>
</div>

<div id="content" role="main">
<div class="container">
<section class="row">
<h1>Grace View Components</h1>
<h1>Welcome to Grace</h1>

<p>
<a href="https://github.com/grace-plugins/grace-view-components" target="_blank">Grace View Components</a> is a Grace plugin for creating reusable, testable and encapsulated view components.
Congratulations, you have successfully started your first Grace application! At the moment
this is the default page, feel free to modify it to either redirect to a controller or display
whatever content you may choose. Below is a list of controllers that are currently deployed in
this application, click on each to execute its default action:
</p>

</section>
<div class="row p-3">
<div class="col-3">
${new CardComponent(title: 'My First Component', content: 'This is the first Card').render()}
</div>
<div class="col-3">
${new CardComponent(title: 'My Second Component', content: 'This is the second Card').render()}
</div>
<div class="col-3">
${new CardComponent(title: 'My Third Component', content: 'This is the third Card').render()}
</div>
<div class="col-3">
<vc:card title="My Fouth Component" content="This is the fouth Card" />
</div>
</div>
<div class="row p-3">
<div class="col-4">
${new ButtonComponent(name: 'Primary Button', cssClasses: 'btn-primary').render()}
${new ButtonComponent(name: 'Success Button', cssClasses: 'btn-success').render()}
<div id="controllers" role="navigation">
<h2>Available Controllers:</h2>
<ul>
<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
<li class="controller">
<g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link>
</li>
</g:each>
</ul>
</div>
<div class="col-4">
${new ButtonComponent(name: 'Large Success Button', cssClasses: 'btn-success', size: 'lg').render()}
${new ButtonComponent(name: 'Small Success Button', cssClasses: 'btn-success', size: 'sm').render()}
</div>
<div class="col-2">
${new ButtonComponent(name: 'Disabled Button', cssClasses: 'btn-success', size: 'sm', state: 'disabled').render()}
</div>
<div class="col-2">
<vc:button type="button" name="Demo Button" cssClasses="btn-warning" color="#f00" />
</div>
</div>
<div class="row p-3">
<div class="col-4">
<vc:icon name="alarm" />
</div>
<div class="col-4">
<vc:icon name="apple" />
</div>
<div class="col-2">
<vc:icon name="bag" />
</div>
<div class="col-2">
<vc:icon name="bank" />
<vc:icon name="box" />
</div>
</div>
</section>
</div>
</div>

Expand Down

0 comments on commit b2a5fd3

Please sign in to comment.