Skip to content

Commit

Permalink
исправлен style..css
Browse files Browse the repository at this point in the history
  • Loading branch information
ardnaxelas committed Dec 8, 2024
1 parent ab475f4 commit 5fc7e86
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 97 deletions.
34 changes: 1 addition & 33 deletions citywalls2/controllers/streetController.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,36 +126,4 @@ exports.housesByStreet = asyncHandler(async (req, res) => {
houses,
});

});



// exports.streets = asyncHandler(async (req, res) => {
// console.log("Запрос на получение списка улиц...");
// const cursor = await db.query('FOR street IN streets RETURN street');
// const streets = await cursor.all();
// console.log("Улицы:", streets);
// res.render('streets', { streets });
// });
//
// exports.houses = asyncHandler(async (req, res) => {
// const streetKey = req.params.key;
// const streetId = `streets/${streetKey}`;
// console.log(`Запрос на получение домов для streetId: ${streetId}`);
//
// const query = `
// FOR house IN houses
// FILTER house._id IN (
// FOR edge IN located_at
// FILTER edge._to == @streetId
// RETURN edge._from
// )
// RETURN house
// `;
// const bindVars = { streetId };
// const cursor = await db.query(query, bindVars);
// const houses = await cursor.all();
// console.log(`Найдено домов: ${houses.length}`);
// console.log('Дома:', houses);
// res.render('houses', { houses, streetKey });
// });
});
60 changes: 19 additions & 41 deletions citywalls2/public/stylesheets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,44 +83,22 @@ label {
border: 1px solid #ccc;
}

/*header, footer {*/
/* background-color: #333;*/
/* color: #fff;*/
/* padding: 15px;*/
/*}*/

/*header h1, footer p {*/
/* margin: 0;*/
/*}*/

/*nav a {*/
/* color: #fff;*/
/* margin-right: 15px;*/
/* text-decoration: none;*/
/*}*/

/*main {*/
/* padding: 20px;*/
/*}*/

/*button {*/
/* padding: 10px 20px;*/
/* font-size: 16px;*/
/*}*/

/*table {*/
/* width: 100%;*/
/* border-collapse: collapse;*/
/* margin-top: 20px;*/
/*}*/

/*table th, table td {*/
/* border: 1px solid #ccc;*/
/* padding: 10px;*/
/* text-align: left;*/
/*}*/

/*table th {*/
/* background-color: #f4f4f4;*/
/*}*/

table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
table, th, td {
border: 1px solid #ccc;
}
th, td {
padding: 10px;
text-align: center;
}
th {
background-color: #f4f4f4;
}
img {
max-width: 100px;
height: auto;
}
4 changes: 2 additions & 2 deletions citywalls2/routes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ router.get('/export', street_controller.export)
// Маршрут для страницы фильтрации улиц
router.get('/main/streets', street_controller.streets_filter)

router.get('/main/streets/filter', street_controller.streets)

// Маршрут для отображения домов конкретной улицы
router.get('/main/streets/:streetName/houses', street_controller.housesByStreet);

router.get('/main/streets/filter', street_controller.streets)


// router.get('/streets/:key/houses', street_controller.houses)

Expand Down
21 changes: 0 additions & 21 deletions citywalls2/views/houses.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
<link rel="stylesheet" href="/stylesheets/styles.css">
<style>
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
table, th, td {
border: 1px solid #ccc;
}
th, td {
padding: 10px;
text-align: center;
}
th {
background-color: #f4f4f4;
}
img {
max-width: 100px;
height: auto;
}
</style>
</head>
<body>
<h1><%= title %></h1>
Expand Down

0 comments on commit 5fc7e86

Please sign in to comment.