diff --git a/src/mainapp/templates/index.html b/src/mainapp/templates/index.html index fbf2ba8..6b425b8 100644 --- a/src/mainapp/templates/index.html +++ b/src/mainapp/templates/index.html @@ -14,7 +14,7 @@ {% block content %}
-
+

Venues & Waters

@@ -23,131 +23,133 @@
- - - -
-
-
-
-
-
-
-
- placeholder
- maybe a graph here? +
+
+
+
+
+
+
+
+ placeholder
+ maybe a graph here? +
-
-
-
- {% for venue in venues %} -
-
-
-
-

- {% if venue.venue_type == "FISHERY" %} - Fishery - {% elif venue.venue_type == "PRIVATE" %} - Private - {% elif venue.venue_type == "CLUB" %} - Club - {% endif %} -

-

{{ venue.name }}

-
- - -
-

{{ venue.description }}

-
- {% if venue.email_address %} - - - - {% endif %} - {% if venue.phone_number %} - - - - {% endif %} - {% if venue.latitude and venue.longitude %} - - - - {% endif %} - {% if venue.website_url %} - - - - {% endif %} -
- {% if venue.waters %} -
- {{ venue.waters|length }} - -
- {% endif %} - {% if not venue.latitude or not venue.longitude or not venue.phone_number or not venue.website_url or not venue.email_address %} -
- +
+
+ {% for venue in venues %} +
+
+
+
+

+ {% if venue.venue_type == "FISHERY" %} + Fishery + {% elif venue.venue_type == "PRIVATE" %} + Private + {% elif venue.venue_type == "CLUB" %} + Club + {% endif %} +

+

{{ venue.name }}

- {% endif %} - {% if not venue.active %} -
- + + +
+

{{ venue.description }}

+
+ {% if venue.email_address %} + + + + {% endif %} + {% if venue.phone_number %} + + + + {% endif %} + {% if venue.latitude and venue.longitude %} + + + + {% endif %} + {% if venue.website_url %} + + + + {% endif %} +
+ {% if venue.waters %} +
+ {{ venue.waters|length }} +
- {% endif %} -
+ {% endif %} + {% if not venue.latitude or not venue.longitude or not venue.phone_number or not venue.website_url or not venue.email_address %} +
+ +
+ {% endif %} + {% if not venue.active %} +
+ +
+ {% endif %} +
+
-
- {% endfor %} -
-
- - - Create new - + {% endfor %} +
+ + + + Create new + +
@@ -213,7 +215,8 @@
- + +
@@ -274,14 +277,20 @@
-
+
+
- +
- - + +
@@ -303,29 +312,57 @@
-
- - +
+ +
+ + +
-
- - +
+ +
+ + +
-
- - +
+ +
+ + +
- - + +
-
- waters -
- - +
+
+ {% for i in "012345678912345"|make_list %} +
+
+
Section A ยท Coal Wharf, Market Drayton
+
Commercial Water
+
Specimen Carp
+
+
+ {% endfor %}
+
+ + +
+
@@ -350,8 +387,8 @@
- - + +
@@ -381,11 +418,11 @@
- + - + - +
@@ -441,16 +478,16 @@
diff --git a/src/static/js/mainapp/venues.js b/src/static/js/mainapp/venues.js index 0c6adee..7898e9f 100644 --- a/src/static/js/mainapp/venues.js +++ b/src/static/js/mainapp/venues.js @@ -113,7 +113,7 @@ function initAutocomplete() { return; } - alert(JSON.stringify(place, null, 4)); + // alert(JSON.stringify(place, null, 4)); fillAddress(place); }); } @@ -126,11 +126,20 @@ function fillAddressControl(component, types, fieldSelector, component_attr="lon } } +$("#venueResetAddress").on("click",function() { + $("#venueSearchResults").hide(); + $("#venueSearchHelper").show(); + $("#addressContent input[readonly], #addressContent input[readonly='readonly']").val(""); + $("#venueSearch").removeClass("is-valid"); + $("#venueSearch").val("").focus(); +}); + function fillAddress(place) { // Clear the fields first, because sometimes we cant find data to replace them. $("#venueSearchResults").show(); $("#venueSearchHelper").hide(); + $("#venueSearch").removeClass("is-valid"); $("#addressContent input[readonly], #addressContent input[readonly='readonly']").val(""); place.address_components.forEach(component => { @@ -149,8 +158,43 @@ function fillAddress(place) { // fillAddressControl(item, ["lat"], "#venueLat", "lat"); // fillAddressControl(item, ["lng"], "#venueLng", "lng"); // }); + + $("#venueSearch").addClass("is-valid"); } $(document).ready(function() { initMap(); + + $("#contactContent .input-group input[type=checkbox]").each(function() { + $(this).change(function() { + var input = $(this).closest(".input-group").find("input[type=url], input[type=text]").first(); + if (!this.checked) input.val(""); + input.removeClass("is-valid is-invalid"); + input.prop("disabled", !this.checked); + }); + }) + + // $("#venueUseFacebook").change(function() { + // if (!this.checked) $("#venueFacebook").val(""); + // $("#venueFacebook").removeClass("is-valid is-invalid"); + // $("#venueFacebook").prop("disabled", !this.checked); + // }); + + // $("#venueUseInstagram").change(function() { + // if (!this.checked) $("#venueInstagram").val(""); + // $("#venueInstagram").removeClass("is-valid is-invalid"); + // $("#venueInstagram").prop("disabled", !this.checked); + // }); + + // $("#venueUseTwitter").change(function() { + // if (!this.checked) $("#venueTwitter").val(""); + // $("#venueTwitter").removeClass("is-valid is-invalid"); + // $("#venueTwitter").prop("disabled", !this.checked); + // }); +}); + +$("#watersContentScroll").on("click", function() { + $("#venueModal .tab-content").animate({ + scrollTop: $("#watersContent")[0].scrollHeight + }, 1000); }); \ No newline at end of file diff --git a/src/static/scss/base.scss b/src/static/scss/base.scss index 92de54a..b771373 100644 --- a/src/static/scss/base.scss +++ b/src/static/scss/base.scss @@ -14,6 +14,14 @@ $body-bg :#000; } .btn { + &.btn-link { + color: $primary-hover-colour; + transition: color 0.3s; + &:hover { + color: $primary-colour; + } + } + &.btn-primary { border-color: $primary-colour; background-color: $primary-colour; @@ -150,7 +158,45 @@ $body-bg :#000; } } +#watersContentScroll { + position: absolute; + bottom: 0; + right: 0; +} +.mw-1920 { + max-width: 1920px !important; +} + +.btn-animate { + // Initial styles for the button + transform-origin: center; + transition: transform 0.1s ease-out; + + &:active:focus { + transform: scale(0.97); + } + + // Keyframes for the pop animation + @keyframes button-pop { + 0% { + transform: scale(0.95); + } + + 40% { + transform: scale(1.02); + } + + to { + transform: scale(1); + } + } + + // Apply the keyframes on the button when not in :active or :focus state + &:not(:active) { + animation: button-pop 0.25s ease; + } + } @@ -270,6 +316,23 @@ $body-bg :#000; z-index: 9999 !important; } +.animation-bouncing-searchicon { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -100%); + animation: bounce 1s infinite alternate; +} + +@keyframes bounce { + 0%, 100% { + transform: translate(-50%, -100%); + } + 50% { + transform: translate(-50%, -110%); + } +} + // .card-badge-container { // position: relative; diff --git a/src/templates/base.html b/src/templates/base.html index 8f8276e..216f028 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -20,7 +20,7 @@