Skip to content

Commit

Permalink
rebrand: mv from 'weeks' to 'projects'
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Nov 26, 2023
1 parent 90624cf commit 945e2b4
Show file tree
Hide file tree
Showing 92 changed files with 52 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Boolean Algebra and Logical expressions

NOTA: Mi portafolio de clase con todos mis proyectos (includo este) estará siempre desplegado en
<https://paoloose.site/discrete-mathematics/>
<https://paoloose.site/discmaths/>

Todos los proyectos serán interactivos :)

Expand Down Expand Up @@ -37,6 +37,6 @@ sintaxis.
estudiantes de Ingeniería de Software para que puedan nutrirse de él y mejorar sus
capacidades de programación.

Ver en vivo en <https://paoloose.site/discrete-mathematics/assignments/week1/> !
Ver en vivo en <https://paoloose.site/discmaths/assignments/week1/> !

![Table mode](../../assets/week1_table_mode.png)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
authors = ["@paoloose"]
description = "Wasm glue for the logic-parser rust library (personal use)"
repository = "https://github.com/paoloose/discrete-mathematics"
repository = "https://github.com/paoloose/discmaths"

[lib]
crate-type = ["cdylib"]
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name = "logic-parser"
version = "1.3.0"
description = "A simple lexer & parser for logical expressions that supports output as AST, JSON and SVG"
edition = "2021"
homepage = "https://github.com/paoloose/discrete-mathematics/tree/main/assignments/week1/logic-parser"
repository = "https://github.com/paoloose/discrete-mathematics/tree/main/assignments/week1/logic-parser"
homepage = "https://github.com/paoloose/discmaths/tree/main/assignments/week1/logic-parser"
repository = "https://github.com/paoloose/discmaths/tree/main/assignments/week1/logic-parser"
readme = "README.md"
keywords = ["parser", "ast-parser", "logic"]
license = "MIT OR GPL-2.0-or-later"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ standard. 😁 The parser is currently working as expected, reporting meaningful
syntax errors and parsing any complex expression.

Want to use this library for the Web? Web Assembly bindings were also written!
Look at the (unpublished) [`logic-parser-wasm`](https://github.com/paoloose/discrete-mathematics/tree/main/assignments/week1/logic-parser-wasm) library.
Look at the (unpublished) [`logic-parser-wasm`](https://github.com/paoloose/discmaths/tree/main/assignments/week1/logic-parser-wasm) library.

## Examples

Expand Down Expand Up @@ -85,7 +85,7 @@ let svg = render_to_svg(
svg.as_xml()
```

![Resulting tree](https://raw.githubusercontent.com/paoloose/discrete-mathematics/main/assignments/week1/logic-parser/assets/resulting_tree.png)
![Resulting tree](https://raw.githubusercontent.com/paoloose/discmaths/main/assignments/week1/logic-parser/assets/resulting_tree.png)

## Testing

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ async fn handle_msg(client: &mut Client, msg: Message, _clients: &Clients) -> Re
loop {
match reader.read_event_into_async(&mut buf).await {
Ok(Event::Start(e)) => {
println!("- {e:?}");
let tag = e.name().into_inner();
if tag != b"a" { continue; }
let attrs = e.html_attributes()
Expand Down
2 changes: 1 addition & 1 deletion frontend/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import topLevelAwait from 'vite-plugin-top-level-await';
// https://astro.build/config
export default defineConfig({
site: 'https://paoloose.site',
base: '/discrete-mathematics',
base: '/discmaths',
integrations: [react()],
vite: {
plugins: [wasm(), topLevelAwait()]
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "discrete-mathematics",
"name": "discmaths",
"type": "module",
"version": "0.0.1",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Link from "@components/Link.astro";
import type { WeekPage } from '@types';
import type { ProjectPage } from '@types';
type Props = WeekPage;
type Props = ProjectPage;
const { page } = Astro.props;
const { metadata } = page;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { title } = Astro.props;
<style is:global>
@font-face {
font-family: 'mathfont';
src: url('/discrete-mathematics/fonts/mathfont.woff') format('woff');
src: url('/discmaths/fonts/mathfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import AvailableAtGithub from '@components/AvailableAtGithub.astro';
type Props = {
main_id: string,
h1_title: string,
week: number
project: number
}
const { main_id, week, h1_title } = Astro.props;
const { main_id, project, h1_title } = Astro.props;
const GITHUB_URL = `https://github.com/paoloose/discrete-mathematics/tree/main/assignments/week${week}`;
const GITHUB_URL = `https://github.com/paoloose/discmaths/tree/main/assignments/project${project}`;
if (import.meta.env.PROD) {
// Runs on `astro build`
Expand All @@ -24,14 +24,14 @@ if (import.meta.env.PROD) {
}
---

<Layout title={`Assignments: semana ${week}`}>
<Layout title={`Assignments: project ${project}`}>
<Header />
<main>
<Link href="/">Go back</Link>
<section>
<h1>{h1_title}</h1>
<AvailableAtGithub href={GITHUB_URL}>
@paoloose/discrete-mathematics/week{week}
@paoloose/discmaths/project{project}
</AvailableAtGithub>
</section>
<section id={main_id}>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
import { Image } from 'astro:assets';
import Layout from '@layouts/Layout.astro';
import WeekItem from '@components/WeekItem.astro';
import ProjectItem from '@components/ProjectkItem.astro';
import Header from '@components/Header.astro';
import clouds from '@assets/clouds.webp';
import githubLogo from '@assets/github_light.svg';
import type { WeekPageInstance } from '@types';
import type { ProjectPageInstance } from '@types';
const weeks = await Astro.glob('./assignments/*.astro');
const projects = await Astro.glob('./project/*.astro');
---

<Layout title="Discrete Mathematics portfolio">
Expand All @@ -25,19 +25,19 @@ const weeks = await Astro.glob('./assignments/*.astro');
</section>
<footer id="github">
<Image src={githubLogo} alt="The GitHub logo" />
<a href="https://github.com/paoloose/discrete-mathematics" target="_blank">@paoloose/discrete-mathematics</a>
<a href="https://github.com/paoloose/discmaths" target="_blank">@paoloose/discmaths</a>
</footer>
</div>
<Image class="clouds" width={350} src={clouds} alt="Clouds moving across the sky" />
</section>
<section id="assignments">
<h2>Assignments</h2>
<ul id="week-list">
<ul id="projects-list">
{
weeks.map(async (week) => {
projects.map(async (project) => {
return (
<li>
<WeekItem page={week as WeekPageInstance} />
<ProjectItem page={project as ProjectPageInstance} />
</li>
);
})
Expand Down Expand Up @@ -154,13 +154,13 @@ const weeks = await Astro.glob('./assignments/*.astro');
margin-bottom: 22px;
}

#week-list {
#projects-list {
margin-block: 0;
margin-inline: 0;
margin-inline-start: 0;
padding-inline-start: 0;
}
#week-list li {
#projects-list li {
list-style-type: none;
margin-bottom: 25px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
import LogicParser from '@components/LogicParser/LogicParser';
import type { WeekMetadata } from '@types';
import WeekLayout from '@layouts/WeekLayout.astro';
import type { ProjectMetadata } from '@types';
import ProjectLayout from '@layouts/ProjectLayout.astro';
export const metadata: WeekMetadata = {
export const metadata: ProjectMetadata = {
title: 'Project 1: Boolean Algebra and Logical expressions',
description: 'This week we built a logic expressions parser using the concepts of lexing, parsing and syntax trees.',
img: ''
}
---

<WeekLayout
<ProjectLayout
h1_title='Evaluador y visualizador de proposiciones lógicas'
main_id='#logic-parser'
week={1}
project={1}
>
<p>Escribe una proposición lógica para ser evaluada.</p>
<LogicParser client:load />
</WeekLayout>
</ProjectLayout>

<style is:global lang="scss">
#logic-parser #input-wrapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
import Vennbase from '@components/Vennbase/Vennbase';
import type { WeekMetadata } from '@types';
import WeekLayout from '@layouts/WeekLayout.astro';
import type { ProjectMetadata } from '@types';
import ProjectLayout from '@layouts/ProjectLayout.astro';
export const metadata: WeekMetadata = {
export const metadata: ProjectMetadata = {
title: 'Project 2: Vennbase, an easy to query multimedia database',
description: 'A database that can be queried and visualized by using logic and set theory concepts.',
img: ''
}
---

<WeekLayout
<ProjectLayout
h1_title='Vennbase: an easy to query multimedia database'
main_id='#logic-parser'
week={2}
project={2}
>
<Vennbase client:only="react" />
</WeekLayout>
</ProjectLayout>

<style is:global lang="scss">
#vennbase {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
import type { WeekMetadata } from '@types';
import WeekLayout from '@layouts/WeekLayout.astro';
import type { ProjectMetadata } from '@types';
import ProjectLayout from '@layouts/ProjectLayout.astro';
export const metadata: WeekMetadata = {
export const metadata: ProjectMetadata = {
title: 'Final project: Interlinker, a graph-based internet crawler',
description: 'A real-time web crawler visualizer that can be used to search connections between different web pages.',
img: ''
}
---

<WeekLayout
<ProjectLayout
h1_title='Interlinker: a real time web crawler'
main_id='interlinker'
week={3}
project={3}
>
<p>What if you can see how the web is created?</p>
<div id="main-wrapper">
Expand All @@ -32,7 +32,7 @@ export const metadata: WeekMetadata = {
</article>
</div>
<script src="../../components/Interlinker/main.ts"></script>
</WeekLayout>
</ProjectLayout>

<style is:global lang="scss">
main {
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type { AstroInstance } from 'astro'

export type WeekMetadata = {
export type ProjectMetadata = {
title: string
description: string
img: string
}

export type WeekPageInstance = AstroInstance & {
metadata: WeekMetadata
export type ProjectPageInstance = AstroInstance & {
metadata: ProjectMetadata
}

export type WeekPage = {
page: WeekPageInstance
export type ProjectPage = {
page: ProjectPageInstance
}

export type ASTBinaryOperator = {
Expand Down

0 comments on commit 945e2b4

Please sign in to comment.