mirror of https://github.com/docker/docs.git
Merge pull request #508 from mstanleyjones/try_implementing_reading_time
Implement per-page reading-time stats
This commit is contained in:
commit
2c1cd1d565
|
|
@ -0,0 +1,9 @@
|
|||
<span class="reading-time" title="Estimated reading time">
|
||||
<span class="reading-time-label">Estimated reading time: </span>
|
||||
{% assign words = content | number_of_words %}
|
||||
{% if words < 360 %}
|
||||
1 minute
|
||||
{% else %}
|
||||
{{ words | divided_by:180 }} minutes
|
||||
{% endif %}
|
||||
</span>
|
||||
|
|
@ -206,6 +206,7 @@ ng\:form {
|
|||
<section class="section" id="DocumentationText">
|
||||
{% if page.title %}<h1>{{ page.title }}</h1>{% endif %}
|
||||
{% if page.advisory %}<blockquote><p><strong style="color:black">{{ site.data.advisories.texts[page.advisory] }}</strong></p></blockquote>{% endif %}
|
||||
{% include read_time.html %}
|
||||
{{ content }}
|
||||
{% if page.noratings != true %}
|
||||
<div style="text-align: center; margin-top: 50px">
|
||||
|
|
|
|||
|
|
@ -346,3 +346,17 @@ color: #F04124;
|
|||
}
|
||||
|
||||
/* end search */
|
||||
|
||||
/* begin reading_time */
|
||||
|
||||
span.reading-time {
|
||||
font-style: italic;
|
||||
font-size: 80%;
|
||||
display: block;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
span.reading-time-label {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue