fix issue link html
This commit is contained in:
@@ -24,7 +24,6 @@ void Web::siteHtml()
|
||||
font-family: Arial;
|
||||
margin: 40px;
|
||||
background-color: whitesmoke;
|
||||
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
@@ -46,7 +45,7 @@ void Web::siteHtml()
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
li:hover {
|
||||
background-color:black;
|
||||
background-color: black;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
@@ -64,22 +63,25 @@ void Web::siteHtml()
|
||||
<ul>
|
||||
)";
|
||||
|
||||
int index = 0;
|
||||
for (const Path* p : list) {
|
||||
QString fileName = QString("parcours%1.html").arg(index);
|
||||
QString name = p->getName();
|
||||
file << " <li><a href=\"./pages/"
|
||||
if (!p) continue;
|
||||
|
||||
// Nom de fichier sécurisé
|
||||
QString safeName = p->getName().simplified().replace(" ", "_");
|
||||
QString fileName = "parcours_" + safeName + ".html";
|
||||
|
||||
file << " <li><a href=\"pages/"
|
||||
<< fileName.toStdString()
|
||||
<< "\">"
|
||||
<< name.toStdString()
|
||||
<< p->getName().toStdString()
|
||||
<< "</a></li>\n";
|
||||
++index;
|
||||
}
|
||||
|
||||
file << R"( </ul>
|
||||
file << R"( </ul>
|
||||
</body>
|
||||
</html>
|
||||
)";
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user