Compare commits
39
Commits
4ca3ede4a0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a00dcc4e70 | ||
|
|
756d2a98b2 | ||
|
|
e28a164a5c | ||
|
|
4c91cd062f | ||
|
|
9b198acaab | ||
|
|
ea96ffa45a | ||
|
|
430bab4159 | ||
|
|
f11f5d92e1 | ||
|
|
11c3036cbe | ||
|
|
81edc44b8a | ||
|
|
afb1caae3d | ||
|
|
71c0583a5a | ||
|
|
1e351b4727 | ||
|
|
3bc0ee20e8 | ||
|
|
fe4da41268 | ||
|
|
21dae2bcf5 | ||
|
|
1704302086 | ||
|
|
383dedf8b6 | ||
|
|
39c7377dc3 | ||
|
|
7eddb2b5f0 | ||
|
|
9170334fe4 | ||
|
|
923831efce | ||
|
|
7b38d4991a | ||
|
|
44b5592275 | ||
|
|
0a3e17fd81 | ||
|
|
65d1289067 | ||
|
|
9b7275585f | ||
|
|
ba5c6508ec | ||
|
|
2506372963 | ||
|
|
da5cbe7170 | ||
|
|
7a317b9b8d | ||
|
|
5d61596f9c | ||
|
|
2802264eb3 | ||
|
|
d543f1b17d | ||
|
|
e80b303854 | ||
|
|
2c8c86196d | ||
|
|
73e303827d | ||
|
|
76fb5dd1fc | ||
|
|
a386163ba2 |
No files matched your search
@@ -3,3 +3,4 @@ _site
|
||||
.jekyll-cache
|
||||
.jekyll-metadata
|
||||
vendor
|
||||
Gemfile.lock
|
||||
@@ -8,7 +8,11 @@ source "https://rubygems.org"
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
gem "jekyll"
|
||||
# gem "alice", path: "../alice_sites/AliceTheme"
|
||||
|
||||
# para tester no jekylserver
|
||||
# gem "alice", path: "../AliceTheme"
|
||||
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
# gem "minima", "~> 2.5"
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.7)
|
||||
public_suffix (>= 2.0.2, < 7.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.3.4)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0)
|
||||
eventmachine (1.2.7)
|
||||
ffi (1.17.0)
|
||||
ffi (1.17.0-arm64-darwin)
|
||||
ffi (1.17.0-x86_64-darwin)
|
||||
forwardable-extended (2.6.0)
|
||||
google-protobuf (3.25.4)
|
||||
google-protobuf (3.25.4-arm64-darwin)
|
||||
google-protobuf (3.25.4-x86_64-darwin)
|
||||
google-protobuf (3.25.4-x86_64-linux)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.14.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.3.3)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (>= 2.0, < 4.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.3, >= 2.3.1)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (>= 0.3.6, < 0.5)
|
||||
pathutil (~> 0.9)
|
||||
rouge (>= 3.0, < 5.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (>= 1.8, < 4.0)
|
||||
webrick (~> 1.7)
|
||||
jekyll-archives (2.2.1)
|
||||
jekyll (>= 3.6, < 5.0)
|
||||
jekyll-datapage-generator (1.4.0)
|
||||
jekyll-feed (0.17.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-sass-converter (3.0.0)
|
||||
sass-embedded (~> 1.54)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
kramdown (2.4.0)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.4)
|
||||
listen (3.9.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (6.0.1)
|
||||
rake (13.2.1)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.11.1)
|
||||
ffi (~> 1.0)
|
||||
rexml (3.3.6)
|
||||
strscan
|
||||
rouge (4.3.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass-embedded (1.69.5)
|
||||
google-protobuf (~> 3.23)
|
||||
rake (>= 13.0.0)
|
||||
sass-embedded (1.69.5-arm64-darwin)
|
||||
google-protobuf (~> 3.23)
|
||||
sass-embedded (1.69.5-x86_64-darwin)
|
||||
google-protobuf (~> 3.23)
|
||||
strscan (3.1.0)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
unicode-display_width (2.5.0)
|
||||
webrick (1.8.1)
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin
|
||||
ruby
|
||||
x86_64-darwin
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll
|
||||
jekyll-archives
|
||||
jekyll-datapage-generator
|
||||
jekyll-feed
|
||||
|
||||
BUNDLED WITH
|
||||
2.5.16
|
||||
+1
-54
@@ -1,54 +1 @@
|
||||
[
|
||||
{
|
||||
"title":"Introdução ao LMMS",
|
||||
"user":"fls",
|
||||
"nome":"Flávio Luiz Schiavoni",
|
||||
"description":"Bem-vindo ao curso de LMMS, uma ferramenta poderosa e gratuita para produção de música digital! Aqui, você aprenderá desde os conceitos básicos até técnicas avançadas para criar suas próprias músicas e beats.",
|
||||
"date":"9/07/2024",
|
||||
"software":["lmms"],
|
||||
"level":"Basico"
|
||||
},
|
||||
{
|
||||
"title":"Introdução ao Mixxx",
|
||||
"user":"fls",
|
||||
"author":"Flávio Luiz Schiavoni",
|
||||
"description":"Bem-vindos ao curso de Mixxx, um software de DJ gratuito e de código aberto que permite que você crie sets incríveis e faça mixagens profissionais. Este curso é ideal para quem deseja começar na arte da discotecagem ou para DJs experientes que querem explorar uma nova ferramenta.",
|
||||
"date":"09/07/2024",
|
||||
"software":["mixxx"],
|
||||
"level":"Basico",
|
||||
"layout":"aulas"
|
||||
},
|
||||
{
|
||||
"title":"Oficina de beatmaker",
|
||||
"user":"jotachina",
|
||||
"author":"Júlio césar de sousa",
|
||||
"description":"Bem-vindos à oficina de Beatmaker com LMMS! Um software gratuito e de código aberto que permite a criação de beats e produções musicais de alta qualidade. Esta oficina é ideal para quem quer iniciar no mundo da produção musical ou para produtores experientes que desejam explorar novas ferramentas e técnicas. https://alice.ufsj.edu.br/~jotachina/oficinas_lmms/",
|
||||
"links": [
|
||||
"https://live.alice.ufsj.edu.br/p/OficinaLMMS02set",
|
||||
"https://alice.ufsj.edu.br/~jotachina/oficinas_lmms/",
|
||||
"https://alice.dcomp.ufsj.edu.br/s/N0ge6QJ"
|
||||
],
|
||||
"date":"02/08/2024",
|
||||
"software":["lmms"],
|
||||
"level":"Basico",
|
||||
"layout":"aulas"
|
||||
},
|
||||
{
|
||||
"title":"Oficina de beatmaker 2",
|
||||
"user":"jotachina",
|
||||
"nome":"jotachina",
|
||||
"description":"teste",
|
||||
"date":"19/11/2024",
|
||||
"software":"LMMS",
|
||||
"level":"basico"
|
||||
},
|
||||
{
|
||||
"title":"Criando sua primeira bateria no lmms",
|
||||
"user":"bolin",
|
||||
"nome":"bolin",
|
||||
"description":"Uma breve aula ensinando a criar um ritmo básico de hip hop no lmms",
|
||||
"date":"19/11/2024",
|
||||
"software":"LMMS",
|
||||
"level":"basico"
|
||||
}
|
||||
]
|
||||
[{"title":"Introdução ao LMMS","user":"fls","nome":"Flávio Luiz Schiavoni","description":"Bem-vindo ao curso de LMMS, uma ferramenta poderosa e gratuita para produção de música digital! Aqui, você aprenderá desde os conceitos básicos até técnicas avançadas para criar suas próprias músicas e beats.","date":"9\/07\/2024","software":["lmms"],"level":"Basico"},{"title":"Introdução ao Mixxx","user":"fls","author":"Flávio Luiz Schiavoni","description":"Bem-vindos ao curso de Mixxx, um software de DJ gratuito e de código aberto que permite que você crie sets incríveis e faça mixagens profissionais. Este curso é ideal para quem deseja começar na arte da discotecagem ou para DJs experientes que querem explorar uma nova ferramenta.","date":"09\/07\/2024","software":["mixxx"],"level":"Basico","layout":"aulas"},{"title":"Oficina de beatmaker","user":"jotachina","author":"Júlio césar de sousa","description":"Bem-vindos à oficina de Beatmaker com LMMS! Um software gratuito e de código aberto que permite a criação de beats e produções musicais de alta qualidade. Esta oficina é ideal para quem quer iniciar no mundo da produção musical ou para produtores experientes que desejam explorar novas ferramentas e técnicas. https:\/\/alice.ufsj.edu.br\/~jotachina\/oficinas_lmms\/","links":["https:\/\/live.alice.ufsj.edu.br\/p\/OficinaLMMS02set","https:\/\/alice.ufsj.edu.br\/~jotachina\/oficinas_lmms\/","https:\/\/alice.dcomp.ufsj.edu.br\/s\/N0ge6QJ"],"date":"02\/08\/2024","software":["lmms"],"level":"Basico","layout":"aulas"},{"title":"Oficina de beatmaker 2","user":"jotachina","nome":"jotachina","description":"teste","date":"19\/11\/2024","software":"LMMS","level":"basico"},{"title":"Criando sua primeira bateria no lmms","user":"bolin","nome":"bolin","description":"Uma breve aula ensinando a criar um ritmo básico de hip hop no lmms","date":"19\/11\/2024","software":"LMMS","level":"basico"},{"title":"Loop seq 24","user":"mjordao","nome":"mjordao","description":"Como fazer um loop no seq24","date":"18\/12\/2024","software":"seq24","level":"basico"},{"title":"Como realizar uma transmissão ao vivo no Alice Class usando o OBS","user":"carneiro","nome":"carneiro","description":"1. No OBS, entre nas configurações, e vá na aba Transmissão\r\n2. No campo serviços, selecione Personalizado…\r\n3. No campo servidor, preencha com rtmp:\/\/alice.ufsj.edu.br:33000\/live\r\n4. No campo Chave de Transmissão, preencha da seguinte forma: SEU_NOME_DE_USUARIO?password=SUA_SENHA\r\n\r\n","date":"22\/01\/2025","software":"Navegador Web","level":"basico"},{"title":"Como subir um vídeo no Alice Class","user":"carneiro","nome":"carneiro","description":"Como subir um vídeo no Alice Class","date":"22\/01\/2025","software":"Navegador Web","level":"basico"},{"title":"Introdução ao Alice Class","user":"emerson","nome":"emerson","description":"Uma breve introdução sobre o Alice Class.","date":"28\/01\/2025","software":"Navegador Web","level":"basico"}]
|
||||
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"title": "Introdução ao LMMS",
|
||||
"user": "",
|
||||
"author": "Matheus De Bomfim Rodrigues Jordão",
|
||||
"description": " Introdução ao Hydrogen",
|
||||
"date": "9\/07\/2024",
|
||||
"aulas": [
|
||||
"lmms"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="SideBar ">
|
||||
<div class="SideBar">
|
||||
|
||||
<div class="top-sidebar">
|
||||
<img
|
||||
@@ -12,7 +12,7 @@
|
||||
<a class="item-menu" href="{{ site.baseurl }}/">
|
||||
<li>
|
||||
|
||||
<span class="menu-txt">Inicio</span>
|
||||
<span class="menu-txt" id="inicio">Inicio</span>
|
||||
<i class="fa-solid fa-house mx-4"></i>
|
||||
</li>
|
||||
</a>
|
||||
@@ -20,14 +20,14 @@
|
||||
<a class="item-menu" href="{{ site.baseurl }}/aulas">
|
||||
|
||||
<li>
|
||||
<span class="menu-txt">Aulas</span>
|
||||
<span class="menu-txt"id="aulas">Aulas</span>
|
||||
<i class="fa-solid fa-house mx-4"></i>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a class="item-menu" href="{{ site.baseurl }}/cursos">
|
||||
<li>
|
||||
<span class="menu-txt">Cursos</span>
|
||||
<span class="menu-txt" id="cursos">Cursos</span>
|
||||
<i class="fa-solid fa-house mx-4"></i>
|
||||
</li>
|
||||
</a>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<a class="item-menu" href="{{ site.baseurl }}/software">
|
||||
<li>
|
||||
<span class="menu-txt">Software</span>
|
||||
<span class="menu-txt" id="software">Software</span>
|
||||
<i class="fa-solid fa-house mx-4"></i>
|
||||
</li>
|
||||
</a>
|
||||
@@ -66,7 +66,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<a class="" href="{{ site.baseurl }}/dashboard">
|
||||
<span class="menu-txt">Dashboard</span>
|
||||
<span class="menu-txt" id="Dashboard">Dashboard</span>
|
||||
<i class="fa-solid fa-house mx-4"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
+126
-134
@@ -1,24 +1,18 @@
|
||||
<table id="temporary-table" style="display: none;">
|
||||
<tr>
|
||||
<td>{{ include.user }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="live-container">
|
||||
<div class="player-container">
|
||||
<video
|
||||
class="player"
|
||||
data-dashjs-player
|
||||
{% if page.user %}
|
||||
url="https://cast.alice.ufsj.edu.br/dash/{{page.user}}.mpd"
|
||||
url="https://class.alice.ufsj.edu.br/dash/{{page.user}}.mpd"
|
||||
{% endif %}
|
||||
autoplay
|
||||
controls
|
||||
muted
|
||||
muted
|
||||
></video>
|
||||
|
||||
|
||||
<div class="player-off">
|
||||
<h1>Offlinee</h1>
|
||||
<h1>Offline</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,158 +24,156 @@
|
||||
</div>
|
||||
<div class="chat-views">
|
||||
<i class="fa-solid fa-users"></i>
|
||||
<!-- <h4>679 pessoas online</h4> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Campo de nome do usuário -->
|
||||
<div class="chat-username" style="margin-bottom: 10px;">
|
||||
<label for="username-input">Seu nome:</label>
|
||||
<input
|
||||
type="text"
|
||||
id="username-input"
|
||||
placeholder="Escolha um nome (ou deixe em branco)"
|
||||
style="width: 100%; padding: 5px; margin-top: 5px;"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="chat-lines">
|
||||
<div class="chat-line">
|
||||
<!-- <p><span class="username">{msg.nome}:</span> {msg.mensagem}</p> -->
|
||||
</div>
|
||||
<!-- Mensagens serão adicionadas aqui via JavaScript -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="chat-input">
|
||||
<form on:submit|preventDefault={sendMessage} class="chat-input-form">
|
||||
<input class="input chat-enter" placeholder="Converse com o chat aqui" bind:value={message} />
|
||||
<form class="chat-input-form">
|
||||
<input class="input chat-enter" placeholder="Converse com o chat aqui" />
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/dash.all.min.js"></script>
|
||||
|
||||
<script>
|
||||
// Obter a string de query da URL
|
||||
const queryString = window.location.search;
|
||||
// Criar um objeto URLSearchParams com a string de query
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
|
||||
// =====================
|
||||
// Player da live
|
||||
// =====================
|
||||
|
||||
let streamUser;
|
||||
{% if page.user %}
|
||||
const user = "{{page.user}}";
|
||||
streamUser = "{{page.user}}";
|
||||
{% else %}
|
||||
const user = urlParams.get('user');
|
||||
streamUser = urlParams.get('user');
|
||||
{% endif %}
|
||||
|
||||
// Exemplo de como usar o valor
|
||||
console.log(user); // Isso vai exibir o valor do parâmetro 'user'
|
||||
|
||||
if (!streamUser) {
|
||||
streamUser = "default"; // fallback para evitar erro
|
||||
}
|
||||
|
||||
console.log("Usuário da live:", streamUser);
|
||||
const videoElement = document.querySelector('video');
|
||||
const playerOffElement = document.querySelector('.player-off');
|
||||
const url = `https://cast.alice.ufsj.edu.br/dash/${user}.mpd`;
|
||||
const chatContainer = document.querySelector('.chat-container');
|
||||
const chatForm = document.querySelector('.chat-input-form');
|
||||
const usernameInput = document.querySelector('#username-input');
|
||||
const chatInputField = document.querySelector('.chat-enter');
|
||||
|
||||
const url = `https://class.alice.ufsj.edu.br/dash/${streamUser}.mpd`;
|
||||
videoElement.src = url;
|
||||
|
||||
|
||||
|
||||
|
||||
let chatAtivo = false;
|
||||
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log("Arquivo existe.");
|
||||
playerOffElement.style.display = "none";
|
||||
|
||||
|
||||
} else {
|
||||
console.log("Arquivo não encontrado.");
|
||||
// Coloque o código para ocultar o vídeo aqui
|
||||
videoElement.style.opacity = "0";
|
||||
|
||||
}
|
||||
})
|
||||
// URL do servidor WebSocket
|
||||
const socket = new WebSocket('wss://cast.alice.ufsj.edu.br/chat/chat');
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log("Arquivo existe.");
|
||||
playerOffElement.style.display = "none";
|
||||
iniciarChat();
|
||||
} else {
|
||||
console.log("Arquivo não encontrado.");
|
||||
videoElement.style.opacity = "0";
|
||||
|
||||
socket.addEventListener('open', () => {
|
||||
console.log('Conexão WebSocket aberta com sucesso!');
|
||||
});
|
||||
if (chatContainer) {
|
||||
chatContainer.style.opacity = "0.3";
|
||||
chatContainer.style.pointerEvents = "none";
|
||||
}
|
||||
|
||||
// Adiciona um manipulador de eventos para lidar com a recepção de mensagens
|
||||
socket.addEventListener('message', (event) => {
|
||||
console.log('Mensagem recebida do servidor:', event.data);
|
||||
});
|
||||
if (usernameInput) usernameInput.disabled = true;
|
||||
if (chatInputField) chatInputField.disabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Adiciona um manipulador de eventos para lidar com o fechamento da conexão
|
||||
socket.addEventListener('close', (event) => {
|
||||
console.log('Conexão WebSocket fechada:', event.reason || 'Sem motivo específico');
|
||||
});
|
||||
// =====================
|
||||
// Chat ao vivo
|
||||
// =====================
|
||||
|
||||
// Adiciona um manipulador de eventos para lidar com erros
|
||||
socket.addEventListener('error', (event) => {
|
||||
console.error('Erro no WebSocket:', event);
|
||||
});
|
||||
const nomesAlice = [
|
||||
'Alice', 'Chapeleiro Maluco', 'Coelho Branco', 'Rainha de Copas',
|
||||
'Gato de Cheshire', 'Lebre de Março', 'Lagarta', 'Dodo',
|
||||
'Tweedledee', 'Tweedledum', 'Rainha Vermelha', 'Rei de Copas',
|
||||
'JotaChina', 'JotaJapão', 'JotaÍndia', 'JotaCoreia', 'JotaTailândia',
|
||||
'JotaVietnã', 'JotaMalásia', 'JotaIndonésia', 'JotaFilipinas',
|
||||
'JotaSingapura', 'JotaNepal', 'JotaCamboja', 'JotaMianmar',
|
||||
'JotaLaos', 'JotaBangladesh', 'JotaSriLanka'
|
||||
];
|
||||
function iniciarChat() {
|
||||
chatAtivo = true;
|
||||
|
||||
function nomeAleatorio() {
|
||||
return nomesAlice[Math.floor(Math.random() * nomesAlice.length)];
|
||||
const nomesAlice = [
|
||||
'Alice', 'Chapeleiro Maluco', 'Coelho Branco', 'Rainha de Copas',
|
||||
'Gato de Cheshire', 'Lebre de Março', 'Lagarta', 'Dodo',
|
||||
'Tweedledee', 'Tweedledum', 'Rainha Vermelha', 'Rei de Copas'
|
||||
];
|
||||
|
||||
function nomeAleatorio() {
|
||||
return nomesAlice[Math.floor(Math.random() * nomesAlice.length)];
|
||||
}
|
||||
|
||||
let username = nomeAleatorio();
|
||||
|
||||
function setCustomUsername() {
|
||||
const customUsername = usernameInput.value.trim();
|
||||
username = customUsername || nomeAleatorio();
|
||||
}
|
||||
|
||||
const source = new EventSource(`php/chat/relay.php?user=${encodeURIComponent(streamUser)}`);
|
||||
|
||||
let ultimaMensagem = "";
|
||||
|
||||
source.onmessage = function (event) {
|
||||
if (event.data !== ultimaMensagem) {
|
||||
ultimaMensagem = event.data;
|
||||
const msg = JSON.parse(event.data);
|
||||
addMessage(msg);
|
||||
}
|
||||
};
|
||||
|
||||
function sendMessage(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const message = document.querySelector('.chat-enter').value;
|
||||
if (!message.trim()) return;
|
||||
|
||||
const msgData = {
|
||||
nome: username,
|
||||
mensagem: message.trim()
|
||||
};
|
||||
|
||||
fetch(`php/chat/send.php?user=${encodeURIComponent(streamUser)}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: 'mensagem=' + encodeURIComponent(JSON.stringify(msgData))
|
||||
})
|
||||
.catch(err => console.error("Erro ao enviar mensagem:", err));
|
||||
|
||||
document.querySelector('.chat-enter').value = '';
|
||||
}
|
||||
|
||||
function addMessage(msg) {
|
||||
const chatLines = document.querySelector('.chat-lines');
|
||||
const newMessage = document.createElement('div');
|
||||
newMessage.classList.add('chat-line');
|
||||
newMessage.innerHTML = `<p><span class=\"username\">${msg.nome}:</span> ${msg.mensagem}</p>`;
|
||||
|
||||
chatLines.appendChild(newMessage);
|
||||
chatLines.scrollTop = chatLines.scrollHeight;
|
||||
}
|
||||
|
||||
chatForm.addEventListener('submit', sendMessage);
|
||||
usernameInput.addEventListener('change', setCustomUsername);
|
||||
}
|
||||
// Variáveis para armazenar o nome do usuário e a mensagem
|
||||
let username = nomeAleatorio();
|
||||
let message = '';
|
||||
|
||||
// Função que envia a mensagem
|
||||
function sendMessage(event) {
|
||||
event.preventDefault(); // Previne o comportamento padrão do formulário
|
||||
|
||||
// Cria um objeto com os dados da mensagem
|
||||
const msgData = {
|
||||
nome: username,
|
||||
mensagem: message
|
||||
};
|
||||
|
||||
// Envia a mensagem como uma string JSON
|
||||
socket.send(JSON.stringify(msgData));
|
||||
|
||||
// Limpa o campo de entrada de mensagem
|
||||
document.querySelector('.chat-enter').value = '';
|
||||
}
|
||||
|
||||
// Função que adiciona uma nova linha de mensagem ao chat
|
||||
function addMessage(msg) {
|
||||
console.log(msg);
|
||||
|
||||
const chatLines = document.querySelector('.chat-lines');
|
||||
|
||||
// Cria o elemento da mensagem
|
||||
const newMessage = document.createElement('div');
|
||||
newMessage.classList.add('chat-line');
|
||||
newMessage.innerHTML = `<p><span class="username">${msg.nome}:</span> ${msg.mensagem}</p>`;
|
||||
|
||||
// Adiciona a nova mensagem no final da lista de mensagens
|
||||
chatLines.appendChild(newMessage);
|
||||
|
||||
// Rola o chat para baixo para mostrar a nova mensagem
|
||||
chatLines.scrollTop = chatLines.scrollHeight;
|
||||
}
|
||||
|
||||
// Event listener para quando o WebSocket abrir a conexão
|
||||
socket.addEventListener('open', () => {
|
||||
console.log('Conectado ao servidor WebSocket');
|
||||
});
|
||||
|
||||
// Event listener para quando uma mensagem é recebida do servidor
|
||||
socket.addEventListener('message', event => {
|
||||
// Parseia a mensagem recebida como JSON
|
||||
const msg = JSON.parse(event.data);
|
||||
|
||||
// Adiciona a mensagem ao chat
|
||||
addMessage(msg);
|
||||
});
|
||||
|
||||
// Event listener para o envio de mensagem no formulário
|
||||
document.querySelector('.chat-input-form').addEventListener('submit', event => {
|
||||
// Captura o valor do input
|
||||
message = document.querySelector('.chat-enter').value;
|
||||
|
||||
// Chama a função que envia a mensagem
|
||||
sendMessage(event);
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<!-- _includes/tutorial.html -->
|
||||
<div id="tutorial-overlay" class="hidden">
|
||||
<div id="tutorial-box">
|
||||
<p id="tutorial-text">Texto do passo</p>
|
||||
<button id="next-step">Próximo</button>
|
||||
</div>
|
||||
</div>
|
||||
+35
-1
@@ -20,11 +20,14 @@ lang: pt
|
||||
<a class="button" href="{{ site.baseurl }}{{ zip_file }}" download>
|
||||
Download
|
||||
</a>
|
||||
<a class="button" id="etherpad" etherpad>
|
||||
Etherpad
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" ">
|
||||
<div id="aula">
|
||||
{% assign aula_slug = page.title %}
|
||||
{% assign video_aula = '' | append: aula_slug | append: '.mp4' %}
|
||||
<video controls class="aula-video">
|
||||
@@ -33,6 +36,17 @@ lang: pt
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<div id="etherpad-container" style="display: none;">
|
||||
<iframe
|
||||
id="etherpad-iframe"
|
||||
src="https://pad.alice.ufsj.edu.br/p/{{ page.title }}"
|
||||
width="100%"
|
||||
height="900px"
|
||||
frameborder="0">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="content-aula">
|
||||
{{ page.description }}
|
||||
</br>
|
||||
@@ -44,3 +58,23 @@ lang: pt
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const etherpadButton = document.getElementById("etherpad"); // Botão
|
||||
const aulaDiv = document.getElementById("aula"); // Div da aula
|
||||
const etherpadContainer = document.getElementById("etherpad-container"); // Div do Etherpad
|
||||
|
||||
etherpadButton.addEventListener("click", function () {
|
||||
if (aulaDiv.style.display === "none") {
|
||||
// Se a aula estiver oculta, exibe a aula e oculta o Etherpad
|
||||
aulaDiv.style.display = "block";
|
||||
etherpadContainer.style.display = "none";
|
||||
} else {
|
||||
// Caso contrário, oculta a aula e exibe o Etherpad
|
||||
aulaDiv.style.display = "none";
|
||||
etherpadContainer.style.display = "block";
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -6,6 +6,7 @@
|
||||
<meta charset="utf-8">
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css"> -->
|
||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/stylesheet.css">
|
||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/tutorial.css">
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css"> -->
|
||||
|
||||
{% if page.styles %}{{ page.styles }}{% endif %}
|
||||
@@ -24,5 +25,6 @@
|
||||
{{content}}
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ '/assets/js/tutorial.js' | relative_url }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
+113
-71
@@ -71,13 +71,12 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
justify-content: center;
|
||||
|
||||
padding: 30px 25px;
|
||||
padding: 100px 0px;
|
||||
}
|
||||
|
||||
.page-sidebar{
|
||||
width: auto;
|
||||
flex-grow: 1;
|
||||
margin: 0 25px;
|
||||
/* margin: 0 25px; */
|
||||
|
||||
|
||||
}
|
||||
@@ -95,57 +94,57 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
/* ================================================================================================================================== */
|
||||
/* SideBar _include/SideBar.html */
|
||||
.SideBar{
|
||||
.SideBar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
|
||||
flex-direction: row;
|
||||
height: 8vh;
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: var(--background-color);
|
||||
opacity: 0.7;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
backdrop-filter: blur(10px); /* Adiciona o efeito de blur */
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
/* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); */
|
||||
}
|
||||
|
||||
.SideBar .top-sidebar{
|
||||
flex-grow: 1;
|
||||
align-items: end;
|
||||
justify-content: start;
|
||||
}
|
||||
.SideBar aside{
|
||||
flex-grow: 6;
|
||||
|
||||
}
|
||||
|
||||
.SideBar .button-sidebar{
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.SideBar .image{
|
||||
width: 60%;
|
||||
.SideBar .image {
|
||||
width: 100px; /* Ajuste conforme necessário */
|
||||
height: auto;
|
||||
margin: 10px 0px;
|
||||
margin-left: 50px;
|
||||
margin-right: 1000px;
|
||||
}
|
||||
|
||||
.menu{
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.menu li{
|
||||
.SideBar .menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
margin-left: auto;
|
||||
list-style: none;
|
||||
font-family: var(--font-family);
|
||||
|
||||
padding: 15px 10px;
|
||||
|
||||
}
|
||||
.menu li:hover{
|
||||
/* background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(75,144,248,1) 19%, rgba(97,157,246,1) 85%, rgba(241,241,230,0) 100%); */
|
||||
padding: 15px 15px;
|
||||
|
||||
.SideBar .menu li {
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menu a{
|
||||
.SideBar .menu li:hover {
|
||||
/* background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(75,144,248,1) 19%, rgba(97,157,246,1) 85%, rgba(241,241,230,0) 100%); */
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.SideBar .menu a {
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu a:hover{
|
||||
.SideBar .menu a:hover {
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
|
||||
@@ -173,13 +172,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
|
||||
.home-content .banner{
|
||||
height: 500px;
|
||||
max-height: 100vh;
|
||||
min-height: 75vh;
|
||||
width: 100%;
|
||||
background: url('/assets/images/background.svg') ;
|
||||
background: var(--deep-ruby) ;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 30px;
|
||||
|
||||
background-color: var(--primary-color);
|
||||
padding: 0 25px;
|
||||
|
||||
display: flex;
|
||||
@@ -212,17 +212,16 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
}
|
||||
|
||||
.lasted .content-box{
|
||||
.lasted .content-box {
|
||||
width: 100%;
|
||||
|
||||
margin: 25px 0;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
|
||||
gap: 25px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.lasted .content-box .box{
|
||||
height: 500px;
|
||||
width: 400px;
|
||||
@@ -267,18 +266,21 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
|
||||
/* ================================================================================================================================== */
|
||||
/* CSS da pagina Aulas localizada em _content/Pages/index.html */
|
||||
/* CSS da pagina Aulas localizada em _content/Pages/aulas.html */
|
||||
|
||||
.aulas-content{
|
||||
width: 100%;
|
||||
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.aulas-content .title-content{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 15px;
|
||||
/* background-color: #007bff; */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.aulas-content .title-content > :nth-child(1){
|
||||
@@ -329,7 +331,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
background-color: var(--background-color);
|
||||
box-shadow: -5px 5px 15px var(--primary-color);
|
||||
|
||||
margin: 25px 25px;
|
||||
margin: 10px 15px;
|
||||
}
|
||||
|
||||
/* ================================================================================================================================== */
|
||||
@@ -513,13 +515,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
|
||||
.dashboard-content .banner{
|
||||
height: 300px;
|
||||
max-height: 100vh;
|
||||
min-height: 75vh;
|
||||
width: 100%;
|
||||
background: url('/assets/images/background.svg') ;
|
||||
background: var(--deep-ruby) ;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 30px;
|
||||
|
||||
background-color: var(--primary-color);
|
||||
padding: 0 25px;
|
||||
|
||||
display: flex;
|
||||
@@ -575,7 +578,6 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
.player-off{
|
||||
height: 80vh;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -587,10 +589,9 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
.player-container {
|
||||
position: relative;
|
||||
/* width: 100%;
|
||||
height: 100%; */
|
||||
|
||||
flex-grow: 10;
|
||||
/* Em telas grandes, pode ser interessante adicionar margem para separar do chat */
|
||||
/* margin: 15px; */
|
||||
}
|
||||
|
||||
.player {
|
||||
@@ -605,14 +606,13 @@ h1, h2, h3, h4, h5, h6 {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.6); /* Cor de fundo semitransparente */
|
||||
background-color: rgba(0, 0, 0, 0.6); /* Fundo semitransparente */
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 15px;
|
||||
z-index: 10; /* Garante que a mensagem "Offline" apareça em cima do vídeo */
|
||||
|
||||
z-index: 10; /* Garante que a mensagem "Offline" fique acima do player */
|
||||
}
|
||||
|
||||
.player-info {
|
||||
@@ -620,7 +620,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
background-color: #0b1a33;
|
||||
}
|
||||
|
||||
/* Estilos específicos para o player, se necessário */
|
||||
/* Estilos específicos para o player */
|
||||
video::-webkit-media-controls {
|
||||
background-color: hsl(0, 0%, 14%);
|
||||
}
|
||||
@@ -629,22 +629,24 @@ video::-webkit-media-controls-play-button {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Container que engloba o player e o chat */
|
||||
.live-container{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
flex-direction: column; /* Padrão: empilha o player e o chat (telas pequenas) */
|
||||
height: 70vh;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Estilos do chat */
|
||||
.chat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
margin: 15px;
|
||||
background-color: var(--background-color);
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
margin: 15px;
|
||||
background-color: var(--background-color);
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.chat-container {
|
||||
@@ -679,6 +681,7 @@ color: #fff;
|
||||
.chat-line p {
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.username {
|
||||
@@ -711,6 +714,45 @@ color: #fff;
|
||||
background-color: #243b65;
|
||||
}
|
||||
|
||||
/* ===== Regras responsivas ===== */
|
||||
|
||||
/* Para telas grandes: layout em linha com chat à direita */
|
||||
@media (min-width: 768px) {
|
||||
.live-container {
|
||||
flex-direction: row; /* Player e chat lado a lado */
|
||||
align-items: stretch; /* Garante que ambos tenham a mesma altura */
|
||||
}
|
||||
|
||||
.player-container {
|
||||
flex-grow: 1;
|
||||
margin: 15px; /* Opcional: ajuste de espaçamento */
|
||||
}
|
||||
|
||||
.chat {
|
||||
width: 400px; /* Largura fixa, semelhante à do chat da Twitch */
|
||||
height: 95%; /* Alinha a altura do chat à do contêiner (e do player) */
|
||||
margin: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Para telas pequenas: layout em coluna com chat abaixo do player */
|
||||
@media (max-width: 767px) {
|
||||
.live-container {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.player-container, .chat {
|
||||
width: 100%;
|
||||
margin: 15px 0; /* Espaçamento vertical */
|
||||
}
|
||||
|
||||
.chat {
|
||||
height: 500px; /* Altura ajustada para um tamanho adequado */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.page-aula{
|
||||
font-family: var(--font-family);
|
||||
}
|
||||
@@ -777,4 +819,4 @@ color: #fff;
|
||||
}
|
||||
.content-aula a:hover {
|
||||
border-bottom-color: #007bff; /* Mostra a borda inferior ao passar o mouse */
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/* ================================================================================================================================== */
|
||||
/* Variables */
|
||||
:root {
|
||||
/* Paleta de cors */
|
||||
--midnight-blue: #0B1A33;
|
||||
--cornflower-blue: #4B90F8;
|
||||
--goldenrod: #D6A419;
|
||||
--caribbean-green: #00C6BE;
|
||||
--deep-ruby: #623A40;
|
||||
--ivory: #F1F1E6;
|
||||
--alice-blue: #F4F9FF;
|
||||
--charcoal-blue: #35405D;
|
||||
--slate-gray: #616B8B;
|
||||
--light-slate-gray: #909ABB;
|
||||
--periwinkle: #2d2e31;
|
||||
|
||||
/* Informaçoes da paleta de cores */
|
||||
--primary-color: var(--midnight-blue);
|
||||
--secondary-color: var(--cornflower-blue);
|
||||
--tertiary-color: var(--periwinkle);
|
||||
--gradient-backfround: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(75,144,248,1) 19%, rgba(97,157,246,1) 85%, rgba(241,241,230,0) 100%);
|
||||
--accent-color: var(--goldenrod);
|
||||
--background-color: var(--charcoal-blue);
|
||||
--text-color: var( --alice-blue);
|
||||
--secondary-text-color: var(--slate-gray);
|
||||
--border-color: var(--deep-ruby);
|
||||
--highlight-color: var(--caribbean-green);
|
||||
--error-color: var(--slate-gray);
|
||||
--success-color: var(--light-slate-gray);
|
||||
--warning-color: var(--periwinkle);
|
||||
--info-color: var(--ivory);
|
||||
|
||||
--font-family: 'Roboto', sans-serif;
|
||||
--heading-color: var(--alice-blue);
|
||||
--heading-margin: 0 0 20px;
|
||||
}
|
||||
|
||||
|
||||
/* assets/css/tutorial.css */
|
||||
#tutorial-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.8); /* Escurece a tela */
|
||||
/* display: flex; */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#tutorial-box {
|
||||
background: var(--deep-ruby);
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
max-width: 500px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
// assets/script/tutorial.js
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Array de passos com seletor e mensagem para cada etapa do tutorial
|
||||
const steps = [
|
||||
{ selector: '#inicio', message: 'Esta é a barra de navegação, onde você encontra as principais seções.' },
|
||||
{ selector: '#aulas', message: 'Em aulas, temos uma lista de aulas mostrando pelo mais recente ate o mais antigo.' },
|
||||
{ selector: '#cursos', message: 'Em cursos temos os cursos, que não é nada mais que uma junção de aulas sobre um determinado assunto.' },
|
||||
{ selector: '#software', message: 'Caso queira procurar cursos de um determinado programa, você pode procurar ele por aqui.' },
|
||||
{ selector: '#Dashboard', message: 'Aqui é onde você manda as aulas, precisa ter um cadastro como um Autor.' },
|
||||
{ selector: '#lasted', message: 'Aqui mostraremos as 6 ultimas aulas enviadas.' },
|
||||
|
||||
// Adicione os demais passos (total de 10, ou quantos precisar)
|
||||
];
|
||||
|
||||
|
||||
// Função para remover qualquer destaque anterior e destacar o elemento atual
|
||||
function highlightElement(element) {
|
||||
document.querySelectorAll('.tutorial-highlight').forEach(function(el) {
|
||||
el.classList.remove('tutorial-highlight');
|
||||
});
|
||||
if (element) {
|
||||
element.classList.add('tutorial-highlight');
|
||||
}
|
||||
}
|
||||
|
||||
// Função que exibe e posiciona o passo do tutorial
|
||||
function showStep(stepIndex) {
|
||||
const step = steps[stepIndex]; // pega o objeto do passo atual
|
||||
const element = document.querySelector(step.selector);
|
||||
const tutorialBox = document.getElementById('tutorial-box');
|
||||
const tutorialText = document.getElementById('tutorial-text');
|
||||
|
||||
// Atualiza o texto do tutorial com a mensagem correta
|
||||
tutorialText.textContent = step.message;
|
||||
|
||||
// Destaque o elemento alvo, se existir
|
||||
highlightElement(element);
|
||||
|
||||
if (element) {
|
||||
// Obtém a posição do elemento alvo
|
||||
const rect = element.getBoundingClientRect();
|
||||
|
||||
// Posiciona o tutorialBox logo abaixo do elemento (ajuste os valores conforme sua necessidade)
|
||||
tutorialBox.style.position = 'absolute';
|
||||
tutorialBox.style.top = (rect.bottom + 10 + window.scrollY) + 'px'; // 10px abaixo do elemento
|
||||
tutorialBox.style.left = (rect.left + window.scrollX) + 'px';
|
||||
tutorialBox.style.transform = 'none';
|
||||
} else {
|
||||
// Fallback: se o elemento não for encontrado, centraliza a caixa do tutorial
|
||||
tutorialBox.style.position = 'fixed';
|
||||
tutorialBox.style.top = '50%';
|
||||
tutorialBox.style.left = '50%';
|
||||
tutorialBox.style.transform = 'translate(-50%, -50%)';
|
||||
}
|
||||
}
|
||||
|
||||
// Captura os elementos do DOM que vamos usar
|
||||
const overlay = document.getElementById('tutorial-overlay');
|
||||
const nextStepButton = document.getElementById('next-step');
|
||||
const startTutorialButton = document.getElementById('start-tutorial');
|
||||
|
||||
let currentStep = 0;
|
||||
|
||||
// Inicia o tutorial somente quando o botão de início for clicado
|
||||
if (startTutorialButton) {
|
||||
startTutorialButton.addEventListener('click', function() {
|
||||
overlay.classList.remove('hidden'); // Mostra o overlay
|
||||
currentStep = 0;
|
||||
showStep(currentStep);
|
||||
});
|
||||
}
|
||||
|
||||
// Avança os passos ao clicar no botão "Próximo"
|
||||
if (nextStepButton) {
|
||||
nextStepButton.addEventListener('click', function() {
|
||||
currentStep++;
|
||||
if (currentStep < steps.length) {
|
||||
showStep(currentStep);
|
||||
} else {
|
||||
// Quando terminar todos os passos, oculta o tutorial
|
||||
overlay.classList.add('hidden');
|
||||
currentStep = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ lang: pt
|
||||
<h1>{{ autor.title }}</h1>
|
||||
</a>
|
||||
<p>{{ autor.content }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+25
-22
@@ -10,31 +10,34 @@ lang: pt
|
||||
</div>
|
||||
|
||||
<div class="mx-6 mt-6">
|
||||
{% assign cursos = site.cursos | sort: 'date' | reverse %}
|
||||
<div class="columns is-multiline">
|
||||
{% assign cursos = site.data.cursos | sort: 'date' | reverse %}
|
||||
|
||||
<div class="content-box">
|
||||
{% for curso in cursos %}
|
||||
{% assign nome = curso.name | replace: ".md","" %}
|
||||
<div class="column is-one-third">
|
||||
<a href='{{ site.baseurl }}{{ curso.url }}.html' class="card-link">
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<figure class="image is-4by3">
|
||||
<img src="{{ site.baseurl }}/thumbs/{{ nome }}.jpg">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="content my-2">
|
||||
<h1 class="title is-size-4">{{ curso.title }}</h1>
|
||||
{% for aula in curso.aulas %}
|
||||
<span class="tag is-link">{{ aula }}</span>
|
||||
{% endfor %}
|
||||
<h3 class="subtitle is-size-6">{{ curso.description }}</h3>
|
||||
<h3 class="subtitle is-size-6">{{ curso.author }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-top">
|
||||
<figure>
|
||||
<img src="{{ site.baseurl }}/thumbs/{{ curso.name | replace: '.md', '' }}.jpg">
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
<div class="box-info">
|
||||
<h1>
|
||||
<a href="{{ site.baseurl }}/cursos/{{ curso.name | slugify: 'latin' }}.html">
|
||||
{{ curso.title }}
|
||||
</a>
|
||||
</h1>
|
||||
<p>{{ curso.description }}</p>
|
||||
<p><strong>Autor:</strong> {{ curso.author }}</p>
|
||||
|
||||
<div class="tags">
|
||||
{% for aula in curso.aulas %}
|
||||
<span class="tag is-link">{{ aula }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
+10
-2
@@ -1,26 +1,34 @@
|
||||
---
|
||||
layout: default
|
||||
title: AliceClass
|
||||
permalink: /
|
||||
---
|
||||
|
||||
{% include tutorial/tutorial.html %}
|
||||
|
||||
<div class="home-content">
|
||||
<div class="banner">
|
||||
<h1>Bem vindo ao Alice Class</h1>
|
||||
<h3>Participe de uma comunidade colaborativa para criar e compartilhar cursos e materiais educativos.</h3>
|
||||
|
||||
<br/>
|
||||
<h4 style="margin-top: 100px;">E novo aqui? <span style="color: black;" id="start-tutorial">Click aqui</span> e conheça nosso site.</h4>
|
||||
<!-- <button id="start-tutorial">Iniciar Tutorial</button> -->
|
||||
</div>
|
||||
|
||||
<div class="lasted">
|
||||
<div class="title-section">
|
||||
<h1 class="title">Ultimas aulas</h1>
|
||||
<h1 class="title" id="lasted">Ultimas aulas</h1>
|
||||
</div>
|
||||
|
||||
<div class="content-box">
|
||||
{% assign aulas = site.data.aulas | sort: 'date' | reverse %}
|
||||
{% assign max_aulas = 3 %}
|
||||
{% assign max_aulas = 6 %}
|
||||
{% assign count = 0 %}
|
||||
|
||||
{% for aula in aulas %}
|
||||
{% if count < max_aulas %}
|
||||
{% assign count = count | plus: 1 %}
|
||||
{% assign nome = aula.name | replace: ".md","" %}
|
||||
<div class="box">
|
||||
<div class="box-top">
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if (!isset($_GET['user'])) {
|
||||
http_response_code(400);
|
||||
exit("Missing user");
|
||||
}
|
||||
|
||||
$user = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['user']);
|
||||
|
||||
// Verifica se a live está online (arquivo .mpd existe)
|
||||
$mpdPath = "/var/www/html/stream/{$user}.mpd";
|
||||
if (!file_exists($mpdPath)) {
|
||||
http_response_code(404);
|
||||
exit("Live offline");
|
||||
}
|
||||
|
||||
header("Content-Type: text/event-stream");
|
||||
header("Cache-Control: no-cache");
|
||||
header("Connection: keep-alive");
|
||||
|
||||
$tmp_file = sys_get_temp_dir() . "/relay_chat_{$user}.txt";
|
||||
|
||||
// Cria o arquivo se ainda não existir
|
||||
if (!file_exists($tmp_file)) {
|
||||
file_put_contents($tmp_file, '');
|
||||
}
|
||||
|
||||
$lastMessage = '';
|
||||
|
||||
while (true) {
|
||||
clearstatcache();
|
||||
$currentMessage = trim(file_get_contents($tmp_file));
|
||||
|
||||
if ($currentMessage !== '' && $currentMessage !== $lastMessage) {
|
||||
echo "data: " . $currentMessage . "\n\n";
|
||||
ob_flush();
|
||||
flush();
|
||||
$lastMessage = $currentMessage;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
?>
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (isset($_POST['mensagem']) && isset($_GET['user'])) {
|
||||
$mensagem = trim($_POST['mensagem']);
|
||||
$user = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['user']);
|
||||
|
||||
if ($mensagem !== '') {
|
||||
$tmp_file = sys_get_temp_dir() . "/relay_chat_{$user}.txt";
|
||||
file_put_contents($tmp_file, $mensagem); // sobrescreve, não acumula
|
||||
}
|
||||
}
|
||||
?>
|
||||
+12
-2
@@ -43,6 +43,8 @@
|
||||
|
||||
// Processa o vídeo com o script do flavio
|
||||
function process_file($username, $title, $input_file, $output_file) {
|
||||
echo 'Processando vídeo...\n';
|
||||
|
||||
$SCRIPT_PATH = '/var/www/src/aliceclass/script/script.sh';
|
||||
|
||||
$cmd = sprintf('%s "%s" "%s" "%s" "%s" "%s"',
|
||||
@@ -74,8 +76,14 @@
|
||||
}
|
||||
|
||||
function push_to_git() {
|
||||
// $git_cmd = '-c user.name="www-data" -c user.email="no-replay@example.org"'
|
||||
// shell_exec('cd /var/www/src/AliceClass;' . $git_cmd . 'add _data/aulas.json;' . $git_cmd . 'commit -m "update data";' . $git_cmd . 'push');
|
||||
$git_cmd = 'cd /var/www/src/aliceclass; git ';
|
||||
|
||||
shell_exec($git_cmd . ' config user.name www-data 2>&1');
|
||||
shell_exec($git_cmd . ' config user.email www-data@noreply.alice 2>&1');
|
||||
|
||||
shell_exec($git_cmd . ' add /var/www/src/aliceclass/_data/aulas.json 2>&1');
|
||||
shell_exec($git_cmd . ' commit -m "update data" 2>&1');
|
||||
shell_exec($git_cmd . ' push 2>&1');
|
||||
}
|
||||
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
@@ -97,6 +105,8 @@
|
||||
upload($orig_file, $brute_file); //|| echo error && exit;
|
||||
process_file($username, $video_title, $brute_file, $target_file); // || echo error && exit;
|
||||
insert_into_db($username, $video_title, $video_desc, $video_level, $video_software, $video_date);
|
||||
push_to_git();
|
||||
|
||||
|
||||
echo "The file ". htmlspecialchars(basename($orig_file)). " has been uploaded.";
|
||||
?>
|
||||
+59
-33
@@ -1,59 +1,85 @@
|
||||
#!/bin/sh
|
||||
SRC=collections/_aulas
|
||||
# SCRIPT=script/
|
||||
SCRIPT=/var/www/src/AliceClass/script/
|
||||
SCRIPT=/var/www/src/aliceclass/script/
|
||||
# TMP=tmp
|
||||
TMP=$(mktemp -d)
|
||||
ASSETS="$TMP/assets"
|
||||
PARAM="scale=1920:1080: force_original_aspect_ratio=decrease: eval=frame,pad=1920:1080: -1:-1:color=black"
|
||||
|
||||
VIDEOS_PATH=/var/www/html/aliceclass_videos
|
||||
|
||||
|
||||
create_thumb () {
|
||||
THUMB_PATH=$1
|
||||
SRC_FILE=$2
|
||||
|
||||
if test ! -f "${THUMB_PATH}" ; then
|
||||
ffmpeg -y -i "${SRC_FILE}" -vframes 1 -an -s 400x222 -ss 30 "${THUMB_PATH}"
|
||||
fi
|
||||
}
|
||||
|
||||
create_intro_clip () {
|
||||
AUTHOR=$1
|
||||
VIDEO_TITLE=$2
|
||||
|
||||
# sed "s/nomenome/$AUTHOR/g" ${SCRIPT}/intro.svg | sed "s/curso/${VIDEO_TITLE}/g" > ${TMP}/tmp-intro.svg
|
||||
sed "s/nomenome/$AUTHOR/g; s/curso/${VIDEO_TITLE}/g" ${SCRIPT}/intro.svg > ${TMP}/tmp-intro.svg
|
||||
ffmpeg -y -loop 1 -i ${TMP}/tmp-intro.svg -i ${SCRIPT}/intro.wav -shortest ${TMP}/tmp-intro.mkv
|
||||
|
||||
}
|
||||
|
||||
process_video () {
|
||||
NAME=$1
|
||||
|
||||
# VIDEO_TITLE=$1
|
||||
# USERNAME=$2
|
||||
# SRC_FILE=$3
|
||||
# AULA=$4
|
||||
# DEST_FILE=$5
|
||||
|
||||
VIDEO_TITLE=$1
|
||||
AUTHOR=$2
|
||||
INPUT=$3
|
||||
SRC_FILE=$3
|
||||
AULA=$4
|
||||
OUTPUT=$5
|
||||
DEST_FILE=$5
|
||||
|
||||
# no output path
|
||||
if [ -z "$OUTPUT" ]; then
|
||||
OUTPUT="$ASSETS/videos/${NAME}.mp4"
|
||||
if [ -z "$DEST_FILE" ]; then
|
||||
DEST_FILE="$ASSETS/videos/${VIDEO_TITLE}.mp4"
|
||||
fi
|
||||
|
||||
THUMB_PATH=$(dirname $(dirname $OUTPUT))/thumbs/$NAME
|
||||
echo $THUMB_PATH
|
||||
THUMB_PATH="${VIDEOS_PATH}/$AUTHOR/thumbs/${VIDEO_TITLE}.jpg"
|
||||
# THUMB_PATH=$(dirname $(dirname $DEST_FILE))/thumbs/${VIDEO_TITLE}.jpg
|
||||
|
||||
echo "########################################"
|
||||
echo "# Aula: ${AULA}"
|
||||
echo "# Thumb Path: $THUMB_PATH"
|
||||
echo "# Author: ${AUTHOR}"
|
||||
echo "# Input: ${INPUT}"
|
||||
echo "# Input: ${SRC_FILE}"
|
||||
echo "# Src: ${SRC}"
|
||||
echo "# Dest: ${OUTPUT}"
|
||||
echo "# Name: ${NAME}"
|
||||
echo "# Dest: ${DEST_FILE}"
|
||||
echo "# Name: ${VIDEO_TITLE}"
|
||||
echo "# Script Path: ${SCRIPT}"
|
||||
echo "########################################"
|
||||
# exit
|
||||
|
||||
|
||||
# ####################################
|
||||
# Creating the thumbnail if does not exist
|
||||
# ####################################
|
||||
if test ! -f "${THUMB_PATH}.jpg" ; then
|
||||
ffmpeg -y -i "${INPUT}" -vframes 1 -an -s 400x222 -ss 30 "${THUMB_PATH}.jpg"
|
||||
fi
|
||||
create_thumb "${THUMB_PATH}" "${SRC_FILE}"
|
||||
|
||||
# ####################################
|
||||
# if output exist, continue
|
||||
# ####################################
|
||||
if test -f "$ASSETS/videos/${NAME}.mp4" ; then
|
||||
if test -f "$ASSETS/videos/${VIDEO_TITLE}.mp4" ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# ####################################
|
||||
# Creating the intro clip
|
||||
# ####################################
|
||||
# sed "s/nomenome/$AUTHOR/g" ${SCRIPT}/intro.svg | sed "s/curso/${NAME}/g" > ${TMP}/tmp-intro.svg
|
||||
sed "s/nomenome/$AUTHOR/g; s/curso/${NAME}/g" ${SCRIPT}/intro.svg > ${TMP}/tmp-intro.svg
|
||||
ffmpeg -y -loop 1 -i ${TMP}/tmp-intro.svg -i ${SCRIPT}/intro.wav -shortest ${TMP}/tmp-intro.mkv
|
||||
create_intro_clip "${AUTHOR}" "${VIDEO_TITLE}"
|
||||
|
||||
# ###################################################
|
||||
# Audio adjustment
|
||||
@@ -63,12 +89,12 @@ process_video () {
|
||||
# -af dynaudnorm=p=1
|
||||
# -af speechnorm=e=12.5:r=0.0001:l=1
|
||||
# -af acompressor=threshold=0.089:ratio=9:attack=200:release=1000:makeup=2
|
||||
ffmpeg -y -i "${INPUT}" -af dynaudnorm=p=1 ${TMP}/tmp-normalized.mkv
|
||||
ffmpeg -y -i "${SRC_FILE}" -af dynaudnorm=p=1 ${TMP}/tmp-normalized.mkv
|
||||
|
||||
# ####################################################
|
||||
# Wartermarking the video file
|
||||
# ####################################################
|
||||
sed "s/nomenome/$AUTHOR/g" ${SCRIPT}/watermark.svg | sed "s/curso/${NAME}/g" > ${TMP}/tmp-watermark.svg
|
||||
sed "s/nomenome/$AUTHOR/g" ${SCRIPT}/watermark.svg | sed "s/curso/${VIDEO_TITLE}/g" > ${TMP}/tmp-watermark.svg
|
||||
# add watermark to video
|
||||
ffmpeg -y -i ${TMP}/tmp-normalized.mkv -i ${TMP}/tmp-watermark.svg -i ${SCRIPT}/logo.png \
|
||||
-filter_complex "[0][1]overlay=5:H-h-5:format=auto[bg];[bg][2]overlay=W-w-5:5:format=auto" -c:a copy ${TMP}/tmp-video.mkv
|
||||
@@ -89,7 +115,7 @@ process_video () {
|
||||
-vcodec libx264 \
|
||||
-pix_fmt yuv420p \
|
||||
-vsync 2 \
|
||||
"$OUTPUT"
|
||||
"$DEST_FILE"
|
||||
}
|
||||
|
||||
|
||||
@@ -99,10 +125,10 @@ process_video () {
|
||||
# Creating the credits clip
|
||||
# ####################################
|
||||
#if test ${TMP}/tmp-credits.mkv -ot ${SCRIPT}/credits.svg ; then
|
||||
echo "########################################"
|
||||
echo "# Gerando o tmp-credits.mkv"
|
||||
echo "########################################"
|
||||
ffmpeg -y -loop 1 -i ${SCRIPT}/credits.svg -i ${SCRIPT}/credits.wav -shortest ${TMP}/tmp-credits.mkv
|
||||
echo "########################################"
|
||||
echo "# Gerando o tmp-credits.mkv"
|
||||
echo "########################################"
|
||||
ffmpeg -y -loop 1 -i ${SCRIPT}/credits.svg -i ${SCRIPT}/credits.wav -shortest ${TMP}/tmp-credits.mkv
|
||||
#fi
|
||||
|
||||
# ####################################
|
||||
@@ -113,12 +139,12 @@ mkdir -p $ASSETS/videos
|
||||
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
NAME=$1
|
||||
VIDEO_TITLE=$1
|
||||
AUTHOR=$2
|
||||
INPUT=$3
|
||||
SRC_FILE=$3
|
||||
AULA=$4
|
||||
OUTPUT=$5
|
||||
process_video "$NAME" "$AUTHOR" "$INPUT" "$AULA" "$OUTPUT"
|
||||
DEST_FILE=$5
|
||||
process_video "$VIDEO_TITLE" "$AUTHOR" "$SRC_FILE" "$AULA" "$DEST_FILE"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -126,11 +152,11 @@ fi
|
||||
# # ####################################
|
||||
# # Getting parameters from aulas
|
||||
# # ####################################
|
||||
# NAME="$(basename "${aula}" .md)"
|
||||
# VIDEO_TITLE="$(basename "${aula}" .md)"
|
||||
# AUTHOR=$(grep "^author: " "${aula}" | sed -e 's/author: //g')
|
||||
# INPUT="${SRC}/${NAME}.mkv"
|
||||
# SRC_FILE="${SRC}/${VIDEO_TITLE}.mkv"
|
||||
#
|
||||
# process_video "$NAME" "$AUTHOR" "$INPUT"
|
||||
# process_video "$VIDEO_TITLE" "$AUTHOR" "$SRC_FILE"
|
||||
# done
|
||||
|
||||
# rm -f ${TMP}
|
||||
# rm -f ${TMP}
|
||||
Reference in new issue
Block a user