Skip to content

Commit 20181fc

Browse files
committed
Show newlines and links in template descriptions
1 parent d81a0b6 commit 20181fc

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

app/styles/_core.less

+4
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ label.checkbox {
648648
margin-left: 3px;
649649
}
650650

651+
.resource-description {
652+
.word-break();
653+
.pre-wrap();
654+
}
651655

652656
// Misc
653657
// TODO: pull out into _partials where it makes sense

app/styles/_mixins.less

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
min-width: 0; // firefox (1)
6060
}
6161

62+
// Sequences of whitespace are preserved. Lines are broken at newline
63+
// characters, at <br>, and as necessary to fill line boxes.
64+
.pre-wrap {
65+
white-space: pre-wrap;
66+
}
67+
6268
// Linear-gradient stripes
6369
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
6470
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);

app/views/directives/osc-image-summary.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ <h1>{{ name || resource.metadata.name }}</h1>
44
<div ng-show="resource | annotation:'provider'">Provider: {{ resource | annotation:'provider' }}</div>
55
<div ng-show="resource.metadata.namespace">Namespace: {{ resource.metadata.namespace }}</div>
66
</div>
7-
<div class="description gutter-bottom">
8-
<truncate-long-text content="resource | description" limit="256" use-word-boundary="true"></truncate-long-text>
7+
<div class="resource-description gutter-bottom"
8+
ng-bind-html="resource | description | linky">
99
</div>

0 commit comments

Comments
 (0)