Skip to content

Commit 23c3cd2

Browse files
committed
Enhance documentation layout and styling; add CSS for wider content
1 parent be64094 commit 23c3cd2

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { h } from 'vue'
22
import type { Theme } from 'vitepress'
33
import DefaultTheme from 'vitepress/theme'
44
import BlogSponsor from './BlogSponsor.vue'
5+
import './style.css'
56

67
export default {
78
extends: DefaultTheme,

.vitepress/theme/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* Wider content for all pages and blog styling */
2+
3+
.VPDoc .container {
4+
max-width: 1200px !important;
5+
}
6+
7+
.VPDoc .content {
8+
max-width: 900px !important;
9+
}
10+
11+
.VPDoc.has-aside .content-container {
12+
max-width: 1300px !important;
13+
}
14+
15+
/* Horizontal rule spacing */
16+
.VPDoc.has-aside .content-container hr {
17+
margin: 2.5rem 0 !important;
18+
}
19+
20+
/* Paragraph spacing */
21+
.VPDoc.has-aside .content-container p {
22+
/*margin: 1.25rem 0 !important;*/
23+
}

blog/assert-and-expect.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ But now we face a tricky question with lots of room for imagination: **how do we
4848

4949
Sure, we could eventually create a hundred functions, a trait, and a base class with PHPUnit-like syntax... But hey, let's try to find something better first!
5050

51+
5152
## Shorter and clearer
5253

5354
I decided to start like the [webmozarts/assert](https://github.com/webmozarts/assert) library: since we no longer need to write `self::` or `$this->`, let's keep it simple: `Assert::same()`. I chose the familiar PHPUnit parameter order: **$expected** first, then **$actual** (webmozart puts the value being checked first, then the expected value, which actually **looks more logical**).
@@ -101,7 +102,6 @@ Cons:
101102

102103
![Meme](/blog/assert-and-expect/img-3.jpg)
103104

104-
---
105105

106106
## Trying something new
107107

@@ -175,8 +175,6 @@ I won't be surprised if in the future we decide that **$expected** should come a
175175

176176
---
177177

178-
[Join](https://t.me/spiralphp/10863) the discussion or development, propose your wildest ideas or features. It's interesting.
179-
180178
Special thanks to:
181179

182180
- [@petrdobr](https://github.com/petrdobr) for help with assertion implementation.

ru/blog/assert-and-expect.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ Assert::true($foo > 42);
101101

102102
![Мем](/blog/assert-and-expect/img-3.jpg)
103103

104-
---
105104

106105
## Пробуем что-то новое
107106

@@ -126,8 +125,10 @@ Expect::exception(Failure::class)
126125

127126
![Пайповые ассерты](/blog/assert-and-expect/img-4.jpg)
128127

128+
129129
---
130130

131+
131132
Вот мы сделали несколько таких пайповых ассертов.
132133

133134
```php

0 commit comments

Comments
 (0)