Implement custom theming #17

Closed
opened 2022-08-26 07:44:56 +00:00 by emma · 7 comments
Owner

I'd like to implement trinity's javascript sheet selector. Here's the relevant page on their site.

I'd like to implement [trinity's javascript sheet selector](http://www.trinity.moe/js/sheets.js). [Here's the relevant page](https://trinity.moe/css/) on their site.
emma added the
enhancement
label 2022-08-26 07:45:08 +00:00
emma self-assigned this 2022-08-26 07:45:45 +00:00
sashakoshka was assigned by emma 2022-08-26 07:45:45 +00:00
Author
Owner

I'm going to rewrite some of the site to use divs so that theming is more intuitive.

I'm going to rewrite some of the site to use divs so that theming is more intuitive.
Owner

oops my bad. i need to change the colors of these buttons i thought it was a cancel button

oops my bad. i need to change the colors of these buttons i thought it was a cancel button
emma added a new dependency 2022-08-29 21:23:23 +00:00
emma added a new dependency 2022-08-29 21:23:28 +00:00
emma added a new dependency 2022-08-29 21:23:41 +00:00
emma added a new dependency 2022-08-29 21:23:48 +00:00
Owner

@emma what are the dependencies for?

@emma what are the dependencies for?
Author
Owner

@emma what are the dependencies for?

I want to implement those before I start work on this.

> @emma what are the dependencies for? I want to implement those before I start work on this.
Owner

@emma what are the dependencies for?

I want to implement those before I start work on this.

But is this absolutely necessary? If not, the dependencies aren't either.

Maybe we can convey priority some other way? Maybe project boards with different columns for high versus low priorities.

> > @emma what are the dependencies for? > > I want to implement those before I start work on this. But is this absolutely necessary? If not, the dependencies aren't either. Maybe we can convey priority some other way? Maybe project boards with different columns for high versus low priorities.
Author
Owner

@emma what are the dependencies for?

I want to implement those before I start work on this.

But is this absolutely necessary? If not, the dependencies aren't either.

Maybe we can convey priority some other way? Maybe project boards with different columns for high versus low priorities.

It doesn't really need to be conveyed in another way if these things need to be done before I do this.

> > > @emma what are the dependencies for? > > > > I want to implement those before I start work on this. > > But is this absolutely necessary? If not, the dependencies aren't either. > > Maybe we can convey priority some other way? Maybe project boards with different columns for high versus low priorities. It doesn't really *need* to be conveyed in another way if these things *need* to be done before I do this.
Owner

The point of sheets.js and cookies.js (both are public domain, changes can be relicensed freely) are to be very simple drop-in scripts that only need a boilerplate change and maybe a bit of love in order to work. css/ is now an m4 file that's generated out into HTML but I think that makes it easier to see the format of the selector (where $1 is the name of the CSS file):

<INPUT ID="$1" NAME="css" TYPE="radio" VALUE="/css/$1.css" />
<LABEL FOR="$1">/css/$1.css</LABEL>
<BR />

Then at the bottom of the selection page:

<input type="button" value="apply" onclick="var selected; if((selected = document.querySelector('input[name=\'css\']:checked')) != null) window.setCookie('sheet', window.setStyling(selected.value));" />

This requires my js/cookies.js, js/sheets.js, and adding the following boilerplate to pages' heads:

<LINK HREF="css/blank.css" ID="styling" REL="stylesheet" />

Or something like that. I could probably do it myself to a website in an hour or so, certainly it would take a lot less time than I did to write these scripts (coming up with them was a pain and it would probably take me about as long to re-implement them).

The point of sheets.js and cookies.js (both are public domain, changes can be relicensed freely) are to be very simple drop-in scripts that only need a boilerplate change and maybe a bit of love in order to work. css/ is now [an m4 file](https://git.sr.ht/~trinity/homepage/tree/main/item/css/index.m4) that's generated out into HTML but I think that makes it easier to see the format of the selector (where `$1` is the name of the CSS file): ```html <INPUT ID="$1" NAME="css" TYPE="radio" VALUE="/css/$1.css" /> <LABEL FOR="$1">/css/$1.css</LABEL> <BR /> ``` Then at the bottom of the selection page: ```html <input type="button" value="apply" onclick="var selected; if((selected = document.querySelector('input[name=\'css\']:checked')) != null) window.setCookie('sheet', window.setStyling(selected.value));" /> ``` This requires my js/cookies.js, js/sheets.js, and adding the following boilerplate to pages' heads: ```html <LINK HREF="css/blank.css" ID="styling" REL="stylesheet" /> ``` Or something like that. I could probably do it myself to a website in an hour or so, certainly it would take a lot less time than I did to write these scripts (coming up with them was a pain and it would probably take me about as long to re-implement them).
emma added this to the Rework site contents project 2022-09-22 00:32:47 +00:00
emma removed a dependency 2022-12-19 00:50:37 +00:00
emma removed the
enhancement
label 2022-12-19 00:50:48 +00:00
emma closed this issue 2022-12-19 00:50:48 +00:00
emma added the
wontfix
label 2022-12-19 00:50:48 +00:00
Sign in to join this conversation.
No Milestone
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: meta/site#17
No description provided.