Твердосплавные пластины для токарной обработки
:root {
—primary-color: #2c3e50;
—secondary-color: #e74c3c;
—accent-color: #3498db;
—light-bg: #f5f7fa;
—card-bg: #ffffff;
—border-color: #ddd;
—text-color: #333;
—text-light: #777;
—shadow: 0 4px 8px rgba(0,0,0,0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: ‘Segoe UI’, Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(—light-bg);
color: var(—text-color);
line-height: 1.6;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background: linear-gradient(135deg, var(—primary-color) 0%, #1a2530 100%);
color: white;
border-radius: 10px;
box-shadow: var(—shadow);
}
h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
.description {
font-size: 1.1rem;
max-width: 800px;
margin: 0 auto;
color: rgba(255, 255, 255, 0.8);
}
.controls {
display: flex;
justify-content: space-between;
margin-bottom: 25px;
flex-wrap: wrap;
gap: 15px;
background: var(—card-bg);
padding: 20px;
border-radius: 10px;
box-shadow: var(—shadow);
}
.search-box {
flex: 1;
min-width: 300px;
position: relative;
}
.search-box input {
width: 100%;
padding: 12px 20px 12px 45px;
border: 1px solid var(—border-color);
border-radius: 50px;
font-size: 1rem;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
transition: all 0.3s;
}
.search-box input:focus {
outline: none;
border-color: var(—accent-color);
box-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: var(—text-light);
}
.filter-box {
display: flex;
gap: 15px;
flex-wrap: wrap;
}
.filter-box select {
padding: 12px 15px;
border: 1px solid var(—border-color);
border-radius: 8px;
background-color: white;
font-size: 0.95rem;
min-width: 150px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.filter-box select:focus {
outline: none;
border-color: var(—accent-color);
}
.results-info {
margin-bottom: 20px;
font-size: 1.1rem;
color: var(—text-light);
display: flex;
justify-content: space-between;
align-items: center;
}
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 25px;
margin-bottom: 40px;
}
.product-card {
background: var(—card-bg);
border-radius: 10px;
overflow: hidden;
box-shadow: var(—shadow);
transition: transform 0.3s, box-shadow 0.3s;
display: flex;
flex-direction: column;
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.product-header {
background: linear-gradient(135deg, var(—primary-color) 0%, #3a546f 100%);
color: white;
padding: 20px;
}
.product-name {
font-size: 1.4rem;
font-weight: bold;
margin-bottom: 5px;
}
.product-model {
font-size: 1.1rem;
opacity: 0.9;
}
.product-specs {
padding: 20px;
flex-grow: 1;
overflow-y: auto;
max-height: 350px;
}
.specs-title {
font-weight: bold;
margin-bottom: 15px;
color: var(—primary-color);
border-bottom: 2px solid var(—border-color);
padding-bottom: 8px;
font-size: 1.2rem;
}
.spec-item {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-size: 1rem;
}
.spec-name {
color: var(—text-light);
flex: 1;
}
.spec-value {
font-weight: 500;
text-align: right;
flex: 1;
}
.unknown-value {
color: #999;
font-style: italic;
}
.pagination {
display: flex;
justify-content: center;
margin-top: 30px;
gap: 10px;
}
.pagination button {
padding: 10px 18px;
background-color: var(—primary-color);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s;
font-size: 1rem;
}
.pagination button:hover {
background-color: var(—accent-color);
}
.pagination button.active {
background-color: var(—secondary-color);
}
.no-results {
text-align: center;
padding: 40px;
font-size: 1.2rem;
color: var(—text-light);
grid-column: 1 / -1;
}
@media (max-width: 768px) {
.product-grid {
grid-template-columns: 1fr;
}
.controls {
flex-direction: column;
}
.search-box {
min-width: 100%;
}
.filter-box {
width: 100%;
}
.filter-box select {
flex: 1;
min-width: 120px;
}
h1 {
font-size: 2rem;
}
}
.material-badge {
display: inline-block;
padding: 3px 8px;
border-radius: 4px;
font-size: 0.8rem;
margin-left: 8px;
background-color: var(—accent-color);
color: white;
}
Все материалы
N (цветные металлы)
H (Твердые материалы)
K (чугун)
M (нержавеющая сталь)
P (сталь)
Все типы обработки
чистовая
общей работы
получистовая
черновая
Все формы
A (85° rhombus)
C (80° rhombus)
D (55° rhombus)
R (круг)
S (90°)
T (треугольник 60°)
V (35° rhombus)
W (тригональная)
Найдено продуктов: 0
Страница 1 из 1
// Данные продуктов из Excel файла
const products = [
{
model: «APKT1135-G2-AL»,
name: «SK10UF»,
chipbreaker: «G2-AL»,
processingType: «чистовая+Непрерывный»,
chipbreakerType: «G2-AL»,
shape: «A (85° rhombus)»,
clearanceAngle: «P (11°)»,
material: «N (цветные металлы)»,
ic: «»,
thickness: «»,
l: «»,
d: «»,
radius: «»
},
{
model: «APKT1604-G2-AL»,
name: «SK10UF»,
chipbreaker: «G2-AL»,
processingType: «чистовая+Непрерывный»,
chipbreakerType: «G2-AL»,
shape: «A (85° rhombus)»,
clearanceAngle: «P (11°)»,
material: «N (цветные металлы)»,
ic: «16.45»,
thickness: «9.4»,
l: «5.2»,
d: «4.21»,
radius: «»
},
{
model: «APKT1604-MA3-AL»,
name: «SK10UF»,
chipbreaker: «MA3-AL»,
processingType: «чистовая+Непрерывный»,
chipbreakerType: «MA3-AL»,
shape: «A (85° rhombus)»,
clearanceAngle: «P (11°)»,
material: «N (цветные металлы)»,
ic: «16.45»,
thickness: «9.4»,
l: «5.2»,
d: «4.21»,
radius: «»
},
{
model: «APKT1604PDER-AL»,
name: «SK10UF»,
chipbreaker: «AL»,
processingType: «чистовая+Непрерывный»,
chipbreakerType: «AL»,
shape: «A (85° rhombus)»,
clearanceAngle: «P (11°)»,
material: «N (цветные металлы)»,
ic: «16.45»,
thickness: «9.4»,
l: «5.2»,
d: «4.21»,
radius: «»
}
];
// Переменные для пагинации
let currentPage = 1;
const productsPerPage = 9;
let filteredProducts = […products];
// Функция для отображения продуктов
function displayProducts(productsToShow, page = 1) {
const productGrid = document.getElementById(‘productGrid’);
productGrid.innerHTML = »;
const startIndex = (page — 1) * productsPerPage;
const endIndex = startIndex + productsPerPage;
const paginatedProducts = productsToShow.slice(startIndex, endIndex);
// Обновляем информацию о количестве продуктов
document.getElementById(‘productCount’).querySelector(‘span’).textContent = productsToShow.length;
document.getElementById(‘currentPage’).textContent = `Страница ${page} из ${Math.ceil(productsToShow.length / productsPerPage)}`;
if (paginatedProducts.length === 0) {
productGrid.innerHTML = ‘
Нет продуктов, соответствующих вашим критериям фильтрации.
‘;
return;
}
paginatedProducts.forEach(product => {
const productCard = document.createElement(‘div’);
productCard.className = ‘product-card’;
// Определяем цвет материала для бейджа
let materialBadge = »;
let badgeClass = »;
if (product.material.includes(‘N’)) {
badgeClass = ‘material-n’;
} else if (product.material.includes(‘H’)) {
badgeClass = ‘material-h’;
} else if (product.material.includes(‘K’)) {
badgeClass = ‘material-k’;
} else if (product.material.includes(‘M’)) {
badgeClass = ‘material-m’;
} else if (product.material.includes(‘P’)) {
badgeClass = ‘material-p’;
}
productCard.innerHTML = `
Технические характеристики:
Chipbreaker:
${product.chipbreaker || ‘не указано‘}
Вид обработки:
${product.processingType || ‘не указано‘}
Стружколом:
${product.chipbreakerType || ‘не указано‘}
Форма пластины:
${product.shape || ‘не указано‘}
Задний угол пластины:
${product.clearanceAngle || ‘не указано‘}
Обрабатываемый материал:
${product.material || ‘не указано‘}
IC (Размер пластины):
${product.ic || ‘не указано‘}
Толщина пластины:
${product.thickness || ‘не указано‘}
L:
${product.l || ‘не указано‘}
D:
${product.d || ‘не указано‘}
Радиус при вершине:
${product.radius || ‘не указано‘}
`;
productGrid.appendChild(productCard);
});
// Обновляем пагинацию
updatePagination(productsToShow, page);
}
// Функция для обновления пагинации
function updatePagination(productsToShow, currentPage) {
const totalPages = Math.ceil(productsToShow.length / productsPerPage);
const paginationContainer = document.getElementById(‘pagination’);
paginationContainer.innerHTML = »;
if (totalPages {
displayProducts(filteredProducts, currentPage — 1);
});
paginationContainer.appendChild(prevButton);
// Нумерация страниц
const startPage = Math.max(1, currentPage — 2);
const endPage = Math.min(totalPages, startPage + 4);
for (let i = startPage; i {
displayProducts(filteredProducts, i);
});
paginationContainer.appendChild(pageButton);
}
// Кнопка «Вперед»
const nextButton = document.createElement(‘button’);
nextButton.innerHTML = ‘»’;
nextButton.disabled = currentPage === totalPages;
nextButton.addEventListener(‘click’, () => {
displayProducts(filteredProducts, currentPage + 1);
});
paginationContainer.appendChild(nextButton);
}
// Функция для фильтрации продуктов
function filterProducts() {
const searchText = document.getElementById(‘searchInput’).value.toLowerCase();
const materialFilter = document.getElementById(‘materialFilter’).value;
const typeFilter = document.getElementById(‘typeFilter’).value;
const shapeFilter = document.getElementById(‘shapeFilter’).value;
filteredProducts = products.filter(product => {
// Поиск по модели и названию
const matchesSearch = searchText === » ||
product.model.toLowerCase().includes(searchText) ||
product.name.toLowerCase().includes(searchText) ||
(product.material && product.material.toLowerCase().includes(searchText)) ||
(product.shape && product.shape.toLowerCase().includes(searchText));
// Фильтр по материалу
const matchesMaterial = !materialFilter ||
(product.material && product.material.includes(materialFilter));
// Фильтр по типу обработки
const matchesType = !typeFilter ||
(product.processingType && product.processingType.includes(typeFilter));
// Фильтр по форме
const matchesShape = !shapeFilter ||
(product.shape && product.shape.includes(shapeFilter));
return matchesSearch && matchesMaterial && matchesType && matchesShape;
});
currentPage = 1;
displayProducts(filteredProducts, currentPage);
}
// Инициализация
document.addEventListener(‘DOMContentLoaded’, () => {
// Показываем все продукты при загрузке
displayProducts(products, currentPage);
// Добавляем обработчики событий для фильтров
document.getElementById(‘searchInput’).addEventListener(‘input’, filterProducts);
document.getElementById(‘materialFilter’).addEventListener(‘change’, filterProducts);
document.getElementById(‘typeFilter’).addEventListener(‘change’, filterProducts);
document.getElementById(‘shapeFilter’).addEventListener(‘change’, filterProducts);
});