GithubHelp home page GithubHelp logo

Update icons? about perfcascade HOT 12 CLOSED

micmro avatar micmro commented on June 8, 2024
Update icons?

from perfcascade.

Comments (12)

tobli avatar tobli commented on June 8, 2024 2

I have a PR coming up for enabling mime icons and indicator icons separately. Just needs some cleanup to submit.

from perfcascade.

micmro avatar micmro commented on June 8, 2024 1

from perfcascade.

micmro avatar micmro commented on June 8, 2024

I had just quickly thrown them together myself and I'm not quite a designer, so I don't feel attachment to them :). Would be great if you can source some that work with the repos MIT license.
Just let me know if you need my help with anything.

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

Cool, I'll do that when I get back home in a week or so. Would love a release before that though with the changes we have + possible more horizontal lines, if you have time :)

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

@beenanner @tobli have you seen any good svg icons we could use?

from perfcascade.

beenanner avatar beenanner commented on June 8, 2024

I did a quick search on http://www.iconninja.com/, but didn't find any as clean as what you found @soulgalore.

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

Maybe we can use Font Awesome and then when 5.0 upgrade to the latest? https://github.com/encharm/Font-Awesome-SVG-PNG/tree/master/black/svg Haven't mapped everything yet though.

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

@micmro I need your help on this, I got totally stuck on my lack of SVG skills. I've tried adding some of the svgs in https://github.com/encharm/Font-Awesome-SVG-PNG/tree/master/black/svg but however I do they are just tooo big?

from perfcascade.

micmro avatar micmro commented on June 8, 2024

Hi @soulgalore, where do you try to add them? To src/ts/helpers/icons.ts?

Looking at one it looks like you have to remove or change the width, height and viewbox in the <svg width="1792" height="1792" viewBox="0 0 1792 1792" viewBox="0 0 1792 1792 part .

If you let me know which ones you want to use where I could also add them for you.

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

Hey @micmro yes, that's how I tried but somehow the path element has the size inside? Like if I take the path element only of one of the icons and then change one icon in icons.ts it just get too big and with wrong offset?

from perfcascade.

micmro avatar micmro commented on June 8, 2024

Sorry, looks like I was wrong, you need to maintain the viewBox, you could do it like this:

  const parser = new DOMParser()
  let test = `<svg x="${x}" y="${y}" width="18" height="18" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
      <g class="icon icon-no-tls" transform="scale(${scale})">
        <!-- start custom -->
        <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h896q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-640q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h640q26 0 45 19t19 45z"/>
        <!-- end custom -->
      </g>
    </svg>`

  const doc = parser.parseFromString(test, "image/svg+xml")
  return doc.firstChild as SVGElement

but thats not super clean, I think using Inkscape (free OSS) or Illustrator to resize it to the baseline size of 18px by 18px (same as other icons) first would be better, than you can use the same pattern as the other icons.

Just found a guide for Inkscape resizing here.

from perfcascade.

soulgalore avatar soulgalore commented on June 8, 2024

cool, thanks! I'll test it tonight! think @tobli has an PR coming to restructure the icons.

from perfcascade.

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.