-
Notifications
You must be signed in to change notification settings - Fork 0
/
html_helper.html
117 lines (107 loc) · 3.93 KB
/
html_helper.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Menukaarten-docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="assets/css/stylesheet.css" media="screen,print">
<link rel="stylesheet" href="assets/css/print.css" media="print">
<link rel="stylesheet" type="text/css" href="assets/css/shCore.css" media="screen,print">
<link rel="stylesheet" type="text/css" href="assets/css/shThemeDefault.css" media="screen,print">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/SyntaxHighlighter.js"></script>
<script type="text/javascript" src="assets/js/build_menu.js"></script>
</head>
<body>
<div id="header-wrapper">
<div id="header">
<h1>Documentation SexyFramework</h1>
<span>Created by Vincent Bremer & Douwe de Haan</span>
</div>
</div>
<div id="container">
<div id="menu-wrapper">
<div id="menu">
<h1>Table of contents</h1>
<ul></ul>
</div>
</div>
<div id="content-wrapper">
<div id="content">
<!-- START CONTENT -->
<h1>HTML helper</h1>
<h2>Anchor</h2>
<p>To create a anchor (link), you can use the following function. This function will automatically add the attribute target="_blank" when the link contains http:// of https://. So links on your own website can me relative from the base path.</p>
Syntax:<br>
<pre class="brush: php">
html::a($link, $name, $attributes);
</pre>
<span class="bold">Parameters:</span>
<ul class="list">
<li>$link <span class="small">string</span> <span class="small red">required</span></li>
<li>$name <span class="small">string optional</span></li>
<li>$attributes <span class="small">array optional</span></li>
</ul>
Example:
<pre class="brush: php">
echo html::a('users/new', 'New user'));
// Returns:
<a href="http://example.com/users/new">New user</a>
echo html::a('http://www.google.com', 'Google'));
// Returns:
<a href="http://www.google.com" target="_blank">Google</a>
</pre>
<h2>Image</h2>
<p>To include an image use this function. It will automatically find out it's dimensions and add it as attributes. When no $name has been given the alt attribute will contain the image URL.</p>
<pre class="brush: php">
html::image($link, $name, $attributes);
</pre>
<span class="bold">Parameters:</span>
<ul class="list">
<li>$link <span class="small">string</span> <span class="small red">required</span></li>
<li>$attributes <span class="small">array optional</span></li>
</ul>
Example:
<pre class="brush: php">
echo html::image('assets/img/car.jpeg', 'My car');
// Returns:
<img src="http://example.com/assets/img/car.jpeg" height="504" width="290" name="My car" alt="My car">
</pre>
<h2>Stylesheet</h2>
<p>Create a link to the stylesheet.</p>
<pre class="brush: php">
html::stylesheet($link, $attributes);
</pre>
<span class="bold">Parameters:</span>
<ul class="list">
<li>$link <span class="small">string</span> <span class="small red">required</span></li>
<li>$attributes <span class="small">array optional</span></li>
</ul>
Example:
<pre class="brush: php">
echo html::stylesheet('assets/css/dashboard.css'));
// Returns:
<link href="http://example.com/assets/css/stylesheet.css" rel="stylesheet" type="text/css" />
</pre>
<h2>Javascript</h2>
<p>Create a link to the Javascript file.</p>
<pre class="brush: php">
html::javascript($link, $attributes);
</pre>
<span class="bold">Parameters:</span>
<ul class="list">
<li>$link <span class="small">string</span> <span class="small red">required</span></li>
<li>$attributes <span class="small">array optional</span></li>
</ul>
Example:
<pre class="brush: php">
echo html::javascript('assets/js/jquery.js'));
// Returns:
<script type="text/javascript" src="http://example.com/assets/js/jquery.js"><script>
</pre>
<!-- END CONTENT -->
</div>
</div>
</div>
<script type="text/javascript" src="assets/js/SyntaxHighlighter_settings.js"></script>
</body>
</html>