From 82614a5c9add66d284a7319cc50f6fc8b3ea618c Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 23 Oct 2021 18:12:17 +0800 Subject: [PATCH] website: update website template. --- template/details.ejs | 10 +++---- template/hot.ejs | 10 +++---- template/index.ejs | 10 ++++--- template/list.ejs | 8 ++--- template/partial/footer.ejs | 6 ++++ template/{ => partial}/header.ejs | 0 template/styl/index.styl | 30 ++++++++++++++----- template/{ => widget}/footer.ejs | 12 ++------ template/{ => widget}/search.ejs | 50 +++++++++++++++---------------- 9 files changed, 74 insertions(+), 62 deletions(-) create mode 100644 template/partial/footer.ejs rename template/{ => partial}/header.ejs (100%) rename template/{ => widget}/footer.ejs (61%) rename template/{ => widget}/search.ejs (89%) diff --git a/template/details.ejs b/template/details.ejs index da2fa3af2f..8e3604993d 100644 --- a/template/details.ejs +++ b/template/details.ejs @@ -1,7 +1,5 @@ - -<%-include('header'); %> -<%- include('search',{type: "list"}); %> - +<%- include('partial/header'); %> +<%- include('widget/search',{type: "list"}); %>
<% if(md_path){ %> @@ -12,5 +10,5 @@ <% } %> {{content}}
- -<%- include('footer',{type: "list"}); %> \ No newline at end of file +<%- include('widget/footer',{type: "list"}); %> +<%- include('partial/footer'); %> \ No newline at end of file diff --git a/template/hot.ejs b/template/hot.ejs index bb2f0e68b3..73d79b5c36 100644 --- a/template/hot.ejs +++ b/template/hot.ejs @@ -1,7 +1,5 @@ - -<%- include('header',{src:""}); %> -<%- include('search',{type: "list"}); %> - +<%- include('partial/header'); %> +<%- include('widget/search',{type: "list"}); %>
- -<%- include('footer',{type: 'list'}); %> \ No newline at end of file +<%- include('widget/footer',{type: "list"}); %> +<%- include('partial/footer'); %> diff --git a/template/index.ejs b/template/index.ejs index 184166019b..fa15264bb6 100644 --- a/template/index.ejs +++ b/template/index.ejs @@ -1,4 +1,6 @@ - -<%- include('header'); %> -<%- include('search',{type: "index"}); %> -<%- include('footer',{type: "index"}); %> \ No newline at end of file +<%- include('partial/header'); %> +
+<%- include('widget/search',{type: "home"}); %> +<%- include('widget/footer',{type: "home"}); %> +
+<%- include('partial/footer'); %> \ No newline at end of file diff --git a/template/list.ejs b/template/list.ejs index 3b702af5a3..b064b21935 100644 --- a/template/list.ejs +++ b/template/list.ejs @@ -1,6 +1,5 @@ - -<%- include('header',{src:""}); %> -<%- include('search',{type: "list"}); %> +<%- include('partial/header'); %> +<%- include('widget/search',{type: "list"}); %>
-<%- include('footer',{type: 'list'}); %> \ No newline at end of file +<%- include('widget/footer',{type: "list"}); %> +<%- include('partial/footer'); %> \ No newline at end of file diff --git a/template/partial/footer.ejs b/template/partial/footer.ejs new file mode 100644 index 0000000000..8297e0a5f0 --- /dev/null +++ b/template/partial/footer.ejs @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/template/header.ejs b/template/partial/header.ejs similarity index 100% rename from template/header.ejs rename to template/partial/header.ejs diff --git a/template/styl/index.styl b/template/styl/index.styl index 13e939a6fc..dc9728eee7 100644 --- a/template/styl/index.styl +++ b/template/styl/index.styl @@ -183,10 +183,27 @@ a { color #616161 font-size 14px font-weight 300 - border-top: 1px solid #efefef; - padding-bottom: 50px; - &.footer_index { - border-top: 0 + border-top 1px solid #efefef + padding-bottom 50px; + padding 31px 6px 50px 6px + &.home { + border-top 0 + } +} +.header.home { + .header_inner { + display flex + flex-direction column + align-items center + } + .logo { + min-height 140px + display flex + align-items center + } + .search { + display flex + min-width 320px } } @@ -209,9 +226,6 @@ a { width 136px } } - .footer { - display none - } } .search_list { @@ -269,7 +283,7 @@ a { } } -.header_inner, .hotlist { +.header_inner, .hotlist, .search_list { max-width 920px margin 0 auto } diff --git a/template/footer.ejs b/template/widget/footer.ejs similarity index 61% rename from template/footer.ejs rename to template/widget/footer.ejs index 890b64a0a0..d442a41068 100644 --- a/template/footer.ejs +++ b/template/widget/footer.ejs @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/template/search.ejs b/template/widget/search.ejs similarity index 89% rename from template/search.ejs rename to template/widget/search.ejs index c5e2d7fe2f..9caa7068d1 100644 --- a/template/search.ejs +++ b/template/widget/search.ejs @@ -1,29 +1,29 @@ - - - logo - Linux Command Logo. https://github.com/jaywcjlove - - - - + + + logo + Linux Command Logo. https://github.com/jaywcjlove + + + + -
-
-
\ No newline at end of file