commit 9f2dcf1054be23d3aa6041c68a379d6527fa7324 Author: Mario1159 Date: Sun Aug 27 19:19:52 2023 -0400 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3a24117 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.jpg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d26fef2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM denoland/deno:latest + +EXPOSE 3000 +WORKDIR /app + +COPY /src . + +ENTRYPOINT ["deno"] +CMD ["task", "serve"] diff --git a/compose-dev.yaml b/compose-dev.yaml new file mode 100644 index 0000000..b08b839 --- /dev/null +++ b/compose-dev.yaml @@ -0,0 +1,8 @@ +version: "3.9" +services: + app: + container_name: ieee-usm-web-dev + image: mario1159/ieee-usm-web + build: . + ports: + - 8080:3000 \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..606ab42 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,2 @@ +_bin +build \ No newline at end of file diff --git a/src/_config.ts b/src/_config.ts new file mode 100644 index 0000000..2b939ee --- /dev/null +++ b/src/_config.ts @@ -0,0 +1,46 @@ +import lume from "lume/mod.ts"; +import date from "lume/plugins/date.ts"; +import postcss from "lume/plugins/postcss.ts"; +import codeHighlight from "lume/plugins/code_highlight.ts"; +import basePath from "lume/plugins/base_path.ts"; +import slugifyUrls from "lume/plugins/slugify_urls.ts"; +import resolveUrls from "lume/plugins/resolve_urls.ts"; +import pageFind from "lume/plugins/pagefind.ts"; +import sitemap from "lume/plugins/sitemap.ts"; +import feed from "lume/plugins/feed.ts"; + +const site = lume({ + location: new URL("https://ieee.usm.cl/"), + src: "content", + dest: "build" +}); + +site + .ignore("README.md") + .copy("img") + .use(postcss()) + .use(date()) + .use(codeHighlight()) + .use(basePath()) + .use(sitemap()) + .use(pageFind({ + ui: { + resetStyles: false, + }, + })) + .use(slugifyUrls({ alphanumeric: false })) + .use(feed({ + output: ["/feed.json", "/feed.xml"], + query: "type=posts", + info: { + title: "=site.title", + description: "=site.description", + }, + items: { + title: "=title", + content: "$.post-body", + } + })) + .use(resolveUrls()); + +export default site; diff --git a/src/content/.gitignore b/src/content/.gitignore new file mode 100644 index 0000000..c08f9ad --- /dev/null +++ b/src/content/.gitignore @@ -0,0 +1 @@ +_site \ No newline at end of file diff --git a/src/content/404.md b/src/content/404.md new file mode 100644 index 0000000..c2d5b2a --- /dev/null +++ b/src/content/404.md @@ -0,0 +1,8 @@ +--- +layout: layouts/home.njk +url: /404.html +--- + +# Content not found. + +Go [home](/). diff --git a/src/content/README.md b/src/content/README.md new file mode 100644 index 0000000..e789228 --- /dev/null +++ b/src/content/README.md @@ -0,0 +1,128 @@ +# Lume base blog example + +A starter repository showing how to build a blog with the +[Lume](https://github.com/lumeland/lume) static site generator. + +This project started as a fork of +[eleventy-base-blog](https://github.com/11ty/eleventy-base-blog) but adapted to +Lume and with the NetlifyCMS. + +## Getting Started + +1. Make sure you have [Deno installed](https://deno.land/#installation). +2. Clone this Repository + `git clone https://github.com/lumeland/base-blog.git my-blog-name` +3. Edit `_data/site.yml`. Specifically have a look at `_config.js` to see if you + want to configure any option differently. See the + [Lume documentation site](https://lume.land/). +4. Run Lume with `deno task serve`. + +### Implementation Notes + +- `about.md` shows how to add a content page. +- `posts/` has the blog posts but really they can live in any directory. The + `posts/_data.yml` file adds the value for `type` and `layout` fields to all + posts. +- The `menu` field adds any page to the top level site navigation. For example, + this is in use on `index.njk` and `about.md`. You can configure the order with + `menu.order` and the text with `menu.title`. +- `css` files are processed with `postcss` plugin. The imported styles are in + `_includes/css` +- `img` folder is copied as is, (keeping the same directory structure). +- The blog post feed template is in `feed.xml.njk` and `feed.tmpl.js`. +- This example uses four layouts stored in `_includes/layouts/`: + - `base.njk`: the top level HTML structure + - `home.njk`: the home page template (wrapped into `base.njk`) + - `post.njk`: the blog post template (wrapped into `base.njk`) + - `tag.njk`: the tag page template (wrapped into `base.njk`) +- `_includes/templates/postlist.njk` is a Nunjucks a reusable template used to + display a list of all the posts. `index.njk` has an example of how to use it. +- `admin/` has the [NetlifyCMS](https://www.netlifycms.org/) configuration so + you can edit or create new posts using a friendly CMS. + +## Deployment + +### GitHub Pages + +- [Get your own Lume blog on Github Pages](https://github.com/lumeland/base-blog/generate) +- Open the file `.github/workflows/build.yml` and edit the `--location` option + with the url of the site, for example + `--location=https://username.github.io/repo/` +- Enable Github Pages and select the branch `gh-pages` as source. +- [See a live demo](https://lumeland.github.io/base-blog/) + +### GitLab Pages + +- Open the file `.gitlab-ci.yml` and edit the `--location` option + with the url of the site, for example + `--location=https://username.gitlab.io/repo/` +- [See a live demo](https://oscarotero.gitlab.io/base-blog/) + +### Deno Deploy + +- [Create a project in Deno Deploy](https://deno.com/deploy) and configure it. + - Link to your git repository + - Set the GitHub Actions deployment mode. +- Open the file `.github/workflows/deno_deploy.yml` and edit the following: + - The `--location` option with the url of the site, for example: + `--location=https://my-blog.deno.dev` + - The project name in the `denoland/deployctl` step with the name of your + project. +- [See a live demo](https://lume-blog.deno.dev) + +### Vercel + +- [Get your own Lume blog on Vercel](https://vercel.com/new/git/external?repository-url=https://github.com/lumeland/base-blog) +- You need to config your the project manually with the following values: + - **Build Command:** + `curl -fsSL https://deno.land/x/install/install.sh | sh && /vercel/.deno/bin/deno task build --location=https://example.vercel.app/`. + Edit the `--location` option with the name of your domain. + - **Output directory:** `_site` +- [See a live demo](https://lume-blog.vercel.app/) + +### Netlify + +- [Get your own Lume blog on Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/lumeland/base-blog) +- Open the `netlify.toml` file and edit the + `--location=https://deno-blog.netlify.app/` option with your own domain. +- [See a live demo](https://lume-blog.netlify.app/) +- If you want to use NetlifyCMS: + - Activate the Identity service in your Netlify settings panel. + - Activate the Git Gateway. + - Invite the users to edit the content. + +### Fleek + +- [Import your project](https://app.fleek.co/#/start/connect-repository) +- Open the `.fleek.json` file and edit the + `--location=https://example.on.fleek.co` option with your own domain. +- [See a live demo](https://lume-blog.on.fleek.co/) + +### Cloudflare Pages + +- Configure the project with the following values: + - **Build Command:** + `curl -fsSL https://deno.land/x/install/install.sh | sh && /opt/buildhome/.deno/bin/deno task build --location=https://example.pages.dev/`. + Edit the `--location` option with the name of your domain. + - **Output directory:** `_site` +- [See a live demo](https://base-blog.pages.dev/) + +### AWS Amplify + +- Configure the `amplify.yml` file with the following values: + ```yml + version: 1 + frontend: + phases: + build: + commands: + - curl -fsSL https://deno.land/x/install/install.sh | sh + - /root/.deno/bin/deno task build + artifacts: + baseDirectory: /_site + files: + - '**/*' + cache: + paths: [] + ``` +- [See a live demo](https://master.docjzml5t5if1.amplifyapp.com/) diff --git a/src/content/_includes/css/carousel.css b/src/content/_includes/css/carousel.css new file mode 100644 index 0000000..72150f0 --- /dev/null +++ b/src/content/_includes/css/carousel.css @@ -0,0 +1,63 @@ +.carousel .buttons { + display: flex; + flex-flow: row nowrap; + justify-content: space-around; + align-items: center; + position: absolute; + text-align: center; + left: 0; + right: 0; + bottom: 10px; +} + +.carousel .prev { + margin: 0px 340px 0px 0px; +} + +.carousel .next { + margin: 0px 0px 0px 340px; +} + +.carousel .prev, .carousel .next { + display: inline-block; + height: 25px; + width: 25px; + background-color: #000000; + color:rgb(245, 245, 245); + border-radius: 50%; + cursor: pointer; + opacity: 0.6; +} + +.dot { + display: inline-block; + text-align: center; + height: 15px; + width: 15px; + background-color: transparent; + border: 2px solid; + border-color: white; + border-radius: 50%; + cursor: pointer; + opacity: 0.8; + margin: 0 5px; +} + +.active, .dot:hover{ + background-color: white; +} + +.carousel { + position: relative; + height: 670px; + width: 1920px; + margin: 0px auto; + overflow: hidden; +} + +.carousel img { + object-fit: cover; + width: 100%; + height: 670px; + mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0)); +} \ No newline at end of file diff --git a/src/content/_includes/css/fonts.css b/src/content/_includes/css/fonts.css new file mode 100644 index 0000000..d831d50 --- /dev/null +++ b/src/content/_includes/css/fonts.css @@ -0,0 +1 @@ +@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap'); \ No newline at end of file diff --git a/src/content/_includes/css/navbar.css b/src/content/_includes/css/navbar.css new file mode 100644 index 0000000..2d7150b --- /dev/null +++ b/src/content/_includes/css/navbar.css @@ -0,0 +1,62 @@ +.navbar { + display: flex; + flex-wrap: wrap; + align-items: center; + padding: 1rem 1rem 1rem 2rem; + column-gap: 2rem; + row-gap: 1rem; + border-bottom: 6px solid #0e649d; + + & a { + display: block; + + &:not(:hover) { + text-decoration: none; + } + } +} + +.navbar-links { + padding: 0; + margin: 0; + list-style: none; + display: flex; + flex-wrap: wrap; + column-gap: 2rem; + + & [aria-current="page"] { + font-weight: bold; + text-decoration: underline; + } +} +.navbar-search { + flex-grow: 1; + max-width: 800px; + margin-left: auto; +} + +#search { + & .pagefind-ui__drawer { + margin-top: 2px; + position: absolute; + background: var(--white); + padding: 0 2rem 1rem; + max-height: calc(100vh - 200px); + overflow-y: auto; + box-shadow: 0 10px 10px -5px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1); + border-bottom-right-radius: var(--pagefind-ui-border-radius); + border-bottom-left-radius: var(--pagefind-ui-border-radius); + width: 100%; + box-sizing: border-box; + } + & .pagefind-ui__message { + margin: 0; + padding: 0; + } + & .pagefind-ui__result-link { + color: var(--blue); + } + & .pagefind-ui__result-excerpt { + color: var(--darkgray); + } +} \ No newline at end of file diff --git a/src/content/_includes/css/post-list-banner.css b/src/content/_includes/css/post-list-banner.css new file mode 100644 index 0000000..60bd7c2 --- /dev/null +++ b/src/content/_includes/css/post-list-banner.css @@ -0,0 +1,45 @@ +.post-banner-list { + list-style: none; + padding: 0; +} + +.post-banner { + position: relative; + width: 1920px; + height: 670px; +} + +.post-banner-bg { + display: block; + overflow: hidden; + background-color: black; +} + +.post-banner-overlay { + position: absolute; + margin: 72px; +} + +.post-banner-overlay-container { + margin: 0px 0px 10px 0px; + padding: 6px 0px; +} + +.post-banner-title { + font-size: 4em; +} + +.post-banner-description { + font-size: 2em; +} + +.post-banner-date { + font-size: 0.8rem; + color: var(--fg-primary); +} + +.post-banner-overlay-container span { + font-family: 'Montserrat', sans-serif; + color: white; + padding: 8px; +} \ No newline at end of file diff --git a/src/content/_includes/css/post-list.css b/src/content/_includes/css/post-list.css new file mode 100644 index 0000000..e4d8e23 --- /dev/null +++ b/src/content/_includes/css/post-list.css @@ -0,0 +1,19 @@ +.postList { + list-style: none; + padding: 0; +} + +.postList-date { + font-size: 0.8rem; + color: var(--fg-primary); +} + +.postList-title { + display: inline-block; + padding: 0.5em 0.2em; + font-size: 1.2rem; + + &[aria-current="page"] { + font-weight: bold; + } +} diff --git a/src/content/_includes/css/post.css b/src/content/_includes/css/post.css new file mode 100644 index 0000000..4ee1df4 --- /dev/null +++ b/src/content/_includes/css/post.css @@ -0,0 +1,45 @@ +.post-header { + padding: 5vh 0; +} +.post-title { + font-size: 4rem; + font-size: clamp(2rem, 10vw, 4rem); + line-height: 1; + letter-spacing: -0.02em; + margin: 0 0 0.25em; +} +.post-tags { + display: inline; +} +.post-body { + font-size: 1.2em; + line-height: 1.4; + + & p, + & ul, + & ol { + max-width: 45em; + } + + & h2, + & h3, + & h4, + & h5, + & h6 { + max-width: 20em; + margin-bottom: 0; + } +} +.post-navigation { + & ul { + list-style: none; + padding: 0; + display: flex; + flex-wrap: wrap; + justify-content: center; + } + + & li { + padding: 1em; + } +} \ No newline at end of file diff --git a/src/content/_includes/css/reset.css b/src/content/_includes/css/reset.css new file mode 100644 index 0000000..89b5eb7 --- /dev/null +++ b/src/content/_includes/css/reset.css @@ -0,0 +1,68 @@ +:root { + --red: #c04; + --lightgray: #e6e6e6; + --darkgray: #0d1117; + --blue: #135; + --white: #fff; + --font-family: -apple-system, system-ui, sans-serif; +} + +html, +body { + padding: 0; + margin: 0; + font-family: var(--font-family); + color: var(--darkgray); + background-color: var(--white); + + /** Pagefind variables */ + --pagefind-ui-scale: .8; + --pagefind-ui-primary: var(--darkgray); + --pagefind-ui-text: var(--darkgray); + --pagefind-ui-background: var(--white); + --pagefind-ui-border: var(--lightgray); + --pagefind-ui-tag: var(--lightgray); + --pagefind-ui-border-width: 1px; + --pagefind-ui-border-radius: 6px; + --pagefind-ui-image-border-radius: 6px; + --pagefind-ui-image-box-ratio: 3 / 2; + --pagefind-ui-font: var(--font-family); +} + +main { + & > :first-child { + margin-top: 0; + } +} + +a { + color: var(--blue); +} + +/* Warning */ +.warning { + background-color: #ffc; + padding: 1em 0.5em; +} + +table { + margin: 1em 0; + + & td, + & th { + padding-right: 1em; + } +} + +pre, +code { + font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; + line-height: 1.5; + font-size: 1rem; +} + +hr { + border: 0; + border-top: solid 2px var(--lightgray); + margin: 5vh 0; +} \ No newline at end of file diff --git a/src/content/_includes/css/search.css b/src/content/_includes/css/search.css new file mode 100644 index 0000000..1b973df --- /dev/null +++ b/src/content/_includes/css/search.css @@ -0,0 +1,35 @@ +search-form { + +} +oom-search::part(input) { + border: solid 2px var(--darkgray); + border-radius: 4px; + padding: .5em; + background: none; +} +oom-search::part(label) { + font-weight: bold; +} +oom-search::part(input) { + border: solid 2px var(--darkgray); + border-radius: 4px; + padding: .5em; + background: none; +} +oom-search::part(items) { + padding: .5em; + margin: .5em 0; + box-shadow: 0 2px 3px #0003; + background: white; + width: auto; + min-width: 100%; + right: 0; +} +oom-search::part(item) { + background: none; + font: inherit; + padding: .5em 1em; +} +oom-search::part(active) { + background-color: var(--lightgray); +} \ No newline at end of file diff --git a/src/content/_includes/css/tag.css b/src/content/_includes/css/tag.css new file mode 100644 index 0000000..8cdc9ff --- /dev/null +++ b/src/content/_includes/css/tag.css @@ -0,0 +1,16 @@ +.tag { + display: inline-block; + text-transform: uppercase; + font-size: 0.7rem; + line-height: 1; + padding: 0.2em 0.5em; + margin-right: 0.8em; + background-color: var(--red); + color: var(--white); + border-radius: 0.25em; + text-decoration: none; + + &.is-big { + font-size: 1rem; + } +} diff --git a/src/content/_includes/layouts/archive.njk b/src/content/_includes/layouts/archive.njk new file mode 100644 index 0000000..fb89de0 --- /dev/null +++ b/src/content/_includes/layouts/archive.njk @@ -0,0 +1,30 @@ +--- +layout: layouts/base.njk +bodyClass: body-tag +--- +

{{ title }}

+ +{% set postslist = results %} +{% include "templates/postslist.njk" %} + +
+ + \ No newline at end of file diff --git a/src/content/_includes/layouts/base.njk b/src/content/_includes/layouts/base.njk new file mode 100644 index 0000000..261801a --- /dev/null +++ b/src/content/_includes/layouts/base.njk @@ -0,0 +1,41 @@ + + + + + + + {{ title or site.title }} + + + + + + + + +
+ {{ content | safe }} +
+ + + + diff --git a/src/content/_includes/layouts/home.njk b/src/content/_includes/layouts/home.njk new file mode 100644 index 0000000..be3d5f0 --- /dev/null +++ b/src/content/_includes/layouts/home.njk @@ -0,0 +1,6 @@ +--- +layout: layouts/base.njk +bodyClass: body-home +--- + +{{ content | safe }} diff --git a/src/content/_includes/layouts/post.njk b/src/content/_includes/layouts/post.njk new file mode 100644 index 0000000..1794dd5 --- /dev/null +++ b/src/content/_includes/layouts/post.njk @@ -0,0 +1,43 @@ +--- +layout: layouts/base.njk +bodyClass: body-post +--- +
+
+

{{ title }}

+ + + + +
+ +
+ {{ content | safe }} +
+
+ +
+ + \ No newline at end of file diff --git a/src/content/_includes/layouts/tag.njk b/src/content/_includes/layouts/tag.njk new file mode 100644 index 0000000..3535475 --- /dev/null +++ b/src/content/_includes/layouts/tag.njk @@ -0,0 +1,14 @@ +--- +layout: layouts/base.njk +bodyClass: body-tag +--- +
+

Tagged “{{ tag }}”

+ + {% set postslist = search.pages("'" + tag + "'") %} + {% include "templates/postslist.njk" %} + +
+ +

See all tags.

+
\ No newline at end of file diff --git a/src/content/_includes/templates/carousel.njk b/src/content/_includes/templates/carousel.njk new file mode 100644 index 0000000..c4888ff --- /dev/null +++ b/src/content/_includes/templates/carousel.njk @@ -0,0 +1,50 @@ + \ No newline at end of file diff --git a/src/content/_includes/templates/carousel_card.njk b/src/content/_includes/templates/carousel_card.njk new file mode 100644 index 0000000..2f170ce --- /dev/null +++ b/src/content/_includes/templates/carousel_card.njk @@ -0,0 +1,27 @@ +
+
+
+ {{ post.data.title }} +
+
+ {{ post.data.description }} +
+
+ + + {% for tag in post.data.tags %} + {% set page = search.page("type=tag tag='" + tag + "'") %} + {% if page %} + + {{ tag }} + + {% endif %} + {% endfor %} +
+
+ + + +
\ No newline at end of file diff --git a/src/content/_includes/templates/postslist.njk b/src/content/_includes/templates/postslist.njk new file mode 100644 index 0000000..b577fd5 --- /dev/null +++ b/src/content/_includes/templates/postslist.njk @@ -0,0 +1,24 @@ + diff --git a/src/content/about.md b/src/content/about.md new file mode 100644 index 0000000..408f2ff --- /dev/null +++ b/src/content/about.md @@ -0,0 +1,36 @@ +--- +layout: layouts/post.njk +title: Sobre nosotros +templateClass: tmpl-post +menu: + visible: true + order: 3 +--- +# IEEE-USM-SB + +El IEEE de la Universidad Técnica Fedrico Santa María (IEEE-USM-SB), nació el 30 de Mayo de 1986, día en que fue reconocida oficialmente por ese organismo internacional. A partir de su formación se ha destacado por complementar la formación del estudiante de ingeniería mediante la organización de numerosos eventos, entre los cuales los ICX'89-'91 y SEIN-'89-'90 están considerados dentro de los más exitosos, sin desmerecer el IEEExpo-'95 o G-Line y numerosos cursos, tutoriales y charlas que semestre a semestre se organizan en nuestra rama. + +Nuestra Directiva + + +## Sobre la IEEE + +Fundado el año 1884 por Alexander Graham Bell, el Instituto de Ingenieros Eléctricos y Electrónicos (IEEE) es la sociedad técnica profesional más grande del Mundo, devota al avance de la teoría y aplicación de la ingeniería eléctrica, electrónica y computacional. + +Sobre 350.000 ingenieros eléctricos, electrónicos, científicos y estudiantes, en aproximadamente 150 países son los que hoy forman el instituto. + +El instituto promueve el desarrollo de electrotecnologías y ciencias aliadas por medio de la aplicación de estas tecnologías para el beneficio de la humanidad, el mejoramiento del conocimiento de la profesión y la capacitación de sus miembros. + +## Ramas Estudiantiles + +El IEEE posee, como una forma de fomentar el conocimiento, ramas estudiantiles en los principales centros de estudio en el mundo. De esta forma logran que el conocimiento este al alcance de todos los futuros profesionales. + +Estas Ramas Estudiantiles no solo son un puente entre el IEEE y los estudiantes, sino que también fomentan las capacidades de organización de cada uno de sus miembros. + +## Algunos Beneficios + +Al inscribirse al Instituto, automáticamente obtiene una suscripción a la prestigiosa revista Magazine "Spectrum", además de la posibilidad de suscribirse a cualquiera de las publicaciones que periodicamente publica el IEEE a un muy bajo costo. + +Obtienes precios preferenciales a la mayoria de los Congresos, Cursos y similares actividades, además de una gran cantidad de productos, descuentos, etc. para los miembros de determinados países. + + \ No newline at end of file diff --git a/src/content/archive.tmpl.js b/src/content/archive.tmpl.js new file mode 100644 index 0000000..aa0f51f --- /dev/null +++ b/src/content/archive.tmpl.js @@ -0,0 +1,28 @@ +export const layout = "layouts/archive.njk"; +export const title = "Archive"; + +export default function* ({ search, paginate }) { + const posts = search.pages("type=posts", "date=desc"); + + for ( + const data of paginate(posts, { url, size: 10 }) + ) { + // Show the first page in the menu + if (data.pagination.page === 1) { + data.menu = { + visible: true, + order: 3, + }; + } + + yield data; + } +} + +function url(n) { + if (n === 1) { + return "/posts/"; + } + + return `/posts/${n}/`; +} diff --git a/src/content/chapters.njk b/src/content/chapters.njk new file mode 100644 index 0000000..c9769dd --- /dev/null +++ b/src/content/chapters.njk @@ -0,0 +1,12 @@ +--- +layout: layouts/post.njk +title: Chapters +templateClass: tmpl-post +menu: + visible: true + order: 1 +--- + +SSCS/CAS/EDS +Computer Society +Power and Energy Systems \ No newline at end of file diff --git a/src/content/img/logo.jpg b/src/content/img/logo.jpg new file mode 100644 index 0000000..c134c13 --- /dev/null +++ b/src/content/img/logo.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07880ae9c194565faafc6cce55a8d7be6ad77c38e4322a3c4b7364142cc9a633 +size 118549 diff --git a/src/content/img/posts/20230701_canelos_img.jpg b/src/content/img/posts/20230701_canelos_img.jpg new file mode 100644 index 0000000..bd418cd --- /dev/null +++ b/src/content/img/posts/20230701_canelos_img.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4bb61a59e8b4ab454552951ba1900f75c562370145f2b52ba94741a44854054 +size 108512 diff --git a/src/content/img/posts/20230701_canelos_photo_1.jpg b/src/content/img/posts/20230701_canelos_photo_1.jpg new file mode 100644 index 0000000..32a1433 --- /dev/null +++ b/src/content/img/posts/20230701_canelos_photo_1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10bfd26be0f8840cfd0e0e2a9aebd07b7aefa0666244fb52d28f9b84cdb92516 +size 61272 diff --git a/src/content/img/posts/20230701_canelos_photo_2.jpg b/src/content/img/posts/20230701_canelos_photo_2.jpg new file mode 100644 index 0000000..5b820db --- /dev/null +++ b/src/content/img/posts/20230701_canelos_photo_2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64edfc67d8e761237c4d5007f7d1de7b714d7e9eb5287ae070f3ff4e08cee89c +size 94954 diff --git a/src/content/img/posts/20230825_rnr.jpg b/src/content/img/posts/20230825_rnr.jpg new file mode 100644 index 0000000..9a2b9d2 --- /dev/null +++ b/src/content/img/posts/20230825_rnr.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32783739d0bfc112e8477dc834c91c8e6cbf42644c0c71f0826ce037d56df24d +size 209531 diff --git a/src/content/index.njk b/src/content/index.njk new file mode 100644 index 0000000..fd4c40a --- /dev/null +++ b/src/content/index.njk @@ -0,0 +1,30 @@ +--- +layout: layouts/home.njk +menu: + visible: true + title: Home + order: 0 +--- +
+ +{% set postslist = search.pages("type=posts", "date=desc", 3) %} + +{%if postslist.length %} + {% include "templates/carousel.njk" %} +{% endif %} + +

Latest {% if postslist.length == 1 %}Post{% else %}{{ postslist.length }} Posts{% endif %}

+ +{% include "templates/postslist.njk" %} + +
+ +{% set postslist = search.pages("pinned=true") %} + +{%if postslist.length %} +

Pinned Post:

+ {% include "templates/postslist.njk" %} +
+{% endif %} + +

More posts can be found in the archive.

diff --git a/src/content/posts/20230701_canelos.md b/src/content/posts/20230701_canelos.md new file mode 100644 index 0000000..7bd8005 --- /dev/null +++ b/src/content/posts/20230701_canelos.md @@ -0,0 +1,12 @@ +--- +title: CANELOS +description: CAD and Nanoelectronics Seminar +date: 2023-08-25 +tags: + - chipusm sscs-cas-eds-sb +image: img/posts/20230701_canelos_photo_1.jpg +--- + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam placerat pulvinar sagittis. Suspendisse commodo, erat ac tincidunt bibendum, tortor quam imperdiet eros, at vestibulum eros urna a eros. Phasellus quis placerat magna. Donec convallis placerat risus, eu venenatis felis dignissim vel. Praesent vel varius urna. Suspendisse potenti. Phasellus consequat elementum dui nec accumsan. Mauris suscipit lorem dolor, eu ultrices orci vulputate id. + +Proin quis lacus dolor. Sed eu metus malesuada, tempus turpis ut, egestas ex. Vestibulum pulvinar tempor nunc, lobortis iaculis nulla ornare vel. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent odio metus, venenatis sit amet aliquam eget, tincidunt lacinia nulla. Aenean a gravida nunc. Pellentesque commodo mi sit amet mauris maximus efficitur. Quisque ullamcorper dapibus quam quis vehicula. Morbi gravida sagittis nisi vitae faucibus. Sed tempor felis non laoreet tincidunt. Integer dolor nulla, tincidunt non purus a, consectetur volutpat lectus. In hac habitasse platea dictumst. Cras sed vulputate tortor, vitae sodales nisl. Nam laoreet ante non sagittis cursus. Phasellus et magna vitae mi interdum tempus. Fusce consectetur augue sit amet lectus rhoncus, non sollicitudin metus sodales. \ No newline at end of file diff --git a/src/content/posts/20230825_rnr.md b/src/content/posts/20230825_rnr.md new file mode 100644 index 0000000..3b40fc1 --- /dev/null +++ b/src/content/posts/20230825_rnr.md @@ -0,0 +1,18 @@ +--- +title: RNR Chile USACH/UDP +description: Asistencia RNR 2023 +date: 2023-08-25 +tags: + - utfsm-sb +image: img/posts/20230825_rnr.jpg +--- + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam placerat pulvinar sagittis. Suspendisse commodo, erat ac tincidunt bibendum, tortor quam imperdiet eros, at vestibulum eros urna a eros. Phasellus quis placerat magna. Donec convallis placerat risus, eu venenatis felis dignissim vel. Praesent vel varius urna. Suspendisse potenti. Phasellus consequat elementum dui nec accumsan. Mauris suscipit lorem dolor, eu ultrices orci vulputate id. + +Proin quis lacus dolor. Sed eu metus malesuada, tempus turpis ut, egestas ex. Vestibulum pulvinar tempor nunc, lobortis iaculis nulla ornare vel. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent odio metus, venenatis sit amet aliquam eget, tincidunt lacinia nulla. Aenean a gravida nunc. Pellentesque commodo mi sit amet mauris maximus efficitur. Quisque ullamcorper dapibus quam quis vehicula. Morbi gravida sagittis nisi vitae faucibus. Sed tempor felis non laoreet tincidunt. Integer dolor nulla, tincidunt non purus a, consectetur volutpat lectus. In hac habitasse platea dictumst. Cras sed vulputate tortor, vitae sodales nisl. Nam laoreet ante non sagittis cursus. Phasellus et magna vitae mi interdum tempus. Fusce consectetur augue sit amet lectus rhoncus, non sollicitudin metus sodales. + +Suspendisse potenti. Cras eu posuere neque. Nulla blandit nunc in ligula hendrerit euismod. Pellentesque lacinia quam ut orci rhoncus mollis. Nunc varius interdum libero, in cursus diam interdum quis. In egestas, nibh vel lacinia fringilla, lorem dui fermentum tellus, vitae luctus purus libero in augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam id tempus ex. Nam vulputate, purus non ultrices viverra, ligula augue molestie enim, nec aliquet dolor massa eu erat. Praesent accumsan felis ut malesuada pellentesque. Donec sem urna, convallis a eleifend at, cursus et felis. Proin scelerisque felis vel fermentum lacinia. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean scelerisque commodo risus, sit amet suscipit leo efficitur sit amet. + +Praesent in diam sed tellus eleifend imperdiet. Aliquam vestibulum at turpis nec congue. Nullam mi justo, accumsan et massa dapibus, pellentesque rhoncus mauris. Praesent at rutrum tellus, vitae sagittis erat. Fusce ultrices, ante et pretium facilisis, neque tellus ultrices felis, vitae sollicitudin tellus odio finibus metus. Nulla semper eu lorem sit amet porttitor. Phasellus consequat augue sed metus hendrerit rutrum. Donec ut mi a dolor ultricies venenatis. Praesent bibendum, tortor vel bibendum efficitur, arcu felis venenatis ipsum, sed porttitor neque diam ut purus. Cras vitae turpis nec neque blandit malesuada. Fusce ultricies cursus auctor. Curabitur augue ante, pharetra sit amet fermentum nec, accumsan a justo. Aliquam orci elit, iaculis at enim sit amet, bibendum ullamcorper sem. + +Vivamus feugiat felis eu neque rhoncus dapibus non sollicitudin dolor. Praesent erat sem, molestie nec volutpat et, commodo sit amet mauris. Duis efficitur laoreet turpis a consequat. Quisque ac ante egestas, pulvinar massa eu, aliquet orci. Curabitur id egestas est. Donec rhoncus pellentesque tellus quis maximus. Sed nec odio sed magna convallis vehicula non nec neque. \ No newline at end of file diff --git a/src/content/posts/_data.yml b/src/content/posts/_data.yml new file mode 100644 index 0000000..bd026d2 --- /dev/null +++ b/src/content/posts/_data.yml @@ -0,0 +1,2 @@ +type: posts +layout: layouts/post.njk \ No newline at end of file diff --git a/src/content/search.tmpl.js b/src/content/search.tmpl.js new file mode 100644 index 0000000..d20ea51 --- /dev/null +++ b/src/content/search.tmpl.js @@ -0,0 +1,25 @@ +export const url = "/search.json"; + +export default function ({ search }, { url }) { + const result = []; + + // Search tags + for (const tag of search.tags("type=posts")) { + result.push({ + label: `Tag: ${tag}`, + search: tag, + value: url(`/tags/${tag}/`), + }); + } + + // Search posts + for (const post of search.pages("type=posts")) { + result.push({ + label: post.data.title, + search: `${post.data.title} ${post.data.tags.join(" ")}`, + value: url(post.data.url), + }); + } + + return JSON.stringify(result); +} diff --git a/src/content/styles.css b/src/content/styles.css new file mode 100644 index 0000000..ef34d45 --- /dev/null +++ b/src/content/styles.css @@ -0,0 +1,12 @@ +/* Code syntax highlight */ +@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/styles/github-dark.min.css"; + +@import "css/reset.css"; +@import "css/navbar.css"; +@import "css/search.css"; +@import "css/post-list.css"; +@import "css/post.css"; +@import "css/tag.css"; +@import "css/carousel.css"; +@import "css/post-list-banner.css"; +@import "css/fonts.css"; \ No newline at end of file diff --git a/src/content/tag.tmpl.js b/src/content/tag.tmpl.js new file mode 100644 index 0000000..ec3bb58 --- /dev/null +++ b/src/content/tag.tmpl.js @@ -0,0 +1,12 @@ +export const layout = "layouts/tag.njk"; + +export default function* ({ search }) { + for (const tag of search.tags()) { + yield { + url: `/tags/${tag}/`, + title: `Tagged “${tag}”`, + type: "tag", + tag, + }; + } +} diff --git a/src/content/tags.njk b/src/content/tags.njk new file mode 100644 index 0000000..a9f8f28 --- /dev/null +++ b/src/content/tags.njk @@ -0,0 +1,8 @@ +--- +layout: layouts/base.njk +--- +

Tags

+ +{% for page in search.pages("type=tag", "tag") %} + {{ page.data.tag }} +{% endfor %} diff --git a/src/deno.json b/src/deno.json new file mode 100644 index 0000000..ddc662f --- /dev/null +++ b/src/deno.json @@ -0,0 +1,11 @@ +{ + "imports": { + "lume/": "https://deno.land/x/lume@v1.17.3/" + }, + "lock": false, + "tasks": { + "build": "deno task lume", + "serve": "deno task lume -s", + "lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -" + } +} diff --git a/src/server.ts b/src/server.ts new file mode 100644 index 0000000..3b61169 --- /dev/null +++ b/src/server.ts @@ -0,0 +1,18 @@ +import Server from "lume/core/server.ts"; +import expires from "lume/middlewares/expires.ts"; +import notFound from "lume/middlewares/not_found.ts"; + +const server = new Server({ + port: 8000, + root: `${Deno.cwd()}/_site`, +}); + +server.use(expires()); +server.use(notFound({ + root: `${Deno.cwd()}/_site`, + page404: "/404.html", +})); + +server.start(); + +console.log("Listening on http://localhost:8000");