mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
shorten description if it is longer than expected
This commit is contained in:
@@ -62,7 +62,10 @@ class RepositoryEntry extends React.Component<Props> {
|
|||||||
renderModifyLink = (repository: Repository, repositoryLink: string) => {
|
renderModifyLink = (repository: Repository, repositoryLink: string) => {
|
||||||
if (repository._links["update"]) {
|
if (repository._links["update"]) {
|
||||||
return (
|
return (
|
||||||
<RepositoryEntryLink iconClass="fa-cog fa-lg" to={repositoryLink + "/edit"} />
|
<RepositoryEntryLink
|
||||||
|
iconClass="fa-cog fa-lg"
|
||||||
|
to={repositoryLink + "/edit"}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -71,8 +74,16 @@ class RepositoryEntry extends React.Component<Props> {
|
|||||||
render() {
|
render() {
|
||||||
const { repository, classes } = this.props;
|
const { repository, classes } = this.props;
|
||||||
const repositoryLink = this.createLink(repository);
|
const repositoryLink = this.createLink(repository);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames("box", "box-link-shadow", "column", "is-half")}>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
"box",
|
||||||
|
"box-link-shadow",
|
||||||
|
"column is-clipped",
|
||||||
|
"is-half"
|
||||||
|
)}
|
||||||
|
>
|
||||||
<Link className={classNames(classes.overlay)} to={repositoryLink} />
|
<Link className={classNames(classes.overlay)} to={repositoryLink} />
|
||||||
<article className={classNames("media", classes.inner)}>
|
<article className={classNames("media", classes.inner)}>
|
||||||
<figure className="media-left">
|
<figure className="media-left">
|
||||||
@@ -82,9 +93,8 @@ class RepositoryEntry extends React.Component<Props> {
|
|||||||
<div className="content">
|
<div className="content">
|
||||||
<p>
|
<p>
|
||||||
<strong>{repository.name}</strong>
|
<strong>{repository.name}</strong>
|
||||||
<br />
|
|
||||||
{repository.description}
|
|
||||||
</p>
|
</p>
|
||||||
|
<p className={"shorten-text"}>{repository.description}</p>
|
||||||
</div>
|
</div>
|
||||||
<nav className="level is-mobile">
|
<nav className="level is-mobile">
|
||||||
<div className="level-left">
|
<div className="level-left">
|
||||||
|
|||||||
@@ -117,6 +117,19 @@ $fa-font-path: "webfonts";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.media {
|
||||||
|
.media-content{
|
||||||
|
width: calc(50% - .75rem);
|
||||||
|
max-height: 120px;
|
||||||
|
.shorten-text{
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// tables
|
// tables
|
||||||
.table {
|
.table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user