Advertisement
artursn

Untitled

Jul 14th, 2016
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.20 KB | None | 0 0
  1. <!doctype html>
  2. <html class="no-js" lang="">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="description" content="">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <title>title</title>
  8.  
  9.     <style>
  10.         @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700&subset=latin,cyrillic);
  11.         html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  12.           margin: 0;
  13.           padding: 0;
  14.           border: 0;
  15.           font-size: 100%;
  16.           font: inherit;
  17.           vertical-align: baseline;
  18.         }
  19.  
  20.         article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  21.           display: block;
  22.         }
  23.  
  24.         body {
  25.           line-height: 1;
  26.         }
  27.  
  28.         ol, ul {
  29.           list-style: none;
  30.         }
  31.  
  32.         blockquote, q {
  33.           quotes: none;
  34.         }
  35.  
  36.         blockquote:before, blockquote:after {
  37.           content: "";
  38.           content: none;
  39.         }
  40.  
  41.         q:before, q:after {
  42.           content: "";
  43.           content: none;
  44.         }
  45.  
  46.         table {
  47.           border-collapse: collapse;
  48.           border-spacing: 0;
  49.         }
  50.  
  51.         /*Mixins*/
  52.         .ad-section:after {
  53.           content: "";
  54.           display: table;
  55.           clear: both;
  56.         }
  57.  
  58.         @font-face {
  59.           font-family: 'futurabookc';
  60.           src: url("../fonts/futurabookc.eot");
  61.           src: url("../fonts/futurabookc.eot?#iefix") format("embedded-opentype"), url("../fonts/futurabookc.woff") format("woff"), url("../fonts/futurabookc.ttf") format("truetype"), url("../fonts/futurabookc.svg#futurabookc") format("svg");
  62.           font-weight: normal;
  63.           font-style: normal;
  64.         }
  65.  
  66.         body {
  67.           font-family: 'Roboto', sans-serif;
  68.         }
  69.  
  70.         .media {
  71.           display: table;
  72.           width: 100%;
  73.         }
  74.  
  75.         .media-middle {
  76.           display: table-cell;
  77.           vertical-align: middle;
  78.         }
  79.  
  80.         .media-top {
  81.           display: table-cell;
  82.           vertical-align: top;
  83.         }
  84.  
  85.         .ad-input__wrap {
  86.           background-color: #fff;
  87.           border: 1px solid #a7a7a7;
  88.           margin: 12px 0;
  89.         }
  90.  
  91.         .ad-input__wrap.error {
  92.           border-color: #AC1616;
  93.         }
  94.  
  95.         .ad-textarea, .ad-input {
  96.           display: block;
  97.           width: 100%;
  98.           color: #9b9b9b;
  99.           font-size: 14px;
  100.           padding: 5px 12px 5px;
  101.           border: none;
  102.           outline: none;
  103.           box-sizing: border-box;
  104.         }
  105.  
  106.         .ad-textarea {
  107.           resize: none;
  108.           height: 126px;
  109.         }
  110.  
  111.         .ad-btn {
  112.           display: inline-block;
  113.           background: none;
  114.           border: none;
  115.           font-size: 22px;
  116.           text-align: center;
  117.           padding: 7px 15px 6px;
  118.           text-decoration: none;
  119.           color: #fff;
  120.           -webkit-transition: .2s linear;
  121.           transition: .2s linear;
  122.           cursor: pointer;
  123.           text-transform: uppercase;
  124.           font-family: 'futurabookc';
  125.         }
  126.  
  127.         .ad-btn__green {
  128.           background-color: #009e71;
  129.         }
  130.  
  131.         .ad-btn__green:hover {
  132.           background-color: #00855f;
  133.         }
  134.  
  135.         .ad-section {
  136.           background-color: #005436;
  137.           color: #fff;
  138.           border-radius: 8px;
  139.           border: 3px solid #e3e3e3;
  140.         }
  141.  
  142.         .ad-form {
  143.           width: 380px;
  144.           padding: 18px 25px 20px;
  145.           box-sizing: border-box;
  146.           float: left;
  147.           background-color: #006846;
  148.           border-radius: 7px 0 0 7px;
  149.         }
  150.  
  151.         .ad-form__text {
  152.           font-size: 15px;
  153.           color: #fff;
  154.           font-weight: 300;
  155.           line-height: 1.15;
  156.         }
  157.  
  158.         .ad-form__send {
  159.           width: 230px;
  160.           margin-top: 14px;
  161.         }
  162.  
  163.         .ad-code__text {
  164.           font-size: 14px;
  165.           margin-bottom: 6px;
  166.         }
  167.  
  168.         .ad-code__l {
  169.           width: 120px;
  170.         }
  171.  
  172.         .ad-code__captcha {
  173.           height: 50px;
  174.         }
  175.  
  176.         .ad-code__captcha img {
  177.           width: 100%;
  178.           height: 100%;
  179.           display: block;
  180.         }
  181.  
  182.         .ad-code__input {
  183.           margin: 0;
  184.         }
  185.  
  186.         .ad-code__reload {
  187.           color: #79d8b9;
  188.           font-size: 12px;
  189.           display: inline-block;
  190.           margin-top: 11px;
  191.         }
  192.  
  193.         .ad-code__reload:hover {
  194.           text-decoration: none;
  195.         }
  196.  
  197.         .ad-code__r {
  198.           padding-left: 10px;
  199.         }
  200.  
  201.         .ad-right {
  202.           text-align: center;
  203.           padding-bottom: 25px;
  204.         }
  205.  
  206.         .ad-logo {
  207.           display: inline-block;
  208.           text-decoration: none;
  209.           margin: 30px 0;
  210.         }
  211.  
  212.         .ad-skype {
  213.           font-size: 21px;
  214.           display: inline-block;
  215.           color: #fff;
  216.           text-decoration: none;
  217.           margin: 7px 0;
  218.         }
  219.  
  220.         .ad-skype:hover {
  221.           text-decoration: underline;
  222.         }
  223.  
  224.         .ad-skype img {
  225.           vertical-align: middle;
  226.           margin-right: 8px;
  227.         }
  228.  
  229.         .ad-thanks {
  230.           display: none;
  231.           font-size: 22px;
  232.           text-align: center;
  233.           margin: 40px 20px 0;
  234.           color: #fff;
  235.           line-height: 1.4;
  236.         }
  237.     </style>
  238.  
  239. </head>
  240. <body>
  241.     <section class="ad-section">
  242.         <form action="http://adbetnet.com/advertise" class="ad-form">
  243.             <p class="ad-form__text">По вопросам размещения рекламы на сайте обращайтесь по указным контактам или заполните форму обратной связи:</p>
  244.  
  245.             <div class="ad-input__wrap">
  246.                 <input type="text" class="ad-input" placeholder="Введите ваше имя*" name="name">
  247.             </div>
  248.  
  249.             <div class="ad-input__wrap">
  250.                 <input type="text" class="ad-input" placeholder="Укажите ваш мейл*" name="email">
  251.             </div>
  252.  
  253.             <div class="ad-input__wrap error">
  254.                 <input type="text" class="ad-input" placeholder="Тема*" name="subject">
  255.             </div>
  256.  
  257.             <div class="ad-input__wrap">
  258.                 <textarea class="ad-textarea" name="textarea"></textarea>
  259.             </div>
  260.             <button class="ad-btn ad-btn__green ad-form__send">Отправить</button>
  261.  
  262.         </form>
  263.  
  264.         <div class="ad-right">
  265.             <div class="ad-right__item">
  266.                 <a href="https://adbetnet.com/" class="ad-logo"><img src="https://cdn.advertserve.com/images/adbetnet.advertserve.com/servlet/files/38539#feedback/logo.png" alt=""></a>
  267.             </div>
  268.             <div class="ad-right__item">
  269.                 <a href="skype:adbetnet?call" class="ad-skype"><img src="https://cdn.advertserve.com/images/adbetnet.advertserve.com/servlet/files/38540#feedback/skype.png" alt=""> adbetnet</a>
  270.             </div>
  271.  
  272.             <div class="ad-thanks">Ваше сообщение отправлено. <br>Спасибо!</div>
  273.         </div>
  274.  
  275.  
  276.     </section>
  277.  
  278.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
  279.  
  280.   <script>
  281.     var $thanks = $('.ad-thanks');
  282.       $('.ad-form').on('submit', function (e) {
  283.         e.preventDefault();
  284.         var $this = $(this),
  285.             formValues = getValues($this),
  286.             action = $this.attr('action'),
  287.             $inputs = $this.find('.ad-input__wrap');
  288.  
  289.         $inputs.removeClass('error');
  290.  
  291.         $.post(action, formValues, function (obj) {
  292.           var parseObj = obj;
  293.  
  294.           if (!parseObj.result) {
  295.             var errors = parseObj.errors;
  296.             for (var key in errors) {
  297.               $this.find('.ad-input[name=' + key + ']').parent().addClass('error');
  298.             }
  299.           } else {
  300.             $thanks.fadeIn();
  301.             $this.hide();
  302.           }
  303.         }, "json").error(function (jqXHR, textStatus, errorThrown) {
  304.           console.log(textStatus + " | " + errorThrown);
  305.         });
  306.  
  307.       });
  308.  
  309.       function getValues(form) {
  310.         return form.serialize();
  311.       };
  312.   </script>
  313. </body>
  314. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement