Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
VHellendoorn committed Jan 10, 2019
0 parents commit e15a6c5
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
build/
target/
.classpath
37 changes: 37 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>StudyUp</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
17 changes: 17 additions & 0 deletions WebContent/CSS/Main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#core {
width: 100%;
margin: 50px 50px 0 50px;
}

#logo {
width: 200px;
}

pre {
width: 80%;
}

.map {
height: 500px;
width: 80%;
}
Binary file added WebContent/Images/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions WebContent/JS/Main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

window.onload = pageLoad

function pageLoad() {
initMap()
}

function initMap() {
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
});
navigator.geolocation.getCurrentPosition(function(pos) {
const coords = ol.proj.fromLonLat([pos.coords.longitude, pos.coords.latitude]);
map.getView().animate({center: coords, zoom: 13});
});
}
3 changes: 3 additions & 0 deletions WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

7 changes: 7 additions & 0 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>StudyUp</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
65 changes: 65 additions & 0 deletions WebContent/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel='stylesheet' href='webjars/bootstrap/4.2.1/css/bootstrap.min.css'>
<link rel='stylesheet' href='CSS/Main.css'>
<title>StudyUp!</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="#">
<img id="logo" src="Images/Logo.png" alt="StudyUp!">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarResponsive" aria-controls="navbarResponsive"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#Home">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#About">About</a>
</li>
</ul>
</div>
</div>
</nav>

<!-- Page Content -->
<div class="container">
<section id="Home">
<h1 class="mt-4">Meet up to up your grades!</h1>
<p>Alas, this page does nearly nothing :( Let's make it beautiful this quarter.
For now, why don't you add a button below to take us to your location?</p>
<div id="map" class="map"></div>
</section>

<section id="About">
<h1 class="mt-4">About</h1>
<p>This simple web-app will be our basis for teaching various programming tools over the course of this quarter.
During these ten weeks, we will teach you how it works and extend and improve it together until it runs in the cloud
and communicates with other web-apps through shared data-storage.
Your Github fork will be used to introduce you to Git and Github, modern code review, continuous integration and more.
</p>
<p>If you have time to spare, you are fully welcome to improve this page with your own CSS and JS, or even fix that awful logo :)
There is a very small chance that changes we push on the main branch (to move the project forward) will conflict with your edits,
so if you want to do this, please add your changes to separate JS/CSS files.
</p>
</section>
</div>

<!-- YOUR CODE HERE -->
<script type="text/javascript" src="webjars/jquery/3.3.1-1/jquery.min.js"></script>
<script type="text/javascript" src="webjars/bootstrap/4.2.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="webjars/bootstrap/4.2.1/js/bootstrap.bundle.js"></script>
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"></script>
<script src="JS/Main.js"></script>
</body>
</html>
61 changes: 61 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ECS161</groupId>
<artifactId>StudyUp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>9</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>LATEST</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>LATEST</version>
<exclusions>
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

0 comments on commit e15a6c5

Please sign in to comment.