Обучение. Начало Frontend части

This commit is contained in:
2023-01-12 21:38:13 +01:00
parent d9ec810f7f
commit 9ec0f42e17
9 changed files with 264 additions and 22 deletions

View File

@@ -5,7 +5,24 @@ use DarksLight2\Training\TrainingManager;
$short_name = 'first_step';
$manager = TrainingManager::getInstance();
$step = $manager->$short_name;
$button_text = 'Продолжить';
if(!$manager) {
$button_text = '';
}
?>
var_dump($manager->$short_name->progress);
<script>
const training_data = () => {
return {
content: `<?=$step->message?>`,
title: `<?=$step->title?>`,
button_text: `<?=$button_text?>`
}
}
</script>
<script src="/js/training/modal.js"></script>
echo 'it\'s work';
<script>
modal.show()
</script>