Skip to content

Commit

Permalink
feat: more uniform and aligned styles on the settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Jul 3, 2024
1 parent 25fad50 commit f612357
Show file tree
Hide file tree
Showing 21 changed files with 209 additions and 42 deletions.
17 changes: 17 additions & 0 deletions includes/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@

$isAdmin = $_SESSION['userId'] == 1;

function hex2rgb($hex) {
$hex = str_replace("#", "", $hex);
if(strlen($hex) == 3) {
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
} else {
$r = hexdec(substr($hex,0,2));
$g = hexdec(substr($hex,2,2));
$b = hexdec(substr($hex,4,2));
}
return "$r, $g, $b";
}

?>
<!DOCTYPE html>
<html dir="<?= $languages[$lang]['dir'] ?>">
Expand Down Expand Up @@ -71,12 +85,15 @@
:root {
<?php if (isset($settings['customColors']['main_color']) && !empty($settings['customColors']['main_color'])): ?>
--main-color: <?= $settings['customColors']['main_color'] ?>;
--main-color-rgb: <?= hex2rgb($settings['customColors']['main_color']) ?>;
<?php endif; ?>
<?php if (isset($settings['customColors']['accent_color']) && !empty($settings['customColors']['accent_color'])): ?>
--accent-color: <?= $settings['customColors']['accent_color'] ?>;
--accent-color-rgb: <?= hex2rgb($settings['customColors']['accent_color']) ?>;
<?php endif; ?>
<?php if (isset($settings['customColors']['hover_color']) && !empty($settings['customColors']['hover_color'])): ?>
--hover-color: <?= $settings['customColors']['hover_color'] ?>;
--hover-color-rgb: <?= hex2rgb($settings['customColors']['hover_color']) ?>;
<?php endif; ?>
}
</style>
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Dark Theme",
"light_theme" => "Light Theme",
"automatic"=> "Automatisch",
"main_color" => "Hauptfarbe",
"accent_color" => "Akzentfarbe",
"hover_color" => "Hover Farbe",
"custom_css" => "Benutzerdefiniertes CSS",
"save_custom_css" => "Benutzerdefiniertes CSS speichern",
"save_custom_colors" => "Benutzerdefinierte Farben speichern",
"reset_custom_colors" => "Benutzerdefinierte Farben zurücksetzen",
"calculate_monthly_price" => "Berechne und zeige monatlichen Preis für alle Abonnements an",
"convert_prices" => "Preise immer in meine Hauptwährung umrechnen und darin anzeigen (langsamer)",
"hide_disabled_subscriptions" => "Deaktivierte Abonnements verstecken",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/el.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Dark Theme",
"light_theme" => "Light Theme",
"automatic"=> "Αυτόματο",
"main_color" => "Κύριο χρώμα",
"accent_color" => "Χρώμα επισήμανσης",
"hover_color" => "Χρώμα πάνω από",
"save_custom_colors" => "Αποθήκευση προσαρμοσμένων χρωμάτων",
"reset_custom_colors" => "Επαναφορά προεπιλεγμένων χρωμάτων",
"custom_css" => "Προσαρμοσμένο CSS",
"save_custom_css" => "Αποθήκευση προσαρμοσμένου CSS",
"calculate_monthly_price" => "Υπολογισμός και εμφάνιση της μηνιαίας τιμής για όλες τις συνδρομές",
"convert_prices" => "Πάντα να μετατρέπει και να εμφανίζει τις τιμές στο κύριο νόμισμά μου (πιο αργό)",
"hide_disabled_subscriptions" => "Απόκρυψη απενεργοποιημένων συνδρομών",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Dark Theme",
"light_theme" => "Light Theme",
"automatic"=> "Automatic",
"main_color" => "Main Color",
"accent_color" => "Accent Color",
"hover_color" => "Hover Color",
"save_custom_colors" => "Save Custom Colors",
"reset_custom_colors" => "Reset Custom Colors",
"custom_css" => "Custom CSS",
"save_custom_css" => "Save Custom CSS",
"calculate_monthly_price" => "Calculate and show monthly price for all subscriptions",
"convert_prices" => "Always convert and show prices on my main currency (slower)",
"hide_disabled_subscriptions" => "Hide disabled subscriptions",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/es.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Tema Oscuro",
"light_theme" => "Tema Claro",
"automatic"=> "Automático",
"main_color" => "Color Principal",
"accent_color" => "Color de Acento",
"hover_color" => "Color de Hover",
"save_custom_colors" => "Guardar Colores Personalizados",
"reset_custom_colors" => "Restablecer Colores Personalizados",
"custom_css" => "CSS Personalizado",
"save_custom_css" => "Guardar CSS Personalizado",
"calculate_monthly_price" => "Calcular y mostrar el precio mensual de todas las suscripciones",
"convert_prices" => "Convertir y mostrar siempre los precios en mi moneda principal (más lento)",
"hide_disabled_subscriptions" => "Ocultar suscripciones desactivadas",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Thème sombre",
"light_theme" => "Thème clair",
"automatic"=> "Automatique",
"main_color" => "Couleur principale",
"accent_color" => "Couleur d'accent",
"hover_color" => "Couleur de survol",
"save_custom_colors" => "Enregistrer les couleurs personnalisées",
"reset_custom_colors" => "Réinitialiser les couleurs personnalisées",
"custom_css" => "CSS personnalisé",
"save_custom_css" => "Enregistrer le CSS personnalisé",
"calculate_monthly_price" => "Calculer et afficher le prix mensuel pour tous les abonnements",
"convert_prices" => "Convertir toujours et afficher les prix dans ma devise principale (plus lent)",
"hide_disabled_subscriptions" => "Masquer les abonnements désactivés",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/it.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@
"dark_theme" => 'Tema scuro',
"light_theme" => 'Tema chiaro',
"automatic" => "Automatico",
"main_color" => "Colore principale",
"accent_color" => "Colore di accento",
"hover_color" => "Colore al passaggio del mouse",
"save_custom_colors" => "Salva colori personalizzati",
"reset_custom_colors" => "Ripristina colori personalizzati",
"custom_css" => "CSS personalizzato",
"save_custom_css" => "Salva CSS personalizzato",
'calculate_monthly_price' => 'Calcola e mostra il prezzo mensile per tutti gli abbonamenti',
'convert_prices' => 'Converti sempre e mostra i prezzi nella mia valuta principale (più lento)',
"hide_disabled_subscriptions" => 'Nascondi gli abbonamenti disattivati',
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/jp.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "ダークテーマ",
"light_theme" => "ライトテーマ",
"automatic"=> "自動",
"main_color" => "メインカラー",
"accent_color" => "アクセントカラー",
"hover_color" => "ホバーカラー",
"save_custom_colors" => "カスタムカラーを保存",
"reset_custom_colors" => "カスタムカラーをリセット",
"custom_css" => "カスタムCSS",
"save_custom_css" => "カスタムCSSを保存",
"calculate_monthly_price" => "すべての定期購入の月額料金を計算して表示する",
"convert_prices" => "常にメイン通貨で価格を換算して表示する (遅い)",
"hide_disabled_subscriptions" => "無効な定期購入を非表示にする",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/ko.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@
"dark_theme" => "다크 테마",
"light_theme" => "라이트 테마",
"automatic"=> "자동",
"main_color" => "메인 색상",
"accent_color" => "강조 색상",
"hover_color" => "마우스 호버 색상",
"save_custom_colors" => "커스텀 색상 저장",
"reset_custom_colors" => "커스텀 색상 리셋",
"custom_css" => "커스텀 CSS",
"save_custom_css" => "커스텀 CSS 저장",
"calculate_monthly_price" => "모든 구독에 대한 월별 요금을 계산하고 표시",
"convert_prices" => "항상 기본 통화로 가격을 환산하고 표시 (느림)",
"hide_disabled_subscriptions" => "비활성화된 구독 숨기기",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/pl.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Przełącz na jasny/ciemny motyw",
"light_theme" => "Przełącz na ciemny/jasny motyw",
"automatic"=> "Automatycznie",
"main_color" => "Główny kolor",
"accent_color" => "Kolor akcentowy",
"hover_color" => "Kolor najechania",
"save_custom_colors" => "Zapisz niestandardowe kolory",
"reset_custom_colors" => "Resetuj niestandardowe kolory",
"custom_css" => "Niestandardowy CSS",
"save_custom_css" => "Zapisz niestandardowy CSS",
"calculate_monthly_price" => "Oblicz i pokaż miesięczną cenę wszystkich subskrypcji",
"convert_prices" => "Zawsze przeliczaj i pokazuj ceny w mojej głównej walucie (wolniej)",
"hide_disabled_subscriptions" => "Ukryj wyłączone subskrypcje",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/pt.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Tema Escuro",
"light_theme" => "Tema Claro",
"automatic"=> "Automático",
"main_color" => "Cor Principal",
"accent_color" => "Cor de Destaque",
"hover_color" => "Cor de Hover",
"save_custom_colors" => "Guardar Cores Personalizadas",
"reset_custom_colors" => "Repor Cores Personalizadas",
"custom_css" => "CSS Personalizado",
"save_custom_css" => "Guardar CSS Personalizado",
"calculate_monthly_price" => "Calcular e mostrar preço mensal para todas as subscrições",
"convert_prices" => "Converter e mostrar todas as subscrições na moeda principal (mais lento)",
"hide_disabled_subscriptions" => "Esconder subscrições desactivadas",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/pt_br.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Tema Escuro",
"light_theme" => "Tema Claro",
"automatic" => "Automático",
"main_color" => "Cor principal",
"accent_color" => "Cor de destaque",
"hover_color" => "Cor de destaque (hover)",
"save_custom_colors" => "Salvar Cores Personalizadas",
"reset_custom_colors" => "Redefinir Cores Personalizadas",
"custom_css" => "CSS Personalizado",
"save_custom_css" => "Salvar CSS Personalizado",
"calculate_monthly_price" => "Calcular e exibir o custo mensal para todas as assinaturas",
"convert_prices" => "Sempre converter e exibir preços na moeda principal (mais lento)",
"hide_disabled_subscriptions" => "Ocultar assinaturas desativadas",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Темная тема",
"light_theme" => "Светлая тема",
"automatic"=> "Автоматически",
"main_color" => "Основной цвет",
"accent_color" => "Акцентный цвет",
"hover_color" => "Цвет при наведении",
"save_custom_colors" => "Сохранить пользовательские цвета",
"reset_custom_colors" => "Сбросить пользовательские цвета",
"custom_css" => "Пользовательский CSS",
"save_custom_css" => "Сохранить пользовательский CSS",
"calculate_monthly_price" => "Рассчитать и показать ежемесячную цену для всех подписок",
"convert_prices" => "Всегда конвертировать и показывать цены в моей основной валюте (медленнее)",
"hide_disabled_subscriptions" => "Скрыть отключенные подписки",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/sl.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Temna tema",
"light_theme" => "Svetla tema",
"automatic"=> "Samodejno",
"main_color" => "Glavna barva",
"accent_color" => "Poudarna barva",
"hover_color" => "Barva ob hoverju",
"save_custom_colors" => "Shrani barve po meri",
"reset_custom_colors" => "Ponastavi barve po meri",
"custom_css" => "CSS po meri",
"save_custom_css" => "Shrani CSS po meri",
"calculate_monthly_price" => "Izračunaj in prikaži mesečno ceno za vse naročnine",
"convert_prices" => "Vedno pretvori in prikaži cene v moji glavni valuti (počasneje)",
"hide_disabled_subscriptions" => "Skrij onemogočene naročnine",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/sr.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@
"dark_theme" => "Тамна тема",
"light_theme" => "Светла тема",
"automatic"=> "Аутоматски",
"main_color" => "Главна боја",
"accent_color" => "Акцент боја",
"hover_color" => "Боја приликом преласка",
"save_custom_colors" => "Сачувај прилагођене боје",
"reset_custom_colors" => "Ресетуј прилагођене боје",
"custom_css" => "Прилагођени CSS",
"save_custom_css" => "Сачувај прилагођени CSS",
"calculate_monthly_price" => "Израчунајте и прикажите месечну цену за све претплате",
"convert_prices" => "Увек конвертујте и прикажите цене на мојој главној валути (спорије)",
"hide_disabled_subscriptions" => "Сакриј онемогућене претплате",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/sr_lat.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Tamna tema",
"light_theme" => "Svetla tema",
"automatic"=> "Automatski",
"main_color" => "Glavna boja",
"accent_color" => "Akcentna boja",
"hover_color" => "Boja prilikom prelaska",
"save_custom_colors" => "Sačuvaj prilagođene boje",
"reset_custom_colors" => "Resetuj prilagođene boje",
"custom_css" => "Prilagođeni CSS",
"save_custom_css" => "Sačuvaj prilagođeni CSS",
"calculate_monthly_price" => "Izračunaj i prikaži mesečnu cenu za sve pretplate",
"convert_prices" => "Uvek konvertuj i prikaži cene u mojoj glavnoj valuti (sporije)",
"hide_disabled_subscriptions" => "Sakrij onemogućene pretplate",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/tr.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "Koyu Temayı",
"light_theme" => "Açık Temayı",
"automatic"=> "Otomatik",
"main_color" => "Ana",
"accent_color" => "Vurgu",
"hover_color" => "Üzerine gelindiğinde",
"save_custom_colors" => "Özel Renkleri Kaydet",
"reset_custom_colors" => "Özel Renkleri Sıfırla",
"custom_css" => "Özel CSS",
"save_custom_css" => "Özel CSS'yi Kaydet",
"calculate_monthly_price" => "Tüm aboneliklerin aylık fiyatını hesaplayın ve gösterin",
"convert_prices" => "Fiyatları her zaman ana para birimimde dönüştürün ve gösterin (daha yavaş)",
"hide_disabled_subscriptions" => "Devre dışı bırakılan abonelikleri gizle",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/zh_cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@
"dark_theme" => "深色主题",
"light_theme" => "浅色主题",
"automatic"=> "自动",
"main_color" => "主色",
"accent_color" => "强调色",
"hover_color" => "悬停颜色",
"save_custom_colors" => "保存自定义颜色",
"reset_custom_colors" => "重置自定义颜色",
"custom_css" => "自定义 CSS",
"save_custom_css" => "保存自定义 CSS",
"calculate_monthly_price" => "计算并显示所有订阅的月价格",
"convert_prices" => "始终按我的主要货币转换和显示价格(较慢)",
"hide_disabled_subscriptions" => "隐藏已停用的订阅",
Expand Down
7 changes: 7 additions & 0 deletions includes/i18n/zh_tw.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@
"dark_theme" => "深色主題",
"light_theme" => "淺色主題",
"automatic"=> "自動",
"main_color" => "主要顏色",
"accent_color" => "強調顏色",
"hover_color" => "懸停顏色",
"save_custom_colors" => "儲存自訂顏色",
"reset_custom_colors" => "重設自訂顏色",
"custom_css" => "自訂 CSS",
"save_custom_css" => "儲存自訂 CSS",
"calculate_monthly_price" => "計算並顯示所有訂閱的每月價格",
"convert_prices" => "始終按照我的主要貨幣單位轉換和顯示價格(較慢)",
"hide_disabled_subscriptions" => "隱藏已停用的訂閱",
Expand Down
Loading

0 comments on commit f612357

Please sign in to comment.