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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
103 deletions
+47
-103
main.js
app/assets/javascripts/main.js
+27
-17
index.html.haml
app/views/home/index.html.haml
+8
-68
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(){
$
(
'[data-toggle=tooltip]'
).
tooltip
();
}
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
initMap
()
{
// The location of Uluru
var
uluru
=
{
lat
:
48.9161793
,
lng
:
24.7258968
};
// The map, centered at Uluru
var
map
=
new
google
.
maps
.
Map
(
document
.
getElementById
(
'map'
),
{
zoom
:
4
,
center
:
uluru
});
// The marker, positioned at Uluru
var
marker
=
new
google
.
maps
.
Marker
({
position
:
uluru
,
map
:
map
});
}
// 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
()
{
var
checkWidth
=
$
(
window
).
width
();
...
...
app/views/home/index.html.haml
View file @
e29897ba
.content
.wrapper
.content
.main_head
.main_head_top.clearfix
.main_menu
%nav
.navbar.navbar-default
.container-fluid
/ Brand and toggle get grouped for better mobile display
.navbar-header
%button
.navbar-toggle.collapsed
{
"aria-expanded"
=>
"false"
,
"data-target"
=>
"#bs-example-navbar-collapse-1"
,
"data-toggle"
=>
"collapse"
,
:type
=>
"button"
}
%span
.sr-only
Toggle navigation
%span
.icon-bar
%span
.icon-bar
%span
.icon-bar
/ Collect the nav links, forms, and other content for toggling
#bs-example-navbar-collapse-1
.collapse.navbar-collapse
%ul
.nav.navbar-nav
%li
%a
{
:href
=>
"#"
}
про палатформу
%li
%a
{
:href
=>
"#"
}
Ґранти
%li
%a
{
:href
=>
"#"
}
Проекти
%li
%a
{
:href
=>
"#"
}
Партнери
%li
%a
{
:href
=>
"#"
}
DIGITAL WORKSHOP
%li
%a
{
:href
=>
"#"
}
Про нас
%li
%a
{
:href
=>
"#"
}
Новини
%li
%a
{
:href
=>
"#"
}
Звіти
%li
%a
{
:href
=>
"#"
}
connectif
%ul
.nav.nav-tabs.nav_btns
%li
.active
%a
{
"data-toggle"
=>
"tab"
,
:href
=>
"#1"
}
Люди
%li
%a
{
"data-toggle"
=>
"tab"
,
:href
=>
"#2"
}
Бізнеси
.show_tip
Ознайомтесь з дружніми бізнесами
які допомагають формувати
та покрищувати наше місто
.login_wrap
%div
%button
.login_btn
{
"data-target"
=>
"#modal3"
,
"data-toggle"
=>
"modal"
}
=
image_tag
(
"login.png"
)
.search_block
%input
#search_field
.search_field
{
:placeholder
=>
"Пошук за іменем... "
,
:type
=>
"text"
}
/
%button
.search_btn
%i
.icon.icon_search
.main_head_middle
.tab-content.head_tab-content
#1
.tab-pane.tab-pane_people.active
...
...
@@ -257,7 +209,7 @@
.lang
%a
.lang_link
{
:href
=>
"#"
}
ENG
%a
.lang_link.active
{
:href
=>
"#"
}
UA
.section.section_grants
.section.section_grants
.container
.row
.col-sm-5.col-md-6
...
...
@@ -324,7 +276,7 @@
.info_tip_text
Якщо ти маєш ідею - поділись нею,
якщо шукаєш ідею - знаходь
.section.section_project
.section.section_project
.container
.row
.col-sm-4
...
...
@@ -569,7 +521,7 @@
долучилось людей
%strong
214
%a
.btn.btn_default.btn_bordered.btn_more.disabled
{
:href
=>
"#"
}
Більше
.section.section_advert
.section.section_advert
.container
.row
.col-sm-7.col-md-8.advert_left
...
...
@@ -582,7 +534,7 @@
%a
.advert_link
{
:href
=>
"#"
}
=
image_tag
(
"dw_img.png"
)
%span
.advert_link_text
Сприяння розвитку України
.section.section_news
.section.section_news
.container.grid_padding_xs
%h3
.title_bold
Новини
...
...
@@ -625,7 +577,7 @@
%span
.news_text
Досліджень, розробки законопроектів, підготовки кадрів та інших цілей на умовах, передбачених грантодавцем.
%a
.link.link_md
{
:href
=>
"#"
}
більше новин
.map_wrap
.map_wrap
.map_info
.container
.row
...
...
@@ -650,19 +602,7 @@
#map
.map
%a
.btn.btn_default.btn_round.btn_bordered
{
"data-original-title"
=>
"долучитись"
,
"data-placement"
=>
"top"
,
"data-toggle"
=>
"tooltip"
,
:href
=>
"#"
}
%i
.icon.icon_plus
.point.sm_size
{
:style
=>
"top: 300px; left: 150px;"
}
.map_tip
{
:style
=>
"position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); white-space:nowrap; "
}
.map_tip_top
.map_tip_name
Тарас Коломійченко
%a
.round_link
{
:href
=>
"#"
}
%i
.icon.icon_fb
.map_tip_bot
Китай, Шанхай
%i
.icon.icon_close
.point.sm_size
{
:style
=>
"top: 400px; left: 100px;"
}
.point.lg_size
{
:style
=>
"top: 450px; left: 150px;"
}
+99
.tooltip_templates
.tooltip_templates
#tooltip_content_inner
.tooltipster_top
.tooltipster_title
...
...
app/views/layouts/application.html.haml
View file @
e29897ba
...
...
@@ -6,28 +6,31 @@
=
csrf_meta_tags
=
stylesheet_link_tag
'application'
,
media:
'all'
,
'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
=>
"width=device-width"
,
:name
=>
"viewport"
}
/
%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=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"
}
/
: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=Roboto+Slab:300,400&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
=>
"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-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-icon180.png"
,
:rel
=>
"apple-touch-icon"
,
:sizes
=>
"180x180"
}
/
%body
=
render
'partials/modal'
-
if
current_page?
(
root_path
)
...
...
app/views/partials/_footer.html.haml
View file @
e29897ba
/
Javascript
\==================================================
/ 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
%script
{
:src
=>
"http://maps.googleapis.com/maps/api/js?libraries=geometry&sensor=false&key=AIzaSyCd7M4P6CpmOv7_K1XGn_0JgEa47r97tu4&callback=initMap"
,
:type
=>
"text/javascript"
}
:cdata
\ 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