Skip to content

Commit

Permalink
SAK-43993 Library,Simple RSS Portlet - fix news feed formatting (saka…
Browse files Browse the repository at this point in the history
…iproject#8613)

* SAK-43993 Library,Simple RSS Portlet - fix news feed formatting

Co-authored-by: Michael Greene <[email protected]>

Co-authored-by: Shawn Foster <[email protected]>
  • Loading branch information
profmikegreene and fostersdesign authored Oct 1, 2020
1 parent c3462c4 commit aafd1e6
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 88 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.#{$namespace}sakai-simple-rss {
.#{$namespace}toolBody--sakai-simple-rss {
padding: 0 $standard-spacing $standard-spacing;
}
.simple-rss-portlet form p {
margin-top: $standard-spacing;
margin-bottom: 0;
}
.news-items ul {
padding:0;
display:flex;
flex-direction: column;
}
.news-items li {
list-style-type: none;
display:flex;
flex-direction: row;
margin-bottom: $standard-spacing;
}
/** overrides for CSyndFeed **/
/** Sakai version **/
.news-item-img {
flex: 1 0 0 ;
margin-right: $standard-spacing;
}
.news-item-content {
flex: 4 0px;
}
.news-items h4 {
margin-top:0;
line-height: 1.25;
}
.news-item-attachment {
font-size: 0.9em;
flex: auto;
background-color: var(--sakai-background-color-2);
border: 1px solid var(--sakai-border-color);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ body > .portletBody > #calendarForm{
.navIntraTool {
margin: 0;
}
}
}
1 change: 1 addition & 0 deletions library/src/morpheus-master/sass/tool.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
@import "modules/tool/rubrics/rubrics";
@import "modules/tool/authz/authz";
@import "modules/tool/delegatedaccess/delegatedaccess";
@import "modules/tool/simplerss/simplerss";

@import "base/rtl";

Expand Down
64 changes: 0 additions & 64 deletions simple-rss-portlet/src/main/webapp/css/simple-rss-portlet.css

This file was deleted.

1 change: 0 additions & 1 deletion simple-rss-portlet/src/main/webapp/pages/edit.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<fmt:setLocale value="${language}" />
<fmt:setBundle basename="au.edu.anu.portal.portlets.rss.utils.messages" />

<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/simple-rss-portlet.css" />

<div class="simple-rss-portlet">

Expand Down
46 changes: 24 additions & 22 deletions simple-rss-portlet/src/main/webapp/pages/view.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>

<portlet:defineObjects />
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/simple-rss-portlet.css" />

<div class="news-feed">

Expand All @@ -31,39 +30,42 @@
<img src="${SyndFeed.image.url}" alt="${SyndFeed.image.description}" class="news-feed-img"/>
</a>
</c:if>
<p>${SyndFeed.description}</p>
<h1>${SyndFeed.description}</h1>
</div>

<div class="news-items">
<ul>
<c:forEach items="${SyndFeed.entries}" var="SyndEntry" end="${maxItems}">
<li>
<c:if test="${not empty Media[SyndEntry.uri] && Media[SyndEntry.uri].image}">
<img src="${Media[SyndEntry.uri].url}" class="news-item-img"/>
</c:if>
<h3>
<c:choose>
<c:when test="${not empty SyndEntry.link}">
<a target="_blank" href="${SyndEntry.link}" class="news-item-title">${SyndEntry.title}</a>
</c:when>
<c:otherwise>
${SyndEntry.title}
</c:otherwise>
</c:choose>
</h3>
<span class="news-item-excerpt">${SyndEntry.description.value}</span>

<c:if test="${not empty Media[SyndEntry.uri] && !Media[SyndEntry.uri].image}">
<div class="news-item-attachment">
<a href="${Media[SyndEntry.uri].url}">${Media[SyndEntry.uri].displayName}</a>
(${Media[SyndEntry.uri].type}, ${Media[SyndEntry.uri].displayLength})
<div class="news-item-img">
<img src="${Media[SyndEntry.uri].url}" />
</div>
</c:if>

<div class="news-item-content">
<h2>
<c:choose>
<c:when test="${not empty SyndEntry.link}">
<a target="_blank" href="${SyndEntry.link}" class="news-item-title">${SyndEntry.title}</a>
</c:when>
<c:otherwise>
${SyndEntry.title}
</c:otherwise>
</c:choose>
</h2>
<span class="news-item-excerpt">${SyndEntry.description.value}</span>

<c:if test="${not empty Media[SyndEntry.uri] && !Media[SyndEntry.uri].image}">
<div class="news-item-attachment">
<a href="${Media[SyndEntry.uri].url}">${Media[SyndEntry.uri].displayName}</a>
(${Media[SyndEntry.uri].type}, ${Media[SyndEntry.uri].displayLength})
</div>
</c:if>
</div>
</li>
</c:forEach>

</ul>
</div>
</div>


0 comments on commit aafd1e6

Please sign in to comment.