diff --git a/demo/assets/css/fork-corner.min.css b/demo/assets/css/fork-corner.min.css index 2f2e539..c7e7cd2 100644 --- a/demo/assets/css/fork-corner.min.css +++ b/demo/assets/css/fork-corner.min.css @@ -12,4 +12,4 @@ * Website: warengonzaga.com */ -html,body{overflow-x:hidden;touch-action:pan-y}#fork-corner{z-index:105;position:absolute}.fork-corner+div{position:absolute;width:200px;height:200px;z-index:100}.fork-corner.fc-pos-tr{top:16.66667px;right:16.66667px}.fork-corner.fc-pos-tr.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tr.fc-animate-default:hover{transform:rotate(45deg);transition:0.5s}.fork-corner.fc-pos-tr+div{top:-100px;right:-100px;transform:rotate(45deg)}.fork-corner.fc-pos-tl{top:16.66667px;left:16.66667px}.fork-corner.fc-pos-tl.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tl.fc-animate-default:hover{transform:rotate(-45deg);transition:0.5s}.fork-corner.fc-pos-tl+div{top:-100px;left:-100px;transform:rotate(45deg)}.fork-corner.fc-theme-default{text-decoration:none}.fork-corner.fc-theme-default>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-default+div{background-color:#f34f29}.fork-corner.fc-theme-github{text-decoration:none}.fork-corner.fc-theme-github>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-github+div{background-color:#181717}.fork-corner.fc-theme-gitlab{text-decoration:none}.fork-corner.fc-theme-gitlab>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-gitlab+div{background-color:#e24329}.fork-corner.fc-theme-bitbucket{text-decoration:none}.fork-corner.fc-theme-bitbucket>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-bitbucket+div{background-color:#205081} +html,body{overflow-x:hidden;touch-action:pan-y}#fork-corner{z-index:105;position:absolute}.fork-corner+div{position:absolute;width:200px;height:200px;z-index:100}.fork-corner.fc-pos-tr{top:16.66667px;right:16.66667px}.fork-corner.fc-pos-tr.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tr.fc-animate-default:hover{transform:rotate(45deg);transition:0.5s}.fork-corner.fc-pos-tr+div{top:-100px;right:-100px;transform:rotate(45deg)}.fork-corner.fc-pos-tl{top:16.66667px;left:16.66667px}.fork-corner.fc-pos-tl.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tl.fc-animate-default:hover{transform:rotate(-45deg);transition:0.5s}.fork-corner.fc-pos-tl+div{top:-100px;left:-100px;transform:rotate(45deg)}.fork-corner.fc-theme-default{text-decoration:none}.fork-corner.fc-theme-default>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-default+div{background-color:#f34f29}.fork-corner.fc-theme-github{text-decoration:none}.fork-corner.fc-theme-github>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-github+div{background-color:#181717}.fork-corner.fc-theme-gitlab{text-decoration:none}.fork-corner.fc-theme-gitlab>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-gitlab+div{background-color:#e24329}.fork-corner.fc-theme-bitbucket{text-decoration:none}.fork-corner.fc-theme-bitbucket>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-bitbucket+div{background-color:#205081}.fork-corner.fc-size-small.fc-pos-tr{top:12.5px !important;right:12.5px !important}.fork-corner.fc-size-small.fc-pos-tr+div{top:-75px !important;right:-75px !important}.fork-corner.fc-size-small.fc-pos-tl{top:12.5px !important;left:12.5px !important}.fork-corner.fc-size-small.fc-pos-tl+div{top:-75px !important;left:-75px !important}.fork-corner.fc-size-small.fc-theme-default>i,.fork-corner.fc-size-small.fc-theme-github>i,.fork-corner.fc-size-small.fc-theme-gitlab>i,.fork-corner.fc-size-small.fc-theme-bitbucket>i{font-size:37.5px !important}.fork-corner.fc-size-small+div{width:150px !important;height:150px !important}.fork-corner.fc-size-medium.fc-pos-tr{top:20.83333px !important;right:20.83333px !important}.fork-corner.fc-size-medium.fc-pos-tr+div{top:-125px !important;right:-125px !important}.fork-corner.fc-size-medium.fc-pos-tl{top:20.83333px !important;left:20.83333px !important}.fork-corner.fc-size-medium.fc-pos-tl+div{top:-125px !important;left:-125px !important}.fork-corner.fc-size-medium.fc-theme-default>i,.fork-corner.fc-size-medium.fc-theme-github>i,.fork-corner.fc-size-medium.fc-theme-gitlab>i,.fork-corner.fc-size-medium.fc-theme-bitbucket>i{font-size:62.5px !important}.fork-corner.fc-size-medium+div{width:250px !important;height:250px !important}.fork-corner.fc-size-large.fc-pos-tr{top:25px !important;right:25px !important}.fork-corner.fc-size-large.fc-pos-tr+div{top:-150px !important;right:-150px !important}.fork-corner.fc-size-large.fc-pos-tl{top:25px !important;left:25px !important}.fork-corner.fc-size-large.fc-pos-tl+div{top:-150px !important;left:-150px !important}.fork-corner.fc-size-large.fc-theme-default>i,.fork-corner.fc-size-large.fc-theme-github>i,.fork-corner.fc-size-large.fc-theme-gitlab>i,.fork-corner.fc-size-large.fc-theme-bitbucket>i{font-size:75px !important}.fork-corner.fc-size-large+div{width:300px !important;height:300px !important} diff --git a/dist/fork-corner.css b/dist/fork-corner.css index a116e69..dd33d5b 100644 --- a/dist/fork-corner.css +++ b/dist/fork-corner.css @@ -89,3 +89,75 @@ html, body { .fork-corner.fc-theme-bitbucket + div { background-color: #205081; } + +.fork-corner.fc-size-small.fc-pos-tr { + top: 12.5px !important; + right: 12.5px !important; } + .fork-corner.fc-size-small.fc-pos-tr + div { + top: -75px !important; + right: -75px !important; } + +.fork-corner.fc-size-small.fc-pos-tl { + top: 12.5px !important; + left: 12.5px !important; } + .fork-corner.fc-size-small.fc-pos-tl + div { + top: -75px !important; + left: -75px !important; } + +.fork-corner.fc-size-small.fc-theme-default > i, +.fork-corner.fc-size-small.fc-theme-github > i, +.fork-corner.fc-size-small.fc-theme-gitlab > i, +.fork-corner.fc-size-small.fc-theme-bitbucket > i { + font-size: 37.5px !important; } + +.fork-corner.fc-size-small + div { + width: 150px !important; + height: 150px !important; } + +.fork-corner.fc-size-medium.fc-pos-tr { + top: 20.83333px !important; + right: 20.83333px !important; } + .fork-corner.fc-size-medium.fc-pos-tr + div { + top: -125px !important; + right: -125px !important; } + +.fork-corner.fc-size-medium.fc-pos-tl { + top: 20.83333px !important; + left: 20.83333px !important; } + .fork-corner.fc-size-medium.fc-pos-tl + div { + top: -125px !important; + left: -125px !important; } + +.fork-corner.fc-size-medium.fc-theme-default > i, +.fork-corner.fc-size-medium.fc-theme-github > i, +.fork-corner.fc-size-medium.fc-theme-gitlab > i, +.fork-corner.fc-size-medium.fc-theme-bitbucket > i { + font-size: 62.5px !important; } + +.fork-corner.fc-size-medium + div { + width: 250px !important; + height: 250px !important; } + +.fork-corner.fc-size-large.fc-pos-tr { + top: 25px !important; + right: 25px !important; } + .fork-corner.fc-size-large.fc-pos-tr + div { + top: -150px !important; + right: -150px !important; } + +.fork-corner.fc-size-large.fc-pos-tl { + top: 25px !important; + left: 25px !important; } + .fork-corner.fc-size-large.fc-pos-tl + div { + top: -150px !important; + left: -150px !important; } + +.fork-corner.fc-size-large.fc-theme-default > i, +.fork-corner.fc-size-large.fc-theme-github > i, +.fork-corner.fc-size-large.fc-theme-gitlab > i, +.fork-corner.fc-size-large.fc-theme-bitbucket > i { + font-size: 75px !important; } + +.fork-corner.fc-size-large + div { + width: 300px !important; + height: 300px !important; } diff --git a/dist/fork-corner.min.css b/dist/fork-corner.min.css index 2f2e539..c7e7cd2 100644 --- a/dist/fork-corner.min.css +++ b/dist/fork-corner.min.css @@ -12,4 +12,4 @@ * Website: warengonzaga.com */ -html,body{overflow-x:hidden;touch-action:pan-y}#fork-corner{z-index:105;position:absolute}.fork-corner+div{position:absolute;width:200px;height:200px;z-index:100}.fork-corner.fc-pos-tr{top:16.66667px;right:16.66667px}.fork-corner.fc-pos-tr.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tr.fc-animate-default:hover{transform:rotate(45deg);transition:0.5s}.fork-corner.fc-pos-tr+div{top:-100px;right:-100px;transform:rotate(45deg)}.fork-corner.fc-pos-tl{top:16.66667px;left:16.66667px}.fork-corner.fc-pos-tl.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tl.fc-animate-default:hover{transform:rotate(-45deg);transition:0.5s}.fork-corner.fc-pos-tl+div{top:-100px;left:-100px;transform:rotate(45deg)}.fork-corner.fc-theme-default{text-decoration:none}.fork-corner.fc-theme-default>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-default+div{background-color:#f34f29}.fork-corner.fc-theme-github{text-decoration:none}.fork-corner.fc-theme-github>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-github+div{background-color:#181717}.fork-corner.fc-theme-gitlab{text-decoration:none}.fork-corner.fc-theme-gitlab>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-gitlab+div{background-color:#e24329}.fork-corner.fc-theme-bitbucket{text-decoration:none}.fork-corner.fc-theme-bitbucket>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-bitbucket+div{background-color:#205081} +html,body{overflow-x:hidden;touch-action:pan-y}#fork-corner{z-index:105;position:absolute}.fork-corner+div{position:absolute;width:200px;height:200px;z-index:100}.fork-corner.fc-pos-tr{top:16.66667px;right:16.66667px}.fork-corner.fc-pos-tr.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tr.fc-animate-default:hover{transform:rotate(45deg);transition:0.5s}.fork-corner.fc-pos-tr+div{top:-100px;right:-100px;transform:rotate(45deg)}.fork-corner.fc-pos-tl{top:16.66667px;left:16.66667px}.fork-corner.fc-pos-tl.fc-animate-default{transition:0.5s}.fork-corner.fc-pos-tl.fc-animate-default:hover{transform:rotate(-45deg);transition:0.5s}.fork-corner.fc-pos-tl+div{top:-100px;left:-100px;transform:rotate(45deg)}.fork-corner.fc-theme-default{text-decoration:none}.fork-corner.fc-theme-default>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-default+div{background-color:#f34f29}.fork-corner.fc-theme-github{text-decoration:none}.fork-corner.fc-theme-github>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-github+div{background-color:#181717}.fork-corner.fc-theme-gitlab{text-decoration:none}.fork-corner.fc-theme-gitlab>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-gitlab+div{background-color:#e24329}.fork-corner.fc-theme-bitbucket{text-decoration:none}.fork-corner.fc-theme-bitbucket>i{font-size:50px;color:#ffffff}.fork-corner.fc-theme-bitbucket+div{background-color:#205081}.fork-corner.fc-size-small.fc-pos-tr{top:12.5px !important;right:12.5px !important}.fork-corner.fc-size-small.fc-pos-tr+div{top:-75px !important;right:-75px !important}.fork-corner.fc-size-small.fc-pos-tl{top:12.5px !important;left:12.5px !important}.fork-corner.fc-size-small.fc-pos-tl+div{top:-75px !important;left:-75px !important}.fork-corner.fc-size-small.fc-theme-default>i,.fork-corner.fc-size-small.fc-theme-github>i,.fork-corner.fc-size-small.fc-theme-gitlab>i,.fork-corner.fc-size-small.fc-theme-bitbucket>i{font-size:37.5px !important}.fork-corner.fc-size-small+div{width:150px !important;height:150px !important}.fork-corner.fc-size-medium.fc-pos-tr{top:20.83333px !important;right:20.83333px !important}.fork-corner.fc-size-medium.fc-pos-tr+div{top:-125px !important;right:-125px !important}.fork-corner.fc-size-medium.fc-pos-tl{top:20.83333px !important;left:20.83333px !important}.fork-corner.fc-size-medium.fc-pos-tl+div{top:-125px !important;left:-125px !important}.fork-corner.fc-size-medium.fc-theme-default>i,.fork-corner.fc-size-medium.fc-theme-github>i,.fork-corner.fc-size-medium.fc-theme-gitlab>i,.fork-corner.fc-size-medium.fc-theme-bitbucket>i{font-size:62.5px !important}.fork-corner.fc-size-medium+div{width:250px !important;height:250px !important}.fork-corner.fc-size-large.fc-pos-tr{top:25px !important;right:25px !important}.fork-corner.fc-size-large.fc-pos-tr+div{top:-150px !important;right:-150px !important}.fork-corner.fc-size-large.fc-pos-tl{top:25px !important;left:25px !important}.fork-corner.fc-size-large.fc-pos-tl+div{top:-150px !important;left:-150px !important}.fork-corner.fc-size-large.fc-theme-default>i,.fork-corner.fc-size-large.fc-theme-github>i,.fork-corner.fc-size-large.fc-theme-gitlab>i,.fork-corner.fc-size-large.fc-theme-bitbucket>i{font-size:75px !important}.fork-corner.fc-size-large+div{width:300px !important;height:300px !important} diff --git a/source/_base.scss b/source/_base.scss index 8f21fd0..265d433 100644 --- a/source/_base.scss +++ b/source/_base.scss @@ -10,16 +10,16 @@ html, body { .fork-corner + div { position: absolute; - width: $corner-size; - height: $corner-size; + width: $default-corner-size; + height: $default-corner-size; z-index: 100; } .fork-corner { // top right controller &.fc-pos-tr { - top: $corner-size/12; - right: $corner-size/12; + top: $default-corner-size/12; + right: $default-corner-size/12; &.fc-animate-default { transition: 0.5s; @@ -31,14 +31,14 @@ html, body { } // top right element &.fc-pos-tr + div { - top: ($corner-size/2) - $corner-size; - right: ($corner-size/2) - $corner-size; + top: ($default-corner-size/2) - $default-corner-size; + right: ($default-corner-size/2) - $default-corner-size; transform: rotate(45deg); } // top left controller &.fc-pos-tl { - top: $corner-size/12; - left: $corner-size/12; + top: $default-corner-size/12; + left: $default-corner-size/12; &.fc-animate-default { transition: 0.5s; @@ -50,8 +50,8 @@ html, body { } // top left element &.fc-pos-tl + div { - top: ($corner-size/2) - $corner-size; - left: ($corner-size/2) - $corner-size; + top: ($default-corner-size/2) - $default-corner-size; + left: ($default-corner-size/2) - $default-corner-size; transform: rotate(45deg); } } @@ -61,7 +61,7 @@ html, body { &.fc-theme-default { text-decoration: none; > i { - font-size: $corner-size/4; + font-size: $default-corner-size/4; color: $default-icon-color; } } @@ -75,7 +75,7 @@ html, body { &.fc-theme-github { text-decoration: none; > i { - font-size: $corner-size/4; + font-size: $default-corner-size/4; color: $github-icon-color; } } @@ -89,7 +89,7 @@ html, body { &.fc-theme-gitlab { text-decoration: none; > i { - font-size: $corner-size/4; + font-size: $default-corner-size/4; color: $gitlab-icon-color; } } @@ -103,7 +103,7 @@ html, body { &.fc-theme-bitbucket { text-decoration: none; > i { - font-size: $corner-size/4; + font-size: $default-corner-size/4; color: $bitbucket-icon-color; } } @@ -111,3 +111,117 @@ html, body { background-color: $bitbucket-bg-color; } } + +// small corner size +.fork-corner { + &.fc-size-small { + // top right controller + &.fc-pos-tr { + top: $small-corner-size/12 !important; + right: $small-corner-size/12 !important; + + & + div { + top: ($small-corner-size/2) - $small-corner-size !important; + right: ($small-corner-size/2) - $small-corner-size !important; + } + } + // top left controller + &.fc-pos-tl { + top: $small-corner-size/12 !important; + left: $small-corner-size/12 !important; + + & + div { + top: ($small-corner-size/2) - $small-corner-size !important; + left: ($small-corner-size/2) - $small-corner-size !important; + } + } + // corner theme + &.fc-theme-default > i, + &.fc-theme-github > i, + &.fc-theme-gitlab > i, + &.fc-theme-bitbucket > i { + font-size: $small-corner-size/4 !important; + } + // corner element + & + div { + width: $small-corner-size !important; + height: $small-corner-size !important; + } + } +} + +// medium corner size +.fork-corner { + &.fc-size-medium { + // top right controller + &.fc-pos-tr { + top: $medium-corner-size/12 !important; + right: $medium-corner-size/12 !important; + + & + div { + top: ($medium-corner-size/2) - $medium-corner-size !important; + right: ($medium-corner-size/2) - $medium-corner-size !important; + } + } + // top left controller + &.fc-pos-tl { + top: $medium-corner-size/12 !important; + left: $medium-corner-size/12 !important; + + & + div { + top: ($medium-corner-size/2) - $medium-corner-size !important; + left: ($medium-corner-size/2) - $medium-corner-size !important; + } + } + // corner theme + &.fc-theme-default > i, + &.fc-theme-github > i, + &.fc-theme-gitlab > i, + &.fc-theme-bitbucket > i { + font-size: $medium-corner-size/4 !important; + } + // corner element + & + div { + width: $medium-corner-size !important; + height: $medium-corner-size !important; + } + } +} + +// large corner size +.fork-corner { + &.fc-size-large { + // top right controller + &.fc-pos-tr { + top: $large-corner-size/12 !important; + right: $large-corner-size/12 !important; + + & + div { + top: ($large-corner-size/2) - $large-corner-size !important; + right: ($large-corner-size/2) - $large-corner-size !important; + } + } + // top left controller + &.fc-pos-tl { + top: $large-corner-size/12 !important; + left: $large-corner-size/12 !important; + + & + div { + top: ($large-corner-size/2) - $large-corner-size !important; + left: ($large-corner-size/2) - $large-corner-size !important; + } + } + // corner theme + &.fc-theme-default > i, + &.fc-theme-github > i, + &.fc-theme-gitlab > i, + &.fc-theme-bitbucket > i { + font-size: $large-corner-size/4 !important; + } + // corner element + & + div { + width: $large-corner-size !important; + height: $large-corner-size !important; + } + } +} \ No newline at end of file diff --git a/source/_vars.scss b/source/_vars.scss index 6e7af63..aff3fd7 100644 --- a/source/_vars.scss +++ b/source/_vars.scss @@ -1,4 +1,7 @@ -$corner-size: 200px; +$default-corner-size: 200px; +$small-corner-size: 150px; +$medium-corner-size: 250px; +$large-corner-size: 300px; $default-icon-color: #ffffff; $default-bg-color: #f34f29; $github-icon-color: #ffffff;