feat: Subtitle typed animation
This commit is contained in:
@@ -6,6 +6,20 @@
|
||||
<%- js('fancybox/jquery.fancybox.min') %>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.subtitle.enable){ %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js"></script>
|
||||
<script>
|
||||
var typed = new Typed("#subtitle", {
|
||||
strings: ['<%= theme.subtitle.text %>'],
|
||||
startDelay: <%= theme.subtitle.startDelay %>,
|
||||
typeSpeed: <%= theme.subtitle.typeSpeed %>,
|
||||
loop: <%= theme.subtitle.loop %>,
|
||||
backSpeed: <%= theme.subtitle.backSpeed %>,
|
||||
showCursor: <%= theme.subtitle.showCursor %>
|
||||
});
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.toc && is_post()){ %>
|
||||
<%- js('/js/tocbot.min') %>
|
||||
<script>
|
||||
|
@@ -12,7 +12,13 @@
|
||||
</div>
|
||||
<div class="cover-inner text-center text-white">
|
||||
<h1><a href="<%- url_for() %>"><%= config.title %></a></h1>
|
||||
<h2><%= config.subtitle %></h2>
|
||||
<div id="subtitle-box">
|
||||
<% if (theme.subtitle.enable) { %>
|
||||
<span id="subtitle"></span>
|
||||
<% }else{ %>
|
||||
<span id="subtitle"><%= theme.subtitle.text %></span>
|
||||
<% } %>
|
||||
</div>
|
||||
<div>
|
||||
<% if (theme.cover.logo) { %>
|
||||
<img
|
||||
|
Reference in New Issue
Block a user