Add screenshot plugin (#217)
This commit is contained in:
@@ -26,5 +26,6 @@
|
||||
"skyline",
|
||||
"stackoverflow",
|
||||
"stock",
|
||||
"achievements"
|
||||
"achievements",
|
||||
"screenshot"
|
||||
]
|
||||
20
source/templates/classic/partials/screenshot.ejs
Normal file
20
source/templates/classic/partials/screenshot.ejs
Normal file
@@ -0,0 +1,20 @@
|
||||
<% if (plugins.screenshot) { %>
|
||||
<section>
|
||||
<h2 class="field">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M15 3H7c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM6 5H2V4h4v1zm4.5 7C8.56 12 7 10.44 7 8.5S8.56 5 10.5 5 14 6.56 14 8.5 12.44 12 10.5 12zM13 8.5c0 1.38-1.13 2.5-2.5 2.5S8 9.87 8 8.5 9.13 6 10.5 6 13 7.13 13 8.5z"></path></svg>
|
||||
<%= plugins.screenshot.title %>
|
||||
</h2>
|
||||
<div class="row">
|
||||
<section class="row center">
|
||||
<% if (plugins.screenshot.error) { %>
|
||||
<div class="field error">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2.343 13.657A8 8 0 1113.657 2.343 8 8 0 012.343 13.657zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"></path></svg>
|
||||
<%= plugins.screenshot.error.message %>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<img class="screenshot autosize" src="<%= plugins.screenshot.image %>" height="<%= plugins.screenshot.height %>" width="<%= plugins.screenshot.width %>" alt=""/>
|
||||
<% } %>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<% } %>
|
||||
@@ -932,6 +932,12 @@
|
||||
stroke: rgba(127, 127, 127, 0.4) !important;
|
||||
}
|
||||
|
||||
/* Autosize */
|
||||
.autosize {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Fade animation */
|
||||
.af {
|
||||
opacity: 0;
|
||||
|
||||
Reference in New Issue
Block a user