-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_framework-elements.php
More file actions
34 lines (29 loc) · 1.17 KB
/
_framework-elements.php
File metadata and controls
34 lines (29 loc) · 1.17 KB
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
<!DOCTYPE html><html lang="en-gb">
<?php
$page_title = "Basic Form Elements";
$page_desc = "Common elements for forms";
@include('_includes/header-include.html');
$files = array();
$patterns_dir = "_framework-elements";
$handle = opendir($patterns_dir);
while (false !== ($file = readdir($handle))):
if(stristr($file,'.html')):
$files[] = $file;
endif;
endwhile;
sort($files);
foreach ($files as $file):
echo '<section class="pattern">';
echo '<h2 style="color:gray;">'.ucwords(str_replace(['-','.'],[' ',' - '], str_replace('.html', '', $file))).'</h2>';
include($patterns_dir.'/'.$file);
echo '<details class="primer">';
echo '<summary title="Show markup and usage">•••</summary>';
echo '<section>';
echo '<textarea rows="10" cols="30" class="input code">'.htmlspecialchars(file_get_contents($patterns_dir.'/'.$file)).'</textarea>';
echo '<p class="caption"><strong>Usage:</strong> '.htmlspecialchars(@file_get_contents($patterns_dir.'/'.str_replace('.html','.txt',$file))).'</p>';
echo '</section>';
echo '</details><!--/.primer-->';
echo '</section><!--/.pattern-->';
endforeach;
@include("_includes/footer-include.html");
?>