mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
Auto-resize large images to fit screen; Improve sharing style
This commit is contained in:
parent
0d6971aff3
commit
e714825a7a
7 changed files with 82 additions and 22 deletions
|
@ -6,7 +6,7 @@
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
<div>
|
<div>
|
||||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||||
<p>{{ .Summary }}</p>
|
<div class="article-style"><p>{{ .Summary }}</p></div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{ partial "article_metadata" (dict "content" . "is_list" 0) }}
|
{{ partial "article_metadata" (dict "content" . "is_list" 0) }}
|
||||||
|
|
||||||
<div class="post" itemprop="articleBody">
|
<div class="article-style" itemprop="articleBody">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<div class="article-list-item" itemscope="" itemprop="blogPost">
|
<div class="article-list-item" itemscope="" itemprop="blogPost">
|
||||||
<h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
|
<h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
|
||||||
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
|
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
|
||||||
<p itemprop="articleBody">
|
<p class="article-style" itemprop="articleBody">
|
||||||
{{ if .Truncated }}
|
{{ if .Truncated }}
|
||||||
{{ .Summary }}
|
{{ .Summary }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{ with .Params.external_link }}<a class="btn btn-primary btn-outline" href="{{ . }}">Go to Project Site</a>{{ end }}
|
{{ with .Params.external_link }}<a class="btn btn-primary btn-outline" href="{{ . }}">Go to Project Site</a>{{ end }}
|
||||||
|
|
||||||
<div class="post" itemprop="articleBody">
|
<div class="article-style" itemprop="articleBody">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<div class="space-below"></div>
|
<div class="space-below"></div>
|
||||||
|
|
||||||
{{ .Content }}
|
<div class="article-style">{{ .Content }}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div>
|
<div>
|
||||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||||
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
|
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
|
||||||
<p>{{ .Summary }}</p>
|
<div class="article-style"><p>{{ .Summary }}</p></div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
* Fonts
|
* Fonts
|
||||||
**************************************************/
|
**************************************************/
|
||||||
|
|
||||||
@import url(//fonts.googleapis.com/css?family=Lato:400,700);
|
@import url(//fonts.googleapis.com/css?family=Lato:400,700|Merriweather|Roboto+Mono);
|
||||||
@import url(//fonts.googleapis.com/css?family=Roboto+Mono);
|
|
||||||
@import url(//fonts.googleapis.com/css?family=Merriweather);
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Core
|
* Core
|
||||||
|
@ -82,10 +80,21 @@ h3.post-title a {
|
||||||
-webkit-transition: color 0.6s ease;
|
-webkit-transition: color 0.6s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img, video {
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
pre, code {
|
pre, code {
|
||||||
font-family: 'Roboto Mono', 'Courier New', 'Courier', monospace;
|
font-family: 'Roboto Mono', 'Courier New', 'Courier', monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin: 0 0 1.5rem;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.space-below {
|
.space-below {
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
@ -136,12 +145,57 @@ footer p {
|
||||||
background-color: rgb(247, 247, 247);
|
background-color: rgb(247, 247, 247);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
* Sharing
|
||||||
|
**************************************************/
|
||||||
|
|
||||||
|
.share-box {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.share {
|
||||||
|
list-style: none;
|
||||||
|
text-align: right;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.share li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.share li .fa {
|
||||||
|
display: inline-block;
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 37px;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
transition: all 150ms ease-in-out;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.share li a {
|
||||||
|
background-color: #b5c6ce;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 50%;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.share li:hover .fa {
|
||||||
|
-moz-transform: scale(1.4);
|
||||||
|
-webkit-transform: scale(1.4);
|
||||||
|
transform: scale(1.4)
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Blog Articles
|
* Blog Articles
|
||||||
**************************************************/
|
**************************************************/
|
||||||
|
|
||||||
.article-metadata {
|
.article-metadata {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
line-height: 37px; /* Match share bar line height. */
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-list-item {
|
.article-list-item {
|
||||||
|
@ -161,23 +215,29 @@ footer p {
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.share {
|
.article-style img, .article-style video {
|
||||||
list-style: none;
|
box-shadow: 0 0 1px #edefed;
|
||||||
float: right;
|
-moz-box-shadow: 0 0 1px #edefed;
|
||||||
|
-webkit-box-shadow: 0 0 1px #edefed;
|
||||||
|
box-shadow: 1px 1px 0px #edefed,-1px -1px 0px #edefed,1px -1px 0px #edefed,-1px 1px 0px #edefed; */
|
||||||
|
-moz-box-shadow: 1px 1px 0px #edefed,-1px -1px 0px #edefed,1px -1px 0px #edefed,-1px 1px 0px #edefed;
|
||||||
|
-webkit-box-shadow: 1px 1px 0px #edefed,-1px -1px 0px #edefed,1px -1px 0px #edefed,-1px 1px 0px #edefed;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 60px;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.share li {
|
.article-style figure {
|
||||||
margin-right: 3px;
|
margin-top: 60px;
|
||||||
margin-left: 3px;
|
margin-bottom: 60px;
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.share li:last-child {
|
.article-style figure img {
|
||||||
margin-right: 0px;
|
margin-top: 0;
|
||||||
}
|
margin-bottom: 0;
|
||||||
|
|
||||||
ul.share li i {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#comments {
|
#comments {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue