diff --git a/layout/_meta/article-copyright.ejs b/layout/_meta/article-copyright.ejs index 03b54794..0a97d666 100755 --- a/layout/_meta/article-copyright.ejs +++ b/layout/_meta/article-copyright.ejs @@ -40,7 +40,7 @@ url: 'https://creativecommons.org/licenses/by-nd/4.0' }, 'cc_by_nc_sa': { - label: __('license_content', 'CC BY-NC-SA 4.0'), + label: __('copyright.license_content', 'CC BY-NC-SA 4.0'), url: 'https://creativecommons.org/licenses/by-nc-sa/4.0' }, 'public_domain': { @@ -48,24 +48,15 @@ url: null } }; - const isValidLicense = (licenseKey) => { - return licenseMap.hasOwnProperty(licenseKey); - }; - - - const getLicenseType = () => { - if (page.copyright && page.copyright !== "") { - return 'custom'; - } else if (page.license && isValidLicense(page.license)) { - return page.license; - } else if (theme.articles.copyright.default && isValidLicense(theme.articles.copyright.default)) { - return theme.articles.copyright.default; - } else { - return 'cc_by_nc_sa'; - } - }; - const licenseType = getLicenseType(); + let licenseType = 'cc_by_nc_sa'; // Default license type + if (page.copyright && page.copyright !== "") { + licenseType = 'custom'; + } else if (page.license && licenseMap[page.license]) { + licenseType = page.license; + } else if (theme.articles.copyright.default && licenseMap[theme.articles.copyright.default]) { + licenseType = theme.articles.copyright.default; + } %> <% if (licenseType === 'custom') { %> @@ -73,8 +64,6 @@ <% } else { %> <%- licenseMap[licenseType].label %> <% } %> - - diff --git a/layout/article-content.ejs b/layout/article-content.ejs index 28d08b57..13d31c1f 100755 --- a/layout/article-content.ejs +++ b/layout/article-content.ejs @@ -107,7 +107,7 @@ <%- articleRecommendationGenerator(page) %> <% if (page.prev || page.next) { %> -
+
<% if (page.prev) { %>