Skip to content

Commit 409f9b3

Browse files
committed
Some bits for map display
1 parent b95291b commit 409f9b3

File tree

6 files changed

+82
-14
lines changed

6 files changed

+82
-14
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<txp:hide>
2+
CONTACT EMAIL ADDRESS ----------------------------------------------------------
3+
For contact page, if used.
4+
</txp:hide>
5+
<txp:variable name="--contact-email" value="[email protected]" />
6+
7+
<txp:hide>
8+
CONTACT PHONE NUMBER -----------------------------------------------------------
9+
Provide a contact telephone number for the site (optional).
10+
</txp:hide>
11+
<txp:variable name="--contact-phone" value="" />
12+
13+
<txp:hide>
14+
LOCATION MAP ON CONTACT PAGE? --------------------------------------------------
15+
Value of '0' for no, '1' for yes.
16+
</txp:hide>
17+
<txp:variable name="--contact-map" value="0" />
18+
19+
<txp:hide>
20+
LOCATION MAP LATITUDE AND LONGITUDE --------------------------------------------
21+
If a location map is displayed (see above), provide valid latitude and longitude
22+
coordinates. For example, '51.505, -0.09'.
23+
</txp:hide>
24+
<txp:variable name="--contact-map-lat-long" value="" />
25+
26+
<txp:hide>
27+
LOCATION MAP ZOOM LEVEL --------------------------------------------------------
28+
If a location map is displayed (see above), provide an initial zoom level.
29+
</txp:hide>
30+
<txp:variable name="--contact-map-zoom" value="13" />

templates/forms/misc/--variables.txp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ By default, breadcrumbs are separated by arrow symbols. Add 'path' to the
2424
</txp:hide>
2525
<txp:variable name="--breadcrumb-style" value="" />
2626

27-
<txp:hide>
28-
CONTACT EMAIL ADDRESS ----------------------------------------------------------
29-
For contact page, if used.
30-
</txp:hide>
31-
<txp:variable name="--contact-email" value="[email protected]" />
32-
3327
<txp:hide>
3428
OVERRIDE DEFAULT SOCIAL MEDIA ICON STYLE ---------------------------------------
3529
By default, social media icons are full colour. Add either 'monochrome' or

templates/pages/contact.txp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="<txp:lang />" dir="<txp:text item="lang_dir" />">
33
<head>
4+
<txp:output_form form="--variables--contact" />
45
<txp:output_form form="head" />
56
<title><txp:page_title /></title>
67
<txp:meta_description />
@@ -16,6 +17,9 @@
1617
"url": "<txp:section url escape="json" />"
1718
}
1819
</script>
20+
<txp:if_variable name="--contact-map" value="1">
21+
<link rel="stylesheet" href="<txp:page_url type="theme_path" />/assets/css/map.css">
22+
</txp:if_variable>
1923
<txp:else />
2024
<meta name="robots" content="none">
2125
</txp:if_article_list>
@@ -26,13 +30,19 @@
2630
<txp:output_form form="breadcrumbs" />
2731
<div class="container">
2832
<txp:if_plugin name="com_connect" version="4.6">
29-
<txp:com_connect to='<txp:variable name="contact" />' />
33+
<txp:com_connect to='<txp:variable name="--contact-email" />' />
3034
TODO
3135
<txp:else />
3236
TODO
3337
</txp:if_plugin>
38+
39+
<txp:if_variable name="--contact-map" value="1"><div id="map"></div></txp:if_variable>
3440
</div>
3541
</div>
3642
<txp:output_form form="footer" />
43+
<txp:if_article_list><txp:if_variable name="--contact-map" value="1">
44+
<script src="<txp:page_url type="theme_path" />/assets/js/map.js"></script>
45+
<script>var mymap = L.map('mapid').setView([51.505, -0.09], 13);</script>
46+
</txp:if_variable></txp:if_article_list>
3747
</body>
3848
</html>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<txp:hide>
2+
CONTACT EMAIL ADDRESS ----------------------------------------------------------
3+
For contact page, if used.
4+
</txp:hide>
5+
<txp:variable name="--contact-email" value="[email protected]" />
6+
7+
<txp:hide>
8+
CONTACT PHONE NUMBER -----------------------------------------------------------
9+
Provide a contact telephone number for the site (optional).
10+
</txp:hide>
11+
<txp:variable name="--contact-phone" value="" />
12+
13+
<txp:hide>
14+
LOCATION MAP ON CONTACT PAGE? --------------------------------------------------
15+
Value of '0' for no, '1' for yes.
16+
</txp:hide>
17+
<txp:variable name="--contact-map" value="0" />
18+
19+
<txp:hide>
20+
LOCATION MAP LATITUDE AND LONGITUDE --------------------------------------------
21+
If a location map is displayed (see above), provide valid latitude and longitude
22+
coordinates. For example, '51.505, -0.09'.
23+
</txp:hide>
24+
<txp:variable name="--contact-map-lat-long" value="" />
25+
26+
<txp:hide>
27+
LOCATION MAP ZOOM LEVEL --------------------------------------------------------
28+
If a location map is displayed (see above), provide an initial zoom level.
29+
</txp:hide>
30+
<txp:variable name="--contact-map-zoom" value="13" />

themes/hive-framework-0.0.3/forms/misc/--variables.txp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ By default, breadcrumbs are separated by arrow symbols. Add 'path' to the
2424
</txp:hide>
2525
<txp:variable name="--breadcrumb-style" value="" />
2626

27-
<txp:hide>
28-
CONTACT EMAIL ADDRESS ----------------------------------------------------------
29-
For contact page, if used.
30-
</txp:hide>
31-
<txp:variable name="--contact-email" value="[email protected]" />
32-
3327
<txp:hide>
3428
OVERRIDE DEFAULT SOCIAL MEDIA ICON STYLE ---------------------------------------
3529
By default, social media icons are full colour. Add either 'monochrome' or

themes/hive-framework-0.0.3/pages/contact.txp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="<txp:lang />" dir="<txp:text item="lang_dir" />">
33
<head>
4+
<txp:output_form form="--variables--contact" />
45
<txp:output_form form="head" />
56
<title><txp:page_title /></title>
67
<txp:meta_description />
@@ -16,6 +17,9 @@
1617
"url": "<txp:section url escape="json" />"
1718
}
1819
</script>
20+
<txp:if_variable name="--contact-map" value="1">
21+
<link rel="stylesheet" href="<txp:page_url type="theme_path" />/assets/css/map.css">
22+
</txp:if_variable>
1923
<txp:else />
2024
<meta name="robots" content="none">
2125
</txp:if_article_list>
@@ -26,13 +30,19 @@
2630
<txp:output_form form="breadcrumbs" />
2731
<div class="container">
2832
<txp:if_plugin name="com_connect" version="4.6">
29-
<txp:com_connect to='<txp:variable name="contact" />' />
33+
<txp:com_connect to='<txp:variable name="--contact-email" />' />
3034
TODO
3135
<txp:else />
3236
TODO
3337
</txp:if_plugin>
38+
39+
<txp:if_variable name="--contact-map" value="1"><div id="map"></div></txp:if_variable>
3440
</div>
3541
</div>
3642
<txp:output_form form="footer" />
43+
<txp:if_article_list><txp:if_variable name="--contact-map" value="1">
44+
<script src="<txp:page_url type="theme_path" />/assets/js/map.js"></script>
45+
<script>var mymap = L.map('mapid').setView([51.505, -0.09], 13);</script>
46+
</txp:if_variable></txp:if_article_list>
3747
</body>
3848
</html>

0 commit comments

Comments
 (0)