Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example page have been translated #641

Merged
merged 9 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion example/assets/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body {
}

.ce-example {
font-size: 15px;
font-size: 16.2px;
}

.ce-example__header {
Expand All @@ -19,6 +19,7 @@ body {
display: flex;
padding: 0 30px;
margin-bottom: 30px;
flex-wrap: wrap;
}

.ce-example__header a {
Expand All @@ -34,13 +35,31 @@ body {
margin-left: auto;
}

@media all and (max-width: 730px){
.ce-example__header-menu {
margin-left: 0;
margin-top: 10px;
flex-basis: 100%;
font-size: 14px;
}
}

.ce-example__header-menu a {
margin-left: 20px;
}

@media all and (max-width: 730px){
.ce-example__header-menu a {
margin-left: 0;
margin-right: 15px;
}
}

.ce-example__content {
max-width: 1100px;
margin: 0 auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.ce-example__content--small {
Expand Down Expand Up @@ -123,3 +142,19 @@ body {
.sc_bool {
color: rgb(247, 60, 173);
}

.ce-example .ce-block:first-of-type h2.ce-header{
font-size: 50px;
}

.ce-example h2.ce-header{
font-size: 30px;
}

.ce-example h3.ce-header {
font-size: 24px;
}

.ce-example h4.ce-header {
font-size: 18px;
}
39 changes: 24 additions & 15 deletions example/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
<a class="ce-example__header-logo" href="https://ifmo.su/editor">Editor.js 🤩🧦🤨</a>
neSpecc marked this conversation as resolved.
Show resolved Hide resolved

<div class="ce-example__header-menu">
<a href="https://github.com/editor-js/" target="_blank">Plugins</a>
<a href="https://github.com/editor-js" target="_blank">Plugins</a>
<a href="https://editorjs.io/usage" target="_blank">Usage</a>
<a href="https://editorjs.io/configuration" target="_blank">Configuration</a>
<a href="https://editorjs.io/creating-a-block-tool" target="_blank">API</a>
</div>
</div>
<div class="ce-example__content _ce-example__content--small">
Expand All @@ -28,7 +31,7 @@
<pre class="ce-example__output-content" id="output"></pre>

<div class="ce-example__output-footer">
<a href="https://ifmo.su" style="font-weight: bold;">Made by CodeX</a>
<a href="https://codex.so" style="font-weight: bold;">Made by CodeX</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -170,63 +173,69 @@
{
type : 'paragraph',
data : {
text : 'Привет. Перед вами наш обновленный редактор. На этой странице вы можете проверить его в действиипопробуйте отредактировать или дополнить материал. Код страницы содержит пример подключения и простейшей настройки.'
text : 'Hey. Meet the new Editor. On this page you can see it in actiontry to edit this text. Source code of the page contains the example of connection and configuration.'
n0str marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
type: "header",
data: {
text: "О редакторе",
text: "Key features",
level: 3
}
},
{
type : 'list',
data : {
items : [
'Это блочный редактор',
'На выводе отдает чистые данные',
'Имеет гибкие настройки и простой API',
'It is a block-styled editor',
'It returns clean data output in JSON',
'Designed to be extendable and pluggable with the simple API',
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
],
style: 'unordered'
}
},
{
type: "header",
data: {
text: "Что значит «блочный» редактор",
text: "What does it mean «block-styled editor»",
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
level: 3
}
},
{
type : 'paragraph',
data : {
text : 'Блоки — это структурные элементы, из которых состоит статья. Например <code class="inline-code">Параграф</code>, <code class="inline-code">Заголовок</code>, <code class="inline-code">Изображение</code>, <code class="inline-code">Видео</code> — это все Блоки. В Editor.js каждый Блок определяется плагином. Есть много готовых Блоков и простой API для создания новых. Например, вы можете создать Блок для Твиттера, Инстаграма, Опроса, Игры или CTA-кнопки.'
text : 'In other editors the workspace is provided by single contenteditable element in where you can create different HTML markup. Editor.js <mark class=\"cdx-marker\">workspace consists of separate Blocks: paragraphs, headings, images, lists, quotes, etc</mark>. Each of them is an independent contenteditable element (or more complex structure) provided by Plugin and united by Editor\'s Core.'
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
type : 'paragraph',
data : {
text : `There are dozens of <a href="https://github.com/editor-js">ready-to-use Blocks</a> and the <a href="https://editorjs.io/creating-a-block-tool">simple API</a> for creation any Block you need. For example, you can implement Blocks for Tweets, Instagram posts, surveys and polls, CTA-buttons and even games.`
}
},
{
type: "header",
data: {
text: "Что значит «чистые данные»",
text: "What does it means clean data output",
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
level: 3
}
},
{
type : 'paragraph',
data : {
text : 'В отличие от WYSIWYG-редакторов, Editor.js возвращает не сгенерированный HTML-код, включающий и содержание и оформление статьи, а JSON с данными о каждом Блоке. Пример таких данных находится внизу этой страницы.'
text : 'Unlike most WYSIWYG-editors that outputs generated HTML-markup which consists both content data and content appearance, Editor.js outputs JSON object with data of each Block. You can see an example below this text.'
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
type : 'paragraph',
data : {
text : 'Полученные данные можно использовать как угодно: выводить в вебе, рендерить в нативных мобильных приложениях, передавать в Instant Articles или Google AMP, использовать для генерации аудио-версии и тд.'
text : `Given data can be used as you want: render in HTML for <code class="inline-code">Web clients</code>, render natively for <code class="inline-code">mobile apps</code>, create markup for <code class="inline-code">Facebook Instant Articles</code> or <code class="inline-code">Google AMP</code>, generate an <code class="inline-code">audio version</code> and so on.`
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
type : 'paragraph',
data : {
text : 'Помимо этого, данные о Блоках удобно очищать, фильтровать и обрабатывать на бэкенде.'
text : 'In addition to this, clean data is useful to sanitise, validate and process on the backend.'
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
Expand All @@ -236,13 +245,13 @@
{
type : 'paragraph',
data : {
text : 'Мы работали над этим редактором более двух лет. В отладке принимали участие известные медиа-проекты: vc.ru, TJ, DTF — с их помощью удалось найти и исправить много ошибок, стабилизировать ядро. Вместе с этим мы развивали API, который позволяет создавать плагины под любые задачи. Надеемся, вам понравится 😏'
text : 'We have been working on this projects more the three years. There are big media projects that helps us to test and debug Editor, make core more stable. At the same time we improved the API, that should be able to be used for any plugins for any tasks. Hope you enjoy. 😏'
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
type: 'image',
data: {
url: 'https://ifmo.su/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',
url: 'https://codex.so/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',
caption: '',
stretched: false,
withBorder: true,
Expand Down