-
- <% (config.materialx && config.materialx.nav_menu && (config.materialx.nav_menu||[]) || (theme.materialx.nav_menu||[])).forEach(function(value){ %>
-
- - - - <%=value.name%> - - - <%})%> + <% if (config.nav_menu) { %> + <% (config.nav_menu || []).forEach(function(value){ %> +
- + + <%=value.name%> + + + <%})%> + <% } %>
-
- <% if (theme.nav_search.enable === true) { %>
+ <% if (config.search.enable === true) { %>
- <% } %>
- @@ -52,12 +53,14 @@ diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 301bec5..1971cab 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -6,20 +6,22 @@ <%- js('js/jquery.fitvids.js') %> - +<% if (config.search && config.search.enable) { %> + +<% } %> <%- js('js/search.js') %> <%- js('js/app.js') %> diff --git a/layout/_partial/side.ejs b/layout/_partial/side.ejs index 5814a70..64a39f7 100755 --- a/layout/_partial/side.ejs +++ b/layout/_partial/side.ejs @@ -1,3 +1,20 @@ -<% (config.materialx && config.materialx.widgets && (config.materialx.widgets||[]) || (theme.materialx.widgets||[])).forEach(function(name){ %> - <%- partial('../_widget/'+name) %> -<% }) %> +<% if (config.widgets){ %> + <% if (config.widgets.author){ %> + <%- partial('../_widget/author') %> + <% } %> + <% if (config.widgets.categories){ %> + <%- partial('../_widget/categories') %> + <% } %> + <% if (config.widgets.tagcloud){ %> + <%- partial('../_widget/tagcloud') %> + <% } %> + <% if (config.widgets.musicid){ %> + <%- partial('../_widget/music') %> + <% } %> + <% if (config.widgets.links){ %> + <%- partial('../_widget/links') %> + <% } %> + <% if (config.widgets.toc){ %> + <%- partial('../_widget/toc') %> + <% } %> +<% } %> diff --git a/layout/_widget/about.ejs b/layout/_widget/about.ejs deleted file mode 100755 index 400ff7f..0000000 --- a/layout/_widget/about.ejs +++ /dev/null @@ -1,33 +0,0 @@ -
- <%= item.name %><%= item.posts.length %>
- <% }); %>
-
- <%= item.name %><%= item.posts.length %>
+ <% }); %>
+
-
- <%= item.name %>-<%= item.desc %>-
- <% }) %>
-
-
- - - <%= item.name %> --
- <% }) %>
-
-
+ + + <%= item.name %> ++
+ <% }) %>
+
- <% if(config.avatar) { %>
-
- <% } else { %>
-
- <%} %>
-
-
- <% if (config.materialx && (config.materialx.widgets_about.title)){ %>
-
- <% if (config.materialx && config.materialx.widgets_about.social){ %>
- <%= config.materialx.widgets_about.title %>
- <% } %> -
-
- <% if (config.materialx && (config.materialx.widgets_about.motto)){ %>
- <%= config.materialx.widgets_about.motto %>
- <% } %>
-
-
- <% (config.materialx && config.materialx.footer_social && (config.materialx.footer_social||[]) || (theme.materialx.footer_social||[])).forEach(function(value){ %>
- <% if (value.url && value.slug) { %>
-
-
-
- <%}%>
- <%})%>
-
- <% } %>
-
-
+
+
+ <%} %>
+
+ <% if (config.widgets.author.title){ %>
+
+ <% if (config.widgets.author.social){ %>
+
+ <% } %>
+ <%= config.widgets.author.title %>
+ <% } %> + <% if (config.widgets.author.motto){ %> +
+
+ <%= config.widgets.author.motto %>
+
+ <% } %>
+ 分类
-
- <% if (site.categories.length){ %>
-
+ -
- <% site.categories.sort('name').each(function(item){ %>
-
分类
+
+ <% if (site.categories.length){ %>
+
-
+ <% site.categories.sort('name').each(function(item){ %>
+
联系
-
-
--
- <% ((config.materialx && (config.materialx.widgets_contacts||[])) || (theme.materialx.widgets_contacts||[])).forEach(function(item){ %>
-
友链
-
-
- -
- <% (config.materialx && (config.materialx.widgets_links||[])).forEach(function(item){ %>
-
友链
+
+
+-
+ <% (config.widgets.links||[]).forEach(function(item){ %>
+
音乐
-
+
- 标签
-
- <%- tagcloud(site.tags, {
- min_font: 14,
- max_font: 24,
- color: true,
- start_color: '#999',
- end_color: '#555',
- }) %>
-
- 标签
+
+ <%- tagcloud(site.tags, {
+ min_font: 14,
+ max_font: 24,
+ color: true,
+ start_color: '#999',
+ end_color: '#555',
+ }) %>
+
+