Website: add contributor information to policy details page. (#25275)

Closes: #24454


Changes:
- Updated the policy details page to include the policy's contributor
This commit is contained in:
Eric 2025-01-09 10:25:46 -06:00 committed by GitHub
parent 9ad246876c
commit 7ceb5bcac4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View file

@ -155,6 +155,33 @@
line-height: 150%;
margin-bottom: 0px;
padding: 16px 0px 32px 0px;
}
[purpose='policy-attribution'] {
display: flex;
flex-direction: row;
align-items: center;
padding-top: 8px;
padding-bottom: 16px;
[purpose='contributor-profile-picture'] {
width: 28.8px;
height: 28.8px;
margin-right: 8px;
border-radius: 50%;
}
[purpose='contributor-profile-name'] {
font-size: 14px;
line-height: 150%;
}
[purpose='policy-link'] {
color: unset;
text-decoration: none;
&:hover {
text-decoration: none;
}
}
}
[purpose='policy-details'] {
padding-right: 64px;

View file

@ -30,6 +30,11 @@
<div purpose="policy-details-and-sidebar" class="d-flex flex-lg-row flex-column">
<div purpose="policy-details" class="d-flex flex-column">
<h2 purpose="policy-name"><%- query.name %></h2>
<div purpose="policy-attribution">
<img alt="Contributor's GitHub profile picture" purpose="contributor-profile-picture" src="https://github.com/<%- query.contributors[0].handle %>.png?size=200">
<a purpose="policy-link" href="https://github.com/<%- query.contributors[0].handle %>" class="d-flex align-items-center">
<p purpose="contributor-profile-name" class="mb-0"><%= query.contributors[0].name %></p></a>
</div>
<p purpose="policy-description"><%- query.description %></p>
<!-- <div purpose="policy-control" v-if="query.control">
<h3>Control</h3>