diff --git a/package/hexo-theme-async/layout/page.ejs b/package/hexo-theme-async/layout/page.ejs index a7a00abf..1f24b04d 100644 --- a/package/hexo-theme-async/layout/page.ejs +++ b/package/hexo-theme-async/layout/page.ejs @@ -5,4 +5,6 @@ <%- partial('./comment') %> <%} else if (page.type=='about'){%> <%- partial('./about',{post: page }) %> +<%} else if (page.type=='project'){%> + <%- partial('./project',{post: page }) %> <%}%> diff --git a/package/hexo-theme-async/layout/project.ejs b/package/hexo-theme-async/layout/project.ejs new file mode 100644 index 00000000..b58b4bc8 --- /dev/null +++ b/package/hexo-theme-async/layout/project.ejs @@ -0,0 +1,68 @@ +
+ + + <% let banner = page.banner || {}; %> + <%- partial('./_partial/banner', { + ...theme.banner.default, + bannerTitle: page.title, + ...banner + }) %> + + +
+
+ <% if(!page.single_column) { %> + + <% } %> +
+ + +
+
+ +
+
+
+ <%- page.title %> +
+
+
+ + <% if(Array.isArray(theme.projects)){ %> + <% theme.projects.forEach((item,index)=>{ %> +
+
+
<%- item.title %>
+
+ <% item.children.forEach((project,index)=>{ %> +
+
+
+
<%- project.name %>
+
<%- project.desc %>
+ Github +
+
+
+ <%})%> +
+ <%})%> + <% } %> + +
+ + + <%- partial('./_partial/footer') %> + + +
+ + +
+
+
+
\ No newline at end of file diff --git a/package/hexo-theme-async/source/css/_components/card.less b/package/hexo-theme-async/source/css/_components/card.less index 12d0676c..a348c117 100644 --- a/package/hexo-theme-async/source/css/_components/card.less +++ b/package/hexo-theme-async/source/css/_components/card.less @@ -918,4 +918,25 @@ .trm-sliders-card { overflow: hidden } +} + +// project card +.trm-project-card { + background-color: @theme-bg-color; + position : relative; + overflow : hidden; + border-radius : 10px; + margin-bottom : 40px; + box-shadow : @box-shadow; + padding : 40px; + text-align : center; + + .trm-project-desc { + height : 3rem; + overflow: hidden; + } + + &:hover { + transform: scale(1.05); + } } \ No newline at end of file