diff --git a/README.md b/README.md index c4c2bb6..6342400 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,15 @@ image: thumb: thumbnail-image.jpg #keep it square 200x200 px is good ``` +If you want to apply attribution to a feature image use the following YAML front matter on posts or pages. Image credits appear directly below the feature image with a link back to the original source. + +``` yaml +image: + feature: feature-image-filename.jpg + credit: Michael Rose #name of the person or site you want to credit + creditlink: http://mademistakes.com #url to their site or licensing +``` + #### Categories In the sample `_posts` folder you may have noticed `category: articles` in the front matter. I like keeping all posts grouped in the same folder. If you decide to rename or add categories you will need to modify the permalink in `articles.md` along with the filename (if renaming). diff --git a/_layouts/page.html b/_layouts/page.html index ee85b10..38044d1 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -14,7 +14,7 @@
- {% if page.image.feature %}{{ page.title }}{% endif %} + {% if page.image.feature %}{{ page.title }}{% if page.image.credit %}

Photo Credit: {{ page.image.credit }}{% endif %}{% endif %}

{% if page.headline %}{{ page.headline }}{% else %}{{ page.title }}

{% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index f836f50..5dc2cf4 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -14,7 +14,7 @@
- {% if page.image.feature %}{{ page.title }}{% endif %} + {% if page.image.feature %}{{ page.title }}{% if page.image.credit %}

Photo Credit: {{ page.image.credit }}{% endif %}{% endif %}

diff --git a/_posts/2011-03-10-sample-post.md b/_posts/2011-03-10-sample-post.md index 3d3acaa..08d5fe0 100644 --- a/_posts/2011-03-10-sample-post.md +++ b/_posts/2011-03-10-sample-post.md @@ -7,6 +7,8 @@ category: articles tags: [sample post] image: feature: so-simple-sample-image-1.jpg + credit: Michael Rose + creditlink: http://mademistakes.com comments: true --- diff --git a/_posts/2012-05-22-readability-post.md b/_posts/2012-05-22-readability-post.md index ade68da..f3036fc 100644 --- a/_posts/2012-05-22-readability-post.md +++ b/_posts/2012-05-22-readability-post.md @@ -6,6 +6,8 @@ category: articles tags: [sample post, readability, test, intro] image: feature: so-simple-sample-image-2.jpg + credit: Michael Rose + creditlink: http://mademistakes.com comments: true --- diff --git a/_posts/2013-05-23-readability-feature-post.md b/_posts/2013-05-23-readability-feature-post.md index 23c1788..fb5b972 100644 --- a/_posts/2013-05-23-readability-feature-post.md +++ b/_posts/2013-05-23-readability-feature-post.md @@ -7,6 +7,8 @@ tags: [sample post, readability] modified: 2013-06-30 image: feature: so-simple-sample-image-3.jpg + credit: Michael Rose + creditlink: http://mademistakes.com comments: true --- diff --git a/about.md b/about.md index 2792be4..6b327ad 100644 --- a/about.md +++ b/about.md @@ -5,6 +5,8 @@ title: About the Jekyll Theme tags: [Jekyll, theme, simple, minimal, minimalism, responsive] image: feature: so-simple-sample-image-4.jpg + credit: Michael Rose + creditlink: http://mademistakes.com --- Looking for a simple, responsive, theme for your Jekyll powered blog? Well look no further. Here be **So Simple Theme**, the followup to [**Minimal Mistakes**](http://mmistakes.github.io/minimal-mistakes) --- by designer slash illustrator [Michael Rose](http://mademistakes). diff --git a/assets/css/main.css b/assets/css/main.css index d1a60db..8b9e04f 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -38,6 +38,9 @@ a:hover{color:#000000;} a:focus{outline:thin dotted;color:#000000;} a:hover,a:active{outline:0;} figcaption{padding-top:10px;font-size:14px;font-size:0.875rem;line-height:1.7143;line-height:1.3;color:#3c3c3c;} +.image-credit{margin:0 auto;max-width:440px;padding-top:5px;padding-right:20px;padding-left:20px;text-align:right;font-size:14px;font-size:0.875rem;line-height:1.7143;line-height:1.3;color:#6f6f6f;*zoom:1;}.image-credit:before,.image-credit:after{display:table;content:"";line-height:0;} +.image-credit:after{clear:both;} +@media only screen and (min-width: 48em){.image-credit{max-width:760px;padding-right:60px;padding-left:60px;}}@media only screen and (min-width: 62.5em){.image-credit{max-width:960px;}}.image-credit a{color:#6f6f6f;} .notice{margin-top:1.5em;padding:.5em 1em;text-indent:0;font-size:16px;font-size:1rem;background-color:#f2f2f2;border:1px solid #e6e6e6;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} blockquote{font-family:'volkhov',serif;font-style:italic;font-size:24px;font-size:1.5rem;line-height:1;margin-bottom:24px;margin-bottom:1.5rem;padding-left:20px;border-left:8px solid #000000;} .footnotes{font-size:14px;font-size:0.875rem;line-height:1.7143;font-family:'source-sans-pro',sans-serif;} @@ -594,7 +597,7 @@ body{margin:0;padding:0;width:100%;background-color:#ffffff;border-top:5px solid #main:after{clear:both;} .entry,.hentry{*zoom:1;border-bottom:1px solid #cccccc;border-bottom:1px solid rgba(0, 0, 0, 0.1);}.entry:before,.hentry:before,.entry:after,.hentry:after{display:table;content:"";line-height:0;} .entry:after,.hentry:after{clear:both;} -.entry-feature-image{margin:20px 0 40px;width:100%;}@media only screen and (min-width: 48em){.entry-feature-image{margin-top:-75px;}}@media only screen and (min-width: 62.5em){.entry-feature-image{margin-top:-145px;}} +.entry-feature-image{margin:20px 0 0;width:100%;}@media only screen and (min-width: 48em){.entry-feature-image{margin-top:-75px;}}@media only screen and (min-width: 62.5em){.entry-feature-image{margin-top:-145px;}} .entry-header{max-width:640px;width:100%;margin-right:auto;margin-left:auto;}@media only screen and (min-width: 62.5em){.entry-header{max-width:100%;margin-right:0;margin-left:0;}} .entry-tags{display:block;margin-top:2em;text-transform:uppercase;font-size:16px;font-size:1rem;font-weight:600;}.entry-tags a{color:#222222;} span+.entry-title{margin-top:0;} diff --git a/assets/less/page.less b/assets/less/page.less index f509c3f..9ca6278 100644 --- a/assets/less/page.less +++ b/assets/less/page.less @@ -177,7 +177,7 @@ body { border-bottom: 1px solid fade(@black,10); } .entry-feature-image { - margin: 20px 0 40px; + margin: 20px 0 0; width: 100%; @media @medium { margin-top: -75px; diff --git a/assets/less/typography.less b/assets/less/typography.less index 9dd28cb..0328910 100644 --- a/assets/less/typography.less +++ b/assets/less/typography.less @@ -41,6 +41,32 @@ figcaption { color: lighten(@text-color, 10); } +// Feature Image Caption +// -------------------------------------------------- +.image-credit { + margin: 0 auto; + max-width: 440px; + padding-top: 5px; + padding-right: 20px; + padding-left: 20px; + text-align: right; + .font(14); + line-height: 1.3; + color: lighten(@text-color, 30); + .clearfix(); + @media @medium { + max-width: 760px; + padding-right: 60px; + padding-left: 60px; + } + @media @large { + max-width: 960px; + } + a { + color: lighten(@text-color, 30); + } +} + // Note text // -------------------------------------------------- .notice { diff --git a/theme-setup.md b/theme-setup.md index 7b12b24..c54671b 100644 --- a/theme-setup.md +++ b/theme-setup.md @@ -108,7 +108,14 @@ image: thumb: thumbnail-image.jpg #keep it square 200x200 px is good {% endhighlight %} -The large texture images used in *Minimal Mistakes* are from [Love Textures](http://lovetextures.com), probably a good idea to swap these out with your own photos... +If you want to apply attribution to a feature image use the following YAML front matter on posts or pages. Image credits appear directly below the feature image with a link back to the original source. + +{% highlight yaml %} +image: + feature: feature-image-filename.jpg + credit: Michael Rose #name of the person or site you want to credit + creditlink: http://mademistakes.com #url to their site or licensing +{% endhighlight %} #### Categories