Subject: [Website] Integral update proposal

From: sirgazil <[email-masked]>
Date: Thu, 8 Jun 2017 14:06:47 -0500

Hi,

I have an incomplete implementation
(https://bitbucket.org/sirgazil/guixsd-website) of a static website that
includes the features illustrated in the mockups (the features that fit
in a static website).

Compared to the current website, this code has a different organization
(see the "Framework" section below). I'm sending this message because I
think this is as far as I can go with the implementation (found some
problems I haven't figured out how to solve, and I'm not skilled enough
to manipulate packages).

This implementation is missing the following parts:

1. New screenshots
2. Packages pages
   1. Package detail page
   2. Packages issues page
   3. Packages reproducibility page
   4. Packages JSON file

To complete part (1) someone could provide the screenshots (ideally
1920×1080 px) in JPG and add them to the "static/media/img" directory,
and update the list of screenshots in "apps/base/data.scm".

To complete (2), there are some package related procedures missing
(https://bitbucket.org/sirgazil/guixsd-website/issues?status=new&status=open).
I tried to use the code that is already in the current website, but
couldn't figure things out.

To complete part (2.1), there is an issue to solve: package pages go in
paths like "/packages/blender-3.0/", but running "haunt build" with
pages on paths that include "." will render the pages with all the HTML
content inside a pre element. David, the maintainer of Haunt, does not
know yet why this would happen. If this issue is solved, there are
already helper builders in "apps/packages/builders.scm" to generate all
the pages.

So, for now, the packages pages are working as in the current website,
but not using tables (to make it easier to adapt the page to several
screen widths), and packages are distributed in numbered pages to avoid
big HTML pages that take too long to load.

Also, the JavaScript code that gets package build status is not
integrated (couldn't figure this one out either).

To complete (2.2), (2.3), and (2.4) someone could add helper builders to
the packages app, and recycle the related SXML pages already used in the
current website.

Framework
=========

The website is composed by apps; for example, a base app, a blog app, a
packages app. An app is a directory with Scheme modules that *usually*
look like this:

apps/abc
├── builder.scm
├── types.scm
├── data.scm
├── utils.scm
└── templates
    ├── components.scm
    ├── some-page.scm
    └── another-page.scm

The builder file contains a Haunt builder procedure and helper builders
that build the web resources of an app. In the types file there are data
type definitions for the app (for example: screenshot, download,
lint-issue, etc.). The data file contains instances of the defined data
types. The utils file contains helper procedures for an application. The
template directory contains SHTML, SXML, SATOM, SJSON templates to build
the web resources provided by an application. The components module in
the templates directory has template components that are used in several
templates or even in other apps.

All apps are "plugged" to the website by adding their builders to the
site object in the "haunt.scm" file.

Currently, there is also an aux app that contains procedures not
particular to any app.

If you have some time, take a look at it and let me know what you think.
I can change *anything* that you think is inefficient, horrible or
whatever. I hope it is not a mess :)

Best,

-- 
https://sirgazil.bitbucket.io/