الگو:کانتبنر 6 ضلعی/مکانیکی محمد: تفاوت میان نسخهها
صفحهای تازه حاوی «<html> <!-- ========================= Font Awesome 6.6 ========================= --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"> <section class="hex-services" aria-label="خدمات مکانیکی، جلوبندی و هیدرولیک فرمان"> <!-- ========================= ردیف اول ========================= --> <div class="hex-ro...» ایجاد کرد |
بدون خلاصۀ ویرایش |
||
| خط ۱: | خط ۱: | ||
<html> | <html lang="fa" dir="rtl"> | ||
<!-- ========================= | <!-- ========================= | ||
Font Awesome 6.6 | Font Awesome 6.6 | ||
| خط ۷: | خط ۸: | ||
<section class="hex-services" aria-label="خدمات مکانیکی، جلوبندی و هیدرولیک فرمان"> | <section class="hex-services" | ||
aria-label="خدمات مکانیکی، جلوبندی و هیدرولیک فرمان"> | |||
<!-- ========================= | <!-- ========================= | ||
ردیف اول | ردیف اول - 5 کادر | ||
========================= --> | ========================= --> | ||
<div class="hex-row"> | <div class="hex-row"> | ||
<!-- تعمیر موتور --> | <!-- تعمیر موتور --> | ||
<a href="#" class="hex-item brown" aria-label="تعمیر موتور خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تعمیر موتور خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۲۵: | خط ۳۱: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-gears"></i> | <i class="fa-solid fa-gears" aria-hidden="true"></i> | ||
<strong>تعمیر موتور</strong> | <strong>تعمیر موتور</strong> | ||
</div> | </div> | ||
| خط ۳۶: | خط ۴۳: | ||
<!-- تعمیر گیربکس --> | <!-- تعمیر گیربکس --> | ||
<a href="#" class="hex-item brown" aria-label="تعمیر گیربکس خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تعمیر گیربکس خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۴۵: | خط ۵۷: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-car"></i> | <i class="fa-solid fa-car" aria-hidden="true"></i> | ||
<strong>تعمیر گیربکس</strong> | <strong>تعمیر گیربکس</strong> | ||
</div> | </div> | ||
| خط ۵۶: | خط ۶۹: | ||
<!-- جلوبندی سازی --> | <!-- جلوبندی سازی --> | ||
<a href="#" class="hex-item brown" aria-label="جلوبندی سازی خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="جلوبندی سازی خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۶۵: | خط ۸۳: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-screwdriver-wrench"></i> | <i class="fa-solid fa-screwdriver-wrench" | ||
aria-hidden="true"></i> | |||
<strong>جلوبندیسازی</strong> | <strong>جلوبندیسازی</strong> | ||
</div> | </div> | ||
| خط ۷۶: | خط ۹۶: | ||
<!-- هیدرولیک فرمان --> | <!-- هیدرولیک فرمان --> | ||
<a href="#" class="hex-item brown" aria-label="تعمیر هیدرولیک فرمان"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تعمیر هیدرولیک فرمان"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۸۵: | خط ۱۱۰: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-car"></i> | <i class="fa-solid fa-car" aria-hidden="true"></i> | ||
<strong>هیدرولیک فرمان</strong> | <strong>هیدرولیک فرمان</strong> | ||
</div> | </div> | ||
| خط ۹۶: | خط ۱۲۲: | ||
<!-- تعویض روغن --> | <!-- تعویض روغن --> | ||
<a href="#" class="hex-item brown" aria-label="تعویض روغن خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تعویض روغن خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۱۰۵: | خط ۱۳۶: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-oil-can"></i> | <i class="fa-solid fa-oil-can" | ||
aria-hidden="true"></i> | |||
<strong>تعویض روغن</strong> | <strong>تعویض روغن</strong> | ||
</div> | </div> | ||
| خط ۱۱۸: | خط ۱۵۱: | ||
<!-- ========================= | <!-- ========================= | ||
ردیف دوم | ردیف دوم - 4 کادر | ||
========================= --> | ========================= --> | ||
<div class="hex-row second-row"> | <div class="hex-row second-row"> | ||
<!-- سیستم ترمز --> | <!-- سیستم ترمز --> | ||
<a href="#" class="hex-item brown" aria-label="تعمیر سیستم ترمز"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تعمیر سیستم ترمز خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۱۳۲: | خط ۱۷۰: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-circle-stop"></i> | <i class="fa-solid fa-circle-stop" | ||
aria-hidden="true"></i> | |||
<strong>سیستم ترمز</strong> | <strong>سیستم ترمز</strong> | ||
</div> | </div> | ||
| خط ۱۴۲: | خط ۱۸۲: | ||
<!-- عیب یابی | <!-- عیب یابی --> | ||
<a href="#" class="hex-item brown" aria-label="عیب یابی خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="عیب یابی خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۱۵۲: | خط ۱۹۷: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-laptop-code"></i> | <i class="fa-solid fa-laptop-code" | ||
aria-hidden="true"></i> | |||
<strong>عیبیابی خودرو</strong> | <strong>عیبیابی خودرو</strong> | ||
</div> | </div> | ||
| خط ۱۶۳: | خط ۲۱۰: | ||
<!-- سرویس دوره ای --> | <!-- سرویس دوره ای --> | ||
<a href="#" class="hex-item brown" aria-label="سرویس دوره ای خودرو"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="سرویس دوره ای خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۱۷۲: | خط ۲۲۴: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-car-side"></i> | <i class="fa-solid fa-car-side" | ||
aria-hidden="true"></i> | |||
<strong>سرویس دورهای</strong> | <strong>سرویس دورهای</strong> | ||
</div> | </div> | ||
| خط ۱۸۲: | خط ۲۳۶: | ||
<!-- | <!-- فرمان و چرخ --> | ||
<a href="#" class="hex-item brown" aria-label="فرمان و چرخ"> | <a href="#" | ||
class="hex-item brown" | |||
aria-label="تنظیم فرمان و چرخ خودرو"> | |||
<svg class="hex-bg" | |||
viewBox="0 0 100 115" | |||
aria-hidden="true"> | |||
<polygon | <polygon | ||
points="50,2 94,27 94,88 50,113 6,88 6,27" | points="50,2 94,27 94,88 50,113 6,88 6,27" | ||
| خط ۱۹۲: | خط ۲۵۱: | ||
stroke-width="2" | stroke-width="2" | ||
stroke-linejoin="round"/> | stroke-linejoin="round"/> | ||
</svg> | </svg> | ||
<div class="hex-content"> | <div class="hex-content"> | ||
<i class="fa-solid fa-arrows-left-right-to-line"></i> | <i class="fa-solid fa-arrows-left-right-to-line" | ||
aria-hidden="true"></i> | |||
<strong>فرمان و چرخ</strong> | <strong>فرمان و چرخ</strong> | ||
</div> | </div> | ||
| خط ۲۰۸: | خط ۲۶۹: | ||
<style> | <style> | ||
/* ========================================= | /* ===================================================== | ||
تنظیمات | MOBILE FIRST | ||
========================================= */ | تنظیمات پایه برای موبایل | ||
===================================================== */ | |||
.hex-services { | .hex-services { | ||
--hex-width: | /* اندازه پایه شش ضلعی */ | ||
--hex-gap: | --hex-width: 21vw; | ||
/* فاصله بین شش ضلعی ها */ | |||
--hex-gap: 0px; | |||
width: 100%; | width: 100%; | ||
max-width: | max-width: 100%; | ||
margin: 0 auto; | margin: 0 auto; | ||
padding: | |||
/* | |||
padding بسیار کم تا شش ضلعی ها | |||
حداکثر فضای عرضی صفحه را بگیرند | |||
*/ | |||
padding: 18px 0; | |||
box-sizing: border-box; | box-sizing: border-box; | ||
| خط ۲۳۵: | خط ۳۰۵: | ||
/* ========================================= | /* ===================================================== | ||
ردیف ها | ردیف شش ضلعی ها | ||
========================================= */ | ===================================================== */ | ||
.hex-row { | .hex-row { | ||
| خط ۲۵۰: | خط ۳۲۰: | ||
gap: var(--hex-gap); | gap: var(--hex-gap); | ||
/* | |||
جلوگیری از رفتن کادرها به خط بعد | |||
*/ | |||
flex-wrap: nowrap; | flex-wrap: nowrap; | ||
} | } | ||
/* ردیف دوم */ | /* ===================================================== | ||
ردیف دوم | |||
===================================================== */ | |||
.second-row { | .second-row { | ||
/* | |||
ردیف دوم کمی داخل تر قرار می گیرد | |||
تا حالت تصویری مشابه نمونه حفظ شود | |||
*/ | |||
padding-left: 9%; | |||
padding-right: 9%; | |||
margin-top: -1px; | margin-top: -1px; | ||
box-sizing: border-box; | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
شش ضلعی | شش ضلعی | ||
========================================= */ | ===================================================== */ | ||
.hex-item { | .hex-item { | ||
| خط ۲۶۸: | خط ۳۵۴: | ||
position: relative; | position: relative; | ||
flex: 0 | /* | ||
در موبایل فضای مساوی می گیرند | |||
*/ | |||
flex: 1 1 0; | |||
width: var(--hex-width); | width: var(--hex-width); | ||
min-width: 0; | |||
aspect-ratio: 100 / 115; | aspect-ratio: 100 / 115; | ||
| خط ۲۸۱: | خط ۳۷۲: | ||
text-decoration: none; | text-decoration: none; | ||
color: # | color: #ffffff; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
/* | |||
بزرگ شدن بسیار ملایم هنگام هاور | |||
*/ | |||
transition: | transition: | ||
transform .25s ease, | transform .25s ease, | ||
| خط ۲۹۳: | خط ۳۸۷: | ||
/* ========================================= | /* ===================================================== | ||
SVG | |||
========================================= */ | ===================================================== */ | ||
.hex-bg { | .hex-bg { | ||
| خط ۳۱۴: | خط ۴۰۸: | ||
/* ========================================= | /* ===================================================== | ||
محتوای | محتوای شش ضلعی | ||
========================================= */ | ===================================================== */ | ||
.hex-content { | .hex-content { | ||
| خط ۳۲۲: | خط ۴۱۶: | ||
position: relative; | position: relative; | ||
width: | /* | ||
فضای بیشتر برای متن | |||
*/ | |||
width: 88%; | |||
display: flex; | display: flex; | ||
| خط ۳۳۳: | خط ۴۳۰: | ||
text-align: center; | text-align: center; | ||
line-height: 1. | line-height: 1.25; | ||
z-index: 2; | z-index: 2; | ||
/* | |||
جلوگیری از خروج متن | |||
*/ | |||
overflow: hidden; | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
آیکون | آیکون | ||
========================================= */ | ===================================================== */ | ||
.hex-content i { | .hex-content i { | ||
font-size: 30px; | /* | ||
بزرگتر از نسخه قبلی | |||
ولی کاملاً ریسپانسیو | |||
*/ | |||
font-size: clamp(21px, 7vw, 30px); | |||
line-height: 1; | line-height: 1; | ||
margin-bottom: | margin-bottom: 7px; | ||
flex-shrink: 0; | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
متن | متن | ||
========================================= */ | ===================================================== */ | ||
.hex-content strong { | .hex-content strong { | ||
| خط ۳۶۵: | خط ۴۷۳: | ||
sans-serif; | sans-serif; | ||
font-size: | /* | ||
فونت بزرگتر و ریسپانسیو | |||
*/ | |||
font-size: clamp(9px, 2.8vw, 13px); | |||
font-weight: | font-weight: 700; | ||
line-height: 1.35; | |||
white-space: nowrap; | white-space: nowrap; | ||
/* | |||
متن همیشه وسط باشد | |||
*/ | |||
text-align: center; | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
رنگ | رنگ نوشته | ||
========================================= */ | ===================================================== */ | ||
. | .brown { | ||
color: #ffffff; | color: #ffffff; | ||
} | } | ||
. | |||
color: # | /* ===================================================== | ||
رنگ شش ضلعی | |||
===================================================== */ | |||
.brown .hex-bg polygon { | |||
color: #795548; | |||
} | } | ||
. | |||
/* ===================================================== | |||
هاور | |||
===================================================== */ | |||
.hex-item:hover { | |||
transform: translateY(-4px) scale(1.025); | |||
filter: brightness(.95); | |||
z-index: 5; | |||
} | } | ||
. | |||
/* ===================================================== | |||
فوکوس برای دسترسی | |||
===================================================== */ | |||
.hex-item:focus-visible { | |||
outline: 2px solid #333; | |||
outline-offset: 3px; | |||
} | } | ||
/* ===================================================== | |||
موبایل خیلی کوچک | |||
320px تا 380px | |||
===================================================== */ | |||
@media (max-width: 380px) { | |||
.hex-services { | |||
padding-top: 12px; | |||
padding-bottom: 12px; | |||
} | |||
} | |||
.hex-content i { | |||
font-size: clamp(19px, 6.5vw, 24px); | |||
margin-bottom: 5px; | |||
} | |||
.hex-content strong { | |||
font-size: clamp(8px, 2.5vw, 10px); | |||
} | |||
. | .second-row { | ||
padding-left: 8%; | |||
padding-right: 8%; | |||
} | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
موبایل متوسط | |||
========================================= */ | 381px تا 599px | ||
===================================================== */ | |||
.hex- | @media (min-width: 381px) and (max-width: 599px) { | ||
.hex-content i { | |||
font-size: clamp(22px, 6.5vw, 30px); | |||
} | |||
.hex-content strong { | |||
font-size: clamp(10px, 2.7vw, 13px); | |||
} | |||
} | } | ||
/* ========================================= | /* ===================================================== | ||
تبلت | تبلت | ||
========================================= */ | ===================================================== */ | ||
@media (min-width: 600px) { | @media (min-width: 600px) { | ||
.hex-services { | .hex-services { | ||
--hex-width: 125px; | |||
--hex-gap: 1px; | |||
max-width: 780px; | |||
padding: 25px 5px; | |||
} | |||
. | .second-row { | ||
-- | padding-left: 8%; | ||
padding-right: 8%; | |||
} | } | ||
.hex-content i { | .hex-content i { | ||
font-size: | |||
font-size: 34px; | |||
margin-bottom: 8px; | |||
} | } | ||
.hex-content strong { | .hex-content strong { | ||
font-size: | |||
font-size: 14px; | |||
} | } | ||
| خط ۴۹۰: | خط ۶۴۳: | ||
/* ========================================= | /* ===================================================== | ||
دسکتاپ | |||
========================================= */ | ===================================================== */ | ||
@media ( | @media (min-width: 900px) { | ||
.hex-services { | .hex-services { | ||
--hex-width: | --hex-width: 140px; | ||
- | |||
max-width: 850px; | |||
padding: 30px 5px; | |||
} | } | ||
.second-row { | |||
padding-left: 8%; | |||
padding-right: 8%; | |||
} | } | ||
.hex-content i { | .hex-content i { | ||
font-size: | font-size: 38px; | ||
margin-bottom: 9px; | |||
} | } | ||
.hex-content strong { | .hex-content strong { | ||
font-size: | font-size: 15px; | ||
} | } | ||
} | |||
. | |||
/* ===================================================== | |||
دسکتاپ بزرگ | |||
===================================================== */ | |||
@media (min-width: 1200px) { | |||
.hex-services { | |||
--hex-width: 150px; | |||
max-width: 920px; | |||
} | |||
.hex-content i { | |||
font-size: 40px; | |||
} | |||
.hex-content strong { | |||
font-size: 16px; | |||
} | } | ||
| خط ۵۳۵: | خط ۷۱۷: | ||
</style> | </style> | ||
</html> | </html> | ||