Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Reorganize shared folder and update guide for authors #52

Merged
merged 57 commits into from
Feb 20, 2020
Merged

Conversation

nokome
Copy link
Member

@nokome nokome commented Feb 17, 2020

This attempts to finally close #25 with a reorganization of the src/shared repo and some guidelines and examples for theme authors. It will add two new themes

  • bootstrap: an example of bootstrapping a theme from an existing stylesheet (as with elife theme)
  • zombie: an example of a theme that relies heavily on the styles defined in shared (cf. skeleton which does not at all)

@davidcmoulton @alex-ketch This is still WIP but I wanted to make you aware of it. Especially the use of the shared/js/dom functions to modify the DOM as needed to apply an existing stylesheet: https://github.com/stencila/thema/pull/52/files#diff-4b8a23a18d6432149ae65d5eca083717R1

The to do list for this PR:

  • Document more fully when and how to use index.{js|ts} and functions
  • Get npm run lint:styles to pass
  • Flesh out the styles in src/shared/styles/types and use them in zombie

@nokome nokome marked this pull request as ready for review February 19, 2020 01:12
@nokome
Copy link
Member Author

nokome commented Feb 19, 2020

After some discussion on the pros and cons of alternative approaches, @alex-ketch and I agreed that it would be best not to have shared/styles. Instead, we will "flesh out" skeleton (maybe it needs a different name) so that (a) it has some reasonable defaults and is not just empty placeholders and (b) that many / most of those defaults will be variables that will allow that theme to be easily extended as new themes. The related shared/mixins can also be removed.

@nokome nokome merged commit bf940bb into next Feb 20, 2020
@nokome nokome deleted the shared-revamp branch February 20, 2020 01:43
@stencila-ci
Copy link
Collaborator

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theme authoring best practices
2 participants