This repository has been archived by the owner on Apr 25, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automating the generation of buttons
- Loading branch information
Dave Redfern
committed
Mar 13, 2017
1 parent
a6056dc
commit 418cb7e
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<a href="#" class="btn btn--ghost">Ghost Button</a> | ||
<button type="button" class="btn btn--ghost">Ghost Button</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
$minus = array( | ||
'btn', | ||
'btn--text', | ||
'btn--block', | ||
'btn--sm', | ||
'btn--lg', | ||
'btn--ghost', | ||
'btn--disabled' | ||
); | ||
$classes = Helper::parseCss('btn--'); | ||
$classes = array_diff($classes, $minus); | ||
|
||
?> | ||
<?php foreach($classes as $class) : ?> | ||
<p><a href="#" class="btn <?php echo $class; ?>"> <?php echo $class; ?> Button</a> | ||
<button type="button" class="btn <?php echo $class; ?>"> <?php echo $class; ?> Button</button></p> | ||
<p><a href="#" class="btn btn--ghost <?php echo $class; ?>"> <?php echo $class; ?> Ghost Button</a> | ||
<button type="button" class="btn btn--ghost <?php echo $class; ?>"> <?php echo $class; ?> Ghost Button</button></p> | ||
<?php endforeach; ?> |
This file was deleted.
Oops, something went wrong.