Adapt publication card to handle missing URLs (#1017)
* Allow for personalized titles for Blog and Note pages * Adapt publication card to handle better the case when URL in authors, publication and paper are not used.
This commit is contained in:
parent
4e4acdbb6b
commit
047bb517cb
2 changed files with 21 additions and 1 deletions
|
@ -24,6 +24,14 @@
|
||||||
float: right !important;
|
float: right !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a[href] {
|
||||||
|
text-decoration: underline; /* Underline only when href is present */
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]) {
|
||||||
|
text-decoration: none; /* No underline when href is absent */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
|
|
|
@ -11,12 +11,22 @@
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h5 class="card-title mb-0">{{ .title }}</h5>
|
<h5 class="card-title mb-0">{{ .title }}</h5>
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
<span><a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a></span>
|
<span>
|
||||||
|
{{ if .publishedIn.url }}
|
||||||
|
<a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a>
|
||||||
|
{{ else }}
|
||||||
|
<a class="">{{ .publishedIn.name }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
<span class="ms-2">{{ .publishedIn.date }}</span>
|
<span class="ms-2">{{ .publishedIn.date }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="authors">
|
<div class="authors">
|
||||||
{{ range $index,$author:= .authors }}
|
{{ range $index,$author:= .authors }}
|
||||||
|
{{if .url}}
|
||||||
<span class="me-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
|
<span class="me-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
|
||||||
|
{{ else }}
|
||||||
|
<span class="me-2"><a class="">{{ .name }}</a></span>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,9 +41,11 @@
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ if .paper.url }}
|
||||||
<div class="details-btn">
|
<div class="details-btn">
|
||||||
<a class="btn btn-outline-info ms-1 ps-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a>
|
<a class="btn btn-outline-info ms-1 ps-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue