From 58d56dc9dae201d89a4911e125099f1f41780eab Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sat, 5 Dec 2020 22:51:37 +0100 Subject: First version of the website --- templates/_defs.scm | 99 ++++++++++++++++++++++++++++++++++ templates/_logo.svg | 27 ++++++++++ templates/_structure.scm | 0 templates/en/_books.md | 13 +++++ templates/en/_funding.md | 18 +++++++ templates/en/_philosophy.md | 7 +++ templates/en/_programming_in_python.md | 10 ++++ templates/en/_summary.md | 14 +++++ templates/en/_whats_informatics.md | 10 ++++ templates/en/index.html | 84 +++++++++++++++++++++++++++++ templates/es/_books.md | 14 +++++ templates/es/_funding.md | 25 +++++++++ templates/es/_philosophy.md | 9 ++++ templates/es/_programming_in_python.md | 12 +++++ templates/es/_summary.md | 16 ++++++ templates/es/_whats_informatics.md | 11 ++++ templates/es/index.html | 85 +++++++++++++++++++++++++++++ 17 files changed, 454 insertions(+) create mode 100644 templates/_defs.scm create mode 100644 templates/_logo.svg create mode 100644 templates/_structure.scm create mode 100644 templates/en/_books.md create mode 100644 templates/en/_funding.md create mode 100644 templates/en/_philosophy.md create mode 100644 templates/en/_programming_in_python.md create mode 100644 templates/en/_summary.md create mode 100644 templates/en/_whats_informatics.md create mode 100644 templates/en/index.html create mode 100644 templates/es/_books.md create mode 100644 templates/es/_funding.md create mode 100644 templates/es/_philosophy.md create mode 100644 templates/es/_programming_in_python.md create mode 100644 templates/es/_summary.md create mode 100644 templates/es/_whats_informatics.md create mode 100644 templates/es/index.html (limited to 'templates') diff --git a/templates/_defs.scm b/templates/_defs.scm new file mode 100644 index 0000000..ed145b4 --- /dev/null +++ b/templates/_defs.scm @@ -0,0 +1,99 @@ +; Global to the file, use (set! lang "lang") to configure in languages +(define lang "en") + +; UTILS ----------------------------------------------------------------------- +(define (anchored-h level title id) + `(,(string->symbol (string-append "h" (number->string level))) + (@ (id ,id)) + ,title + (a (@ (href ,(string-append "#" id)) (class "anchor")) " ¶" ))) + + +(define (absurl-to-lang url) + (string-append "/" lang url)) + +(define (header-link lr text title link active) + `(a (@ (class ,(string-append (if active "active " " ") + "navbar-link link-" lr)) + (href ,link) + (title ,title)) + ,text)) + +(define (style href) + "Make tags to add CSS" + `(link (@ (rel "stylesheet") + (href ,href)))) + +(define (md markdown-text) + `(@raw ,(md-to-html markdown-text))) + +(define (logo-title) `(h1 (@raw ,(file->string "templates/_logo.svg")))) + +; BASE ------------------------------------------------------------------------ +(define (base title body) + `(html + (@ (lang ,lang)) + (head + (meta (@ (charset "utf-8"))) + (meta (@ (name "viewport") + (content "width=device-width, initial-scale=1"))) + ,(style "/static/css/normalize.css") + ,(style "/static/css/style.css") + ,(style "/static/css/fonts.css") + ,(style "/static/css/extra-style.css") + ,(style "/static/css/publishing.css") + (title ,title)) + (body ,body))) + + +; HEADER----------------------------------------------------------------------- +(define (nav-link l) + (header-link "left" + (cdr (assq 'name l)) + (cdr (assq 'title l)) + (cdr (assq 'absurl l)) + (or (assq 'active l) #f))) + +(define (lang-link l) + (header-link "right" + (cdr (assq 'name l)) + (cdr (assq 'title l)) + (cdr (assq 'absurl l)) + (or (assq 'active l) #f))) + +(define (header links langs) + `(header + (@ (class mainheader)) + (div (@ (class container)) + (nav (@ (class navbar)) + (label (@ (id hamburger-label) + (for "hamburger") + (class "navbar-link link-left")) (@raw "☰")) + (input (@ (id "hamburger") (type checkbox))) + + (div (@ (class navbar-contents)) + (div (@ (class navbar-left)) + ,(map nav-link links)) + + (div (@ (class "navbar-right")) + ,(map lang-link langs))))))) + + +(define (book thickness cover-url extra-classes) + `(div (@ (class "book-container") + (tabindex "0")) + (div (@ (class ,(string-join (append '("book") extra-classes) " ")) + (style ,(string-append + "--book-cover: url(" cover-url ");" + "--book-thickness: " thickness ";"))) + (div (@ (class "_side"))) + (div (@ (class "_side"))) + (div (@ (class "_side"))) + (div (@ (class "_side"))) + (div (@ (class "_side"))) + (div (@ (class "_side")))))) + +(define (link-with-title title url) + `(a (@ (title ,title) + (href ,url)) + ,title)) diff --git a/templates/_logo.svg b/templates/_logo.svg new file mode 100644 index 0000000..b4bb2f3 --- /dev/null +++ b/templates/_logo.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/_structure.scm b/templates/_structure.scm new file mode 100644 index 0000000..e69de29 diff --git a/templates/en/_books.md b/templates/en/_books.md new file mode 100644 index 0000000..6df057b --- /dev/null +++ b/templates/en/_books.md @@ -0,0 +1,13 @@ +All the books are published under the terms of the +[CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) license and have +been published in various formats: paperback, web and an easy to print PDF +file, with the goal of making them available for anyone. + +Digital versions of the books are available in the list below while the +paperback edition can be obtained [contacting +us](https://elenq.tech/en/#contact). + +For those who want to take part in the development, send comments, propose +corrections or even create derivative works, having the sources is more than +interesting. Each book has a link to its Git repository where raw content, +change history, etc. are available. diff --git a/templates/en/_funding.md b/templates/en/_funding.md new file mode 100644 index 0000000..f1e1ffe --- /dev/null +++ b/templates/en/_funding.md @@ -0,0 +1,18 @@ +This project's goal is to make the contents available for everyone, regardless +of their resources. That's why we share the contents online for free and we +even allow the printing of the books using our easy-to-print format. + +On the other hand, the project needs to be sustainable so we can keep making +new books, correcting them, maintaining this website and so on. + +This project is funded selling the books, it would die if nobody paid for them. + +Those who want and have the resources to do it, can support the project buying +physical or digital books. + +Even further, its also possible [to hire ElenQ +Technology](https://elenq.tech/en/#products) for training or as an independent +research and development team. + +For both things, you can contact us with the contact info [you can find +here](https://elenq.tech/en/#contact). diff --git a/templates/en/_philosophy.md b/templates/en/_philosophy.md new file mode 100644 index 0000000..2b6aa5d --- /dev/null +++ b/templates/en/_philosophy.md @@ -0,0 +1,7 @@ +As ElenQ Technology's training, the content of ElenQ Publishing is focused on +teaching the underlaying concepts of subjects in order to create a solid +knowledge basis. From that, the goal is to encourage independent learning. + +On the other hand, the books are mainly focused on Free Software due to its +educational value and social approach, which is part of the [values of ElenQ +Technology](https://elenq.tech/en#ethics). diff --git a/templates/en/_programming_in_python.md b/templates/en/_programming_in_python.md new file mode 100644 index 0000000..9f5b431 --- /dev/null +++ b/templates/en/_programming_in_python.md @@ -0,0 +1,10 @@ +- Level: basic +- Publishing date: 10-08-2020 +- ISBN of the paperback edition: 978-84-122572-1-2 +- Price of the physical book: 30€ +- Available languages and formats: + - Español + - [Easy to print PDF](/books/Programming_in_Python/es/book-simple.pdf) + - [Web](/books/Programming_in_Python/es/web.html) + - [Simple Web](/books/Programming_in_Python/es/web-simple.html) +- [Source repository](https://gitlab.com/ElenQ/Publishing/python) diff --git a/templates/en/_summary.md b/templates/en/_summary.md new file mode 100644 index 0000000..2a57127 --- /dev/null +++ b/templates/en/_summary.md @@ -0,0 +1,14 @@ +*ElenQ Publishing* is a book publishing initiative which goal is to empower +people with high quality material, with free licenses, accessible and published +in their own language. + +The project was born from *ElenQ Technology*'s training service, where we +prepare comprehensive course notes for our students. As we realized the notes +could be interesting for the public, we decided to create a publishing house to +make them available for everyone. In 2020 we launched [a crowdfunding +campaign](https://www.goteo.org/project/elenq-publishing) and with it we +published the first books of the collection. + +Today, with the first two books published, printed and sent to their new homes, +*ElenQ Publishing* is another piece of *ElenQ Technology* that is large enough +to deserve its own space. diff --git a/templates/en/_whats_informatics.md b/templates/en/_whats_informatics.md new file mode 100644 index 0000000..4629c69 --- /dev/null +++ b/templates/en/_whats_informatics.md @@ -0,0 +1,10 @@ +- Level: basic +- Publishing date: 10-08-2020 +- ISBN of the paperback edition: 978-84-122572-0-5 +- Price of the physical book: 15€ +- Available languages and formats: + - Español + - [Printable PDF](/books/What_is_Informatics/es/book-simple.pdf) + - [Web](/books/What_is_Informatics/es/web.html) + - [Simple web](/books/What_is_Informatics/es/web-simple.html) +- [Source repository](https://gitlab.com/ElenQ/Publishing/informatics) diff --git a/templates/en/index.html b/templates/en/index.html new file mode 100644 index 0000000..75c8448 --- /dev/null +++ b/templates/en/index.html @@ -0,0 +1,84 @@ +(define footer +" +The content of this website is published under the terms of [Creative Commons +Attribution Share-Alike 4.0 +International](http://creativecommons.org/licenses/by-sa/4.0/) license unless +otherwise stated. +") + +(define summary (md-to-html (file->string "templates/en/_summary.md"))) +(define philo (md-to-html (file->string "templates/en/_philosophy.md"))) +(define funding (md-to-html (file->string "templates/en/_funding.md"))) + +(define books (md-to-html (file->string "templates/en/_books.md"))) +(define python (md-to-html (file->string "templates/en/_programming_in_python.md"))) +(define informatics (md-to-html (file->string "templates/en/_whats_informatics.md"))) + +(load "templates/_defs.scm") +(set! lang "en") + +(sxml->xml + (base + "ElenQ Publishing" + `(,(header + `(((name . "Technology") + (title . "Engineering - ElenQ Technology") + (absurl . "https://elenq.tech/en/index.html")) + + ((name . "Publishing") + (title . "Publishing House - ElenQ Publishing") + (absurl . ,(absurl-to-lang "/index.html")) + (active . #t))) + + `(((name . "en") + (title . "English") + (absurl . "/en/") + (active . #t)) + ((name . "es") + (title . "Español") + (absurl . "/es/")))) + + + (div (@ (class "content container")) + + ,(logo-title) + + (section (@ (class summary)) + (@raw ,summary)) + + (section + ,(anchored-h 2 "Philosophy" "philosophy") + (@raw ,philo)) + + (section + ,(anchored-h 2 "Books" "books") + (@raw ,books)) + + + ,(anchored-h 3 "What is informatics" "whats-informatics") + (p "This document written by Giacomo Tesio and translated and adapted by Ekaitz + Zarraga aims to describe what is informatics from its origins and create debate + about the ethics around it and the current uses it has. This book serves as + opening and statement of purpose of the whole collection because Giacomo's + ideas match perfectly the goals of ElenQ Publishing even if they were developed + independently.") + (div (@ (class "flex-around-wrap")) + (@raw ,informatics) + ,(book "5px" "/books/What_is_Informatics/es/cover.png" '("type2"))) + + + ,(anchored-h 3 "Programming in Python" "programming-in-python") + (p "Written by Ekaitz Zarraga for his courses, this book is a Python programming + manual that also describes general programming theory in an introductory level.") + (div (@ (class "flex-around-wrap")) + (@raw ,python) + ,(book "13px" "/books/Programming_in_Python/es/cover.png" '("type1"))) + + (section + ,(anchored-h 2 "Funding" "funding") + (@raw ,funding))) + + (footer (@ (class bar-bottom)) + (div (@ (class "container text-center")) + (h6 "ElenQ Technology") + ,(md footer)))))) diff --git a/templates/es/_books.md b/templates/es/_books.md new file mode 100644 index 0000000..3c2a02a --- /dev/null +++ b/templates/es/_books.md @@ -0,0 +1,14 @@ +Todos ellos han sido publicados bajo los términos de la licencia +[CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/deed.es) y se han +preparado para su publicación en varios formatos: se publican en papel, en +formato web y en un archivo de fácil impresión con el fin de que puedan llegar +a cualquiera. + +Las versiones digitales están disponibles en los enlaces dispuestos en cada uno +de los libros de la siguiente lista, mientras que las versiones físicas pueden +adquirirse [contactando con nosotros](https://elenq.tech/es/#contact). + +Para colaborar en el proyecto enviando correcciones o comentarios o para crear +proyectos derivados, tener acceso a la fuente es interesante. Cada uno de los +libros lista además su repositorio de Git público, donde puede verse y +descargarse el contenido en crudo, navegar el histórico de cambios, etc. diff --git a/templates/es/_funding.md b/templates/es/_funding.md new file mode 100644 index 0000000..b5b1431 --- /dev/null +++ b/templates/es/_funding.md @@ -0,0 +1,25 @@ +Este proyecto de publicación tiene como objetivo que cualquier persona pueda +acceder al contenido, independientemente de los recursos de los que disponga. +Es por eso que se permite la consulta e incluso la impresión de los libros. + +Sin embargo, necesita financiarse de modo que podamos seguir dedicando tiempo a +publicar ejemplares, corregirlos, mantener este sitio web y todo el tiempo que +este proceso conlleva. + +Como este proyecto se financia a través de las ventas de los ejemplares, +moriría si la gente sólo se limitara a descargar las versiones que se comparten +aquí. + +Quien así lo desee y pueda permitírselo, puede aportar al proyecto mediante la +compra de un ejemplar físico o digital facilitando así que esta iniciativa siga +adelante. + +O, yendo más allá, también es posible contratar [los +servicios](https://elenq.tech/es/#products) de investigación y desarrollo o de +formación de ElenQ Technology. + +La mejor manera de resolver cualquiera de las dos opciones es contactando con +nosotros. La información de contacto [está disponible +aquí](https://elenq.tech/es/#contact). + + diff --git a/templates/es/_philosophy.md b/templates/es/_philosophy.md new file mode 100644 index 0000000..22e5bfa --- /dev/null +++ b/templates/es/_philosophy.md @@ -0,0 +1,9 @@ +Al igual que la formación en ElenQ Technology, los contenidos de ElenQ +Publishing tienen como objetivo centrarse en los conceptos para aportar una +base fundacional fuerte sobre la que fomentar el aprendizaje autónomo. + +Por otro lado, centran su interés en el software libre debido a su valor +didáctico y a su enfoque social, parte del [compromiso ético de ElenQ +Technology](https://elenq.tech/es#ethics). + + diff --git a/templates/es/_programming_in_python.md b/templates/es/_programming_in_python.md new file mode 100644 index 0000000..833241e --- /dev/null +++ b/templates/es/_programming_in_python.md @@ -0,0 +1,12 @@ +- Nivel: básico +- Fecha de edición: 10-08-2020 +- ISBN de la versión física: 978-84-122572-1-2 +- Precio de la edición física: 30€ IVA(4%) incl. +- Formatos e idiomas disponibles: + - Español + - [PDF imprimible](/books/Programming_in_Python/es/book-simple.pdf) + - [Web](/books/Programming_in_Python/es/web.html) + - [Web simple](/books/Programming_in_Python/es/web-simple.html) +- [Repositorio fuente](https://gitlab.com/ElenQ/Publishing/python) + + diff --git a/templates/es/_summary.md b/templates/es/_summary.md new file mode 100644 index 0000000..4130512 --- /dev/null +++ b/templates/es/_summary.md @@ -0,0 +1,16 @@ +*ElenQ Publishing* es una iniciativa de publicación de libros técnicos del área +de la informática, cuyo fin es empoderar a la ciudadanía con material de +calidad, con licencias libres, accesible y en su propio idioma. + +El proyecto nació de la acción formativa de *ElenQ Technology* a modo de +documentación para los cursos que oferta, pero visto que los apuntes tenían +entidad suficiente y eran interesantes para el público general, se decidió +plantear la creación de una editorial de libros técnicos y en 2020 se lanzó +[una campaña de crowdfunding](https://www.goteo.org/project/elenq-publishing) +para editar los primeros ejemplares. + +Actualmente, con los dos primeros ejemplares ya publicados, impresos y +entregados a los participantes de la campaña, *ElenQ Publishing* es una parte +más de las actividades de *ElenQ Technology* que merece un espacio propio. + + diff --git a/templates/es/_whats_informatics.md b/templates/es/_whats_informatics.md new file mode 100644 index 0000000..3d18243 --- /dev/null +++ b/templates/es/_whats_informatics.md @@ -0,0 +1,11 @@ +- Nivel: básico +- Fecha de edición: 10-08-2020 +- ISBN de la versión física: 978-84-122572-0-5 +- Precio de la edición física: 15€ IVA(4%) incl. +- Formatos e idiomas disponibles: + - Español + - [PDF imprimible](/books/What_is_Informatics/es/book-simple.pdf) + - [Web](/books/What_is_Informatics/es/web.html) + - [Web simple](/books/What_is_Informatics/es/web-simple.html) +- [Repositorio fuente](https://gitlab.com/ElenQ/Publishing/informatics) + diff --git a/templates/es/index.html b/templates/es/index.html new file mode 100644 index 0000000..683a691 --- /dev/null +++ b/templates/es/index.html @@ -0,0 +1,85 @@ +(define footer +" +El contenido de este sitio está publicado bajo los términos de la licencia +[Cretive Commons Atribución Compartir-Igual 4.0 +Internacional](http://creativecommons.org/licenses/by-sa/4.0/deed.es) a no +ser que se especifique lo contrario. +") + +(define summary (md-to-html (file->string "templates/es/_summary.md"))) +(define philo (md-to-html (file->string "templates/es/_philosophy.md"))) +(define funding (md-to-html (file->string "templates/es/_funding.md"))) + +(define books (md-to-html (file->string "templates/es/_books.md"))) +(define python (md-to-html (file->string "templates/es/_programming_in_python.md"))) +(define informatics (md-to-html (file->string "templates/es/_whats_informatics.md"))) + +(load "templates/_defs.scm") +(set! lang "es") + +(sxml->xml + (base + "ElenQ Publishing" + `(,(header + `(((name . "Technology") + (title . "Ingeniería - ElenQ Technology") + (absurl . "https://elenq.tech/es/index.html")) + ((name . "Publishing") + (title . "Editorial - ElenQ Publishing") + (absurl . ,(absurl-to-lang "/index.html")) + (active . #t))) + + `(((name . "en") + (title . "English") + (absurl . "/en/")) + ((name . "es") + (title . "Español") + (absurl . "/es/") + (active . #t)))) + + + (div (@ (class "content container")) + + ,(logo-title) + + (section (@ (class summary)) + (@raw ,summary)) + + (section + ,(anchored-h 2 "Filosofía" "philosophy") + (@raw ,philo)) + + (section + ,(anchored-h 2 "Libros" "books") + (@raw ,books)) + + + ,(anchored-h 3 "¿Qué es la informática?" "whats-informatics") + (p "Escrito por Giacomo Tesio y traducido y adaptado por Ekaitz Zárraga, «¿Qué es + la informática?» trata de describir qué es la informática desde su origen y de + generar reflexión respecto a la ética de ésta y al uso que se le está dando hoy + en día. Este tomo sirve como apertura y como declaración de intenciones ya que + las ideas de Giacomo encajan a la perfección con el objetivo de ElenQ + Publishing, a pesar de haber surgido de forma independiente.") + (div (@ (class "flex-around-wrap")) + (@raw ,informatics) + ,(book "5px" "/books/What_is_Informatics/es/cover.png" '("type2"))) + + + ,(anchored-h 3 "Programación en Python" "programming-in-python") + (p "Escrito por Ekaitz Zárraga como material para sus cursos de formación, este + documento es un manual del lenguaje de programación Python que describe además + fundamentos técnicos de la programación general.") + (div (@ (class "flex-around-wrap")) + (@raw ,python) + ,(book "13px" "/books/Programming_in_Python/es/cover.png" '("type1"))) + + + (section + ,(anchored-h 2 "Financiación" "funding") + (@raw ,funding))) + + (footer (@ (class bar-bottom)) + (div (@ (class "container text-center")) + (h6 "ElenQ Technology") + ,(md footer)))))) -- cgit v1.2.3