Hi Ricardo,

Thanks for the helpful answer. Now I almost figured out how to serve static
files.

I have committed the first HTML template page (with table of specifications
stored in the database) to web-interface branch. Can you please review it?

I am a bit confused about the database structure. As far as I understand,
there are project_name (project) and branch_name (jobset) properties, but
project_name is a primary key, so a project can't have several branches?

I'm working on static file serving but I don't know how to set the path of
the static file directory. Now I just wrote my absolute path to the
style.css file. So, I have two questions. 1. Where should I place the
static files? 2. How can I execute getcwd function (as you do it in
rcas-web/rcas/config.scm.in)? I tried to add something like

(define-public %current-directory
`(,(getcwd)))

to my config.scm.in but it does not work.

Best regards,
Tatiana Sholokhova

2018-05-22 8:33 GMT+03:00 Ricardo Wurmus <rek...@elephly.net>:

>
> Hi Tatiana,
>
> > I have already created a small module implementing basic HTML templates
> in
> > Scheme. Also, I have made an extension to the Cuirass Web API. It
> responds
> > on the "/status" request and generates a page with a minimalistic HTML
> > table displaying the list of specifications stored in the database.
>
> Excellent.
>
> > My login on Savannah is "TSholokhova". I am looking forward to making my
> > first commit. I would be glad to receive comments on my code to be sure
> > that I am moving in the right direction.
>
> The Cuirass repository is available at
> http://git.savannah.gnu.org/cgit/guix/guix-cuirass.git
>
> I have added your account to the group, so you should have write access
> to the repository now.  Please push your commits to a new branch on that
> repository.  Please also read the section “Coding Style” in the Guix
> manual.
>
> You are welcome to rewrite your own published commits in your own
> branch, but not in other branches.  When you want us to comment on your
> work, please let us know the range of commits that you would like us to
> review.  Ideally, we would be able to merge your work into the “master”
> branch regularly.
>
> > You have mentioned that many users would prefer an interface working
> > without javascript running. Am I right that we would like to have a
> > non-interactive (js-free) interface working and also add some
> functionality
> > (e. g. search tools for tables) via javascript?
>
> Yes, this sounds like a good idea.  It is not absolutely necessary, but
> it would be nice if basic features of the interface would still be
> usable even when JavaScript is disabled.
>
> > Also, I have a couple of questions regarding the frontend part. What
> > frontend framework we would prefer? If I get it right, Hydra uses
> > Bootstrap.
>
> It is fine to use Bootstrap.  Please include the unminified Bootstrap
> CSS and JS files to the repository.  It is easy to minify them later,
> but it is virtually impossible to turn minified code into something
> readable.
>
> > For the frontend implementation, we need to include some static
> > css&js files in the interface and serve them somehow. Is it a good idea
> to
> > serve the static files by Cuirass web server in Scheme?
>
> Yes, this can be done by the Cuirass web server in Scheme.
>
> In the web interface for RCAS I’m dispatching to “render-static-asset”
> in the controller:
>
>     https://github.com/BIMSBbioinfo/rcas-web/blob/
> master/rcas/web/controller.scm
>
> “render-static-asset” is defined here:
>
>     https://github.com/BIMSBbioinfo/rcas-web/blob/
> master/rcas/web/render.scm#L65
>
> As you can see, this module defines a bunch of mime types and includes
> the appropriate type in the headers along with the contents of the file
> it serves.
>
> Hope this helps!
>
> --
> Ricardo
>
>
>

Reply via email to