This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Theme name | |
Theme URI: theme url | |
Description: Демонстрационная тема, созданная благодаря Bootstrap. | |
Author: Ya! | |
Author URI: url | |
Version: 1.0 | |
Tags: responsive, white, bootstrap | |
License: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpbootstrap_scripts_with_jquery() | |
{ | |
// Register the script like this for a theme: | |
// Регистрирум скрипт ('ИМЯ СКРИПТА','ПУТЬ К ФАЙЛУ СКРИПТА', ЗАВИСИТ ЛИ ОТ БИБЛИОТЕК ); | |
wp_register_script( 'bootstrap', get_template_directory_uri() . '/vendor/bootstrap/js/bootstrap.min.js', array( 'jquery' ) ); | |
wp_register_script( 'easing', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'); | |
wp_register_script( 'custom', get_template_directory_uri() . '/js/freelancer.min.js', array( 'jquery' ) ); | |
// For either a plugin or a theme, you can then enqueue the script: | |
// Добавляем наши скрипты "в очередь", в ковычках имя зарегистрированного скрипта(см.выше) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<?php the_content(); ?> | |
<?php endwhile; else: ?> | |
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Порядок действий: | |
1) Установить WordPress | |
2) Зайти на URL сайта, выполнить установку WP ввести базу данных, логин, пароль | |
3) Перейти в /wp-content/themes/ и добавить папку со своей темой(сайтом) | |
4) Изменить расширение файла index.html на index.php | |
5) Создать файл style.css и прописать комментарий с описанием темы ( https://gist.github.com/ivanmarkovich/2a056172db4cc4c39827343222a00855 ) | |
6) Перенести <link>'и со стилями из index.php в style.css, добавить их через @import | |
7) В файле index.php: подключить файл со стилями используя функцию php - <link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet"> | |
8) В файле index.php: перенести все скрипты из подвала в тег head | |
9) Создать файл functions.php, в него перенести скрипты из head ( https://gist.github.com/ivanmarkovich/954e4cf068efb55211c9e58210d7952a ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('.go_to').click( function(){ // ловим клик по ссылке с классом go_to | |
var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href | |
if ($(scroll_el).length != 0) { // проверим существование элемента чтобы избежать ошибки | |
$('html, body').animate({ scrollTop: $(scroll_el).offset().top }, 500); // анимируем скроллинг | |
} | |
return false; // выключаем стандартное действие | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*====== Screen-Size ====== */ | |
@screen-iphone-max: 480px; | |
@screen-xs-max: 767px; | |
@screen-sm-min: 768px; | |
@screen-sm-max: 991px; | |
@screen-md-min: 992px; | |
@screen-md-max: 1199px; | |
@screen-lg-min: 1200px; | |
/*========= Media ========= */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="form" target="_self" onsubmit="window.location.href = 'success.html'" action="javascript: postContactToGoogle()"> | |
<h3>Заполните форму,<br>чтобы учавствовать</h3> | |
<input type="text" id="field_name" placeholder="ФИО" name="entry.68995314"> | |
<input type="text" id="field_vk" placeholder="Профиль вк" name="entry.314480333"> | |
<input type="text" id="field_email" placeholder="Почта" name="entry.2144067535"> | |
<button type="submit">Перейти к оплате</button> | |
</form> | |
<script type="text/javascript"> | |
function validateEmail(email) { | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | |
if (navigator.userAgent.match(/Tablet|iPad/i) || ( navigator.userAgent.match(/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i) && w >= 767 )) | |
{ | |
// do tablet stuff | |
} else if(navigator.userAgent.match(/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i) ) | |
{ | |
// do mobile stuff | |
} else { | |
// do desktop stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMobile = false; | |
if ($('body').width() <= 767) { | |
isMobile = true; | |
} | |
if (isMobile) { | |
} | |
if (!isMobile) { | |
} |
OlderNewer