From 3063e7cbb89256fa58ae2399c035cf9d6bab2f0b Mon Sep 17 00:00:00 2001 From: "yadong.zhang" Date: Tue, 2 Nov 2021 13:52:12 +0800 Subject: [PATCH] =?UTF-8?q?:bulb:=20=E4=BC=98=E5=8C=96=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=E5=A2=9E=E5=8A=A0=E3=80=90=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E3=80=91=E5=B9=BF=E5=91=8A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/zyd/blog/business/enums/AdPositionEnum.java | 4 ++++ blog-web/src/main/resources/static/css/zhyd.core.css | 2 +- blog-web/src/main/resources/templates/article.ftl | 4 ++-- blog-web/src/main/resources/templates/guestbook.ftl | 4 +--- blog-web/src/main/resources/templates/index.ftl | 2 ++ blog-web/src/main/resources/templates/layout/sidebar.ftl | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/blog-core/src/main/java/com/zyd/blog/business/enums/AdPositionEnum.java b/blog-core/src/main/java/com/zyd/blog/business/enums/AdPositionEnum.java index 70c9c97..e160ec7 100644 --- a/blog-core/src/main/java/com/zyd/blog/business/enums/AdPositionEnum.java +++ b/blog-core/src/main/java/com/zyd/blog/business/enums/AdPositionEnum.java @@ -19,6 +19,10 @@ import java.util.Map; @AllArgsConstructor public enum AdPositionEnum { + /** + * 首页顶部 + */ + HOMEPAGE_TOP("首页顶部"), /** * 每次刷新页面都弹窗显示,AdType 必须为 POP */ diff --git a/blog-web/src/main/resources/static/css/zhyd.core.css b/blog-web/src/main/resources/static/css/zhyd.core.css index 80346bb..27cd23a 100644 --- a/blog-web/src/main/resources/static/css/zhyd.core.css +++ b/blog-web/src/main/resources/static/css/zhyd.core.css @@ -3609,8 +3609,8 @@ img { /* 广告 */ .ad-mark { - padding: 8px; position: relative; + margin-bottom: 10px; } .ad-mark:after { diff --git a/blog-web/src/main/resources/templates/article.ftl b/blog-web/src/main/resources/templates/article.ftl index a5727e8..6a2ae49 100644 --- a/blog-web/src/main/resources/templates/article.ftl +++ b/blog-web/src/main/resources/templates/article.ftl @@ -109,7 +109,7 @@ <#-- 广告位 --> - +
<#-- 广告位 --> - + <#if !article.requiredAuth> <#--评论--> <#if article.comment> diff --git a/blog-web/src/main/resources/templates/guestbook.ftl b/blog-web/src/main/resources/templates/guestbook.ftl index 534aa22..300d645 100644 --- a/blog-web/src/main/resources/templates/guestbook.ftl +++ b/blog-web/src/main/resources/templates/guestbook.ftl @@ -45,9 +45,7 @@ <#-- 广告位 --> -
- -
+ <#if config.comment! && config.comment == 1>
diff --git a/blog-web/src/main/resources/templates/index.ftl b/blog-web/src/main/resources/templates/index.ftl index c66711f..e4966b7 100644 --- a/blog-web/src/main/resources/templates/index.ftl +++ b/blog-web/src/main/resources/templates/index.ftl @@ -7,6 +7,8 @@
+ <#-- 广告位 --> + <@prompt>