Skip to content

Commit cd78b49

Browse files
committed
Feat: add repo post link for GitHub repo card
1 parent 61f1ce6 commit cd78b49

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

assets/css/component-projects/repo-card.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
display: flex;
5656
flex-direction: column;
5757
height: 100%;
58+
position: relative;
5859

5960
.repo-name {
6061
display: flex;
@@ -162,6 +163,13 @@
162163
}
163164
}
164165
}
166+
167+
.repo-post {
168+
position: absolute;
169+
top: calc(0.875rem * 1.5);
170+
height: calc(100% - 0.875rem * 1.5 - 0.75rem * 1.5);
171+
width: 100%;
172+
}
165173
}
166174
}
167175

layouts/partials/plugin/gh-repo-card.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
</a>
4444
{{- end -}}
4545
</p>
46+
{{- $postLink := printf "/%v/%v" page.Section $repoInfo.full_name -}}
47+
{{- $page := site.GetPage $postLink -}}
48+
{{- with site.GetPage $postLink -}}
49+
<a class="repo-post" href="{{ .RelPermalink }}"></a>
50+
{{- end -}}
4651
</div>
4752
</div>
4853
{{- else -}}

0 commit comments

Comments
 (0)