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
<h2 class="category-name popular-posts">Popular Posts</h2> | |
<?php | |
$popular_post = new WP_Query( array( 'posts_per_page' => '7', 'paged' => $paged ) ); | |
if ( $popular_post -> have_posts() ) : | |
while ( $popular_post -> have_posts() ) : $popular_post->the_post(); | |
?> | |
<article class="post"> | |
<div class="img-wrapper"><?php the_post_thumbnail(); ?></div> |
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
function makeFactorial(n) { | |
var result = 1; | |
for(var i = 1; i <= n; i++) { | |
result = result * i; | |
} | |
return result; | |
}; |
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
fucntion checkAge(age) { | |
if (age > 18) { | |
return true; | |
else { | |
return confirm('Родители разрешили?'); | |
} | |
} | |
}; | |
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
// TASK 1 | |
function makeArrayXY(x, y) { | |
var resultArray = []; | |
function getRandomNumber() { | |
return Math.round(Math.random()*100); | |
} | |
for(var i = 0; i < x; i++) { | |
resultArray[i] = new Array(); |
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
// learn.javascript.ru *** | |
/* ===== ARRAY =======*/ | |
//TASK 1 | |
// Получить последний элемент массива | |
var goods = ["Яблоко","Апельсин","Груша","Арбуз","Дыня"]; | |
console.log(goods.length); // Узнаем длину массива | |
console.log(goods); // Выводим весь массив |
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
//Task 1 | |
function calcArif(arr) { | |
var sum; | |
sum = arr.reduce(function(sum, cur) { | |
return sum + cur; | |
}); | |
return sum/arr.length; |
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
<html> | |
<head> | |
<title>Title</title> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body > | |
<h1>Form page</h1> |
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
<button id="modal-btn">Open Modal</button> | |
<div id="myModal" class="popup-login"> | |
<form class="popup-login-form"> | |
<span class="close">x</span> | |
<div class="payment-form-row"> | |
<label class="label" for="login">Login</label> | |
<input class="input" id="login" type="text" placeholder="Enter Your Login"> | |
</div> |
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
.bg { | |
color: #ccc; | |
padding: 0 40px; | |
// border-style: solid; | |
// border-width: 15px; | |
border-image-source: url(../images/border-img-2.png); | |
// border-image-slice: 20; | |
// border-image-repeat: fill; | |
border-image-slice: 13 11 13 13 fill; border-image-width: 13px 13px 13px 13px; border-image-outset: 13px 13px 13px 13px; border-image-repeat: repeat repeat; |
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
// task 8 | |
function manReturnTime(["Юг,", "Север", "Восток", "Запад"], 90) { | |
var timeForStep = 10; | |
if (path.length * timeForStep > time) { | |
return false; | |
} | |
var sonthCount = 0, //создаем счетчики, которые будут считать сколько перемещений есть | |
northCount = 0, | |
westCount = 0, |