Skip to content

Commit 37ea9d3

Browse files
avivaceISSOtm
andauthored
Add danger box and switch to it where necessary (#369)
* Add danger box * Use danger box for turning off LCD caution message * Style danger boxes in dark themes * Switch to danger boxes where needed Co-authored-by: ISSOtm <[email protected]>
1 parent e6e0918 commit 37ea9d3

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

DEPLOY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Those mimick Vuepress' [custom containers](https://vuepress.vuejs.org/guide/mark
6060

6161
These are rendered as "info boxes".
6262

63-
- `type` must be `tip`, or `warning`.
63+
- `type` must be `tip`, `warning`, or `danger`.
6464
- `HEADING` can contain spaces and will be the title of the box. It should be `Warning`, `Tip`, or something illustrative of what the box contains.
6565
- Both `:::` lines **must** be surrounded by empty lines, otherwise they won't be processed.
6666

custom/style.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ code {
9393
color: var(--c-warning-title);
9494
}
9595

96+
.box.danger {
97+
border-left-color: var(--c-danger);
98+
background-color: rgba(255, 0, 0, .15);
99+
color: var(--c-danger-text);
100+
}
101+
102+
.box.danger > .box-title {
103+
color: var(--c-danger-title);
104+
}
105+
96106
.spacer {
97107
width: 100%;
98108
height: 3px;
@@ -109,16 +119,24 @@ code {
109119
--c-warning: #e7c000;
110120
--c-warning-bg: #fffae3;
111121
--c-warning-title: #ad9000;
122+
/* Danger boxes base styling */
123+
--c-danger: #cc0000;
124+
--c-danger-text: #660000;
125+
--c-danger-title: #990000;
112126
}
113127

114128
/* Theme-wide CSS variables */
115129

116130
.ayu {
117131
--c-warning-text: #eac100;
132+
--c-danger-text: #ff2929;
133+
--c-danger-title: #dc0000;
118134
}
119135

120136
.coal {
121137
--c-warning-text: #eac100;
138+
--c-danger-text: #ff2929;
139+
--c-danger-title: #dc0000;
122140
}
123141

124142
.light {
@@ -127,6 +145,8 @@ code {
127145

128146
.navy {
129147
--c-warning-text: #eac100;
148+
--c-danger-text: #ff2929;
149+
--c-danger-title: #dc0000;
130150
}
131151

132152
.rust {

renderer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ fn render(path: &mut PathBuf, name: &str, index: usize) -> Result<()> {
180180
}
181181
in_box = true;
182182

183-
let box_type = if ["tip", "warning"].contains(&box_type) {
183+
let box_type = if ["tip", "warning", "danger"].contains(&box_type) {
184184
box_type
185185
} else {
186186
let mut stderr = StandardStream::stderr(ColorChoice::Auto);

src/LCDC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This bit controls whether the LCD is on and the PPU is active. Setting
2222
it to 0 turns both off, which grants immediate and full access to VRAM,
2323
OAM, etc.
2424

25-
::: warning
25+
::: danger CAUTION
2626

2727
Stopping LCD operation (Bit 7 from 1 to 0) may be performed
2828
during VBlank ONLY, disabling the display outside

src/Power_Up_Sequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ While it may make sense for the boot ROM to at least partially verify the ROM's
160160

161161
### Legal implications
162162

163-
::: warning Caution
163+
::: danger Caution
164164

165165
The following is advisory, but **is not legal advice**.
166166
If necessary (e.g. commercial releases with logos on the boxes), consult a lawyer.

0 commit comments

Comments
 (0)