polished template

This commit is contained in:
GP_DEV
2025-06-19 14:18:56 +03:00
parent f8688ae00b
commit a6bb81cbe1
13 changed files with 677 additions and 259 deletions

View File

@@ -24,6 +24,14 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
gap: 4px;
}
.dark .pl-lang-switcher-container {
border: 1px solid rgba(248, 248, 248, 0.05);
backdrop-filter: blur(20px);
background: linear-gradient(90deg, rgba(248, 248, 248, 0.04) 65.8%, rgba(255, 255, 255, 0.12) 100%);
background-position: -1px 0;
background-size: 101%;
}
.pl-lang-switcher-button,
.pl-lang-switcher-container a {
position: relative;
@@ -33,7 +41,7 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
color: #636363;
font-weight: 600;
font-size: 15px;
line-height: 110%;
line-height: 40%;
text-align: center;
border-radius: 90px;
cursor: pointer;
@@ -48,10 +56,16 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
padding-right: 12px;
}
.dark .pl-lang-switcher-button,
.dark .pl-lang-switcher-container a {
color: #b9b7b9;
}
.pl-lang-switcher-button:hover,
.pl-lang-switcher-container a:hover {
.pl-lang-switcher-container a(not:.pl-lang-switcher-current):hover {
color: #222;
}
.pl-lang-switcher-button.pl-lang-switcher-active,
.pl-lang-switcher-container a.pl-lang-switcher-active,
@@ -59,6 +73,10 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
color: #f8f8f8;
}
.dark a.pl-lang-switcher-current {
color: #303030;
}
.pl-lang-switcher-slider {
position: absolute;
height: 29px;
@@ -69,6 +87,10 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
transform: translateX(var(--pl-slider-x));
transition: all 180ms cubic-bezier(0.4, 0.0, 0.2, 1);
}
.dark .pl-lang-switcher-slider {
background: #faf8f5;
}
</style>
<div class="pl-lang-switcher-container" id="plLangSwitcherContainer">
@@ -123,7 +145,7 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('DOMContentLoaded', function () {
const container = document.getElementById('plLangSwitcherContainer');
if (!container) return;
@@ -180,7 +202,7 @@ if (!function_exists('pll_languages_list') || !function_exists('pll_current_lang
}
function setupClickHandlers() {
container.addEventListener('click', function(e) {
container.addEventListener('click', function (e) {
const link = e.target.closest('a');
if (!link) return;