r98213 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98212‎ | r98213 | r98214 >
Date:08:51, 27 September 2011
Author:inez
Status:deferred
Tags:
Comment:
Support and add to demo all heading levels (1-6) with very simple styling
Modified paths:
  • /trunk/parsers/wikidom/demos/synth/es.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/es.Surface.css (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/es.Surface.css
@@ -33,8 +33,43 @@
3434 margin-top: 0;
3535 position: relative;
3636 min-height: 1.5em;
 37+ font-size: 1em;
3738 }
3839
 40+h1.editSurface-headingBlock, h2.editSurface-headingBlock {
 41+ border-bottom: 1px solid #AAA;
 42+}
 43+
 44+h1.editSurface-headingBlock > * {
 45+ font-size:188%;
 46+ font-weight: normal;
 47+}
 48+
 49+h2.editSurface-headingBlock > * {
 50+ font-size:150%;
 51+ font-weight: normal;
 52+}
 53+
 54+h3.editSurface-headingBlock > * {
 55+ font-size:132%;
 56+ font-weight: bold;
 57+}
 58+
 59+h4.editSurface-headingBlock > * {
 60+ font-size:116%;
 61+ font-weight: bold;
 62+}
 63+
 64+h5.editSurface-headingBlock > * {
 65+ font-size:100%;
 66+ font-weight: bold;
 67+}
 68+
 69+h6.editSurface-headingBlock > * {
 70+ font-size:80%;
 71+ font-weight: bold;
 72+}
 73+
3974 .editSurface-listItem {
4075 position: relative;
4176 padding: 0 0 0 1em;
Index: trunk/parsers/wikidom/demos/synth/es.js
@@ -2,9 +2,26 @@
33 var doc = es.DocumentModel.newFromPlainObject( { 'blocks': [
44 {
55 'type': 'heading',
 6+ 'level': 1,
 7+ 'content': {
 8+ 'text': 'This is a heading (level 1)',
 9+ 'annotations': [
 10+ {
 11+ 'type': 'italic',
 12+ 'range': {
 13+ 'start': 10,
 14+ 'end': 17
 15+ }
 16+ }
 17+ ]
 18+
 19+ }
 20+ },
 21+ {
 22+ 'type': 'heading',
623 'level': 2,
724 'content': {
8 - 'text': 'This is a heading',
 25+ 'text': 'This is a heading (level 2)',
926 'annotations': [
1027 {
1128 'type': 'italic',
@@ -14,9 +31,78 @@
1532 }
1633 }
1734 ]
 35+
1836 }
1937 },
2038 {
 39+ 'type': 'heading',
 40+ 'level': 3,
 41+ 'content': {
 42+ 'text': 'This is a heading (level 3)',
 43+ 'annotations': [
 44+ {
 45+ 'type': 'italic',
 46+ 'range': {
 47+ 'start': 10,
 48+ 'end': 17
 49+ }
 50+ }
 51+ ]
 52+
 53+ }
 54+ },
 55+ {
 56+ 'type': 'heading',
 57+ 'level': 4,
 58+ 'content': {
 59+ 'text': 'This is a heading (level 4)',
 60+ 'annotations': [
 61+ {
 62+ 'type': 'italic',
 63+ 'range': {
 64+ 'start': 10,
 65+ 'end': 17
 66+ }
 67+ }
 68+ ]
 69+
 70+ }
 71+ },
 72+ {
 73+ 'type': 'heading',
 74+ 'level': 5,
 75+ 'content': {
 76+ 'text': 'This is a heading (level 5)',
 77+ 'annotations': [
 78+ {
 79+ 'type': 'italic',
 80+ 'range': {
 81+ 'start': 10,
 82+ 'end': 17
 83+ }
 84+ }
 85+ ]
 86+
 87+ }
 88+ },
 89+ {
 90+ 'type': 'heading',
 91+ 'level': 6,
 92+ 'content': {
 93+ 'text': 'This is a heading (level 6)',
 94+ 'annotations': [
 95+ {
 96+ 'type': 'italic',
 97+ 'range': {
 98+ 'start': 10,
 99+ 'end': 17
 100+ }
 101+ }
 102+ ]
 103+
 104+ }
 105+ },
 106+ {
21107 'type': 'paragraph',
22108 'content': {
23109 'text': 'In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling.\nWord wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line.',

Status & tagging log