Giter Site home page Giter Site logo

homelab-svg-assets's Introduction

homelab-svg-assets

Python_Lint Total Icons Repo Size

Latest GitHub Tag Latest Packagist Version Latest NPM Version

Over 300 full-color SVG icons of homelab-related software, products, and brands in a normalized size.

Table of Contents

Usage

⚠️ All users should read the disclaimer before using this project. ⚠️

General usage

Icons as SVGs are available in the assets directory. See ICONS.md for a preview of all icons.

Diagrams.net usage

In a Diagrams.net project, go to File-->Open Library from-->URL and paste in the URL below (it will take a second to load)

https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/homelab-svg-assets.xml

You can also start brand new project with the library built-in to the URL by using this link (also below)

https://app.diagrams.net/?clibs=Uhttps%3A%2F%2Fraw.githubusercontent.com%2Floganmarchione%2Fhomelab-svg-assets%2Fmain%2Fhomelab-svg-assets.xml

If you self-host Diagrams.net (it is available as a Docker container), you can replace the domain with your custom domain

https://drawio.yourdomain.com/?clibs=Uhttps%3A%2F%2Fraw.githubusercontent.com%2Floganmarchione%2Fhomelab-svg-assets%2Fmain%2Fhomelab-svg-assets.xml

CDN usage

Icons are available via jsDelivr.

Replace the icon name as needed. You can also replace latest with a specific version.

<img height="48" width="48" src="https://cdn.jsdelivr.net/npm/@loganmarchione/homelab-svg-assets@latest/assets/linux.svg"/>

PHP usage

Icons are available in PHP as a package on Packagist.

Run composer require loganmarchione/homelab-svg-assets, or add the package to your composer.json file (below)

{
    "require": {
        "loganmarchione/homelab-svg-assets"
    }
}

Icons will be available at ./vendor/loganmarchione/homelab-svg-assets/assets/linux.svg

NPM usage

Icons are available as a package on NPM.

Run npm install @loganmarchione/homelab-svg-assets, or add the package to your package.json file (below)

{
  "dependencies": {
    "@loganmarchione/homelab-svg-assets": "*"
  }
}

Icons will be available at ./node_modules/@loganmarchione/homelab-svg-assets/assets/linux.svg

Hugo usage

There is a go.mod file, so this icon pack can be used as a Hugo module. You need to be using at least Hugo 0.56.0.

In your Hugo site directory, initialize your site as a module:

hugo mod init foo

In your config.yaml (adjust for .json or .toml configuration files), add the section below:

module:
  imports:
    - path: github.com/loganmarchione/homelab-svg-assets
      mounts:
        - source: assets
          target: assets/svg/homelab-svg-assets

Download the module:

hugo mod get -u

Create a shortcode in the location below:

layouts/shortcodes/homelab.html

Copy/paste the following code into the shortcode (you can apply custom CSS using the class blah in the example):

{{/*Get the parameters */}}
{{ $path := (.Get "src") }}

{{/* Concat to create the correct path */}}
{{- $icon := resources.Get (print "svg/homelab-svg-assets/" $path ".svg" ) -}}

<span class="blah">{{- $icon.Content | safeHTML -}}</span>

Finally, in your markdown files, you can reference the icon:

{{< homelab src="linux" >}}

Legal

See DISCLAIMER.md

TODO

See TODO.md

homelab-svg-assets's People

Contributors

loganmarchione avatar

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.