Skip to content

Commit

Permalink
Added iOS theme
Browse files Browse the repository at this point in the history
  • Loading branch information
qurle committed Nov 13, 2024
1 parent 61b2711 commit 622a813
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/interfaces/themes/legoIOS/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export {
ThemeVkontakteIOS as ThemeLegoIOS,
ThemeVkontakteIOSCssVars as ThemeLegoIOSCssVars,
ThemeVkontakteIOSDescription as ThemeLegoIOSDescription,
} from '@/interfaces/themes/vkontakteIOS';
5 changes: 5 additions & 0 deletions src/interfaces/themes/legoIOSDark/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export {
ThemeVkontakteIOSDark as ThemeLegoIOSDark,
ThemeVkontakteIOSDarkCssVars as ThemeLegoIOSDarkCssVars,
ThemeVkontakteIOSDarkDescription as ThemeLegoIOSDarkDescription,
} from '@/interfaces/themes/vkontakteIOSDark';
3 changes: 3 additions & 0 deletions src/themeDescriptions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { cloudDarkTheme, cloudTheme } from '@/themeDescriptions/themes/cloud';
import { dobroDarkTheme, dobroTheme } from '@/themeDescriptions/themes/dobro';
import { homeDarkTheme, homeTheme } from '@/themeDescriptions/themes/home';
import { legoAndroidTheme, legoAndroidThemeDark } from '@/themeDescriptions/themes/legoAndroid';
import { legoIOSTheme, legoIOSThemeDark } from '@/themeDescriptions/themes/legoIOS';
import { mediaDarkTheme, mediaTheme } from '@/themeDescriptions/themes/media';
import { mycomTheme } from '@/themeDescriptions/themes/mycom';
import {
Expand Down Expand Up @@ -83,6 +84,8 @@ export const themes = [
tutoriaDarkTheme,
legoAndroidTheme,
legoAndroidThemeDark,
legoIOSTheme,
legoIOSThemeDark,

// ==== Темы, наследуемые от базовой темы Paradigm ====
// Темы, наследуемые от Octavius
Expand Down
66 changes: 66 additions & 0 deletions src/themeDescriptions/themes/legoIOS/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { ThemeLegoIOSDescription } from '@/interfaces/themes/legoIOS';
import { ThemeLegoIOSDarkDescription } from '@/interfaces/themes/legoIOSDark';
import { vkontakteIOSTheme, vkontakteIOSThemeDark } from '@/themeDescriptions/themes/vkontakteIOS';

const dark = '#212121';
const light = '#E1E3E6';

export const legoIOSTheme: ThemeLegoIOSDescription = {
...vkontakteIOSTheme, // импорт светлой базовой темы

themeName: 'legoIOS', // название текущей темы
themeNameBase: 'legoIOS', // название светлой (базовой) темы
themeInheritsFrom: 'vkontakteIOS', // название родительской темы

colors: {
...vkontakteIOSTheme.colors,
// переопределение переменных
colorTextAccent: dark,
colorTextAccentThemed: dark,
colorTextPrimary: dark,
colorTextLink: dark,
colorTextLinkThemed: dark,
colorTextLinkTint: dark,
colorIconAccent: dark,
colorIconAccentThemed: dark,
colorStrokeAccent: dark,
colorStrokeAccentThemed: dark,
colorBackgroundAccent: dark,
colorBackgroundAccentThemed: dark,
colorBackgroundAccentThemedAlpha: 'rgba(38, 136, 235, .2)',
colorBackgroundAccentAlternative: dark,
colorBackgroundAccentTint: '#2D2D2D',
colorWriteBarIcon: dark,
},
};

export const legoIOSThemeDark: ThemeLegoIOSDarkDescription = {
...legoIOSTheme, // импорт светлой версии текущей темы,
...vkontakteIOSThemeDark, // импорт тёмной базовой темы

themeName: 'legoIOSDark', // название текущей темы
themeNameBase: 'legoIOS', // название светлой (базовой) темы
themeInheritsFrom: 'vkontakteIOSDark', // название родительской темы
colorsScheme: 'dark', // название схемы (светлая — по умолчанию)

colors: {
...vkontakteIOSThemeDark.colors,
// переопределение переменных
colorTextAccent: light,
colorTextAccentThemed: light,
colorTextPrimary: light,
colorTextLink: light,
colorTextLinkThemed: light,
colorTextLinkTint: light,
colorIconAccent: light,
colorIconAccentThemed: light,
colorStrokeAccent: light,
colorStrokeAccentThemed: light,
colorBackgroundAccent: light,
colorBackgroundAccentThemed: light,
colorBackgroundAccentThemedAlpha: 'rgba(255, 255, 255, .2)',
colorBackgroundAccentAlternative: light,
colorBackgroundAccentTint: '#EAEDF0',
colorWriteBarIcon: light,
},
};

0 comments on commit 622a813

Please sign in to comment.