Giter Site home page Giter Site logo

Comments (12)

hsablonniere avatar hsablonniere commented on July 16, 2024

I kinda have the same problem for my web dev courses. I'm not sure how we could handle that. The hole point of dzslides is to have a one document model. But for code reuse purpuses it would be useful to have a dzslides.js.

@paulrouget What's your opinion on that ?

from dzslides.

paulrouget avatar paulrouget commented on July 16, 2024

We could provide a non-inline version of dzslides-core. But we can't have 2 places for the same code. The clean solution would be to have 2 files: src/content.html and src/core.html and we would concatenate these 2 files into one: dist/template.html. We could use a simple Makefile to do that. But well, we would then introduce a compilation phase.

I think it's more important to keep the usage of dzslides very simple. So let's just make sure the header of the code never change.

How does that sound?

from dzslides.

hsablonniere avatar hsablonniere commented on July 16, 2024

Humm, it think there's some room for a compilation phase on github contributors side. A lot of JS librairies provide a minified version and a "developement" version. Our "developement" version which is our current template.html file would be the "get started" template.

There would be two ways for users to approach DZSlides :

I download template.html and replace examples with my contents. Reasons :

  • I just want to make a presentation.

I download dzslides-min.js and dzslides-min.css. Reasons :

  • I want to make several presentations that have a meaning together, because I'm a teacher, a recurrent speaker or something else. Therefore I need to avoid copy paste of my own styles and DZSlides core.
  • My usage of DZSlides is part of another project like http://johnmacfarlane.net/pandoc or http://txt2tags.org/ and I need a way to include easily the code styles and scripts.

I don't think it would spoil the usage. We just need a simple build tool to create the minified version of the styles and script.

How does that sound?

from dzslides.

paulrouget avatar paulrouget commented on July 16, 2024

I see. But that makes usage and contributions a little more complicated. I want to make sure people understand that template.html is self-contained. Proposing 2 additional files or script can be confusing.

I believe that if someone wants to get external JS and CSS files, that can very easily do it from the current code.

Here is another option: we can keep a CSS and a JS files in another branch, and promote this branch in the core block-comment. We could even use gh-pages then people could use github as a CDN.

from dzslides.

hsablonniere avatar hsablonniere commented on July 16, 2024

I like the gh-pages approach. It would be the repo owner responsability to build and provide tagged and minified static files : dzslides.min.js and dzslides.min.css for each version throught the gh-pages.

Even if we talk about v2, we don't really have a detailed version system. We'll need one. Github provides milestones, we should use it.

Should this be done on your repo or mine?

from dzslides.

paulrouget avatar paulrouget commented on July 16, 2024

I would not be rushing on that for now.

If we introduce versionning for gh-pages, we'll need to do the same for master, which can be a little overkill for now. What if we stick we our current system (no versionning, only one file, no special branch), and we see how things go after the "v2" release?

Also, how do other project work?

from dzslides.

hsablonniere avatar hsablonniere commented on July 16, 2024

Yeah I totally agree, I was talking a but future (post v2) organization.

What do you mean by other project work? I worked a little for momentjs and they have a make file using node and uglify js for minification. They often provide the min version on the master branch but I think your idea of keeping it on gh-pages is the right choice.

Once we have @reagle opinion on that we'll let this issue open on the side and resume it after v2.

from dzslides.

paulrouget avatar paulrouget commented on July 16, 2024

perfect :)

from dzslides.

hsablonniere avatar hsablonniere commented on July 16, 2024

For information, someone has done a splitted version of DZSlides : https://github.com/JosePedroDias/dzslides

from dzslides.

reagle avatar reagle commented on July 16, 2024

Just want to note that the pandoc dev chose to support dzslides
because it was all in a single file.

from dzslides.

reagle avatar reagle commented on July 16, 2024

I'm going to close this since I think it served my original "fyi" intentions and the title doesn't reflect the implicit RFE. @hsablonniere, if you wish to open new issue on "modularization of dzslides via external css/js" please do so. (Unless you would prefer I change the title, but then it doesn't really match my original message.)

from dzslides.

hsablonniere avatar hsablonniere commented on July 16, 2024

I create a dedicated issue (#94). Thanks.

from dzslides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.