Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warm_city
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mykhailo Makohin
warm_city
Commits
e29897ba
Commit
e29897ba
authored
Sep 05, 2019
by
Mykhailo Makohin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish integrate google map
parent
33761f70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
35 deletions
+39
-35
main.js
app/assets/javascripts/main.js
+27
-17
index.html.haml
app/views/home/index.html.haml
+0
-0
application.html.haml
app/views/layouts/application.html.haml
+9
-6
_footer.html.haml
app/views/partials/_footer.html.haml
+3
-12
No files found.
app/assets/javascripts/main.js
View file @
e29897ba
...
@@ -138,25 +138,35 @@ function initTip(){
...
@@ -138,25 +138,35 @@ function initTip(){
$
(
'[data-toggle=tooltip]'
).
tooltip
();
$
(
'[data-toggle=tooltip]'
).
tooltip
();
}
}
function
initMap
(){
function
initMap
()
{
if
(
$
(
'#map'
).
length
)
{
// The location of Uluru
var
map
=
new
GMaps
({
var
uluru
=
{
lat
:
48.9161793
,
lng
:
24.7258968
};
el
:
'#map'
,
// The map, centered at Uluru
lat
:
-
12.043333
,
var
map
=
new
google
.
maps
.
Map
(
lng
:
-
77.028333
,
document
.
getElementById
(
'map'
),
{
zoom
:
4
,
center
:
uluru
});
zoomControl
:
true
,
// The marker, positioned at Uluru
zoomControlOpt
:
{
var
marker
=
new
google
.
maps
.
Marker
({
position
:
uluru
,
map
:
map
});
style
:
'SMALL'
,
position
:
'TOP_LEFT'
},
panControl
:
false
,
streetViewControl
:
false
,
mapTypeControl
:
false
,
overviewMapControl
:
false
});
}
}
}
// function initMap(){
// if ($('#map').length) {
// var map = new GMaps({
// el: '#map',
// lat: -12.043333,
// lng: -77.028333,
// zoomControl : true,
// zoomControlOpt: {
// style : 'SMALL',
// position: 'TOP_LEFT'
// },
// panControl : false,
// streetViewControl : false,
// mapTypeControl: false,
// overviewMapControl: false
// });
// }
// }
function
mobilePartners
()
{
function
mobilePartners
()
{
var
checkWidth
=
$
(
window
).
width
();
var
checkWidth
=
$
(
window
).
width
();
...
...
app/views/home/index.html.haml
View file @
e29897ba
This diff is collapsed.
Click to expand it.
app/views/layouts/application.html.haml
View file @
e29897ba
...
@@ -6,28 +6,31 @@
...
@@ -6,28 +6,31 @@
=
csrf_meta_tags
=
csrf_meta_tags
=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
:
'reload'
=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
:
'reload'
=
javascript_include_tag
'application'
,
'data-turbolinks-track'
:
'reload'
=
javascript_include_tag
'application'
,
'data-turbolinks-track'
:
'reload'
%meta
{
:charset
=>
"utf-8"
}
%meta
{
:charset
=>
"utf-8"
}
/
%meta
{
:content
=>
""
,
:name
=>
"description"
}
/
%meta
{
:content
=>
""
,
:name
=>
"description"
}
/
%meta
{
:content
=>
"width=device-width"
,
:name
=>
"viewport"
}
/
%meta
{
:content
=>
"width=device-width"
,
:name
=>
"viewport"
}
/
%meta
{
:content
=>
"IE=edge"
,
"http-equiv"
=>
"X-UA-Compatible"
}
/
%meta
{
:content
=>
"IE=edge"
,
"http-equiv"
=>
"X-UA-Compatible"
}
/
/
Fonts
\==================================================
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Open+Sans:400,600,700"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Open+Sans:400,600,700"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=PT+Sans:400,700italic,700,400italic"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=PT+Sans:400,700italic,700,400italic"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Noto+Serif:400,400italic&subset=latin,cyrillic-ext"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Noto+Serif:400,400italic&subset=latin,cyrillic-ext"
,
:rel
=>
"stylesheet"
,
:type
=>
"text/css"
}
/
:javascript
var
GOOGLE_API_KEY
=
"
#{
ENV
[
'AIzaSyALmxk-nEaCo8KVfJTdAiVFPBKA9s0VnmM'
]
}
"
=
javascript_include_tag
'application'
=
javascript_include_tag
"//maps.googleapis.com/maps/api/js?libraries=places&key=
#{
ENV
[
'AIzaSyALmxk-nEaCo8KVfJTdAiVFPBKA9s0VnmM'
]
}
"
%link
{
:href
=>
"//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Roboto+Slab:300,400&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Roboto+Slab:300,400&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Roboto:300,500&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
%link
{
:href
=>
"//fonts.googleapis.com/css?family=Roboto:300,500&subset=cyrillic-ext"
,
:rel
=>
"stylesheet"
}
/
/
/
Styles
\==================================================
/
Favicons + Touch Icons
\==================================================
%link
{
:href
=>
"img/favicons/apple-touch-icon57.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon57.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon57.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"57x57"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon57.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"57x57"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon60.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"60x60"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon60.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"60x60"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon114.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"114x114"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon114.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"114x114"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon120.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"120x120"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon120.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"120x120"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon180.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"180x180"
}
/
%link
{
:href
=>
"img/favicons/apple-touch-icon180.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"180x180"
}
/
%body
%body
=
render
'partials/modal'
=
render
'partials/modal'
-
if
current_page?
(
root_path
)
-
if
current_page?
(
root_path
)
...
...
app/views/partials/_footer.html.haml
View file @
e29897ba
/
%script
{
:src
=>
"http://maps.googleapis.com/maps/api/js?libraries=geometry&sensor=false&key=AIzaSyCd7M4P6CpmOv7_K1XGn_0JgEa47r97tu4&callback=initMap"
,
:type
=>
"text/javascript"
}
Javascript
:cdata
\==================================================
\ No newline at end of file
/ Connecting jQuery library from CDN
%script
{
:src
=>
"//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
}
/ If CDN unavailable - connect local copy of jQuery
:javascript
window
.
jQuery
||
document
.
write
(
'<script src="jquery.min.js"><
\
/script>'
)
/ Plugins goes here
%script
{
:src
=>
"//maps.google.com/maps/api/js?sensor=true"
,
:type
=>
"text/javascript"
}
/ %script{:src => "build.min.js"}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment