Skip to content

Commit

Permalink
fix theme
Browse files Browse the repository at this point in the history
  • Loading branch information
FlamesONE committed Mar 30, 2024
1 parent 8d0a262 commit ca6ca67
Show file tree
Hide file tree
Showing 92 changed files with 10,531 additions and 0 deletions.
43 changes: 43 additions & 0 deletions app/Themes/standard/ThemeLoader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

namespace Flute\Themes\standard;

use Flute\Core\Support\AbstractThemeLoader;

class ThemeLoader extends AbstractThemeLoader
{
public function __construct()
{
$this->createTheme();
}

protected function createTheme()
{
$this->setKey("standard");
$this->setName("Flute Standard");
$this->setAuthor("Flames");
$this->setDescription("Просто стандартный шаблон на Flute");
$this->setVersion("1.1");

$this->setSettings([
"nav_type" => [
'name' => 't_standard.nav_type',
'description' => 't_standard.nav_type_desc',
'value' => 'default'
]
]);

// User select components
$this->addComponentLayout('cookie_alert', 'components/alerts/cookie');
$this->addComponentLayout('lang_alert', 'components/alerts/select_language');
$this->addComponentLayout('mobile_alert', 'components/alerts/mobile');

$this->addComponentLayout('editor', 'components/editor');
$this->addComponentLayout('flash', 'components/flash');
$this->addComponentLayout('footer', 'components/footer');
$this->addComponentLayout('navbar', 'components/navbar');
$this->addComponentLayout('navigation', 'components/navigation');

$this->loadTranslations();
}
}
Binary file added app/Themes/standard/assets/img/cookie.webp
Binary file not shown.
Binary file added app/Themes/standard/assets/img/lang.webp
Binary file not shown.
Binary file added app/Themes/standard/assets/img/learn-photo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/Themes/standard/assets/img/secrets/walter.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/Themes/standard/assets/js/alerts/cookie.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$("#cookie_close").on('click', (e) => {
setCookie('accept_cookie', 'true', 365);
let element = $('.toast-cookie');
element.removeClass('show');
setTimeout(() => element.remove(), 300);
});
49 changes: 49 additions & 0 deletions app/Themes/standard/assets/js/alerts/lang.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
let driverObj;

$('#lang_close').on('click', (e) => {
setCookie('accept_cookie', 'true', 365);
closeLangNotify();
});

$('.choose_lang').on('click', (e) => {
openMiniProfile();
closeNotifications();
closeSearch();

if ($(e.currentTarget).data('auth') == '1') {
const langContainer = $('.miniprofile_langs_container');
const baseContainer = $('.miniprofile_base');

if (!langContainer.is(':visible')) {
langContainer.show();
baseContainer.hide();
}
} else {
$('.miniprofile_container').addClass('opened');
}

driverObj = driver({
onDestroyed: (e) => {
closeMiniProfile();
},
});

driverObj.highlight({
element: '.miniprofile_langs_container',
});
});

$('.choose_correct').on('click', (e) => {
setLang($(e.currentTarget).data('value'));
});

function closeLangNotify() {
let element = $('.toast-lang');
element.removeClass('show');
setTimeout(() => element.remove(), 300);
}

function setLang(lang) {
setCookie('current_lang', lang, 365);
closeLangNotify();
}
6 changes: 6 additions & 0 deletions app/Themes/standard/assets/js/alerts/mobile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$("#mobile_close").on('click', (e) => {
setCookie('mobile_alert', 'true', 365);
let element = $('.mobile_alert');
element.removeClass('opened');
setTimeout(() => element.remove(), 300);
});

0 comments on commit ca6ca67

Please sign in to comment.