Add new subscribers form + visual fixes
- New opt-in form for subscribers features - Bumped version to 1.3.0 - Resolved author image alignment, closes #238
This commit is contained in:
parent
c1a3840cbe
commit
09b4830398
10 changed files with 216 additions and 42 deletions
|
@ -227,6 +227,7 @@ h2 {
|
|||
|
||||
h3 {
|
||||
font-size: 3rem;
|
||||
letter-spacing: -0.6px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
|
@ -440,6 +441,78 @@ margin on the iframe, cause it breaks stuff. */
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
textarea, select, input {
|
||||
width: 260px;
|
||||
padding: 6px 9px;
|
||||
margin: 0 0 5px 0;
|
||||
outline: 0;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 100;
|
||||
line-height: 1.4em;
|
||||
background: #fff;
|
||||
border: #e7eef2 1px solid;
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
max-width: 340px;
|
||||
min-width: 250px;
|
||||
height: auto;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="email"]:focus,
|
||||
input[type="search"]:focus,
|
||||
input[type="tel"]:focus,
|
||||
input[type="url"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="number"]:focus,
|
||||
input[type="date"]:focus,
|
||||
input[type="month"]:focus,
|
||||
input[type="week"]:focus,
|
||||
input[type="time"]:focus,
|
||||
input[type="datetime"]:focus,
|
||||
input[type="datetime-local"]:focus,
|
||||
textarea:focus {
|
||||
border: #bbc7cc 1px solid;
|
||||
background: #fff;
|
||||
outline: none;
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
select {
|
||||
width: 270px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
button {
|
||||
min-height: 35px;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
padding: 0.1rem 1.5rem;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 11px; // Hack because Firefox sucks ass.
|
||||
line-height: 13px; // Hack because Firefox sucks ass.
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
text-shadow: none;
|
||||
border-radius: 0.3rem;
|
||||
border: rgba(0,0,0,0.05) 0.1em solid;
|
||||
background: #5ba4e5;
|
||||
}
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
3. Utilities - These things get used a lot
|
||||
|
@ -1121,7 +1194,7 @@ body:not(.post-template) .post-title {
|
|||
.post-footer {
|
||||
position: relative;
|
||||
margin: 6rem 0 0 0;
|
||||
padding: 6rem 0 0 0;
|
||||
padding: 3rem 0 0 0;
|
||||
border-top: #EBF2F6 1px solid;
|
||||
}
|
||||
|
||||
|
@ -1174,7 +1247,7 @@ body:not(.post-template) .post-title {
|
|||
links remain at a fixed width the whole time */
|
||||
.post-footer .share {
|
||||
position: absolute;
|
||||
top: 6rem;
|
||||
top: 3rem;
|
||||
right: 0;
|
||||
width: 140px;
|
||||
}
|
||||
|
@ -1566,7 +1639,65 @@ body:not(.post-template) .post-title {
|
|||
|
||||
|
||||
/* ==========================================================================
|
||||
10. Footer - The bottom of every page
|
||||
10. Subscribe - Generate those email subscribers
|
||||
========================================================================== */
|
||||
|
||||
.gh-subscribe {
|
||||
border: #e7eef2 1px solid;
|
||||
padding: 3rem;
|
||||
margin-top: 3rem;
|
||||
text-align: center;
|
||||
background: #f5f8fa;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.gh-subscribe-title {
|
||||
margin-bottom: 0;
|
||||
font-size: 2.4rem
|
||||
}
|
||||
|
||||
.gh-subscribe p {
|
||||
margin-top: 0;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.gh-subscribe form {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
|
||||
.gh-subscribe .form-group {
|
||||
flex-grow: 1;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.gh-subscribe .subscribe-email {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
border-radius: 4px 0 0 4px;
|
||||
transition: all ease 0.5s;
|
||||
}
|
||||
|
||||
.gh-subscribe .subscribe-email:focus {
|
||||
border: #5ba4e5 1px solid;
|
||||
transition: all ease 0.2s;
|
||||
}
|
||||
|
||||
.gh-subscribe button {
|
||||
margin-left: -1px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.gh-subscribe-rss {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
11. Footer - The bottom of every page
|
||||
========================================================================== */
|
||||
|
||||
.site-footer {
|
||||
|
@ -1604,7 +1735,7 @@ body:not(.post-template) .post-title {
|
|||
|
||||
|
||||
/* ==========================================================================
|
||||
11. Media Queries - Smaller than 900px
|
||||
12. Media Queries - Smaller than 900px
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
|
@ -1720,6 +1851,18 @@ body:not(.post-template) .post-title {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.gh-subscribe {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.gh-subscribe-title {
|
||||
font-size: 2rem
|
||||
}
|
||||
|
||||
.gh-subscribe p {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.read-next {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
|
@ -1980,6 +2123,10 @@ body:not(.post-template) .post-title {
|
|||
height: 20vh;
|
||||
}
|
||||
|
||||
.post-footer .author-image {
|
||||
top: -60px;
|
||||
}
|
||||
|
||||
.author-profile .author-image {
|
||||
margin-top: -70px;
|
||||
}
|
||||
|
@ -1992,6 +2139,14 @@ body:not(.post-template) .post-title {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.gh-subscribe {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.gh-subscribe form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.read-next {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: -37px;
|
||||
|
@ -2050,15 +2205,15 @@ body:not(.post-template) .post-title {
|
|||
}
|
||||
}
|
||||
@keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% {
|
||||
0%, 10%, 25%, 40%, 50% {
|
||||
-webkit-transform: translateY(0) rotate(-90deg);
|
||||
transform: translateY(0) rotate(-90deg);
|
||||
}
|
||||
40% {
|
||||
20% {
|
||||
-webkit-transform: translateY(-10px) rotate(-90deg);
|
||||
transform: translateY(-10px) rotate(-90deg);
|
||||
}
|
||||
60% {
|
||||
30% {
|
||||
-webkit-transform: translateY(-5px) rotate(-90deg);
|
||||
transform: translateY(-5px) rotate(-90deg);
|
||||
}
|
||||
|
|
10
author.hbs
10
author.hbs
|
@ -1,9 +1,9 @@
|
|||
{{!< default}}
|
||||
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}
|
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
|
||||
|
||||
{{! The big featured header }}
|
||||
{{!-- The big featured header --}}
|
||||
|
||||
{{! Everything inside the #author tags pulls data from the author }}
|
||||
{{!-- Everything inside the #author tags pulls data from the author --}}
|
||||
{{#author}}
|
||||
<header class="main-header author-head {{#if cover}}" style="background-image: url({{cover}}){{else}}no-cover{{/if}}">
|
||||
<nav class="main-nav overlay clearfix">
|
||||
|
@ -32,10 +32,10 @@
|
|||
</section>
|
||||
{{/author}}
|
||||
|
||||
{{! The main content area on the homepage }}
|
||||
{{!-- The main content area on the homepage --}}
|
||||
<main class="content" role="main">
|
||||
|
||||
{{! The tag below includes the post loop - partials/loop.hbs }}
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}}
|
||||
{{> "loop"}}
|
||||
|
||||
</main>
|
||||
|
|
20
default.hbs
20
default.hbs
|
@ -1,35 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{! Document Settings }}
|
||||
{{!-- Document Settings --}}
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
{{! Page Meta }}
|
||||
{{!-- Page Meta --}}
|
||||
<title>{{meta_title}}</title>
|
||||
<meta name="description" content="{{meta_description}}" />
|
||||
|
||||
{{!-- Mobile Meta --}}
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
{{!-- Brand icon --}}
|
||||
<link rel="shortcut icon" href="{{asset "favicon.ico"}}">
|
||||
|
||||
{{! Styles'n'Scripts }}
|
||||
{{!-- Styles'n'Scripts --}}
|
||||
<link rel="stylesheet" type="text/css" href="{{asset "css/screen.css"}}" />
|
||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />
|
||||
|
||||
{{! Ghost outputs important style and meta data with this tag }}
|
||||
{{!-- Ghost outputs important style and meta data with this tag --}}
|
||||
{{ghost_head}}
|
||||
</head>
|
||||
<body class="{{body_class}} nav-closed">
|
||||
|
||||
{{!-- The blog navigation links --}}
|
||||
{{navigation}}
|
||||
|
||||
<div class="site-wrapper">
|
||||
|
||||
{{! Everything else gets inserted here }}
|
||||
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
|
||||
{{{body}}}
|
||||
|
||||
{{!-- The tiny footer at the very bottom --}}
|
||||
<footer class="site-footer clearfix">
|
||||
<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> © {{date format="YYYY"}}</section>
|
||||
<section class="poweredby">Proudly published with <a href="https://ghost.org">Ghost</a></section>
|
||||
|
@ -39,11 +43,11 @@
|
|||
|
||||
{{!-- jQuery needs to come before `{{ghost_foot}}` so that jQuery can be used in code injection --}}
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||
{{! Ghost outputs important scripts and data with this tag }}
|
||||
{{!-- Ghost outputs important scripts and data with this tag --}}
|
||||
{{ghost_foot}}
|
||||
|
||||
{{!-- Fitvids makes video embeds responsive and awesome --}}
|
||||
<script type="text/javascript" src="{{asset "js/jquery.fitvids.js"}}"></script>
|
||||
{{! The main JavaScript file for Casper }}
|
||||
{{!-- The main JavaScript file for Casper --}}
|
||||
<script type="text/javascript" src="{{asset "js/index.js"}}"></script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{!< default}}
|
||||
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}
|
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
|
||||
|
||||
{{! The big featured header }}
|
||||
{{!-- The big featured header --}}
|
||||
<header class="main-header {{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}">
|
||||
<nav class="main-nav overlay clearfix">
|
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
|
||||
|
@ -18,10 +18,10 @@
|
|||
<a class="scroll-down icon-arrow-left" href="#content" data-offset="-45"><span class="hidden">Scroll Down</span></a>
|
||||
</header>
|
||||
|
||||
{{! The main content area on the homepage }}
|
||||
{{!-- The main content area on the homepage --}}
|
||||
<main id="content" class="content" role="main">
|
||||
|
||||
{{! The tag below includes the post loop - partials/loop.hbs }}
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}}
|
||||
{{> "loop"}}
|
||||
|
||||
</main>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "Casper",
|
||||
"version": "1.2.8"
|
||||
"version": "1.3.0"
|
||||
}
|
||||
|
|
6
page.hbs
6
page.hbs
|
@ -1,9 +1,9 @@
|
|||
{{!< default}}
|
||||
|
||||
{{! This is a page template. A page outputs content just like any other post, and has all the same
|
||||
attributes by default, but you can also customise it to behave differently if you prefer. }}
|
||||
{{!-- This is a page template. A page outputs content just like any other post, and has all the same
|
||||
attributes by default, but you can also customise it to behave differently if you prefer. --}}
|
||||
|
||||
{{! Everything inside the #post tags pulls data from the page }}
|
||||
{{!-- Everything inside the #post tags pulls data from the page --}}
|
||||
{{#post}}
|
||||
|
||||
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{! Previous/next page links - only displayed on page 2+ }}
|
||||
{{!-- Previous/next page links - only displayed on page 2+ --}}
|
||||
<div class="extra-pagination inner">
|
||||
{{pagination}}
|
||||
</div>
|
||||
|
||||
{{! This is the post loop - each post will be output using this markup }}
|
||||
{{!-- This is the post loop - each post will be output using this markup --}}
|
||||
{{#foreach posts}}
|
||||
<article class="{{post_class}}">
|
||||
<header class="post-header">
|
||||
|
@ -21,5 +21,5 @@
|
|||
</article>
|
||||
{{/foreach}}
|
||||
|
||||
{{! Previous/next page links - displayed on every page }}
|
||||
{{!-- Previous/next page links - displayed on every page --}}
|
||||
{{pagination}}
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
<li class="nav-{{slug}}{{#if current}} nav-current{{/if}}" role="presentation"><a href="{{url absolute="true"}}">{{label}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{#if @labs.subscribers}}
|
||||
<a class="subscribe-button" href="{{@blog.url}}/subscribe/">Subscribe</a>
|
||||
{{else}}
|
||||
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<span class="nav-cover"></span>
|
||||
|
|
19
post.hbs
19
post.hbs
|
@ -1,9 +1,9 @@
|
|||
{{!< default}}
|
||||
|
||||
{{! The comment above "< default" means - insert everything in this file into
|
||||
the {body} of the default.hbs template, which contains our header/footer. }}
|
||||
{{!-- The comment above "< default" means - insert everything in this file into
|
||||
the {{{body}}} of the default.hbs template, containing the blog header/footer. --}}
|
||||
|
||||
{{! Everything inside the #post tags pulls data from the post }}
|
||||
{{!-- Everything inside the #post tags pulls data from the post --}}
|
||||
{{#post}}
|
||||
|
||||
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
<footer class="post-footer">
|
||||
|
||||
{{! Everything inside the #author tags pulls data from the author }}
|
||||
{{!-- Everything inside the #author tags pulls data from the author --}}
|
||||
{{#author}}
|
||||
|
||||
{{#if image}}
|
||||
|
@ -72,11 +72,22 @@
|
|||
</a>
|
||||
</section>
|
||||
|
||||
{{!-- Email subscribe form at the bottom of the page --}}
|
||||
{{#if @labs.subscribers}}
|
||||
<section class="gh-subscribe">
|
||||
<h3 class="gh-subscribe-title">Subscribe to {{@blog.title}}</h3>
|
||||
<p>Get the latest posts delivered right to your inbox.</p>
|
||||
{{subscribe_form placeholder="Your email address"}}
|
||||
<span class="gh-subscribe-rss">or subscribe <a href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/">via RSS</a> with Feedly!</span>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
</footer>
|
||||
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{!-- Links to Previous/Next posts --}}
|
||||
<aside class="read-next">
|
||||
{{#next_post}}
|
||||
<a class="read-next-story {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}" href="{{url}}">
|
||||
|
|
8
tag.hbs
8
tag.hbs
|
@ -1,7 +1,7 @@
|
|||
{{!< default}}
|
||||
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}
|
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
|
||||
|
||||
{{! If we have a tag cover, display that - else blog cover - else nothing }}
|
||||
{{!-- If we have a tag cover, display that - else blog cover - else nothing --}}
|
||||
<header class="main-header tag-head {{#if tag.image}}" style="background-image: url({{tag.image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}">
|
||||
<nav class="main-nav overlay clearfix">
|
||||
{{#if @blog.logo}}<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>{{/if}}
|
||||
|
@ -23,10 +23,10 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{! The main content area on the homepage }}
|
||||
{{!-- The main content area on the homepage --}}
|
||||
<main class="content" role="main">
|
||||
|
||||
{{! The tag below includes the post loop - partials/loop.hbs }}
|
||||
{{!-- The tag below includes the post loop - partials/loop.hbs --}}
|
||||
{{> "loop"}}
|
||||
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue