add pdf download links to index page
This commit is contained in:
@@ -22,19 +22,36 @@ cat > "$BUILD_DIR/index.html" << 'HEADER'
|
|||||||
}
|
}
|
||||||
h1 { color: #fff; margin-bottom: 0.5rem; }
|
h1 { color: #fff; margin-bottom: 0.5rem; }
|
||||||
.subtitle { color: #888; margin-bottom: 2rem; }
|
.subtitle { color: #888; margin-bottom: 2rem; }
|
||||||
|
.termin-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
.termin {
|
.termin {
|
||||||
background: #16213e;
|
background: #16213e;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
margin-bottom: 1rem;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
|
flex: 1;
|
||||||
transition: transform 0.2s, background 0.2s;
|
transition: transform 0.2s, background 0.2s;
|
||||||
}
|
}
|
||||||
.termin:hover { background: #1f4068; transform: translateX(5px); }
|
.termin:hover { background: #1f4068; transform: translateX(5px); }
|
||||||
.termin h2 { color: #fff; margin: 0 0 0.5rem 0; font-size: 1.2rem; }
|
.termin h2 { color: #fff; margin: 0 0 0.5rem 0; font-size: 1.2rem; }
|
||||||
.termin .date { color: #4ecca3; font-size: 0.9rem; }
|
.termin .date { color: #4ecca3; font-size: 0.9rem; }
|
||||||
.termin .topic { color: #aaa; font-size: 0.95rem; margin-left: 1rem; }
|
.termin .topic { color: #aaa; font-size: 0.95rem; margin-left: 1rem; }
|
||||||
|
.pdf {
|
||||||
|
background: #e94560;
|
||||||
|
color: #fff;
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
.pdf:hover { background: #ff6b6b; }
|
||||||
footer { margin-top: 2rem; color: #666; font-size: 0.85rem; text-align: center; }
|
footer { margin-top: 2rem; color: #666; font-size: 0.85rem; text-align: center; }
|
||||||
footer a { color: #4ecca3; }
|
footer a { color: #4ecca3; }
|
||||||
</style>
|
</style>
|
||||||
@@ -66,13 +83,23 @@ for html in $(ls "$BUILD_DIR"/2*.html 2>/dev/null | sort); do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
termin_label="Termin $termin_num"
|
termin_label="Termin $termin_num"
|
||||||
|
pdf_filename="${filename%.html}.pdf"
|
||||||
|
|
||||||
|
# Check if PDF exists
|
||||||
|
pdf_link=""
|
||||||
|
if [[ -f "$BUILD_DIR/$pdf_filename" ]]; then
|
||||||
|
pdf_link="<a href=\"$pdf_filename\" class=\"pdf\">PDF</a>"
|
||||||
|
fi
|
||||||
|
|
||||||
cat >> "$BUILD_DIR/index.html" << LINK
|
cat >> "$BUILD_DIR/index.html" << LINK
|
||||||
<a href="$filename" class="termin">
|
<div class="termin-row">
|
||||||
<h2>$termin_label</h2>
|
<a href="$filename" class="termin">
|
||||||
<span class="date">$formatted_date</span>
|
<h2>$termin_label</h2>
|
||||||
<span class="topic">$topic</span>
|
<span class="date">$formatted_date</span>
|
||||||
</a>
|
<span class="topic">$topic</span>
|
||||||
|
</a>
|
||||||
|
$pdf_link
|
||||||
|
</div>
|
||||||
LINK
|
LINK
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user