Commit e29897ba by Mykhailo Makohin

finish integrate google map

parent 33761f70
......@@ -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();
......
.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
......
......@@ -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)
......
/
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
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