Skip to content
Permalink
Browse files

redo the post link

- strip the post link from excerpt
- redo link with proper style
- put link on bottom
- clip excerpt before the link
  • Loading branch information...
illwieckz committed Aug 28, 2019
1 parent 64657b9 commit f4fbb469b2a24937347ad1b76f13c072b4a4b69d
Showing with 43 additions and 6 deletions.
  1. +43 −6 NewsCard.qml
@@ -114,38 +114,75 @@ Flickable {
}

width: parent.width - 15
height: parent.height - 15
height: parent.height - 15 - 30

clip: true
color: "transparent"

Column {
id: column
id: excerptColumn

width: parent.width
height: parent.height
spacing: Units.smallSpacing * 2

TitleLabel {
id: title

text: item.cardTitle

clip: true
font.pixelSize: 30
font.bold: true
}

BodyLabel {
id: summary

width: parent.width

width: parent.width
wrapMode: Text.WordWrap
text: item.summary

text: item.summary.substring(0, item.summary.search("<a"))
textFormat: Text.RichText

font.pixelSize: 21
lineHeight: 24
color: "lightgrey"
}
}
}

Rectangle {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
}

width: parent.width - 15
height: 30

clip: true
color: "transparent"

Column {
id: linkColumn

width: parent.width
height: parent.height
spacing: Units.smallSpacing * 2

BodyLabel {
id: link

width: parent.width

text: "<p style='text-align: right;'><a style='color:#00B2B8;' href='" + item.url + "'>&rarr; continue reading</a></p>"
textFormat: Text.RichText

font.pixelSize: 21
lineHeight: 24

onLinkActivated: {
onLinkActivated: {
Qt.openUrlExternally(link);
}

0 comments on commit f4fbb46

Please sign in to comment.
You can’t perform that action at this time.