1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace kalanis\kw_clipr\Output; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
class Web extends AOutput |
7
|
|
|
{ |
8
|
|
|
protected string $closeSequence = '</span>'; |
9
|
|
|
protected string $eolSequence = "<br/>\r\n"; |
10
|
|
|
|
11
|
2 |
|
protected function setTags(): void |
12
|
|
|
{ |
13
|
2 |
|
parent::setTags(); |
14
|
|
|
# format style |
15
|
2 |
|
$this->addTranslation('bold', '<span style="font-weight: bolder">'); |
16
|
2 |
|
$this->addTranslation('under', '<span style="text-decoration: underline">'); |
17
|
|
|
|
18
|
|
|
# default ones |
19
|
|
|
# foreground colors |
20
|
2 |
|
$this->addTranslation('black', '<span style="color: #000000">'); |
21
|
2 |
|
$this->addTranslation('red', '<span style="color: #ff0000">'); |
22
|
2 |
|
$this->addTranslation('green', '<span style="color: #008000">'); |
23
|
2 |
|
$this->addTranslation('brown', '<span style="color: #a52a2a">'); |
24
|
2 |
|
$this->addTranslation('blue', '<span style="color: #0000ff">'); |
25
|
2 |
|
$this->addTranslation('purple', '<span style="color: #800080">'); |
26
|
2 |
|
$this->addTranslation('cyan', '<span style="color: #00ffff">'); |
27
|
2 |
|
$this->addTranslation('gray', '<span style="color: #c0c0c0">'); |
28
|
|
|
|
29
|
|
|
# background colors |
30
|
2 |
|
$this->addTranslation('blackbg', '<span style="background-color: #000000">'); |
31
|
2 |
|
$this->addTranslation('redbg', '<span style="background-color: #ff0000">'); |
32
|
2 |
|
$this->addTranslation('greenbg', '<span style="background-color: #008000">'); |
33
|
2 |
|
$this->addTranslation('brownbg', '<span style="background-color: #a52a2a">'); |
34
|
2 |
|
$this->addTranslation('bluebg', '<span style="background-color: #0000ff">'); |
35
|
2 |
|
$this->addTranslation('purplebg', '<span style="background-color: #800080">'); |
36
|
2 |
|
$this->addTranslation('cyanbg', '<span style="background-color: #00ffff">'); |
37
|
2 |
|
$this->addTranslation('graybg', '<span style="background-color: #c0c0c0">'); |
38
|
|
|
|
39
|
|
|
# stronger ones |
40
|
|
|
# foreground colors |
41
|
2 |
|
$this->addTranslation('dgray', '<span style="color: #808080">'); |
42
|
2 |
|
$this->addTranslation('lred', '<span style="color: #ff694d">'); |
43
|
2 |
|
$this->addTranslation('lgreen', '<span style="color: #90ee90">'); |
44
|
2 |
|
$this->addTranslation('yellow', '<span style="color: #ffff00">'); |
45
|
2 |
|
$this->addTranslation('lblue', '<span style="color: #728fce">'); |
46
|
2 |
|
$this->addTranslation('magenta', '<span style="color: #ff4edf">'); |
47
|
2 |
|
$this->addTranslation('lcyan', '<span style="color: #e0ffff">'); |
48
|
2 |
|
$this->addTranslation('white', '<span style="color: #ffffff">'); |
49
|
|
|
|
50
|
|
|
# background colors |
51
|
2 |
|
$this->addTranslation('dgraybg', '<span style="background-color: #808080">'); |
52
|
2 |
|
$this->addTranslation('lredbg', '<span style="background-color: #ff694d">'); |
53
|
2 |
|
$this->addTranslation('lgreenbg', '<span style="background-color: #90ee90">'); |
54
|
2 |
|
$this->addTranslation('yellowbg', '<span style="background-color: #ffff00">'); |
55
|
2 |
|
$this->addTranslation('lbluebg', '<span style="background-color: #728fce">'); |
56
|
2 |
|
$this->addTranslation('magentabg', '<span style="background-color: #ff4edf">'); |
57
|
2 |
|
$this->addTranslation('lcyanbg', '<span style="background-color: #e0ffff">'); |
58
|
2 |
|
$this->addTranslation('whitebg', '<span style="background-color: #ffffff">'); |
59
|
2 |
|
} |
60
|
|
|
} |
61
|
|
|
|