зачаток

This commit is contained in:
Михаил Капелько
2021-08-30 17:49:55 +03:00
commit c9b8f758af
9 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
function Редактор(имяОбласти)
{
this.создать = function()
{
this.установитьAce();
};
this.установитьAce = function()
{
var область = document.getElementById(имяОбласти);
this.ace = window.ace.edit(имяОбласти);
this.ace.session.setMode("ace/mode/javascript");
}
// Конструктор.
this.создать();
}

View File

@@ -0,0 +1,18 @@
function Пульт(имяОбласти, имяПуска)
{
this.создать = function()
{
this.настроитьКнопкуПуска();
};
this.настроитьКнопкуПуска = function()
{
var пуск = document.getElementById(имяПуска);
пуск.addEventListener("click", function(событие) {
/**/console.debug("НАДО запустить");
});
};
// Конструктор.
this.создать();
}

View File

@@ -0,0 +1,12 @@
function Муром()
{
this.создать = function()
{
this.редактор = new Редактор("редактор");
this.пульт = new Пульт("пульт", "пуск");
};
// Конструктор.
this.создать();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>M-3.0</title>
<style>
#редактор
{
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: calc(50% - 2em);
}
#пульт
{
position: absolute;
left: calc(50% - 2em);
top: 0;
bottom: 0;
width: 4em;
border: 1px solid lightgrey;
display: flex;
justify-content: center;
padding-top: 1em;
}
#воспроизведение
{
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: calc(50% - 2em);
}
</style>
<style>
.кнопка {
border-radius: 50%;
width: 3em;
height: 3em;
border: 1px solid lightgrey;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div id="редактор"></div>
<div id="пульт">
<a class="кнопка" id="пуск">&#9658;</a>
</div>
<div id="воспроизведение"></div>
<script src="ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="ace/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
<script src="ace/worker-javascript.js" type="text/javascript" charset="utf-8"></script>
<script src="100.редактор.js"></script>
<script src="200.пульт.js"></script>
<script src="700.муром.js"></script>
<script>
var муром = new Муром();
</script>
</body>
</html>

1
index.html Symbolic link
View File

@@ -0,0 +1 @@
3.0/редактор/index.html