Browse Source

Added share.html partial

master
digitalcraftsman 10 years ago
parent
commit
8c6b4e7155
  1. 34
      layouts/_default/single.html
  2. 9
      layouts/partials/share.html

34
layouts/_default/single.html

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<section id="wrapper">
<article class="post">
<header>
<h1>{{ .Title }}</h1>
<h2 class="headline">{{ .Date.Format "02/01/2006" }}</h2>
</header>
<section id="post-body">
{{ .Content }}
</section>
</article>
<footer id="post-meta" class="clearfix">
<!-- TODO: Add support for twitter with conditional behavior -->
{{ with .Site.Params.twitter }}<a href="http://twitter.com/{{ . }}">{{ end }}
<img class="avatar" src="{{ .Site.BaseURL }}images/avatar.png">
<div>
<span class="dark">{{ .Site.Params.name }}</span>
<span>{{ .Site.Params.bio }}</span>
</div>
{{ with .Site.Params.twitter }}</a>{{ end }}
<section id="sharing">
{{ partial "share.html" . }}
</section>
</footer>
</section>
{{ partial "js.html" . }}
</body>
</html>

9
layouts/partials/share.html

@ -0,0 +1,9 @@
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Site.BaseURL }}{{ .Permalink }} - {{ .Title }} {{ with .Site.Params.twitter }}by @{{ . }}{{ end }}"><span class="icon-twitter"> Tweet</span></a>
<a class="facebook" href="#" onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;"><span class="icon-facebook-rect"> Share</span>
</a>
Loading…
Cancel
Save