aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAlexey Pyltsyn <lex61rus@gmail.com>2021-10-27 13:49:02 +0300
committerGitHub <noreply@github.com>2021-10-27 13:49:02 +0300
commita68152ef9cd653f92705683592d4652b617ab02c (patch)
tree7c146e854366c2f99c945c139e357279a03170b5 /files
parentd994a7ce54ab29f67b13e49f5eca0930b0803b56 (diff)
downloadtranslated-content-a68152ef9cd653f92705683592d4652b617ab02c.tar.gz
translated-content-a68152ef9cd653f92705683592d4652b617ab02c.tar.bz2
translated-content-a68152ef9cd653f92705683592d4652b617ab02c.zip
[RU] Fix another live samples (#2879)
Diffstat (limited to 'files')
-rw-r--r--files/ru/web/api/canvas_api/tutorial/basic_usage/index.html4
-rw-r--r--files/ru/web/api/canvasrenderingcontext2d/currenttransform/index.html6
-rw-r--r--files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html6
-rw-r--r--files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html12
-rw-r--r--files/ru/web/api/css_object_model/managing_screen_orientation/index.html4
-rw-r--r--files/ru/web/javascript/reference/global_objects/array/some/index.html8
-rw-r--r--files/ru/web/svg/attribute/text-anchor/index.html2
-rw-r--r--files/ru/web/svg/element/ellipse/index.html6
8 files changed, 24 insertions, 24 deletions
diff --git a/files/ru/web/api/canvas_api/tutorial/basic_usage/index.html b/files/ru/web/api/canvas_api/tutorial/basic_usage/index.html
index 89d79cedf3..866af040db 100644
--- a/files/ru/web/api/canvas_api/tutorial/basic_usage/index.html
+++ b/files/ru/web/api/canvas_api/tutorial/basic_usage/index.html
@@ -87,7 +87,7 @@ if (canvas.getContext){
<p><strong>Примечание:</strong> вставка скрипта внутрь HTML не является хорошей практикой. Мы делаем это здесь, чтобы сделать пример короче.</p>
</div>
-<pre><code>&lt;!DOCTYPE html&gt;</code>
+<pre class="brush: html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Canvas tutorial&lt;/title&gt;
@@ -119,7 +119,7 @@ if (canvas.getContext){
<p>Для начала, давайте посмотрим на простой пример, который рисует два пересекающихся прямоугольника, один из которых имеет прозрачность alpha. Мы изучим, как это работает более детально в последующих примерах.</p>
-<pre><code>&lt;!DOCTYPE html&gt;</code>
+<pre class="brush: html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type="application/javascript"&gt;
diff --git a/files/ru/web/api/canvasrenderingcontext2d/currenttransform/index.html b/files/ru/web/api/canvasrenderingcontext2d/currenttransform/index.html
index f103140929..18774474af 100644
--- a/files/ru/web/api/canvasrenderingcontext2d/currenttransform/index.html
+++ b/files/ru/web/api/canvasrenderingcontext2d/currenttransform/index.html
@@ -31,11 +31,11 @@ translation_of: Web/API/CanvasRenderingContext2D/currentTransform
<h4 id="HTML">HTML</h4>
-<pre><code>&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</code></pre>
+<pre class="brush: html">&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</pre>
<h4 id="JavaScript">JavaScript</h4>
-<pre><code>const canvas = document.getElementById('canvas');
+<pre class="brush: html">const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let matrix = ctx.currentTransform;
@@ -46,7 +46,7 @@ matrix.d = 1;
matrix.e = 0;
matrix.f = 0;
ctx.currentTransform = matrix;
-ctx.fillRect(0, 0, 100, 100);</code></pre>
+ctx.fillRect(0, 0, 100, 100);</pre>
<h4 id="Результат">Результат</h4>
diff --git a/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html b/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
index 08fffcc737..963d67e340 100644
--- a/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
+++ b/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
@@ -52,19 +52,19 @@ translation_of: Web/API/CanvasRenderingContext2D/getImageData
<h4 id="HTML">HTML</h4>
-<pre><code>&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</code></pre>
+<pre class="brush: html">&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</pre>
<h4 id="JavaScript">JavaScript</h4>
<p>The object retrieved by <code>getImageData()</code> has a width of 200 and a height of 100, for a total of 20,000 pixels. Of those pixels, most are either transparent or taken from off the canvas; only 5,000 of them are opaque black (the color of the drawn rectangle).</p>
-<pre><code>const canvas = document.getElementById('canvas');
+<pre class="brush: html">const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.rect(10, 10, 100, 100);
ctx.fill();
let imageData = ctx.getImageData(60, 60, 200, 100);
-ctx.putImageData(imageData, 150, 10);</code></pre>
+ctx.putImageData(imageData, 150, 10);</pre>
<h4 id="Result">Result</h4>
diff --git a/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html b/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html
index 12b18c913c..428f7905a1 100644
--- a/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html
+++ b/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html
@@ -46,11 +46,11 @@ translation_of: Web/API/CanvasRenderingContext2D/lineJoin
<h4 id="HTML">HTML</h4>
-<pre><code>&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</code></pre>
+<pre class="brush: html">&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</pre>
<h4 id="JavaScript">JavaScript</h4>
-<pre><code>const canvas = document.getElementById('canvas');
+<pre class="brush: html">const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.lineWidth = 20;
@@ -60,7 +60,7 @@ ctx.moveTo(20, 20);
ctx.lineTo(190, 100);
ctx.lineTo(280, 20);
ctx.lineTo(280, 150);
-ctx.stroke();</code></pre>
+ctx.stroke();</pre>
<h4 id="Result">Result</h4>
@@ -75,10 +75,10 @@ ctx.stroke();</code></pre>
<p> </p>
<div class="hidden">
-<pre><code>&lt;canvas id="canvas" width="150" height="150"&gt;&lt;/canvas&gt;</code></pre>
+<pre class="brush: html">&lt;canvas id="canvas" width="150" height="150"&gt;&lt;/canvas&gt;</pre>
</div>
-<pre><code>var ctx = document.getElementById('canvas').getContext('2d');
+<pre class="brush: html">var ctx = document.getElementById('canvas').getContext('2d');
var lineJoin = ['round', 'bevel', 'miter'];
ctx.lineWidth = 10;
@@ -91,7 +91,7 @@ for (let i = 0; i &lt; lineJoin.length; i++) {
ctx.lineTo(115, 45 + i * 40);
ctx.lineTo(155, 5 + i * 40);
ctx.stroke();
-}</code></pre>
+}</pre>
<p>{{EmbedLiveSample("Разница_между_значениями_lineJoin", "180", "180", "https://mdn.mozillademos.org/files/237/Canvas_linejoin.png")}}</p>
diff --git a/files/ru/web/api/css_object_model/managing_screen_orientation/index.html b/files/ru/web/api/css_object_model/managing_screen_orientation/index.html
index 673a22eafa..bc2be9accf 100644
--- a/files/ru/web/api/css_object_model/managing_screen_orientation/index.html
+++ b/files/ru/web/api/css_object_model/managing_screen_orientation/index.html
@@ -118,10 +118,10 @@ li {
<tbody>
<tr>
<td>
- <div style="max-width: 220px;">{{ EmbedLiveSample('Adjusting_layout_based_on_the_orientation', 180, 350) }}</div>
+ <div style="max-width: 220px;">{{ EmbedLiveSample('Настройка_раскладки_содержимого_по_ориентации_экрана', 180, 350) }}</div>
</td>
<td>
- <div style="max-width: 390px;">{{ EmbedLiveSample('Adjusting_layout_based_on_the_orientation', 350, 180) }}</div>
+ <div style="max-width: 390px;">{{ EmbedLiveSample('Настройка_раскладки_содержимого_по_ориентации_экрана', 350, 180) }}</div>
</td>
</tr>
</tbody>
diff --git a/files/ru/web/javascript/reference/global_objects/array/some/index.html b/files/ru/web/javascript/reference/global_objects/array/some/index.html
index b415e0e522..74c871f12b 100644
--- a/files/ru/web/javascript/reference/global_objects/array/some/index.html
+++ b/files/ru/web/javascript/reference/global_objects/array/some/index.html
@@ -106,20 +106,20 @@ checkAvailability(fruits, 'banana'); // true</pre>
<h3 id="Проверка_наличия_элемента_в_массиве_с_использованием_стрелочной_функции">Проверка наличия элемента в массиве с использованием стрелочной функции</h3>
-<pre><code>const fruits = ['apple', 'banana', 'mango', 'guava'];
+<pre class="brush: js">const fruits = ['apple', 'banana', 'mango', 'guava'];
function checkAvailability(arr, val) {
return arr.some(arrVal =&gt; val === arrVal);
}
checkAvailability(fruits, 'kela'); // false
-checkAvailability(fruits, 'banana'); // true</code></pre>
+checkAvailability(fruits, 'banana'); // true</pre>
<p>{{ EmbedLiveSample('Проверка_наличия_элемента_в_массиве_с_использованием_стрелочной_функции', '', '', '', 'Experiment:StaticExamplesOnTop/JavaScript/Array/some') }}</p>
<h3 id="Приведение_значения_к_логическому_типу">Приведение значения к логическому типу</h3>
-<pre><code>const TRUTHY_VALUES = [true, 'true', 1];
+<pre class="brush: js">const TRUTHY_VALUES = [true, 'true', 1];
function getBoolean(value) {
'use strict';
@@ -136,7 +136,7 @@ function getBoolean(value) {
getBoolean(false); // false
getBoolean('false'); // false
getBoolean(1); // true
-getBoolean('true'); // true</code></pre>
+getBoolean('true'); // true</pre>
<p>{{ EmbedLiveSample('Приведение_значения_к_логическому_типу', '', '', '', 'Web/JavaScript/Reference/Global_Objects/Array/some') }}</p>
diff --git a/files/ru/web/svg/attribute/text-anchor/index.html b/files/ru/web/svg/attribute/text-anchor/index.html
index 6d79404ea2..75c6ebc428 100644
--- a/files/ru/web/svg/attribute/text-anchor/index.html
+++ b/files/ru/web/svg/attribute/text-anchor/index.html
@@ -56,7 +56,7 @@ translation_of: Web/SVG/Attribute/text-anchor
<h2 id="Пример">Пример</h2>
-<pre>&lt;html&gt;
+<pre class="brush: html">&lt;html&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;текст в якорях&lt;/title&gt;
diff --git a/files/ru/web/svg/element/ellipse/index.html b/files/ru/web/svg/element/ellipse/index.html
index f46f687516..d19379be5b 100644
--- a/files/ru/web/svg/element/ellipse/index.html
+++ b/files/ru/web/svg/element/ellipse/index.html
@@ -17,12 +17,12 @@ original_slug: Web/SVG/Элемент/ellipse
<div id="LiveSample">
<div class="hidden">
-<pre><code>html,body,svg { height:100% }</code></pre>
+<pre class="brush: css">html,body,svg { height:100% }</pre>
</div>
-<pre><code>&lt;svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"&gt;
+<pre class="brush: html">&lt;svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"&gt;
&lt;ellipse cx="100" cy="50" rx="100" ry="50" /&gt;
-&lt;/svg&gt;</code></pre>
+&lt;/svg&gt;</pre>
<p>{{EmbedLiveSample('LiveSample', 100, '100%')}}</p>
</div>