Fixes privacy policy undefined bugs, improves link to listing report
This commit is contained in:
parent
2576082a90
commit
5d658452f4
|
@ -23,43 +23,55 @@ const getIconName = (clasification: string) => {
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="privacy-policy-wrapper">
|
<div class="privacy-policy-wrapper">
|
||||||
<div class="left">
|
|
||||||
<h4>Privacy Policy Summary</h4>
|
{(priv.points && priv.points.length) > 0 && (
|
||||||
<ul>
|
<div class="left">
|
||||||
{priv.points.map((point) => (
|
<h4>Privacy Policy Summary</h4>
|
||||||
<li class={`clasification ${point.case.classification}`}>
|
<ul>
|
||||||
<FontAwesome iconName={getIconName(point.case.classification)} />
|
{priv.points.map((point) => (
|
||||||
{point.title}
|
<li class={`clasification ${point.case.classification}`}>
|
||||||
</li>
|
<FontAwesome iconName={getIconName(point.case.classification)} />
|
||||||
))}
|
{point.title}
|
||||||
</ul>
|
</li>
|
||||||
</div>
|
))}
|
||||||
<div class="right">
|
</ul>
|
||||||
<h4>Score</h4>
|
|
||||||
<div class={`rating rating-${priv.rating}`}>
|
|
||||||
<p>{priv.rating}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<h4>Documents</h4>
|
)}
|
||||||
<ul>
|
|
||||||
{priv.documents.map((document) => (
|
<div class="right">
|
||||||
<li class="list-item">
|
{ priv.rating && (
|
||||||
<a href={document.url} target="_blank">{document.name}</a>
|
<h4>Score</h4>
|
||||||
<div class="date-block">
|
<div class={`rating rating-${priv.rating}`}>
|
||||||
Created {formatDate(document.created_at)},
|
<p>{priv.rating}</p>
|
||||||
Last modified {timeAgo(document.updated_at)}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</li>
|
{priv.documents && priv.documents.length > 0 && (
|
||||||
))}
|
<h4>Documents</h4>
|
||||||
</ul>
|
<ul>
|
||||||
<h4>Domains Covered by Policy</h4>
|
{priv.documents.map((document) => (
|
||||||
<ul>
|
<li class="list-item">
|
||||||
{priv.urls.map((url) => (
|
<a href={document.url} target="_blank">{document.name}</a>
|
||||||
<li>{url}</li>
|
<div class="date-block">
|
||||||
))}
|
Created {formatDate(document.created_at)},
|
||||||
</ul>
|
Last modified {timeAgo(document.updated_at)}
|
||||||
<h4>About the Data</h4>
|
</div>
|
||||||
<p>This data is kindly provided by <a href="https://tosdr.org/">tosdr.org</a></p>
|
</li>
|
||||||
<p>View the full report at: <a href={`https://tosdr.org/en/service/${priv.id}`}>tosdr.org/en/service/{priv.id}</a></p>
|
))}
|
||||||
|
</ul>
|
||||||
|
)}
|
||||||
|
{priv.urls && priv.urls.length > 1 && (
|
||||||
|
<h4>Domains Covered by Policy</h4>
|
||||||
|
<ul>
|
||||||
|
{priv.urls.map((url) => (
|
||||||
|
<li>{url}</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
)}
|
||||||
|
{priv.points && priv.points.length > 0 && (
|
||||||
|
<h4>About the Data</h4>
|
||||||
|
<p>This data is kindly provided by <a href="https://tosdr.org/">tosdr.org</a></p>
|
||||||
|
<p>View the full report at: <a href={`https://tosdr.org/en/service/${priv.id}`}>tosdr.org/en/service/{priv.id}</a></p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -67,13 +67,16 @@ const {
|
||||||
src={service.icon || `https://icon.horse/icon/${formatLink(service.url)}`}
|
src={service.icon || `https://icon.horse/icon/${formatLink(service.url)}`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{subHeading ? <h4>{service.name}</h4> : <h3>{service.name}</h3>}
|
<a class="service-title" href={`/${slugify(categoryName)}/${slugify(sectionName)}/${slugify(service.name)}`}>
|
||||||
|
{subHeading ? <h4>{service.name}</h4> : <h3>{service.name}</h3>}
|
||||||
|
</a>
|
||||||
{service.followWith && <p class="follow-with">({service.followWith})</p> }
|
{service.followWith && <p class="follow-with">({service.followWith})</p> }
|
||||||
<a class="service-link" href={service.url}>{formatLink(service.url)}</a>
|
<a class="service-link" href={service.url}>{formatLink(service.url)}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="service-body">
|
<div class="service-body">
|
||||||
<p set:html={parseMarkdown(service.description)}></p>
|
<p set:html={parseMarkdown(service.description)}></p>
|
||||||
<div class="service-stats">
|
<div class="service-stats">
|
||||||
|
<div class="left">
|
||||||
{ service.securityAudited && (
|
{ service.securityAudited && (
|
||||||
<span class="meta-item great" title={`${service.name} has been security audited by an accredited auditor, with results published publicly`}>
|
<span class="meta-item great" title={`${service.name} has been security audited by an accredited auditor, with results published publicly`}>
|
||||||
<FontAwesome iconName="securityAudited" /> Security Audited
|
<FontAwesome iconName="securityAudited" /> Security Audited
|
||||||
|
@ -108,6 +111,7 @@ const {
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
) }
|
) }
|
||||||
|
</div>
|
||||||
<div class="view-service">
|
<div class="view-service">
|
||||||
<a href={`/${slugify(categoryName)}/${slugify(sectionName)}/${slugify(service.name)}`}>View {service.name} Report</a>
|
<a href={`/${slugify(categoryName)}/${slugify(sectionName)}/${slugify(service.name)}`}>View {service.name} Report</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,10 +160,15 @@ const {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
h3, h4 {
|
.service-title {
|
||||||
margin: 0;
|
text-decoration: none;
|
||||||
font-size: 1.6rem;
|
color: var(--foreground);
|
||||||
|
h3, h4 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.service-icon {
|
.service-icon {
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
|
@ -193,10 +202,37 @@ const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.service-stats {
|
.service-stats {
|
||||||
|
.left {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.view-service {
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
opacity: 0.8;
|
||||||
|
a {
|
||||||
|
padding: 0.25rem 0.6rem;
|
||||||
|
width: fit-content;
|
||||||
|
right: 1rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
background: var(--accent-3);
|
||||||
|
color: var(--accent-fg);
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: var(--curve-md);
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.meta-item, .warning {
|
.meta-item, .warning {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -239,16 +275,7 @@ const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-service {
|
|
||||||
a {
|
|
||||||
padding: 0.25rem 0.6rem;
|
|
||||||
color: var(--accent-3);
|
|
||||||
width: fit-content;
|
|
||||||
position: absolute;
|
|
||||||
right: 1rem;
|
|
||||||
transform: scale(0.8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
section :global(.view-all) {
|
section :global(.view-all) {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|
|
@ -121,10 +121,12 @@ export async function getStaticPaths() {
|
||||||
// const { previous, next } = makePaginationLinks();
|
// const { previous, next } = makePaginationLinks();
|
||||||
|
|
||||||
|
|
||||||
|
const ignoredSites = ['github.gom', 'wikipedia.'];
|
||||||
|
|
||||||
// Fetch detailed data about the services GitHub repo, privacy policy and website
|
// Fetch detailed data about the services GitHub repo, privacy policy and website
|
||||||
const githubData = github ? await fetchGitHubStats(github) : null;
|
const githubData = github ? await fetchGitHubStats(github) : null;
|
||||||
const privacyData = tosdrId ? await fetchTosdrPrivacy(tosdrId) : null;
|
const privacyData = tosdrId ? await fetchTosdrPrivacy(tosdrId) : null;
|
||||||
const websiteData = (url && !url.includes('github.com')) ? await fetchWebsiteInfo(url) : null;
|
const websiteData = (url && !ignoredSites.some(ignoredSite => url.includes(ignoredSite))) ? await fetchWebsiteInfo(url) : null;
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue