develop/blog #7
|
|
@ -14,7 +14,9 @@
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .Permalink }}">
|
||||||
<h2>{{ .Title }}</h2>
|
<h2>{{ .Title }}</h2>
|
||||||
{{if isset .Params "image" }}
|
{{if isset .Params "image" }}
|
||||||
|
<div class="preview">
|
||||||
<img src="{{ index .Params "image" }}" alt="{{ .Title }}" class="preview">
|
<img src="{{ index .Params "image" }}" alt="{{ .Title }}" class="preview">
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if ne .Kind "term" }}
|
{{ if ne .Kind "term" }}
|
||||||
<p class="date">{{.Date.Format "January 2, 2006"}}</p>
|
<p class="date">{{.Date.Format "January 2, 2006"}}</p>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if isset .Params "image" }}
|
{{if isset .Params "image" }}
|
||||||
<img src="{{ index .Params "image" }}" alt="{{ .Title }}" class="preview">
|
<img src="{{ index .Params "image" }}" alt="{{ .Title }}" class="heading">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<article class="row content" style="margin-top: 2em">
|
<article class="row content" style="margin-top: 2em">
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,35 @@ article p img {
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hide some pagination links on tablet/mobile-width views */
|
/* automatically hyphenate long words in summaries on list pages */
|
||||||
|
.summary {
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
-ms-hyphens: auto;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.heading {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.preview {
|
||||||
|
width: 100%;
|
||||||
|
height: 12rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.preview {
|
||||||
|
width: 100%;
|
||||||
|
height: 12rem;
|
||||||
|
object-fit: cover;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 420px) {
|
@media (max-width: 420px) {
|
||||||
|
/* hide some pagination links on mobile-width views */
|
||||||
.mobile-hidden {
|
.mobile-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -43,18 +70,19 @@ article p img {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 550px) {
|
@media (max-width: 550px) {
|
||||||
|
/* hide some pagination links on tablet-width views */
|
||||||
.tablet-hidden {
|
.tablet-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* automatically hyphenate long words in summaries on list pages */
|
/* enlarge article thumbnail on smaller views */
|
||||||
.summary {
|
div.preview {
|
||||||
-webkit-hyphens: auto;
|
height: 20rem;
|
||||||
-ms-hyphens: auto;
|
|
||||||
hyphens: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img.preview {
|
img.preview {
|
||||||
width: 100%;
|
height: 20rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,11 +143,11 @@ h6 { font-size: 1.4rem; line-height: 1.6; letter-spacing: 0; }
|
||||||
|
|
||||||
/* Larger than phablet */
|
/* Larger than phablet */
|
||||||
@media (min-width: 550px) {
|
@media (min-width: 550px) {
|
||||||
h1 { font-size: 4.0rem; }
|
h1 { font-size: 3.2rem; }
|
||||||
h2 { font-size: 3.2rem; }
|
h2 { font-size: 2.6rem; }
|
||||||
h3 { font-size: 3.0rem; }
|
h3 { font-size: 2.4rem; }
|
||||||
h4 { font-size: 2.8rem; }
|
h4 { font-size: 2.2rem; }
|
||||||
h5 { font-size: 2.4rem; }
|
h5 { font-size: 2.0rem; }
|
||||||
h6 { font-size: 1.5rem; }
|
h6 { font-size: 1.5rem; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue