Contact form inspired by a dribbble by Bluroon https://dribbble.com/shots/1356864-Contact-Us
Forked from Lentie Ward's Pen Responsive Contact Form with Map.
A Pen by Daniel Naranjo on CodePen.
| #browser | |
| #content | |
| #left | |
| #map | |
| %p Where To Find Us | |
| .map-locator | |
| .tooltip | |
| %ul | |
| %li | |
| %span.entypo-location | |
| %span.selectedLocation Israel | |
| %li | |
| %span.entypo-mail | |
| %a{:href => "#"} [email protected] | |
| %li | |
| %span.entypo-phone | |
| (+972 2) 629 06 32 | |
| .zoom | |
| %ul#location-bar | |
| %li | |
| %a{:href => "http://f.cl.ly/items/452R3S1440221Z3m372j/israel.png", | |
| :data => {:location => 'Israel'}, | |
| :class => "location"} Israel | |
| %li | |
| %a{ :href => "http://f.cl.ly/items/0n0o01382l0p1u271D43/usa.png", | |
| :data => {:location => 'USA'}, | |
| :class => "location"} USA | |
| %li | |
| %a{:href => "http://f.cl.ly/items/0g0l283X3h1T3H270V0A/netherlands.png", | |
| :data => {:location => 'The Netherlands'}, | |
| :class => "location"} The Netherlands | |
| %li | |
| %a{:href => "http://f.cl.ly/items/1i2Y262H020X141R3h0k/singapore.png", | |
| :data => {:location => 'Singapore'}, | |
| :class => "location"} Singapore | |
| #right | |
| %p Connect | |
| #social | |
| %a.social | |
| %span.entypo-facebook | |
| %a.social | |
| %span.entypo-twitter | |
| %a.social | |
| %span.entypo-linkedin | |
| %a.social | |
| %span.entypo-gplus | |
| %a.social | |
| %span.entypo-instagrem | |
| %form | |
| %p Get in Contact | |
| %input{:type => "email", :placeholder => "Email"}/ | |
| %input{:type => "text", :placeholder => "Subject"} | |
| %textarea{:placeholder => "Message", :rows => "4"} | |
| %input{:type => "submit", :placeholder => "Send"}/ | |
| %p other way | |
| %p.other.entypo-mail | |
| %a{:href => "#"} [email protected] | |
| %p.other.entypo-phone (+972 2) 629 06 32 |
Contact form inspired by a dribbble by Bluroon https://dribbble.com/shots/1356864-Contact-Us
Forked from Lentie Ward's Pen Responsive Contact Form with Map.
A Pen by Daniel Naranjo on CodePen.
| //Inspired by a dribbble by Bluroon | |
| //https://dribbble.com/shots/1356864-Contact-Us | |
| //Capture the click event on a location | |
| $("#location-bar a").click(function(event){ | |
| event.preventDefault(); | |
| var $this = $(this), | |
| $li = $this.parent(), | |
| selectedMap = $this.attr("href"), | |
| selectedLocation = $this.data('location'); | |
| $li.addClass('active').siblings('li').removeClass('active'); | |
| //Update #map bkimage with the image from the location | |
| $('#map').css('background-image', 'url(' + selectedMap + ')'); | |
| //update tooltip 'address' | |
| $('.selectedLocation').text(selectedLocation); | |
| }); |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
| @import "compass/css3"; | |
| @import url(http://fonts.googleapis.com/css?family=Open+Sans:100,300,400,600); | |
| @import url(http://weloveiconfonts.com/api/?family=brandico|entypo); | |
| /* entypo */ | |
| [class*="entypo-"]:before { | |
| font-family: 'entypo', sans-serif; | |
| padding-right: 10px; | |
| } | |
| @mixin clearfix { | |
| &:after { | |
| content: ""; | |
| display: table; | |
| clear: both; | |
| } | |
| } | |
| @mixin box-shadow($horizontal: 1px, $vertical: 1px, $blur: 2px, $color: rgba(0,0,0,0.5)) { | |
| -webkit-box-shadow: $horizontal $vertical $blur $color; | |
| -moz-box-shadow: $horizontal $vertical $blur $color; | |
| box-shadow: $horizontal $vertical $blur $color; | |
| } | |
| $dkgray: #394141; | |
| $gray: #454f4f ; | |
| $ltgray: #8e9699; | |
| $seafoam: #7BC087; | |
| $green: #5FA269; | |
| $accent: #51B2D6; | |
| body { | |
| font-family: 'Open Sans', sans-serif; | |
| font-size: 100%; | |
| } | |
| *, *:before, *:after { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| border: 0; | |
| } | |
| ul {list-style:none;} | |
| a { | |
| color: white; | |
| text-decoration: none; | |
| } | |
| #browser { | |
| margin: 10px auto; | |
| color: white; | |
| width: 80%; | |
| } | |
| .arrow { | |
| position: absolute; | |
| right: 3px; | |
| top: 6px; | |
| font-size: 1.2em; | |
| color: $ltgray; | |
| } | |
| #content { | |
| @include clearfix; | |
| background: $gray; | |
| #left, #right { | |
| height: 100%; | |
| } | |
| #left { | |
| float: left; | |
| width:75%; | |
| background: #ffffff; | |
| @media all and (max-width: 780px) { | |
| width: 100%; | |
| } | |
| #map { | |
| height: 388px; | |
| position: relative; | |
| background-image: url('http://f.cl.ly/items/452R3S1440221Z3m372j/israel.png'); | |
| background-size: cover; | |
| p { | |
| text-transform: uppercase; | |
| padding-top: 20px; | |
| padding-left: 30px; | |
| font-size: 0.9em; | |
| font-weight: 600; | |
| } | |
| .zoom { | |
| position: absolute; | |
| right: 25px; | |
| top: 25px; | |
| width: 2px; | |
| height: 70px; | |
| background: white; | |
| &:before, | |
| &:after { | |
| text-align: center; | |
| font-weight: 600; | |
| position: absolute; | |
| color: $seafoam; | |
| background: white; | |
| width: 20px; | |
| } | |
| &:before { | |
| content:'+'; | |
| top:-10px; | |
| right: -8px; | |
| } | |
| &:after { | |
| content:'-'; | |
| bottom: -10px; | |
| right: -8px; | |
| } | |
| } | |
| .map-locator { | |
| position: absolute; | |
| top: 40%; | |
| left: 30%; | |
| border-radius: 15px; | |
| height: 30px; | |
| width: 30px; | |
| background: rgba(0,0,0,0.4); | |
| border: solid 2px white; | |
| &:before { | |
| content: ''; | |
| position: absolute; | |
| top: 9px; | |
| left: 9px; | |
| width: 8px; | |
| height: 8px; | |
| background: white; | |
| border-radius: 5px; | |
| } | |
| .tooltip { | |
| position: absolute; | |
| color: $dkgray; | |
| left: 50px; | |
| top: -10px; | |
| background: white; | |
| font-size: 0.8em; | |
| font-weight: 600; | |
| @include box-shadow; | |
| &:before { | |
| content:''; | |
| position: absolute; | |
| left:-10px; | |
| top: 14px; | |
| border-right: solid white 10px; | |
| border-top: solid transparent 8px; | |
| border-bottom: solid transparent 8px; | |
| } | |
| [class*="entypo-"] { | |
| min-width: 25px; | |
| display: inline-block; | |
| text-align: center; | |
| border-right: solid thin #CCC; | |
| margin-right: 5px; | |
| } | |
| li { | |
| border-bottom: solid thin #CCC; | |
| padding: 10px; | |
| white-space: nowrap; | |
| a { color: $accent;} | |
| &:hover [class*="entypo-"] {color: $accent} | |
| } | |
| } | |
| } | |
| } | |
| ul#location-bar { | |
| width: 100%; | |
| text-align: center; | |
| display: table; | |
| li { | |
| display: table-cell; | |
| padding: 15px; | |
| background: $green; | |
| border-right: solid thin lighten($green, 10%); | |
| &:last-of-type { | |
| border-right: 0; | |
| } | |
| &:hover { | |
| background: darken($green, 10%); | |
| } | |
| } | |
| .active { background: darken($green, 10%); } | |
| } | |
| } | |
| #right { | |
| float: left; | |
| width:25%; | |
| background: $gray; | |
| font-size: 0.75em; | |
| padding: 15px; | |
| @media all and (max-width: 780px) { | |
| width: 100%; | |
| } | |
| p { | |
| margin-bottom: 10px; | |
| text-transform: uppercase; | |
| } | |
| a { | |
| &:hover {color: $accent;} | |
| } | |
| #social {display: table; width: 100%;} | |
| .social { | |
| display: table-cell; | |
| text-align: center; | |
| } | |
| form { | |
| border-top: solid thin $ltgray; | |
| border-bottom: solid thin $ltgray; | |
| margin: 20px 0; | |
| padding: 20px 0; | |
| input, | |
| textarea { | |
| background: $dkgray; | |
| padding: 8px; | |
| margin-bottom: 8px; | |
| width: 100%; | |
| color: white; | |
| &:last-of-type {margin-bottom: 0;} | |
| &[type='submit'] { | |
| text-transform: uppercase; | |
| background: $seafoam; | |
| width: 50%; | |
| color: white; | |
| margin-top: 5px; | |
| &:hover { | |
| background: darken($seafoam, 10%); | |
| @include box-shadow; | |
| } | |
| } | |
| &[type='textarea'] { | |
| min-height:75px; | |
| vertical-align: text-top; | |
| } | |
| } | |
| }//endofform | |
| p.other { | |
| font-size: 0.7; | |
| margin-bottom: 5px; | |
| text-transform: lowercase; | |
| font-weight: 100; | |
| &, | |
| a { | |
| color: $ltgray; | |
| } | |
| } | |
| } | |
| } |