Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasjunior committed Sep 13, 2018
1 parent a5aa874 commit 0b53167
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
<p align="center">
<img src="https://raw.githubusercontent.com/douglasjunior/emage/master/screenshot/electron.png" alt="screenshot" width="100" />
<img src="https://raw.githubusercontent.com/douglasjunior/emage/master/screenshot/wizard.png" alt="screenshot" width="100" />
<p/>
</p>

<h1 align="center">E-Mage (Electron + Image Compression + Magic)</h1>
<p align="center">From developers to developers: a cross-platform tool to help with image compression.<p/>
<p align="center">
From developers to developers: a cross-platform tool to help with image compression.
</p>

</center>

<p align="center">
<img src="https://raw.githubusercontent.com/douglasjunior/emage/master/screenshot/screen.png" alt="screenshot" width="500" />
<p/>
</p>

<blockquote align="center">
Inspired by <a href="https://github.com/ImageOptim/ImageOptim" target="_blank">ImageOptim</a> for Mac and created with the <a href="https://github.com/imagemin/imagemin" target="_blank">imagemin</a> and their <a href="https://www.npmjs.com/search?q=keywords:imageminplugin" target="_blank">plugins</a>.
Expand Down
41 changes: 22 additions & 19 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ <h1 class="project-name">{{ site.title | default: site.github.repository_name }}
/>
<img src="https://raw.githubusercontent.com/douglasjunior/emage/master/screenshot/wizard.png" alt="screenshot" width="100"
/>
<p/>
</p>

<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>

<div id="download-buttons">
Loading download links...
</div>
<div id="download-buttons">
Loading download links...
</div>

{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
</header>

<main id="content" class="main-content" role="main">
Expand All @@ -107,20 +107,23 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
axios.get('https://api.github.com/repos/douglasjunior/emage/releases/latest')
.then(function (response) {
downloadsDiv.innerHTML = '';
var assets = response.data.assets;
var buttons = assets
.forEach(function (asset) {
var btn = document.createElement('a');
btn.className = 'btn';
btn.href = asset.browser_download_url;
btn.type = asset.content_type;
btn.textContent = getAssetLabelByFileName(asset.name);
downloadsDiv.appendChild(btn);
});
response.data.assets.forEach(function (asset) {
var btn = document.createElement('a');
btn.className = 'btn';
btn.href = asset.browser_download_url;
btn.type = asset.content_type;
btn.textContent = getAssetLabelByFileName(asset.name);
downloadsDiv.appendChild(btn);
});
})
.catch(function (ex) {
console.warn(ex);
downloadsDiv.textContent = 'Could not load download list.';
downloadsDiv.innerHTML = '';
var btn = document.createElement('a');
btn.className = 'btn';
btn.href = '{{ site.github.download_url }}';
btn.textContent = 'Download';
downloadsDiv.appendChild(btn);
})
</script>
</body>
Expand Down

0 comments on commit 0b53167

Please sign in to comment.