Commits

Nhi Nguyen  committed 40fdb3a

CONFDEV-17399: refactor code & update css

  • Participants
  • Parent commits c8e7749

Comments (0)

Files changed (2)

File src/main/java/com/atlassian/confluence/plugins/macros/advanced/BlogPostsMacro.java

 import com.atlassian.confluence.security.PermissionManager;
 import com.atlassian.confluence.setup.settings.SettingsManager;
 import com.atlassian.confluence.spaces.Space;
+import com.atlassian.confluence.spaces.Spaced;
 import com.atlassian.confluence.user.AuthenticatedUserThreadLocal;
 import com.atlassian.confluence.user.UserAccessor;
 import com.atlassian.confluence.util.ExcerptHelper;
     private Space getCurrentSpace(ContentEntityObject ceo)
     {
         Space currentSpace = null;
-        if (ceo instanceof Comment)
+        if (ceo instanceof Spaced)
         {
-            currentSpace = ((Comment) ceo).getSpace();
-        }
-        else if (ceo instanceof PageContentEntityObject)
-        {
-            currentSpace = ((PageContentEntityObject) ceo).getSpace();
-        }
-        else if (ceo instanceof SpaceContentEntityObject)
-        {
-            currentSpace = ((SpaceContentEntityObject) ceo).getSpace();
+            currentSpace = ((Spaced) ceo).getSpace();
         }
         return currentSpace;
     }

File src/main/resources/com/atlassian/confluence/plugins/macros/advanced/blog-posts.css

     border-radius: 3px;
     border: 1px solid #cccccc;
     min-height: 160px;
-    padding: 20px;
-}
-
-.macro-blank-experience p {
-    width: 65%;
+    padding: 20px 190px 20px 20px;
 }
 
-.aui-button.black-text a{
+.aui-button.black-text a {
     color: black;
 }
 
-.columnLayout .cell.aside .macro-blank-experience,
 .columnLayout.threeColumns .macro-blank-experience,
-.columnLayout.three-equal .macro-blank-experience {
+.columnLayout .cell.aside .macro-blank-experience,
+.columnLayout.three-equal .macro-blank-experience,
+.columnLayout.sidebars .macro-blank-experience {
     background: none;
-}
-
-.columnLayout .cell.aside .macro-blank-experience p,
-.columnLayout.threeColumns .macro-blank-experience p,
-.columnLayout.three-equal .macro-blank-experience p {
-    width: 100%;
+    padding: 20px;
 }
 
 .blog-post.macro-blank-experience {