Initial public commit

This commit is contained in:
2016-08-15 18:21:55 +02:00
commit f9c5f3db5a
86 changed files with 2024 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
return [
'defaults' => [
'text' => 'Learn more',
'label' => false,
'link' => url(),
'modifiers' => [],
'class' => false
]
];
+12
View File
@@ -0,0 +1,12 @@
<?php
if(!is_array($modifiers)) $modifiers = [$modifiers];
$modifiers = array_map(function($modifier) {
return 'button--' . $modifier;
}, $modifiers);
$modifiers = implode(' ', $modifiers);
$classes = 'button' . r($modifiers, ' ' . $modifiers) . r($class, ' ' . $class);
?>
<a href="<?= $link ?>" class="<?= $classes ?>"<?php if($label): ?> aria-label="<?= $label ?>"<?php endif ?>><?= $text ?></a>
+45
View File
@@ -0,0 +1,45 @@
.button {
display: inline-block;
text-align: center;
font: inherit;
line-height: inherit;
background: none;
cursor: pointer;
padding: 0.3em 0.5em 0.2em;
border: 1px solid $color--brand-primary;
border-radius: -cdd-em(4);
& + & {
margin-top: 0.5em;
}
transition: color 0.2s ease, border-color 0.2s ease;
&, &:link, &:visited {
color: $color--brand-primary;
}
&:hover, &:focus, &:not(&--novisited):visited {
border-color: $color--brand-primary-alternate;
color: $color--brand-primary-alternate;
}
&--secondary {
&, &:link, &:visited {
border-color: $color--brand-secondary;
color: $color--brand-secondary;
}
&:hover, &:focus, &:not(.button--novisited):visited {
border-color: $color--brand-secondary-alternate;
color: $color--brand-secondary-alternate;
}
}
&:disabled, &--disabled {
border-color: $color--passive-dark;
color: $color--passive-dark;
}
}