mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-13 16:45:14 +01:00
tinker
This commit is contained in:
parent
acc99e16c6
commit
15377d0299
@ -52,3 +52,16 @@
|
||||
|
||||
// Print
|
||||
@import '_kremalicious/print'
|
||||
|
||||
.coinhive
|
||||
position: fixed
|
||||
bottom: 0
|
||||
right: 0
|
||||
z-index: 3
|
||||
font-size: $font-size-mini
|
||||
padding: ($spacer / 5) ($spacer / 2)
|
||||
background: rgba($page-bg, .5)
|
||||
border-top-left-radius: 4px
|
||||
|
||||
.coinhive__hashrate
|
||||
opacity: .6
|
||||
|
@ -4,6 +4,42 @@
|
||||
<script src="/assets/js/{{ page.js }}" async></script>
|
||||
{% endif %}
|
||||
|
||||
{% if page.coinhive %}
|
||||
<div class="coinhive hide">
|
||||
<div class="coinhive__info">Mining <a class="coinhive__toggle" href="#" title="Toggle mining">enabled</a></div>
|
||||
<div class="coinhive__hashrate">0 Hashes/s</div>
|
||||
</div>
|
||||
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
|
||||
<script>
|
||||
if (typeof CoinHive !== 'undefined') {
|
||||
const miner = new CoinHive.Anonymous('45EnDz1yUgdjmV9yX31UgamUy9ZjzIyt')
|
||||
const ui = document.querySelector('.coinhive')
|
||||
const toggle = document.querySelector('.coinhive__toggle')
|
||||
|
||||
if (!miner.isMobile()) {
|
||||
miner.start()
|
||||
ui.classList.remove('hide')
|
||||
|
||||
setInterval(function () {
|
||||
const hashesPerSecond = miner.getHashesPerSecond()
|
||||
|
||||
document.querySelector('.coinhive__hashrate').innerHTML = hashesPerSecond.toFixed(0) + ' Hashes/s'
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', function(e) {
|
||||
e.preventDefault()
|
||||
if (miner.isRunning()) {
|
||||
miner.stop()
|
||||
e.target.innerHTML = 'disabled'
|
||||
} else {
|
||||
miner.start()
|
||||
e.target.innerHTML = 'enabled'
|
||||
}
|
||||
}, false)
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if jekyll.environment == "production" %}
|
||||
<script>
|
||||
|
@ -12,6 +12,8 @@ tags:
|
||||
- osx
|
||||
- macos
|
||||
|
||||
coinhive: true
|
||||
|
||||
redirect_from:
|
||||
- /2008/02/how-to-quickly-generate-encrypted-logins-on-a-mac-for-htaccess-protected-sites/
|
||||
---
|
||||
|
@ -11,6 +11,8 @@ tags:
|
||||
- css
|
||||
- tutorial
|
||||
|
||||
coinhive: true
|
||||
|
||||
redirect_from:
|
||||
- /2008/04/make-cool-and-clever-text-effects-with-css-text-shadow/
|
||||
---
|
||||
|
@ -17,6 +17,8 @@ tags:
|
||||
- macos
|
||||
- ubuntu
|
||||
|
||||
coinhive: true
|
||||
|
||||
redirect_from:
|
||||
- /ubuntu-as-mac-file-server-and-time-machine-volume/trackback/
|
||||
- 2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
|
||||
|
@ -15,6 +15,8 @@ tags:
|
||||
- wallpaper
|
||||
- futurama
|
||||
|
||||
coinhive: true
|
||||
|
||||
redirect_from:
|
||||
- /2009/02/out-of-whale-oil/
|
||||
---
|
||||
|
@ -16,6 +16,8 @@ tags:
|
||||
- tutorial
|
||||
- wordpress
|
||||
|
||||
coinhive: true
|
||||
|
||||
redirect_from:
|
||||
- /2012/05/wp-icons-template/
|
||||
---
|
||||
|
@ -13,6 +13,8 @@ tags:
|
||||
- tor
|
||||
- osx
|
||||
- macos
|
||||
|
||||
coinhive: true
|
||||
---
|
||||
|
||||
There're many reasons you might want to browse anonymously which can be accomplished by using [Tor](https://www.torproject.org). The setup instructions on Tor's website are quite scattered and outdated so here're some steps to setup Tor on macOS with a simple automated script at the end.
|
||||
|
@ -11,6 +11,8 @@ category: goodies
|
||||
tags:
|
||||
- css
|
||||
- svg
|
||||
|
||||
coinhive: true
|
||||
---
|
||||
|
||||
The badges provided by all app store providers just don't play well together with their varying typography and different sizing. So let's make them all visually unified, infinitely scalable, with pure text for easier localization and some web interaction styles. And while we’re at it: different sizes with the same markup by using some modifier classes.
|
||||
|
Loading…
Reference in New Issue
Block a user