all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Recommended way of packaging web themes
@ 2023-11-08 23:10 Luis Felipe
  2023-11-08 23:44 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Felipe @ 2023-11-08 23:10 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1690 bytes --]

Hi,

With "web theme" I mean a directory containing CSS, JavaScript, images 
and other files that define a particular look and feel for a website, 
web application or other kinds of products that use web technologies.

For example, I'm looking into packaging the current Guix's website theme 
and a new theme that I've been planning to develop (based on the 
former). If these were packaged, I think it would be easier for other 
Guix websites and services (e.g. CI, QA, DATA) to use them and hopefully 
achieve a more uniform look and feel for the network of Guix web fronts.

I've experimented a bit and packaged both themes:

https://codeberg.org/luis-felipe/guix-channel-x/src/branch/trunk/luflac-x/packages/web-themes.scm

Once installed, I can access both themes from a custom path indicated by 
a non-standard environment variable (WEB_THEMES_PATH, currently set by 
the defined packages):

#+begin_example
❯ guix shell -L luflac-x guile guix-website-theme-initial 
guix-website-theme-aureus
❯ guile
...
 > (getenv "WEB_THEMES_PATH")
$1 = "/gnu/store/gc0szk5h3s45d605ikzyxxxc4z2b9l3l-profile/www/themes"
 > (define guix-icon-path (string-append $1 "/aureus/base/img/icon.svg"))
 > (file-exists? guix-icon-path)
$2 = #t
#+end_example

However, while this seems to work alright, I'm not confident it is the 
right thing to do...

How would you recommend packaging these kinds of themes?

Are there any standard paths and environment variables for web themes? 
Or should one use Freedesktop.org's XDG_DATA_DIRS and their specified 
locations instead?

Thanks in advance,

-- 
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Recommended way of packaging web themes
  2023-11-08 23:10 Recommended way of packaging web themes Luis Felipe
@ 2023-11-08 23:44 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2023-11-09  7:56   ` Tomas Volf
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2023-11-08 23:44 UTC (permalink / raw)
  To: Luis Felipe, guix-devel

Hi Felipe,

On Wed, Nov 08 2023, Luis Felipe wrote:

> I'm looking into packaging the current Guix's website theme 
> [...] I think it would be easier for other 
> Guix websites and services (e.g. CI, QA, DATA) to use them and hopefully 
> achieve a more uniform look and feel for the network of Guix web fronts.

Could you simply publish the resources online (except Javascript, of
course) so any site can use them?

It would be similar to Google Fonts. [1]

Then I would package the resources being served in such a way that
anyone can easily set up a second server.

Kind regards
Felix

[1] https://fonts.google.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Recommended way of packaging web themes
  2023-11-08 23:44 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2023-11-09  7:56   ` Tomas Volf
  2023-11-09 15:11     ` Luis Felipe
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2023-11-09  7:56 UTC (permalink / raw)
  To: Felix Lechner; +Cc: Luis Felipe, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

On 2023-11-08 15:44:46 -0800, Felix Lechner via Development of GNU Guix and the GNU System distribution. wrote:
> Hi Felipe,
> 
> On Wed, Nov 08 2023, Luis Felipe wrote:
> 
> > I'm looking into packaging the current Guix's website theme 
> > [...] I think it would be easier for other 
> > Guix websites and services (e.g. CI, QA, DATA) to use them and hopefully 
> > achieve a more uniform look and feel for the network of Guix web fronts.
> 
> Could you simply publish the resources online (except Javascript, of
> course) so any site can use them?

If that will be done, please try to provide a versioned, well, version as well,
so that subresource integrity can be used.

> 
> It would be similar to Google Fonts. [1]
> 
> Then I would package the resources being served in such a way that
> anyone can easily set up a second server.
> 
> Kind regards
> Felix
> 
> [1] https://fonts.google.com/
>

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Recommended way of packaging web themes
  2023-11-09  7:56   ` Tomas Volf
@ 2023-11-09 15:11     ` Luis Felipe
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Felipe @ 2023-11-09 15:11 UTC (permalink / raw)
  To: Felix Lechner, guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 900 bytes --]

Hi Felix, Tomas,

El 9/11/23 a las 7:56, Tomas Volf escribió:
> On 2023-11-08 15:44:46 -0800, Felix Lechner via Development of GNU Guix and the GNU System distribution. wrote:
>> Hi Felipe,
>>
>> On Wed, Nov 08 2023, Luis Felipe wrote:
>>
>>> I'm looking into packaging the current Guix's website theme
>>> [...] I think it would be easier for other
>>> Guix websites and services (e.g. CI, QA, DATA) to use them and hopefully
>>> achieve a more uniform look and feel for the network of Guix web fronts.
>> Could you simply publish the resources online (except Javascript, of
>> course) so any site can use them?
> If that will be done, please try to provide a versioned, well, version as well,
> so that subresource integrity can be used.
Thanks, I'll explore that path instead: simply serving them and using 
Cross-Origin Resource Sharing (CORS) and Subresource Integrity (SRI).

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-09 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-08 23:10 Recommended way of packaging web themes Luis Felipe
2023-11-08 23:44 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-11-09  7:56   ` Tomas Volf
2023-11-09 15:11     ` Luis Felipe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.