diff --git a/.idea/php.xml b/.idea/php.xml index 31b8a3a..99ff18f 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,5 +1,15 @@ + + + + + + + + + + diff --git a/index.php b/index.php index b0b412c..0277110 100755 --- a/index.php +++ b/index.php @@ -13,6 +13,7 @@

Всем привет! Добро пожаловать на мой первый сайт.

diff --git a/lessons/classes/StringLib.php b/lessons/classes/StringLib.php new file mode 100644 index 0000000..d7deef3 --- /dev/null +++ b/lessons/classes/StringLib.php @@ -0,0 +1,19 @@ + 'blue-text' ]; - public static function renderTable(bool $styled = false): string { + public static function renderTable(bool $styled = false): string + { $cells = ''; for ($leftOperand = self::$minOperand; $leftOperand <= self::$maxOperand; $leftOperand++) { @@ -24,7 +27,8 @@ public static function renderTable(bool $styled = false): string { return $cells; } - private static function getCell(int $leftOperand, bool $styled): string { + private static function getCell(int $leftOperand, bool $styled): string + { $content = ''; for ($rightOperand = self::$minOperand; $rightOperand <= self::$maxOperand; $rightOperand++) { @@ -33,13 +37,14 @@ private static function getCell(int $leftOperand, bool $styled): string { $result = $leftOperand * $rightOperand; $resultStyled = $styled ? self::getNumbersStyled($result) : $result; - $string = $leftOperandStyled ." x ". $rightOperandStyled ." = ". $resultStyled; + $string = $leftOperandStyled . " x " . $rightOperandStyled . " = " . $resultStyled; $content .= self::addBr($string); } return $content; } - private static function addNewRowInTable(int $currentCell, string $content) : string { + private static function addNewRowInTable(int $currentCell, string $content): string + { return $currentCell == 5 ? $content . '' : $content; } @@ -53,13 +58,15 @@ private static function addTd(string $text): string return '' . $text . ''; } - private static function changeColor(int $number): string { + private static function changeColor(int $number): string + { $class = isset(self::$colors[$number]) ? self::$colors[$number] : 'default-color'; return '' . $number . ''; } - private static function getNumbersStyled(int $number): string { + private static function getNumbersStyled(int $number): string + { $numbersStyled = ''; $stringWithNumbers = strval($number); diff --git a/lessons/handler.php b/lessons/handler.php new file mode 100644 index 0000000..c6c31fb --- /dev/null +++ b/lessons/handler.php @@ -0,0 +1,30 @@ + + + + Beginner level + + + + +

+ +

+Назад + + \ No newline at end of file diff --git a/lessons/lesson1.php b/lessons/lesson1.php index a415c2b..5d9edad 100644 --- a/lessons/lesson1.php +++ b/lessons/lesson1.php @@ -1,7 +1,3 @@ - @@ -12,7 +8,14 @@ - +
diff --git a/lessons/lesson2.php b/lessons/lesson2.php index 96cc316..95bce26 100644 --- a/lessons/lesson2.php +++ b/lessons/lesson2.php @@ -1,7 +1,3 @@ - @@ -12,7 +8,14 @@ - +
diff --git a/lessons/lesson3.php b/lessons/lesson3.php new file mode 100644 index 0000000..5e3fd76 --- /dev/null +++ b/lessons/lesson3.php @@ -0,0 +1,21 @@ + + + + Beginner level + + + + +
+ Введите текст:
+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/style.css b/style.css index e8a7eda..f8e3830 100644 --- a/style.css +++ b/style.css @@ -46,4 +46,8 @@ table { .yellow-text { color: yellow; +} + +.input-field { + margin: 10px 0 10px 0; } \ No newline at end of file