improved industriels display

This commit is contained in:
Bachir Soussi Chiadmi 2021-01-26 11:43:42 +01:00
parent e4b4a967a0
commit 1ff973d995
4 changed files with 22 additions and 19 deletions

View File

@ -2054,14 +2054,14 @@ article.card {
article.card.modal-card section.col-right section.industriels > section {
flex: 0 0 50%; }
article.card.modal-card section.col-right section.industriels > section ul li {
padding: .5em 0; }
padding: 0.1em 0 .4em 0; }
article.card.modal-card section.col-right section.industriels > section h2 {
margin: 0;
font-size: 1em;
line-height: 1; }
article.card.modal-card section.col-right section.industriels > section p {
margin: 0;
font-size: 0.882em; }
font-size: 0.756em; }
article.card.modal-card section.col-right section.attachments a {
margin: 0;
font-size: 0.882em;

File diff suppressed because one or more lines are too long

View File

@ -1274,7 +1274,7 @@ article.card{
flex: 0 0 50%;
ul{
li{
padding: .5em 0;
padding:0.1em 0 .4em 0;
}
}
h2{
@ -1284,7 +1284,7 @@ article.card{
}
p{
margin: 0;
font-size: 0.882em;
font-size: 0.756em;
}
}
}

View File

@ -116,30 +116,30 @@
</vsa-heading>
<vsa-content>
<section class="industriels">
<section v-if="material.distributor">
<span class="label">{{ $t("materio.Distributor") }}</span>
<ul>
<li v-for="distrib in material.distributor" v-bind:key="distrib.id">
<h2>{{ distrib.name }}</h2>
<p v-if="distrib.website">
<a target="_blank" :href="distrib.website.url">{{distrib.website.url}}</a>
</p>
<p v-if="distrib.email"><a :href="'mailto:'+distrib.email">{{ distrib.email }}</a></p>
</li>
</ul>
</section>
<section v-if="material.manufacturer">
<span class="label">{{ $t("materio.Manufacturer") }}</span>
<ul>
<li v-for="manu in material.manufacturer" v-bind:key="manu.id">
<h2>{{ manu.name }}</h2>
<p v-if="manu.website">
<a target="_blank" :href="manu.website.url">{{manu.website.url}}</a>
<a target="_blank" :href="manu.website.url">{{shortUrl(manu.website.url)}}</a>
</p>
<p v-if="manu.email"><a :href="'mailto:'+manu.email">{{ manu.email }}</a></p>
</li>
</ul>
</section>
<section v-if="material.distributor">
<span class="label">{{ $t("materio.Distributor") }}</span>
<ul>
<li v-for="distrib in material.distributor" v-bind:key="distrib.id">
<h2>{{ distrib.name }}</h2>
<p v-if="distrib.website">
<a target="_blank" :href="distrib.website.url">{{shortUrl(distrib.website.url)}}</a>
</p>
<p v-if="distrib.email"><a :href="'mailto:'+distrib.email">{{ distrib.email }}</a></p>
</li>
</ul>
</section>
</section>
</vsa-content>
</vsa-item>
@ -295,6 +295,9 @@ export default {
},
prettyFileSize(bytes){
return prettyBytes(parseInt(bytes))
},
shortUrl(url){
return url.replace(/^http:\/\//, '').replace(/^www\./, '')
}
}
}