Proposal: develop possibility to choose between themes #18

Closed
opened 2018-03-05 14:46:59 +00:00 by tammoterhark · 5 comments
tammoterhark commented 2018-03-05 14:46:59 +00:00 (Migrated from github.com)

Why?

As discussed with Harmen: we only release Hypha with one theme: default. But user may want to develop own theme. Currently this can be done by editting the file /data/hypha.css (why in data?).

I think it would be cleaner to make a new directory: /system/themes/default and put all styling in there. When user wants to develop own theme, user can either changes files in /system/themes/default or copy default to /system/themes/[new name] and then change whatever is necessary. Needed: possibility to change to new theme when logged in as admin.

Advantage: whenever user runs into trouble, choosing "default" theme in backend can be used to check if thing are still all right in default theme. So user can check if error is in theme or elsewhere.

Why? As discussed with Harmen: we only release Hypha with one theme: default. But user may want to develop own theme. Currently this can be done by editting the file /data/hypha.css (why in data?). I think it would be cleaner to make a new directory: /system/themes/default and put all styling in there. When user wants to develop own theme, user can either changes files in /system/themes/default or copy default to /system/themes/[new name] and then change whatever is necessary. Needed: possibility to change to new theme when logged in as admin. Advantage: whenever user runs into trouble, choosing "default" theme in backend can be used to check if thing are still all right in default theme. So user can check if error is in theme or elsewhere.
matthijskooijman commented 2018-03-05 16:07:20 +00:00 (Migrated from github.com)

Currently this can be done by editting the file /data/hypha.css (why in data?).

Because it can be edited by the user, and thus is effectively site-specific data (I guess).

One downside of the current approach is that when running from git, making changes to the CSS leaves you with modified files in the git checkout, and conflicts when the CSS is changed in the repository. Having separate user-defined themes would remove the need for modifying the builtin css, which should solve this problem too.

> Currently this can be done by editting the file /data/hypha.css (why in data?). Because it can be edited by the user, and thus is effectively site-specific data (I guess). One downside of the current approach is that when running from git, making changes to the CSS leaves you with modified files in the git checkout, and conflicts when the CSS is changed in the repository. Having separate user-defined themes would remove the need for modifying the builtin css, which should solve this problem too.
giplt commented 2018-03-05 16:23:01 +00:00 (Migrated from github.com)

Correct. All system files are (or could be) static, all user editable files are in data. System configuration data in root (/data), page content in subfolders (/data/images, /data/pages etc)

Distinction between a default theme and a user-defined theme seems to be a good approach to me.

Correct. All system files are (or could be) static, all user editable files are in data. System configuration data in root (/data), page content in subfolders (/data/images, /data/pages etc) Distinction between a default theme and a user-defined theme seems to be a good approach to me.
tammoterhark commented 2018-03-05 20:52:51 +00:00 (Migrated from github.com)

The distinction between data and core was misinterpreted by me: I thought data was data.

Maybe an idea:

/system
/user-files
/user-files/themes (for custom themes)
/user-files/data (for pages and settings)
/user-files/data/images

The distinction between data and core was misinterpreted by me: I thought data was data. Maybe an idea: /system /user-files /user-files/themes (for custom themes) /user-files/data (for pages and settings) /user-files/data/images
matthijskooijman commented 2018-03-15 12:41:33 +00:00 (Migrated from github.com)

See #23 for discussion about a different structure.

See #23 for discussion about a different structure.
tammoterhark commented 2018-07-02 08:56:49 +00:00 (Migrated from github.com)

Double

Double
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#18
No description provided.