Navigation Menu

Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed Oct 11, 2012
0 parents commit 8099015
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
/.idea
/*.iml
/target
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: java $JAVA_OPTS -jar target/dependency/jetty-runner.jar --port $PORT target/*.war
61 changes: 61 additions & 0 deletions pom.xml
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.jamesward</groupId>
<artifactId>sample-jetty-war</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<repositories>
<repository>
<id>webjars</id>
<url>http://webjars.github.com/m2</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>8.1.6.v20120903</version>
<destFileName>jetty-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
47 changes: 47 additions & 0 deletions src/main/webapp/index.html
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<title>WebJars Sample - Jetty WAR</title>
<link rel='stylesheet' href='/webjars/bootstrap/2.1.1/css/bootstrap.min.css'>
<script type='text/javascript' src='/webjars/jquery/1.8.2/jquery.min.js'></script>
<script type='text/javascript' src='/webjars/bootstrap/2.1.1/js/bootstrap.min.js'></script>
<style type="text/css">
body {
margin-top: 50px;
}
</style>
<script type="text/javascript">
$(function() {
$("#showModalButton").bind('click', function(event) {
$('#myModal').modal()
})
})
</script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a id="titleLink" class="brand" href="/">hello, bootstrap</a>
</div>
</div>
</div>

<div class="container">
<button id="showModalButton" class="btn btn-primary btn-large"><i class="icon-exclamation-sign icon-white"></i> Show a Modal</button>
</div>

<div id="myModal" class="modal hide fade">
<div class="modal-header">
<button class="close" data-dismiss="modal">&times;</button>
<h3>This is a Modal</h3>
</div>
<div class="modal-body">
<p>Bootstrap depends on jQuery. So when you specify Bootstrap as a dependency you get jQuery too.</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>
</body>
</html>

0 comments on commit 8099015

Please sign in to comment.