Skip to content

Commit

Permalink
generated using facelift
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarferreira committed Jul 20, 2018
1 parent 45ef886 commit 685d930
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
dryrun (1.1.5)
dryrun (1.1.6)
bundler (>= 1.16)
colorize (>= 0.8)
highline (>= 1.7)
Expand Down
76 changes: 76 additions & 0 deletions docs/css/main.css
@@ -0,0 +1,76 @@
div.notification.notification-producthunt {
border-radius: 0 !important;
background: #da552f;
}

p.install-text code {
border-radius: 5px;
padding: 0.75rem;
}

p.install-text code::before {
content: '$ ';
}

p.install-text code:hover {
cursor: text;
}

p.install-text code:hover span {
background: pink;
}

.hero .hero-foot {
margin-bottom: 1rem;
}

#madeWithBulma {
vertical-align: bottom;
}

div.column.has-content-vcentered {
display: flex;
flex-direction: column;
justify-content: center;
}

div.notification.copy-notification {
position: absolute;
top: 0;
right: 0;
z-index: 999;
}

.makerlink {
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
right: 0px;
bottom: 0px;
position: fixed;
z-index: 100;
border-top-left-radius: 5px;
color: rgb(111, 111, 111);
padding: 6px;
border-top: 1px solid rgb(239, 239, 239);
border-left: 1px solid rgb(239, 239, 239);
background: rgb(255, 255, 255);
text-decoration: none;
}

.makerlink .makerlink__img {
width: 22px;
vertical-align: middle;
border-radius: 100%;
}

.makerlink .makerlink__author {
vertical-align: middle;
display: inline;
font-weight: 500;
font-size: 14px;
margin: 0px 0px 0px 7px;
}

h1 a {
color:inherit;
text-decoration: none;
}
66 changes: 66 additions & 0 deletions docs/index.html
@@ -0,0 +1,66 @@
<!-- Generated with: https://github.com/cesarferreira/facelift -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dryrun - ☁️ Try the demo project of any Android Library</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
<link rel="stylesheet" href="./css/main.css" />
<!-- Twitter Meta -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="dryrun" />
<meta name="twitter:url" content="https://github.com/cesarferreira/dryrun" />
<meta name="twitter:description" content="☁️ Try the demo project of any Android Library" />
<meta property="og:url" content="https://github.com/cesarferreira/dryrun" />

<meta property="og:title" content="dryrun" />
<meta property="og:description" content="☁️ Try the demo project of any Android Library" />
</head>
<body>
<div class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns is-variable is-6">
<!-- Content Left -->
<div class="column is-5 has-content-vcentered">
<h1 class="title is-1"><a href="https://github.com/cesarferreira/dryrun">dryrun</a></h1>
<h2 class="subtitle">☁️ Try the demo project of any Android Library</h2>
<div class="call-to-action content">
<p class="install-text is-size-4">
<code><span>gem install dryrun</span></code>
</p>
<div class="notification is-link is-hidden copy-notification">Copied to clipboard!</div>
</div>

<div class="features content">
<strong>Features</strong>
<ul>
<li>Try any android library hosted online directly from the command line</li>
<li>Specify any custom branch to run</li>
<li>Specify any flavour to run</li>
<li>Specify any app module to run</li>
<li>Checkout tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b")</li>
</ul>
</div>

</div>
<!-- Media Right -->
<div class="column is-7 has-content-vcentered">
<figure class="image is-4by2">
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/ss.gif" />
</figure>
</div>
</div>
</div>
</div>
</div>

<a target="_blank" rel="noopener" class="makerlink" href="http://cesarferreira.com">
<img class="makerlink__img" src="https://pbs.twimg.com/profile_images/884351017097322496/2mmpORsM_400x400.jpg" style="display: inline-block">
<p class="makerlink__author">by cesar ferreira</p>
</a>
<script async type="text/javascript" src="./js/index.js"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions docs/js/index.js
@@ -0,0 +1,42 @@
// `copyToClipboard()` courtesy @chalarangelo (Angelos Chalaris)
// refs: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
const copyToClipboard = (str) => {
const el = document.createElement('textarea'); // Create a <textarea> element
el.value = str; // Set its value to the string that you want copied
el.setAttribute('readonly', ''); // Make it readonly to be tamper-proof
el.style.position = 'absolute';
el.style.left = '-9999px'; // Move outside the screen to make it invisible
document.body.appendChild(el); // Append the <textarea> element to the HTML document
const selected =
document.getSelection().rangeCount > 0 // Check if there is any content selected previously
? document.getSelection().getRangeAt(0) // Store selection if found
: false; // Mark as false to know no selection existed before
el.select(); // Select the <textarea> content
document.execCommand('copy'); // Copy - only works as a result of a user action (e.g. click events)
document.body.removeChild(el); // Remove the <textarea> element
if (selected) { // If a selection existed before copying
document.getSelection().removeAllRanges(); // Unselect everything on the HTML document
document.getSelection().addRange(selected); // Restore the original selection
}
};

const showCopyNotification = () => {
const notification = document.querySelector('div.notification.copy-notification');
notification.classList.remove('is-hidden');
setTimeout(() => {
notification.classList.add('is-hidden');
}, 2000);
};

const installTextCode = document.querySelector('p.install-text code');
const installTextSpan = document.querySelector('p.install-text code span');

const clickableElements = [installTextCode, installTextSpan];

clickableElements.forEach((el) => {
const npmInstallText = installTextSpan.textContent; // 'npm i -g amo-cli'
el.addEventListener('click', () => {
copyToClipboard(npmInstallText);
showCopyNotification();
});
});
Empty file added docs/js/vendor/.keep
Empty file.
Empty file added docs/res/.keep
Empty file.
24 changes: 24 additions & 0 deletions facelift.json
@@ -0,0 +1,24 @@
{
"title": "dryrun",
"subtitle": "☁️ Try the demo project of any Android Library",
"installation": "gem install dryrun",
"url": "https://github.com/cesarferreira/dryrun",
"screenshot": "https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/ss.gif",
"author": {
"name": "cesar ferreira",
"thumbnail": "https://pbs.twimg.com/profile_images/884351017097322496/2mmpORsM_400x400.jpg",
"homepage": "http://cesarferreira.com"
},
"highlights": [
{
"title": "Features",
"items": [
"Try any android library hosted online directly from the command line",
"Specify any custom branch to run",
"Specify any flavour to run",
"Specify any app module to run",
"Checkout tag/commit hash to clone (e.g. \"v0.4.5\", \"6f7dd4b\")"
]
}
]
}

0 comments on commit 685d930

Please sign in to comment.