-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout.page
149 lines (118 loc) · 2.97 KB
/
about.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
title: Normal
description: Port of the default layout from Mecha version `1.x.x`.
image: /lot/y/normal/index.png
images:
- /lot/y/normal/index.png
- /lot/y/normal/index/1.png
author: Taufik Nurrohman
type: Markdown
version: 2.13.0
...
This is the default layout used by Mecha version `1.x.x`.
### Features
- Automatic menu navigation
- Automatic set the home page view to `/article`
- Comments (requires `comment` extension)
- Page views counter (requires `view` extension)
- Manual post excerpt (requires `excerpt` extension)
- Widgets:
- Tags (requires `tag` extension)
- Random Posts
- Recent Posts
- Related Posts
- Recent Comments (requires `comment` extension)
- List (custom)
### Widgets
To create a custom widget, open `aside.php` file then add this code just before the `</aside>` tag:
~~~ .php
<?= self::widget([
'id' => 'foo-bar', // Optional
'title' => 'Your Custom Widget Title', // Optional
'content' => '<p>Your custom widget content.</p>'
]); ?>
~~~
Example widget as advertisement container:
~~~ .php
<?php
$content = <<<HTML
// Paste your ads code here!
HTML;
echo self::widget([
'title' => 'Advertisement',
'content' => $content
]);
?>
~~~
Example widget list:
~~~ .php
<?= self::widget('list', [
'title' => 'My List',
'list' => [
'List Item 1',
'List Item 2',
'List Item 3'
]
]); ?>
~~~
Example widget list as link list:
~~~ .php
<?= self::widget('list', [
'title' => 'My List',
'list' => [
'<a href="http://example.com/link-1">Link 1</a>',
'<a href="http://example.com/link-2">Link 2</a>',
'<a href="http://example.com/link-3">Link 3</a>'
]
]); ?>
~~~
### Grid System
~~~ .html
<div class="grids">
<div class="grid span-6">6/6 Column</div>
</div>
<div class="grids">
<div class="grid span-3">2/6 Column</div>
<div class="grid span-3">2/6 Column</div>
</div>
<div class="grids">
<div class="grid span-2">3/6 Column</div>
<div class="grid span-2">3/6 Column</div>
<div class="grid span-2">3/6 Column</div>
</div>
<div class="grids">
<div class="grid span-1">1/6 Column</div>
<div class="grid span-1">1/6 Column</div>
<div class="grid span-1">1/6 Column</div>
<div class="grid span-1">1/6 Column</div>
<div class="grid span-1">1/6 Column</div>
<div class="grid span-1">1/6 Column</div>
</div>
<div class="grids">
<div class="grid span-1">1/6 Column</div>
<div class="grid span-5">5/6 Column</div>
</div>
<div class="grids">
<div class="grid span-2">2/6 Column</div>
<div class="grid span-4">4/6 Column</div>
</div>
~~~
### Embeds
Embedding a video:
~~~ .html
<div class="video">
<!-- Video embed code goes here… -->
</div>
~~~
Embedding an audio:
~~~ .html
<div class="audio">
<!-- Audio embed code goes here… -->
</div>
~~~
### Image Alignments
~~~ .html
<img alt="" class="align-right" src="/path/to/image.jpg">
<img alt="" class="align-center" src="/path/to/image.jpg">
<img alt="" class="align-left" src="/path/to/image.jpg">
~~~