diff --git a/littlelink/css/animations.css b/littlelink/css/animations.css new file mode 100644 index 0000000..8493b21 --- /dev/null +++ b/littlelink/css/animations.css @@ -0,0 +1,145 @@ +/* Table of contents +–––––––––––––––––––––––––––––––––––––––––––––––––– +- Entrance animations +- Button hover animations +- Icon hover animations + +*/ + + + +/* Entrance animations +–––––––––––––––––––––––––––––––––––––––––––––––––– */ + +.button-entrance { + animation-name: popUp; + animation-duration: 1s; + animation-fill-mode: both; + /* Used to start button entrance animation one after another */ + animation-delay: calc(var(--delay)/10); + } + +@keyframes popUp { + from { + opacity: 0; + transform: scale3d(0.3, 0.3, 0.3); + } + + 50% { + opacity: 1; + } +} + +.fadein { + animation-name: fadein; + animation-duration: 3s; + animation-fill-mode: both; + } + +@keyframes fadein { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + + +/* Button hover animations +–––––––––––––––––––––––––––––––––––––––––––––––––– */ +/* (Also apply to icon) */ + +.button-hover{ + -webkit-transform:perspective(1px) translateZ(0); + transform:perspective(1px) translateZ(0); + box-shadow:0 0 1px rgba(0,0,0,0); + -webkit-transition-duration:.3s; + transition-duration:.3s; + -webkit-transition-property:transform; + transition-property:transform +} +.button-hover:active,.button-hover:focus,.button-hover:hover{ + -webkit-transform:scale(1.1); + transform:scale(1.1) +} + + +/* Icon hover animations +–––––––––––––––––––––––––––––––––––––––––––––––––– */ + +.icon-hover{ + -webkit-transform:perspective(1px) translateZ(0); + transform:perspective(1px) translateZ(0); + box-shadow:0 0 1px rgba(0,0,0,0); + -webkit-transition-duration:.3s; + transition-duration:.3s +} +.icon-hover .hvr-icon{ + -webkit-transform:translateZ(0); + transform:translateZ(0) +} +.icon-hover:active .hvr-icon,.icon-hover:focus .hvr-icon,.icon-hover:hover .hvr-icon{ + -webkit-animation-name:icon-hover; + animation-name:icon-hover; + -webkit-animation-duration:1s; + animation-duration:1s; + -webkit-animation-timing-function:ease-in-out; + animation-timing-function:ease-in-out; + -webkit-animation-iteration-count:1; + animation-iteration-count:1 +} + +@-webkit-keyframes icon-hover{ + 16.65%{ + -webkit-transform:translateY(6px); + transform:translateY(6px) + } + 33.3%{ + -webkit-transform:translateY(-5px); + transform:translateY(-5px) + } + 49.95%{ + -webkit-transform:translateY(4px); + transform:translateY(4px) + } + 66.6%{ + -webkit-transform:translateY(-2px); + transform:translateY(-2px) + } + 83.25%{ + -webkit-transform:translateY(1px); + transform:translateY(1px) + } + 100%{ + -webkit-transform:translateY(0); + transform:translateY(0) + } +} +@keyframes icon-hover{ + 16.65%{ + -webkit-transform:translateY(6px); + transform:translateY(6px) + } + 33.3%{ + -webkit-transform:translateY(-5px); + transform:translateY(-5px) + } + 49.95%{ + -webkit-transform:translateY(4px); + transform:translateY(4px) + } + 66.6%{ + -webkit-transform:translateY(-2px); + transform:translateY(-2px) + } + 83.25%{ + -webkit-transform:translateY(1px); + transform:translateY(1px) + } + 100%{ + -webkit-transform:translateY(0); + transform:translateY(0) + } +} \ No newline at end of file diff --git a/resources/views/littlelink.blade.php b/resources/views/littlelink.blade.php index 687391f..c3ce094 100644 --- a/resources/views/littlelink.blade.php +++ b/resources/views/littlelink.blade.php @@ -44,7 +44,6 @@ - @if(file_exists(base_path("littlelink/images/avatar.png" ))) @@ -57,11 +56,17 @@ + @if(file_exists(base_path("themes/{{$info->theme}}/skeleton-auto.css" ))) + + @else + + @endif @else + @if ($color_scheme_override == 'dark') @@ -136,12 +141,12 @@ function get_operating_system() { @if($user_browser === 'Chrome' or get_operating_system() == 'mobile') -
+
@else -
+
@endif @@ -171,18 +176,18 @@ function get_operating_system() { @foreach($links as $link) @php $linkName = str_replace('default ','',$link->name) @endphp @if($link->button_id === 0) -
+
{{ $link->title }}
@elseif($link->name === "custom" and $link->custom_css === "" or $link->custom_css === "NULL") -
{{ $link->title }}
+
{{ $link->title }}
@elseif($link->name === "custom" and $link->custom_css != "") -
{{ $link->title }}
+
{{ $link->title }}
@elseif($link->name === "buy me a coffee") -
button-iconBuy me a Coffee
+
button-iconBuy me a Coffee
@elseif($link->name === "custom_website"and $link->custom_css === "" or $link->custom_css === "NULL") -
button-icon{{ $link->title }}
+
button-icon{{ $link->title }}
@elseif($link->name === "custom_website" and $link->custom_css != "") -
button-icon{{ $link->title }}
+
button-icon{{ $link->title }}
@elseif($link->name === "space") title) and $link->title < 10) @@ -195,7 +200,7 @@ function get_operating_system() { @elseif($link->name === "heading")

{{ $link->title }}

@else -
button-icon{{ ucfirst($linkName) }}
+
button-icon{{ ucfirst($linkName) }}
@endif @endforeach