Giter Club home page Giter Club logo

Comments (2)

crobi avatar crobi commented on September 25, 2024

Good point, they update their icons every couple of days. Even better would be if you could load icons from arbitrary URLs.

I've been experimenting with a different approach of generating the spell cards. The code is available in the web-components branch, and there's a (possibly slightly outdated) online preview.

In this new approach, the icons are not placed via a CSS class and a PNG background image, but instead via a src property of a custom tag. This loads a SVG icon directly from a URL and dynamically inserts it into the HTML. Currently, all icon paths are prefixed with ./icons/ in the generator, so you won't be able to load external icons, but you could try opening this test page and experiment with the icon URL.

Ultimatively, I want to use this new approach of loading icons, but am not sure how to make existing data files backward compatible yet enable external icon URLs at the same time.

from rpg-cards.

lucidobservor avatar lucidobservor commented on September 25, 2024

The preview definitely allows more icons than the currently live version. I
also like the formatting in the Contents section a lot more, so that's
excellent. This definitely serves my purposes, so thank you very much for
that!

I don't have any suggestions for the backwards compatibility, besides the
obvious: allow the importing of data from either format and call that
sufficient.

On Mon, May 4, 2015 at 4:19 PM, Robert Autenrieth [email protected]
wrote:

Good point, they update their icons every couple of days. Even better
would be if you could load icons from arbitrary URLs.

I've been experimenting with a different approach of generating the spell
cards. The code is available in the web-components branch, and there's a
(possibly slightly outdated) online preview
http://crobi.github.io/rpg-cards/generator-next/generate.html.

In this new approach, the icons are not placed via a CSS class and a PNG
background image, but instead via a src property of a custom tag. This
loads a SVG icon directly from a URL and dynamically inserts it into the
HTML. Currently, all icon paths are prefixed with ./icons/ in the
generator, so you won't be able to load external icons, but you could try
opening this test page
http://crobi.github.io/rpg-cards/generator-next/components-test.html
and experiment with the icon URL.

Ultimatively, I want to use this new approach of loading icons, but am not
sure how to make existing data files backward compatible yet enable
external icon URLs at the same time.


Reply to this email directly or view it on GitHub
#33 (comment).

from rpg-cards.

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.