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 70c9c97fdd7d310a729bf92730c2247d9d2d8ff0..e160ec73a0da5f88eb3ef671df824cef792c38ef 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 80346bbbc995f1f12e52523095cca50d8aa53bd1..27cd23ab605ae37ba5047f1972a86c1c9d61dce6 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 a5727e86e7ab7df953c689e08b5d4e86b231fe51..6a2ae4971a04289c205ddbc71e4e681c1c10f377 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 534aa229349d277215f29bf165785b15b1859f45..300d645a0dec9670af76d7003b371447ff43a88b 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 c66711f718ce01e3546729ef3938bfa079dbe73d..e4966b7e6ceed379f91a028baf18c17c11bdb9bd 100644 --- a/blog-web/src/main/resources/templates/index.ftl +++ b/blog-web/src/main/resources/templates/index.ftl @@ -7,6 +7,8 @@
+ <#-- 广告位 --> + <@prompt>