Skip to content

Commit

Permalink
novos dados da disciplina
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Mar 11, 2024
1 parent 67d3662 commit 560906b
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 57 deletions.
31 changes: 30 additions & 1 deletion src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
// subject data
export const SUBJECT = {
CLASSROOM_URLS: {
A: 'https://classroom.google.com/c/NjYzNjMwNzkyOTky',
},
CHAT_URL: 'https://mail.google.com/mail/u/0/#chat/space/AAAAke2P7Sw',
PROJECTS_URL: 'https://padlet.com/lucachaves/projetolp22024',
GITHUB_URLS: {
A: 'https://github.com/lucachaves/lp2-2024',
},
SCHEDULES: [
{
className: 'A',
room: 'Lab 58',
day: 'Segunda',
start: '08:40',
end: '10:40',
},
{
className: 'B',
room: 'Lab 58',
day: 'Segunda',
start: '10:40',
end: '12:20',
},
],
};

// project data
export const GITHUB_EDIT_URL = 'https://github.com/ifpb/lp2/tree/main';

export const CLASSNOTE_SLUGS = [
export const CONTENT_SLUGS = [
'javascript/introduction',
'javascript/frontend',
'nodejs/http',
Expand Down
92 changes: 45 additions & 47 deletions src/layouts/MarkDownLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import NavBar from '../components/NavBar.astro';
import Sidebar from '../components/Sidebar.astro';
import TableOfContent from '../components/TableOfContent.astro';
import NavigationContent from '../components/NavigationContent.astro';
import { CLASSNOTE_SLUGS, GITHUB_EDIT_URL } from '../consts';
import { CONTENT_SLUGS, GITHUB_EDIT_URL } from '../consts';
import '../styles/global.css';
import '../styles/code.css';
Expand Down Expand Up @@ -35,13 +35,11 @@ const classNoteTitles: Record<string, string> = classroomEntries.reduce(
{}
);
const classNoteIndex = CLASSNOTE_SLUGS.findIndex(
(slug) => slug === currentSlug
);
const classNoteIndex = CONTENT_SLUGS.findIndex((slug) => slug === currentSlug);
const previousClassNote = CLASSNOTE_SLUGS[classNoteIndex - 1];
const previousClassNote = CONTENT_SLUGS[classNoteIndex - 1];
const nextClassNote = CLASSNOTE_SLUGS[classNoteIndex + 1];
const nextClassNote = CONTENT_SLUGS[classNoteIndex + 1];
const githubEditUrl = `${GITHUB_EDIT_URL}/src${file.split('/src').pop()}`;
---
Expand Down Expand Up @@ -74,7 +72,7 @@ const githubEditUrl = `${GITHUB_EDIT_URL}/src${file.split('/src').pop()}`;
</p>

<NavigationContent
hasNavigation={CLASSNOTE_SLUGS.includes(currentSlug)}
hasNavigation={CONTENT_SLUGS.includes(currentSlug)}
previousClassNoteLink={previousClassNote}
nextClassNoteLink={nextClassNote}
previousClassNoteTitle={classNoteTitles[previousClassNote]}
Expand Down Expand Up @@ -135,45 +133,45 @@ const githubEditUrl = `${GITHUB_EDIT_URL}/src${file.split('/src').pop()}`;
</style>

<script is:inline>
// Copy to clipboard
// lucide:copy
const copyButton =
'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g></svg>';

// material-symbols:check-small
const copyButtonCheck =
'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="currentColor" d="m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4l-8 8Z"/></svg>';

// use a class selector if available
let blocks = document.querySelectorAll('pre');

blocks.forEach((block) => {
// only add button if browser supports Clipboard API
if (navigator.clipboard) {
let button = document.createElement('button');

button.innerHTML = copyButton;
block.appendChild(button);

button.addEventListener('click', async () => {
button.classList.add('copy-button-block');
await copyCode(block, button);
});
// Copy to clipboard
// lucide:copy
const copyButton =
'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g></svg>';

// material-symbols:check-small
const copyButtonCheck =
'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"><path fill="currentColor" d="m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4l-8 8Z"/></svg>';

// use a class selector if available
let blocks = document.querySelectorAll('pre');

blocks.forEach((block) => {
// only add button if browser supports Clipboard API
if (navigator.clipboard) {
let button = document.createElement('button');

button.innerHTML = copyButton;
block.appendChild(button);

button.addEventListener('click', async () => {
button.classList.add('copy-button-block');
await copyCode(block, button);
});
}
});

async function copyCode(block, button) {
let code = block.querySelector('code');
let text = code.innerText;

await navigator.clipboard.writeText(text);

// visual feedback that task is completed
button.innerHTML = copyButtonCheck;

setTimeout(() => {
button.innerHTML = copyButton;
button.classList.remove('copy-button-block');
}, 1000);
}
});

async function copyCode(block, button) {
let code = block.querySelector('code');
let text = code.innerText;

await navigator.clipboard.writeText(text);

// visual feedback that task is completed
button.innerHTML = copyButtonCheck;

setTimeout(() => {
button.innerHTML = copyButton;
button.classList.remove('copy-button-block');
}, 1000);
}
</script>
6 changes: 3 additions & 3 deletions src/pages/classnotes.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
import { getCollection } from 'astro:content';
import BaseLayout from '../layouts/BaseLayout.astro';
import { CLASSNOTE_SLUGS } from '../consts';
import { CONTENT_SLUGS } from '../consts';
const classnoteOrder = (classnote: string) =>
CLASSNOTE_SLUGS.indexOf(classnote) + 1;
CONTENT_SLUGS.indexOf(classnote) + 1;
const classroomEntries = await getCollection('classnotes', ({ slug }) =>
CLASSNOTE_SLUGS.includes(slug)
CONTENT_SLUGS.includes(slug)
);
classroomEntries.sort(
Expand Down
54 changes: 48 additions & 6 deletions src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: ../layouts/MarkDownLayout.astro
title: Linguagem de Programação II
---

import { SUBJECT } from '../consts.js'

# {frontmatter.title}

A disciplina de [Linguagem e Técnicas de Programação II](/docs/plano-de-ensino.pdf) (LP2) do Curso Integrado em Informática do IFPB tem como objetivo apresentar ao aluno conceitos sobre desenvolvimento Web Back-end. Sua carga horária apresenta um total de 80 horas aula e será ministrada pelo professor Luiz Carlos Chaves. Para as aulas serão utilizadas exposições e atividades práticas, além de avaliações individuais e em grupo.
Expand Down Expand Up @@ -36,27 +38,67 @@ A disciplina apresenta o seguinte conteúdo, que será dividido conforme este [r
- Validação de Dados
- Upload de Arquivo

Sobre o código fonte gerados durante as aulas, ele estará disponível no repositório da disciplina ({Object.keys(SUBJECT.GITHUB_URLS).map((github) => (<a href={SUBJECT.GITHUB_URLS[github]} target="_blank">Turma {github}</a>)).reduce((prev, curr) => [prev, ', ', curr])}).

## Horário e ambiente

As aulas da disciplina serão alocados nesse horário e ambiente:

| Turma | Dia | Horário | Ambiente |
| ------- | ------- | ----------- | --------- |
| Turma A | Segunda | 07:00-08:40 | Lab Redes |
| Turma B | Segunda | 08:40-10:40 | Lab Redes |
<table>
<thead>
<tr>
<th>Turm</th>
<th>Dia</th>
<th>Horário</th>
<th>Ambiente</th>
</tr>
</thead>
<tbody>
{SUBJECT.SCHEDULES.map(({ className, day, start, end, room }) => (
<tr>
<td>Turma {className}</td>
<td>{day}</td>
<td>{start}-{end}</td>
<td>{room}</td>
</tr>
))}
</tbody>
</table>

## Avaliações

Em relação às avaliação da disciplina serão adotados estas notas durante os bimestres por meio de exercícios e projetos:
As notas bimetrais serão computadas pelas notas das atividades durante os bimestres:

- 1º Bimestre: (Nota 1 + Nota 2)/2
- 2º Bimestre: (Nota 1 + Nota 2)/2
- 3º Bimestre: (Nota 1 + Nota 2)/2
- 4º Bimestre: (Nota 1 + Nota 2)/2

Esta sala do Google Classroom ({Object.keys(SUBJECT.CLASSROOM_URLS).map((github) => (<a href={SUBJECT.GITHUB_URLS[github]} target="_blank">Turma {github}</a>)).reduce((prev, curr) => [prev, ', ', curr])}) será utilizada para enviar todas as avaliações, e a maioria das avaliações serão baseadas em projetos. Após a escolha do tema do projeto, todos os projetos devem declarar suas propostas no Padlet dos <a href={SUBJECT.PROJECTS_URL} target="_blank">projetos deste ano</a>, seguindo o formato de card a seguir:

```text
Título/Tema do Projeto
Descrição: Resumidamente descreva a ideia central do seu projeto
Equipe:
- Nome do Aluno 1 (matricula, github, linkedin)
- Nome do Aluno 2 (matricula, github, linkedin)
- Nome do Aluno 3 (matricula, github, linkedin)
Proposta:
http://link-da-apresentação-da-proposta
Protótipo:
http://link-do-protótipo
Repositório:
http://github.com/link-do-repositorio
```

## Comunicação

Toda a comunicação será realizada usando o Google Chat.
Toda a comunicação será realizada usando este <a href={SUBJECT.CHAT_URL} target="_blank">chat</a> do Google Chat.

## Ferramentas

Expand Down

0 comments on commit 560906b

Please sign in to comment.