modif export + automatisation + fonction qui centralise tout les exports

This commit is contained in:
p2405951 2025-06-20 16:08:32 +02:00
parent 0ca9c535c5
commit 105f1a6918
13 changed files with 624 additions and 122 deletions

100
data/parcours.html Normal file
View File

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Carte du parcours</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: whitesmoke ;
}
#container {
display: flex;
gap: 20px;
}
#map {
height: 600px;
width: 60%;
border-radius: 5%;
border: 1px solid #aaa;
}
#fiche {
width: 40%;
max-height: 600px;
overflow-y: auto;
border: 1px solid #aaa;
padding: 10px;
box-sizing: border-box;
background-color:#095228;
border-radius: 5%;
}
body h1 {
display:flex;
align-items:center;
justify-content:center;
text-align: center;
color: blue;
font-style: bold;
margin-bottom: 20px;
background-color:#70726e;
border-radius:12px;
height: 75px;
}
#fiche h2{
color:white;
}
#fiche p{
color:white;
}
#fiche img {
max-width: 100%;
height: auto;
margin-top: 10px;
border-radius: 5px;
}
</style>
</head>
<body>
<h1>Fiche du parcours</h1>
<div id="container">
<div id="map"></div>
<div id="fiche">
<h2>parcous1</h2>
<p><strong>Ville :</strong> Bourg en bresse</p>
<p><strong>Département :</strong> 1</p>
<p><strong>Difficulté :</strong> 2</p>
<p><strong>Durée (heures) :</strong> 2.3</p>
<p><strong>Longueur (km) :</strong> 17.3</p>
<img src="data/parcours1.png">
</div>
</div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([45.5, 1.5], 10); // Vue centrée
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
L.marker([45.62, -1.03348]).addTo(map).bindPopup("<b>Étape 1</b><br><b>Personnages :</b><ul><li>Quentin</li><li>Malo</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
L.marker([-45.62, 1.03348]).addTo(map).bindPopup("<b>Étape 2</b><br><b>Personnages :</b><ul><li>Antoine</li><li>Giovanni</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
var latlngs = [
[45.62, -1.03348],
[-45.62, 1.03348],
];
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10',
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
</script>
</body>
</html>

View File

@ -5,7 +5,7 @@
"difficulty": 2,
"duration": 2.3,
"length": 17.3,
"image": "data/parcours1.png",
"image": "../data/parcours1.png",
"steps": [
{
"numero": 1,

44
data/parcours2.json Normal file
View File

@ -0,0 +1,44 @@
{
"name": "parcours2",
"city": "Paris",
"departement": 1,
"difficulty": 2,
"duration": 2.3,
"length": 17.3,
"image": "../data/parcours1.png",
"steps": [
{
"numero": 1,
"title": "Première étape",
"GPS": "N 45 37.199 W 1 2.009",
"reponse": -1,
"dialogue": [
{
"personnage": "Quentin",
"texte": "ligne de dialogue 1 HJDDDZJJJJJJJJJJJJJJJJJJJDBJBDJZBZJDBJ"
},
{
"personnage": "Malo",
"texte": "ligne de dialogue 2BDJJHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHBDHDBHBZHVZDHVHVHEDHJVHVDHEDJD"
}
]
},
{
"numero": 2,
"title": "Deuxième étape",
"GPS": "S 45 37.199 E 1 2.009",
"reponse": 4156,
"dialogue": [
{
"personnage": "Antoine",
"texte": "ligne de dialogue 1"
},
{
"personnage": "Giovanni",
"texte": "ligne de dialogue 2"
}
]
}
]
}

53
index.html Normal file
View File

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>Liste des parcours</title>
<style>
body {
font-family: Arial;
margin: 40px;
background-color: whitesmoke;
}
h1 {
text-align: center;
color: black;
font-style: bold;
}
ul {
max-width: 600px;
margin: 0 auto;
padding: 0;
list-style-type: none;
}
li {
background: white;
margin: 10px 0;
padding: 15px;
border-radius: 8px;
box-shadow: 0 0 6px rgba(0,0,0,0.1);
transition: background-color 0.3s ease;
}
li:hover {
background-color:black;
}
a {
text-decoration: none;
color: purple;
font-weight: bold;
font-size: 1.2em;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Liste des parcours</h1>
<ul>
<li><a href="./pages/parcours1.html">parcous1</a></li>
<li><a href="./pages/parcours2.html">parcours2</a></li>
</ul>
</body>
</html>

View File

@ -9,39 +9,9 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QFile file1("data/parcours1.json");
if (!file1.open(QIODevice::ReadOnly)) {
qWarning() << "Impossible d'ouvrir le fichier data/parcours1.json";
return -1;
}
Path* p = new Path(&file1);
file1.close();
QFile file2("data/parcours1.json");
if (!file2.open(QIODevice::ReadOnly)) {
qWarning() << "Impossible d'ouvrir le fichier data/parcours2.json";
delete p;
return -1;
}
Path* p2 = new Path(&file2);
file2.close();
QList<Path*> paths = w.getPath();
paths.append(p);
paths.append(p2);
w.setPath(paths);
w.setCurrentPath(p);
w.exportHTMLMap();
w.setCurrentPath(p2);
w.exportHTMLMap();
w.loadAndExportPaths();
Web u(w.getPath());
u.siteHtml();
delete p;
delete p2;
return a.exec();
}

View File

@ -6,11 +6,14 @@
#include <QMessageBox>
#include <fstream>
int MainWindow::indexPath = 0;
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
indexPath++;
}
MainWindow::~MainWindow()
@ -22,16 +25,11 @@ MainWindow::~MainWindow()
delete p;
}
}
void MainWindow::updatePathView()
{
}
{}
void MainWindow::updateStepView(size_t num)
{
}
{}
void MainWindow::onTextChanged()
{
@ -65,17 +63,16 @@ void MainWindow::loadPath()
void MainWindow::addNewPath()
{
path.append(currentPath);
}
void MainWindow::addNewStep()
{
}
void MainWindow::exportHTMLMap()
void MainWindow::exportHTMLMap(int index)
{
std::ofstream file("parcours.html");
std::ofstream file("./pages/parcours" + std::to_string(index) + ".html");
if (!file.is_open()) {
QMessageBox::warning(this, "Erreur", "Impossible d'ouvrir le fichier.");
return;
@ -89,16 +86,116 @@ void MainWindow::exportHTMLMap()
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: whitesmoke;
}
#container {
display: flex;
gap: 20px;
}
#map {
height: 600px;
width: 70%;
border-radius:8%;
width: 60%;
border-radius: 5%;
border: 1px solid #aaa;
}
#fiche {
padding-right:20px;
width: 40%;
max-height: 600px;
overflow-y: auto;
border: 1px solid #aaa;
padding: 10px;
box-sizing: border-box;
background-color:#095228;
border-radius: 5%;
}
#fiche ul {
padding-left: 20px;
list-style-type: disc;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
max-width: 90%;
}
#fiche li {
white-space: normal;
overflow-wrap: break-word;
}
body h1 {
display:flex;
align-items:center;
justify-content:center;
text-align: center;
color: black;
font-style: bold;
margin-bottom: 20px;
background-color:brown;
border-radius:12px;
height: 75px;
}
#fiche h2, #fiche h3, #fiche p, #fiche li {
color: white;
}
#fiche img {
max-width: 100%;
height: auto;
margin-top: 10px;
border-radius: 5px;
}
</style>
</head>
<body>
<h1>Carte du parcours</h1>
<div id="map"></div>
<h1>Fiche du parcours</h1>
<div id="container">
<div id="map"></div>
<div id="fiche">
)";
if (currentPath) {
Path* p = currentPath;
file << "<h2>" << p->getName().toStdString() << "</h2>\n";
file << "<p><strong>Ville :</strong> " << p->getCity().toStdString() << "</p>\n";
file << "<p><strong>Département :</strong> " << p->getDepartement() << "</p>\n";
file << "<p><strong>Difficulté :</strong> " << p->getDifficulty() << "</p>\n";
file << "<p><strong>Durée (heures) :</strong> " << p->getDuration() << "</p>\n";
file << "<p><strong>Longueur (km) :</strong> " << p->getLength() << "</p>\n";
if (!p->getImage().isEmpty()) {
file << "<img src=\"" << p->getImage().toStdString() << "\">\n";
}
int stepNum = 1;
for (const Step& s : p->getStep()) {
file << "<h3>Étape " << stepNum << "</h3>\n";
const QList<QString> persos = s.getPersonnage();
const QList<QString> textes = s.getTexte();
if (!persos.isEmpty()) {
file << "<p><strong>Personnages :</strong></p>\n<ul>";
for (const QString& pers : persos) {
file << "<li>" << pers.toStdString() << "</li>\n";
}
file << "</ul>\n";
}
if (!textes.isEmpty()) {
file << "<p><strong>Dialogues :</strong></p>\n<ul>";
for (const QString& txt : textes) {
file << "<li>" << txt.toStdString() << "</li>\n";
}
file << "</ul>\n";
}
stepNum++;
}
}
file << R"(
</div>
</div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
@ -112,12 +209,6 @@ void MainWindow::exportHTMLMap()
if (!path.isEmpty() && path[0]) {
Path* p = path[0];
int stepNum = 1;
// c un test
// qDebug() << "Nombre d'étapes dans le path :" << p->getStep().size();
for (const Step& s : p->getStep()) {
qDebug() << s.getTitle() << s.getLatitude() << s.getLongitude();
}
for (const Step& s : p->getStep()) {
float lat = s.getLatitude();
@ -125,7 +216,6 @@ void MainWindow::exportHTMLMap()
QList<QString> personnages = s.getPersonnage();
QList<QString> textes = s.getTexte();
QString popupHtml = "<b>Étape " + QString::number(stepNum) + "</b><br>";
// ajout des perso
if (!personnages.isEmpty()) {
popupHtml += "<b>Personnages :</b><ul>";
for (const QString& pers : personnages) {
@ -133,11 +223,20 @@ void MainWindow::exportHTMLMap()
}
popupHtml += "</ul>";
}
if (!textes.isEmpty()) {
popupHtml += "<b>Textes :</b><ul>";
for (const QString& txt : textes) {
popupHtml += "<li>" + txt + "</li>";
}
popupHtml += "</ul>";
}
file << "L.marker([" << lat << ", " << lon << "]).addTo(map)"
<< ".bindPopup(\"" << popupHtml.toStdString() << "\");\n";
++stepNum;
}
file << "var latlngs = [\n";
for (const Step& s : p->getStep()) {
float lat = s.getLatitude();
@ -146,26 +245,27 @@ void MainWindow::exportHTMLMap()
}
file << "];\n";
// Ajouter la polyline en pointillés
file << R"(
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10', // ligne en pointillés
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10',
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
)";
}
file << R"(
</script>
</body>
</html>
)";
file.close();
}
void MainWindow::loadImage(QString fileName) {
QString ext[] = {"png", "jpeg", "jpg"};
@ -220,6 +320,16 @@ void MainWindow::on_toolButton_clicked()
loadImage(fileName);
}
int MainWindow::getIndexPath() const
{
return indexPath;
}
void MainWindow::setIndexPath(int newIndexPath)
{
indexPath = newIndexPath;
}
QString MainWindow::getCurrentFile() const
{
return currentFile;

View File

@ -24,8 +24,8 @@ public:
void loadPath();
void addNewPath();
void addNewStep();
void exportHTMLMap();
void exportHTMLMap(int index);
void loadAndExportPaths();
QString getCurrentFile() const;
void setCurrentFile(const QString &newCurrentFile);
QList<Path *> getPath() const;
@ -33,6 +33,9 @@ public:
Path *getCurrentPath() const;
void setCurrentPath(Path *newCurrentPath);
int getIndexPath() const;
void setIndexPath(int newIndexPath);
private slots:
void on_pushButton_clicked();
@ -43,6 +46,7 @@ private slots:
private:
Ui::MainWindow *ui;
QString currentFile;
static int indexPath;
bool textChanged;
QList<Path*> path;
Path* currentPath;

130
pages/parcours1.html Normal file
View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Carte du parcours</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: whitesmoke;
}
#container {
display: flex;
gap: 20px;
}
#map {
height: 600px;
width: 60%;
border-radius: 5%;
border: 1px solid #aaa;
}
#fiche {
padding-right:20px;
width: 40%;
max-height: 600px;
overflow-y: auto;
border: 1px solid #aaa;
padding: 10px;
box-sizing: border-box;
background-color:#095228;
border-radius: 5%;
}
#fiche ul {
padding-left: 20px;
list-style-type: disc;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
max-width: 90%;
}
#fiche li {
white-space: normal;
overflow-wrap: break-word;
}
body h1 {
display:flex;
align-items:center;
justify-content:center;
text-align: center;
color: black;
font-style: bold;
margin-bottom: 20px;
background-color:brown;
border-radius:12px;
height: 75px;
}
#fiche h2, #fiche h3, #fiche p, #fiche li {
color: white;
}
#fiche img {
max-width: 100%;
height: auto;
margin-top: 10px;
border-radius: 5px;
}
</style>
</head>
<body>
<h1>Fiche du parcours</h1>
<div id="container">
<div id="map"></div>
<div id="fiche">
<h2>parcous1</h2>
<p><strong>Ville :</strong> Bourg en bresse</p>
<p><strong>Département :</strong> 1</p>
<p><strong>Difficulté :</strong> 2</p>
<p><strong>Durée (heures) :</strong> 2.3</p>
<p><strong>Longueur (km) :</strong> 17.3</p>
<img src="../data/parcours1.png">
<h3>Étape 1</h3>
<p><strong>Personnages :</strong></p>
<ul><li>Quentin</li>
<li>Malo</li>
</ul>
<p><strong>Dialogues :</strong></p>
<ul><li>ligne de dialogue 1</li>
<li>ligne de dialogue 2</li>
</ul>
<h3>Étape 2</h3>
<p><strong>Personnages :</strong></p>
<ul><li>Antoine</li>
<li>Giovanni</li>
</ul>
<p><strong>Dialogues :</strong></p>
<ul><li>ligne de dialogue 1</li>
<li>ligne de dialogue 2</li>
</ul>
</div>
</div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([45.5, 1.5], 10); // Vue centrée
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
L.marker([45.62, -1.03348]).addTo(map).bindPopup("<b>Étape 1</b><br><b>Personnages :</b><ul><li>Quentin</li><li>Malo</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
L.marker([-45.62, 1.03348]).addTo(map).bindPopup("<b>Étape 2</b><br><b>Personnages :</b><ul><li>Antoine</li><li>Giovanni</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
var latlngs = [
[45.62, -1.03348],
[-45.62, 1.03348],
];
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10',
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
</script>
</body>
</html>

130
pages/parcours2.html Normal file
View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Carte du parcours</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: whitesmoke;
}
#container {
display: flex;
gap: 20px;
}
#map {
height: 600px;
width: 60%;
border-radius: 5%;
border: 1px solid #aaa;
}
#fiche {
padding-right:20px;
width: 40%;
max-height: 600px;
overflow-y: auto;
border: 1px solid #aaa;
padding: 10px;
box-sizing: border-box;
background-color:#095228;
border-radius: 5%;
}
#fiche ul {
padding-left: 20px;
list-style-type: disc;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
max-width: 90%;
}
#fiche li {
white-space: normal;
overflow-wrap: break-word;
}
body h1 {
display:flex;
align-items:center;
justify-content:center;
text-align: center;
color: black;
font-style: bold;
margin-bottom: 20px;
background-color:brown;
border-radius:12px;
height: 75px;
}
#fiche h2, #fiche h3, #fiche p, #fiche li {
color: white;
}
#fiche img {
max-width: 100%;
height: auto;
margin-top: 10px;
border-radius: 5px;
}
</style>
</head>
<body>
<h1>Fiche du parcours</h1>
<div id="container">
<div id="map"></div>
<div id="fiche">
<h2>parcours2</h2>
<p><strong>Ville :</strong> Paris</p>
<p><strong>Département :</strong> 1</p>
<p><strong>Difficulté :</strong> 2</p>
<p><strong>Durée (heures) :</strong> 2.3</p>
<p><strong>Longueur (km) :</strong> 17.3</p>
<img src="../data/parcours1.png">
<h3>Étape 1</h3>
<p><strong>Personnages :</strong></p>
<ul><li>Quentin</li>
<li>Malo</li>
</ul>
<p><strong>Dialogues :</strong></p>
<ul><li>ligne de dialogue 1 HJDDDZJJJJJJJJJJJJJJJJJJJDBJBDJZBZJDBJ</li>
<li>ligne de dialogue 2BDJJHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHBDHDBHBZHVZDHVHVHEDHJVHVDHEDJD</li>
</ul>
<h3>Étape 2</h3>
<p><strong>Personnages :</strong></p>
<ul><li>Antoine</li>
<li>Giovanni</li>
</ul>
<p><strong>Dialogues :</strong></p>
<ul><li>ligne de dialogue 1</li>
<li>ligne de dialogue 2</li>
</ul>
</div>
</div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([45.5, 1.5], 10); // Vue centrée
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
L.marker([45.62, -1.03348]).addTo(map).bindPopup("<b>Étape 1</b><br><b>Personnages :</b><ul><li>Quentin</li><li>Malo</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
L.marker([-45.62, 1.03348]).addTo(map).bindPopup("<b>Étape 2</b><br><b>Personnages :</b><ul><li>Antoine</li><li>Giovanni</li></ul><b>Textes :</b><ul><li>ligne de dialogue 1</li><li>ligne de dialogue 2</li></ul>");
var latlngs = [
[45.62, -1.03348],
[-45.62, 1.03348],
];
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10',
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
</script>
</body>
</html>

View File

@ -1,44 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Carte du parcours</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<style>
#map {
height: 600px;
width: 70%;
border-radius:8%;
}
</style>
</head>
<body>
<h1>Carte du parcours</h1>
<div id="map"></div>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([45.5, 1.5], 10); // Vue centrée
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
L.marker([45.62, -1.03348]).addTo(map).bindPopup("<b>Étape 1</b><br><b>Personnages :</b><ul><li>Quentin</li><li>Malo</li></ul>");
L.marker([-45.62, 1.03348]).addTo(map).bindPopup("<b>Étape 2</b><br><b>Personnages :</b><ul><li>Antoine</li><li>Giovanni</li></ul>");
var latlngs = [
[45.62, -1.03348],
[-45.62, 1.03348],
];
var polyline = L.polyline(latlngs, {
color: 'purple',
weight: 2,
dashArray: '10, 10', // ligne en pointillés
opacity: 0.7
}).addTo(map);
map.fitBounds(polyline.getBounds());
</script>
</body>
</html>

View File

@ -51,10 +51,10 @@ QList<Step> Path::getStep() const
}
Path::Path(QFile *file){
/*if (!file->open(QIODevice::ReadOnly)) {
if (!file->open(QIODevice::ReadOnly)) {
qWarning() << "Could not open file:" << file->errorString();
return;
}*/
}
QByteArray data = file->readAll();
file->close();
QJsonDocument doc = QJsonDocument::fromJson(data);

View File

@ -13,11 +13,13 @@ SOURCES += \
mainwindow.cpp \
step.cpp \
path.cpp \
web.cpp
HEADERS += \
mainwindow.h \
step.h \
path.h \
web.h
FORMS += \
mainwindow.ui

23
web.cpp
View File

@ -21,15 +21,15 @@ void Web::siteHtml()
<title>Liste des parcours</title>
<style>
body {
font-family: Arial, sans-serif;
font-family: Arial;
margin: 40px;
background-color: #f0f0f0;
color: #333;
background-color: whitesmoke;
}
h1 {
text-align: center;
color: purple;
font-style: italic;
color: black;
font-style: bold;
}
ul {
max-width: 600px;
@ -45,9 +45,9 @@ void Web::siteHtml()
box-shadow: 0 0 6px rgba(0,0,0,0.1);
transition: background-color 0.3s ease;
}
/*li:hover {
background-color: red;
}*/
li:hover {
background-color:black;
}
a {
text-decoration: none;
color: purple;
@ -68,8 +68,11 @@ void Web::siteHtml()
for (const Path* p : list) {
QString fileName = QString("parcours%1.html").arg(index);
QString name = p->getName();
file << " <li><a href=\"" << fileName.toStdString() << "\">"
<< name.toStdString() << "</a></li>\n";
file << " <li><a href=\"./pages/"
<< fileName.toStdString()
<< "\">"
<< name.toStdString()
<< "</a></li>\n";
++index;
}