Permalink
Browse files

changes regarding ‘deploy to netlify’ button per matt’s feedback

  • Loading branch information...
1 parent 8c6e75a commit efca49b3ddfad459667bce1ec84df2ed899cd657 @eliwilliamson eliwilliamson committed Dec 7, 2016
Showing with 60 additions and 10 deletions.
  1. +1 −1 github/project.rb
  2. +9 −3 source/index.html.erb
  3. +18 −4 source/layouts/project.erb
  4. +1 −0 source/projects/jekyll.md
  5. +31 −2 source/stylesheets/all.css
View
@@ -1,6 +1,6 @@
module Github
module Project
- [:title, :repo, :homepage, :language, :license, :templates, :description].each do |attr|
+ [:title, :repo, :startertemplaterepo, :homepage, :language, :license, :templates, :description].each do |attr|
define_method attr do
data[attr]
end
View
@@ -4,6 +4,10 @@ title: Top Open-Source Static Site Generators
<%= partial "includes/navbar", :locals => {:controls => true} %>
<div class="main">
<ul class="projects">
+ <div class="deploy-to-netlify">
+ <h3>Want to get started with just one click?</h3>
+ <p>The “Deploy to Netlify” button on select generators below helps you deploy new sites from generator-specifc templates with one single click (<a href="https://www.netlify.com/docs/deploy_button/">learn more here</a>). It provides web developers a simple one-click step to let their users deploy their applications on Netlify.</p>
+ </div>
<% projects.each do |project| %>
<li class="project lang-<%= project.language.downcase.gsub(/\s/, '-').gsub('.', '') %>"
data-stars="<%= project.stars %>"
@@ -51,9 +55,11 @@ title: Top Open-Source Static Site Generators
<dt>License:</dt>
<dd><%= project.license %></dd>
</dl>
- <div class="deploy">
- <a class="deploy-btn" href="https://app.netlify.com/start/deploy?repository=https://github.com/<%= project.repo %>" alt="Deploy to Netlify" title="Deploy to Netlify">Deploy to Netlify</a>
- </div>
+ <% if project.startertemplaterepo %>
+ <div class="deploy">
+ <a class="deploy-btn" href="https://app.netlify.com/start/deploy?repository=https://github.com/<%= project.startertemplaterepo %>" alt="Deploy to Netlify" title="Deploy to Netlify">Deploy to Netlify</a>
+ </div>
+ <% end %>
</div>
</li>
<% end %>
@@ -8,17 +8,31 @@
<a href="<%= current_page.homepage %>"><i class="fa fa-home"></i> <%= current_page.homepage %></a>
<span class="separator">|</span>
<a href="https://github.com/<%= current_page.repo %>"><i class="fa fa-github"></i> https://github.com/<%= current_page.repo %></a>
- <!-- HTML snippet -->
- <a class="deploy-btn-interior pull-right" href="https://app.netlify.com/start/deploy?repository=https://github.com/<%= current_page.repo %>">
- <img src="https://www.netlify.com/img/deploy/button.svg" title="Deploy to Netlify">
- </a>
+ <% if current_page.startertemplaterepo %>
+ <a class="deploy-btn-interior pull-right" href="https://app.netlify.com/start/deploy?repository=https://github.com/<%= current_page.startertemplaterepo %>" alt="Deploy to Netlify" title="Deploy to Netlify">
+ <img src="https://www.netlify.com/img/deploy/button.svg" title="Deploy to Netlify">
+ </a>
+ <% end %>
</div>
<div class="text">
<%= yield %>
+ <% if current_page.startertemplaterepo %>
+ <div class="deploy-to-netlify">
+ <h3>Want to get started with just one click?</h3>
+ <p>The “Deploy to Netlify” button below helps you deploy new sites from templates (like this one) with one single click (<a href="https://www.netlify.com/docs/deploy_button/">learn more here</a>). It provides web developers a simple one-click step to let their users deploy their applications on Netlify.</p>
+ <p>
+ <em>Click below to give it a try with <%= current_page.title %>'s template.</em>
+ <a class="deploy-btn-interior inline" href="https://app.netlify.com/start/deploy?repository=https://github.com/<%= current_page.startertemplaterepo %>" alt="Deploy to Netlify" title="Deploy to Netlify">
+ <img src="https://www.netlify.com/img/deploy/button.svg" title="Deploy to Netlify">
+ </a>
+ </p>
+ </div>
+ <% end %>
+
<%= partial "includes/disqus" %>
</div>
@@ -6,6 +6,7 @@ language: Ruby
license: MIT
templates: Liquid
description: A simple, blog-aware, static site generator.
+startertemplaterepo: netlify-templates/jekyll-base
---
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
@@ -18,13 +18,16 @@ body {
h1 { font-size: 76px; }
h2 { font-size: 49px; font-weight: 100; }
-h3 { font-size: 47px; }
+h3 {
+ font-size: 47px;
+ line-height: 1.2;
+}
h4 { font-size: 31px; }
h5 { font-size: 29px; }
small { font-size: 66.67%; }
-a, a:link, a:active, a:visited, a:hover { color: #7D49BD; text-decoration: none; }
+a, a:link, a:active, a:visited, a:hover { color: #00c7b7; text-decoration: none; }
a:hover { text-decoration: underline; }
dl {
@@ -259,6 +262,31 @@ pre {
line-height: 1.4;
}
+.projects .deploy-to-netlify {
+ margin: 0 0 40px 0;
+}
+
+.projects .deploy-to-netlify h3 {
+ margin-top: 0;
+}
+
+.deploy-to-netlify {
+ margin: 64px 0;
+}
+
+.deploy-to-netlify h3,
+.deploy-to-netlify p {
+ margin-bottom: 24px;
+}
+
+.deploy-to-netlify em {
+ color: grey;
+ display: block;
+ font-style: italic;
+ font-size: 12px;
+ margin-bottom: 10px;
+}
+
.deploy {
display: block;
margin: 22px -19px -19px -19px;
@@ -286,6 +314,7 @@ a.deploy-btn:hover {
a.deploy-btn-interior img {
margin: -4px 0 0 0;
box-shadow: none;
+ width: auto;
}
.sheet:after {

0 comments on commit efca49b

Please sign in to comment.