Commit fc2c191f authored by jkerr's avatar jkerr
Browse files

All but finished

parent 87e59957
......@@ -2,12 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="cccfd40b-d5c2-4431-bcfd-f34d25764049" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/admin.html" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/getbookings.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/reviews.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/gitlab-ci.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/admin.html" beforeDir="false" afterPath="$PROJECT_DIR$/admin.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/reviews.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/reviews.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -21,76 +21,49 @@
<executable />
</execution>
</component>
<component name="DockManager">
<window id="1">
<content type="file-editors">
<state>
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
</leaf>
</state>
</content>
</window>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="73" lean-forward="true" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
<folding>
<element signature="e#9#15#0" expanded="true" />
</folding>
<state relative-caret-position="255">
<caret line="17" column="76" lean-forward="true" selection-start-line="17" selection-start-column="76" selection-end-line="17" selection-end-column="76" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.html">
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="795">
<caret line="53" column="12" selection-start-line="53" selection-start-column="12" selection-end-line="53" selection-end-column="12" />
<state relative-caret-position="180">
<caret line="12" column="38" lean-forward="true" selection-start-line="12" selection-start-column="38" selection-end-line="12" selection-end-column="38" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/admin.html">
<entry file="file://$PROJECT_DIR$/style/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="25" lean-forward="true" selection-start-line="21" selection-start-column="25" selection-end-line="21" selection-end-column="25" />
<state relative-caret-position="509">
<caret line="212" column="13" selection-start-line="212" selection-start-column="13" selection-end-line="212" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="20" selection-end-column="20" />
<state relative-caret-position="728">
<caret line="64" column="21" selection-start-line="64" selection-start-column="21" selection-end-line="64" selection-end-column="21" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/style/style.css">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/gitlab-ci.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="670">
<caret line="175" column="14" selection-start-line="175" selection-start-column="14" selection-end-line="175" selection-end-column="14" />
<state relative-caret-position="195">
<caret line="13" column="10" lean-forward="true" selection-start-line="13" selection-start-column="10" selection-end-line="13" selection-end-column="10" />
</state>
</provider>
</entry>
......@@ -121,6 +94,7 @@
<find>json</find>
<find>map.js:51 You clicked the map at LatLng</find>
<find>table</find>
<find>20px</find>
</findStrings>
<replaceStrings>
<replace>console</replace>
......@@ -145,17 +119,19 @@
<option value="$PROJECT_DIR$/scripts/data/POI.json" />
<option value="$PROJECT_DIR$/scripts/getbookings.js" />
<option value="$PROJECT_DIR$/scripts/switchbooking.js" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/scripts/map.js" />
<option value="$PROJECT_DIR$/style/style.css" />
<option value="$PROJECT_DIR$/admin.html" />
<option value="$PROJECT_DIR$/scripts/reviews.js" />
<option value="$PROJECT_DIR$/scripts/data/reviews.json" />
<option value="$PROJECT_DIR$/style/style.css" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/gitlab-ci.yml" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1014" />
<option name="width" value="1104" />
<option name="height" value="1347" />
</component>
<component name="ProjectLevelVcsManager">
......@@ -174,16 +150,6 @@
<item name="assignment-1" type="b2602c69:ProjectViewProjectNode" />
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="assignment-1" type="b2602c69:ProjectViewProjectNode" />
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
<item name="scripts" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="assignment-1" type="b2602c69:ProjectViewProjectNode" />
<item name="assignment-1" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
......@@ -239,7 +205,7 @@
<workItem from="1566340107468" duration="6269000" />
<workItem from="1566359872857" duration="22497000" />
<workItem from="1566431482065" duration="6354000" />
<workItem from="1566445705210" duration="9085000" />
<workItem from="1566445705210" duration="16853000" />
</task>
<task id="LOCAL-00001" summary="First Commit">
<created>1565679239864</created>
......@@ -304,17 +270,24 @@
<option name="project" value="LOCAL" />
<updated>1566437881009</updated>
</task>
<option name="localTasksCounter" value="10" />
<task id="LOCAL-00010" summary="Done all but reviews and tweaks">
<created>1566455085166</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1566455085166</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="59002000" />
<option name="totallyTimeSpent" value="66770000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1014" height="1347" extended-state="0" />
<frame x="0" y="23" width="1104" height="1347" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20987654" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20903955" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
......@@ -346,7 +319,8 @@
<MESSAGE value="Added localStorage" />
<MESSAGE value="worked on map" />
<MESSAGE value="Added buttons to map, still need listeners" />
<option name="LAST_COMMIT_MESSAGE" value="Added buttons to map, still need listeners" />
<MESSAGE value="Done all but reviews and tweaks" />
<option name="LAST_COMMIT_MESSAGE" value="Done all but reviews and tweaks" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/scripts/data/cabinInfo.html">
......@@ -413,13 +387,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/getbookings.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
......@@ -441,44 +408,62 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/admin.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="15" column="31" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/map.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="73" lean-forward="true" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
<state relative-caret-position="510">
<caret line="34" column="8" selection-start-line="34" selection-start-column="8" selection-end-line="45" selection-end-column="11" />
<folding>
<element signature="e#9#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="38" lean-forward="true" selection-start-line="12" selection-start-column="38" selection-end-line="12" selection-end-column="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/style/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="670">
<caret line="175" column="14" selection-start-line="175" selection-start-column="14" selection-end-line="175" selection-end-column="14" />
<state relative-caret-position="509">
<caret line="212" column="13" selection-start-line="212" selection-start-column="13" selection-end-line="212" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="795">
<caret line="53" column="12" selection-start-line="53" selection-start-column="12" selection-end-line="53" selection-end-column="12" />
<state relative-caret-position="255">
<caret line="17" column="76" lean-forward="true" selection-start-line="17" selection-start-column="76" selection-end-line="17" selection-end-column="76" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/admin.html">
<entry file="file://$PROJECT_DIR$/scripts/data/bookings.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" column="25" lean-forward="true" selection-start-line="21" selection-start-column="25" selection-end-line="21" selection-end-column="25" />
<state relative-caret-position="30">
<caret line="2" column="20" lean-forward="true" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/data/reviews.json">
<provider selected="true" editor-type-id="text-editor" />
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="728">
<caret line="64" column="21" selection-start-line="64" selection-start-column="21" selection-end-line="64" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scripts/reviews.js">
<entry file="file://$PROJECT_DIR$/gitlab-ci.yml">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="20" selection-end-column="20" />
<state relative-caret-position="195">
<caret line="13" column="10" lean-forward="true" selection-start-line="13" selection-start-column="10" selection-end-line="13" selection-end-column="10" />
</state>
</provider>
</entry>
......
......@@ -11,9 +11,9 @@
<header>
<h1><a href="index.html">QuickCamp</a></h1>
<div id="bookingTypes">
<h2 class="bookType"></h2>
<h2 class="bookType">||</h2>
<h2 class="bookType">Admin Page</h2>
<h2 class="bookType"></h2>
<h2 class="bookType">||</h2>
</div>
</header>
......
# Full project: https://gitlab.com/pages/plain-html
pages:
stage: deploy
script:
- mkdir .public
- cp -r
*
.public
- mv .public public
artifacts:
paths:
- public
only:
- master
\ No newline at end of file
......@@ -8,6 +8,7 @@
<script src="scripts/switchbooking.js"></script>
<script src="scripts/filterSites.js"></script>
<script src="scripts/setbooking.js"></script>
<script src="scripts/reviews.js"></script>
<link rel="stylesheet" href="scripts/leaflet/leaflet.css"/>
<script src="scripts/leaflet/leaflet.js"></script>
......@@ -30,6 +31,7 @@
<h2>Welcome:</h2>
<p>Here at QuickCamp camping ground, we offer only the best cabins, as well as tent and caravan sites.</p>
</section>
<section>
<section id="book">
<h2>Book a Site:</h2>
<input id="submit" name="submit" type="submit" value="Search">
......@@ -50,13 +52,28 @@
</table>
</div>
</section>
<section>
<section id="mapContainer">
<div id="map"></div>
</section>
</section>
<figure id="photo"><img src=""></figure>
</main>
<footer>
<section id="footer">
<p>QuickCamp is a purely fictional site, this webpage was created for educational purposes.</p>
<p>Contact Us: Lorem ipsum dolor sit amet.</p>
<p>Address: Consectetur adipiscing elit.</p>
<p>Maecenas commodo mattis purus, vitae facilisis diam.</p>
</section>
<section id="reviews">
<h3>Reviews:</h3>
<div>
<h4></h4>
<p><cite></cite><p></p>
<p id="reviewer"></p>
</div>
</section>
</footer>
......
......@@ -2,9 +2,10 @@ var Map = (function () {
pub = {};
var map;
var markers = L.layerGroup();
var campPopup;
/** Setup Function **/
pub.setup = function() {
map = L.map('map').setView([-45.858578, 170.527263], 17.45);
map = L.map('map').setView([-45.858578, 170.527263], 14.45);
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{
maxZoom: 18,
......@@ -15,13 +16,15 @@ var Map = (function () {
/** Adds buttons above map **/
$("#mapContainer").parent().prepend("" +
"<div id='mapButtons'><input type='button' id='mapShowAll' value='Show All'></input>" +
"<input type='button' id='mapShowRes' value='Show Restaurants'></input>" +
"<input type='button' id='mapShowAttr' value='Show Attractions'></input></div>");
"<div id='mapButtons'><input type='button' id='mapShowAll' value='Show All'>" +
"<input type='button' id='mapShowRes' value='Show Restaurants'>" +
"<input type='button' id='mapShowAttr' value='Show Attractions'></div>");
// NEED TO ADD EVENTS TO BUTTONS HERE
$("#mapShowAll").on("click", function() {drawIcons("all")});
$("#mapShowRes").on("click", function() {drawIcons("restaurant")});
$("#mapShowAttr").on("click", function() {drawIcons("attraction")});
drawIcons("all");
}
......@@ -35,7 +38,6 @@ var Map = (function () {
geo = cFeature.geometry;
properties = cFeature.properties;
cType = cFeature.type;
if (type === "all" || cType === type || cType === "camp") {
createMarker(geo, properties);
}
......@@ -49,7 +51,7 @@ var Map = (function () {
if (geo.polygon === true) {
shape = L.polygon(geo.polygonCoords).addTo(markers);
}
marker.bindPopup("<h2>"+properties.name+"</h2>"+"<p>"+properties.info+"</p>");
marker.bindPopup("<h2>" + properties.name + "</h2>" + "<p>" + properties.info + "</p>");
}
return pub;
})();
......
$(document).ready();
\ No newline at end of file
var Reviews = (function() {
pub = [];
var reviews;
var cReview = 0;
//Get reviews
pub.setup = function () {
$.getJSON("scripts/data/reviews.json", function (data) {
reviews = data;
console.log(data);
$("#reviews").find("div").css("opacity", 0);
nextReview();
reviewLoop();
});
};
function reviewLoop() {
setInterval(function () {
$("#reviews").find("div").animate({opacity: 1}, 2000, "linear");
$("#reviews").find("div").animate({opacity: 0}, 2000, "linear", nextReview);
}, 4000);
}
function nextReview() {
newReview = reviews[cReview];
$("#reviews").find("cite").text("\""+newReview.reviewcontent+"\"");
$("#reviews").find("h4").text(newReview.title);
$("#reviews").find("#reviewer").text(newReview.author);
cReview += (cReview < reviews.length-1 ? 1 : 1-(reviews.length));
console.log(cReview);
}
//Set review
return pub;
})();
$(document).ready(Reviews.setup);
\ No newline at end of file
......@@ -84,7 +84,6 @@ h1 a:hover {
padding: calc(var(--defaultSeperation)/4);
float: left;
/* Style */
text-align: center;
background-color: var(--lightblue);
color: var(--white);
font-size: 20pt;
......@@ -93,27 +92,25 @@ h1 a:hover {
margin: 0;
}
#mapButtons {
background-color: inherit;
background-color: var(--darkblue);
float: right;
width: calc(60% - 30px);
}
#mapButtons input {
float: left;
width: 120px;
margin: 5px;
}
/* Main */
main {
overflow: hidden;
width: auto;
padding: 20px;
margin: auto;
padding: var(--defaultSeperation);
margin: 0 auto var(--defaultSeperation) auto;
max-width: 1300px;
/*Style*/
background-color: var(--lightblue);
}
main section {
section {
background-color: var(--white);
}
/* Campsite info*/
......@@ -127,6 +124,10 @@ h2 {
margin: 0;
}
/* Booking form*/
#testSec {
border: solid 1px;
overflow: hidden;
}
#book {
width: calc(40% - var(--defaultSeperation)*2);
float: left;
......@@ -182,7 +183,6 @@ figure {
margin: 0;
overflow: hidden;
width: 40%;
padding: 0;
clear: left;
}
figure img {
......@@ -198,6 +198,37 @@ figure img {
#map {
height: 500px;
}
footer {
height: 120px;
padding: var(--defaultSeperation);
margin: 0 auto 0 auto;
max-width: 1300px;
/*Style*/
background-color: var(--lightblue);
}
footer p {
margin: 0;
}
#footer {
width: calc(60% - var(--defaultSeperation)*3);
height: calc(100% - var(--defaultSeperation));
float: left;
padding: calc(var(--defaultSeperation)/2);
}
#reviews {
width: 40%;
height: calc(100% - var(--defaultSeperation));
float: right;
padding: calc(var(--defaultSeperation)/2);
}
#reviews h3, #reviews h4, #reviews p, #reviews cite {
margin: 0;
width: 100%;
text-align: center;
}
/* ======== Styling ======== */
/* Admin Page */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment