Skip to content

Commit 886761b

Browse files
committed
style
1 parent 2625668 commit 886761b

2 files changed

Lines changed: 52 additions & 12 deletions

File tree

.github/workflows/jekyll-gh-pages.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,28 @@ jobs:
5757
# Templates
5858
5959
Copy these templates to your project and customize them.
60+
61+
<div class="templates-list">
6062
HEADER
6163
sed -i 's/^ //' github-pages/templates.md
6264
6365
for file in docs/templates/*.md; do
6466
if [ -f "$file" ]; then
6567
filename=$(basename "$file")
6668
name="${filename%.md}"
67-
title=$(head -1 "$file" | sed 's/^#* *//')
68-
desc=$(sed -n '2,10p' "$file" | grep -v '^$' | grep -v '^#' | head -1)
69-
70-
echo "" >> github-pages/templates.md
71-
echo "---" >> github-pages/templates.md
72-
echo "" >> github-pages/templates.md
73-
echo "## ${title:-$name}" >> github-pages/templates.md
74-
echo "" >> github-pages/templates.md
75-
echo "${desc:-Template file for your project.}" >> github-pages/templates.md
76-
echo "" >> github-pages/templates.md
77-
echo "[View on GitHub](https://github.com/managedcode/MCAF/blob/main/docs/templates/${filename}){: .btn .btn-primary }" >> github-pages/templates.md
78-
echo "[Download](https://raw.githubusercontent.com/managedcode/MCAF/main/docs/templates/${filename}){: .btn }" >> github-pages/templates.md
69+
70+
echo "<div class=\"template-item\">" >> github-pages/templates.md
71+
echo "<span class=\"template-name\">${name}</span>" >> github-pages/templates.md
72+
echo "<div class=\"template-links\">" >> github-pages/templates.md
73+
echo "<a href=\"https://github.com/managedcode/MCAF/blob/main/docs/templates/${filename}\">View</a>" >> github-pages/templates.md
74+
echo "<a href=\"https://raw.githubusercontent.com/managedcode/MCAF/main/docs/templates/${filename}\" download>Download</a>" >> github-pages/templates.md
75+
echo "</div>" >> github-pages/templates.md
76+
echo "</div>" >> github-pages/templates.md
7977
fi
8078
done
8179
80+
echo "</div>" >> github-pages/templates.md
81+
8282
- name: Copy README to github-pages with TOC
8383
run: |
8484
printf '%s\n' '---' 'layout: default' 'title: MCAF Guide' 'nav_order: 1' '---' '' > github-pages/index.md

github-pages/assets/css/style.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,46 @@ hr {
406406
margin-top: 8px;
407407
}
408408

409+
/* Templates list */
410+
.templates-list {
411+
display: flex;
412+
flex-direction: column;
413+
gap: 12px;
414+
margin-top: 32px;
415+
}
416+
417+
.template-item {
418+
display: flex;
419+
justify-content: space-between;
420+
align-items: center;
421+
padding: 16px 20px;
422+
background: #F5F3F7;
423+
border-radius: 8px;
424+
border: 1px solid #E8E5EB;
425+
}
426+
427+
.template-name {
428+
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
429+
font-size: 15px;
430+
font-weight: 500;
431+
color: #27232A;
432+
}
433+
434+
.template-links {
435+
display: flex;
436+
gap: 16px;
437+
}
438+
439+
.template-links a {
440+
font-size: 14px;
441+
color: #785D8F;
442+
text-decoration: none;
443+
}
444+
445+
.template-links a:hover {
446+
text-decoration: underline;
447+
}
448+
409449
/* Responsive */
410450
@media (max-width: 768px) {
411451
.nav {

0 commit comments

Comments
 (0)