Giter Site home page Giter Site logo

simply007 / kontent-custom-element-font-awesome-selector-svg Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1 MB

This is a custom element for Kentico Kontent that allows you to pick Font Awesome Icon.

License: MIT License

HTML 10.06% CSS 8.19% TypeScript 81.75%
font-awesome kontent custom-element caas kentico-kontent svg react

kontent-custom-element-font-awesome-selector-svg's Introduction

Font Awesome Icon SVG Selector

Stack Overflow Netlify Status

A custom element for Kentico Kontent

This is a custom element for Kentico Kontent that allows you to pick Font Awesome Icon.

Font Awesome Icon SVG Selector

The custom element is storing the svg of the picked icon. As a data storage a local JSON file is used.

💡 If you want to take a look to another approach shat stores the icon codename, take a look to the sibling repository kontent-custom-element-font-awesome-selector-codename.

Stored value

{
  ...
  "elements": {
      "custom_element": {
        "type": "custom",
        "name": "Custom element",
        "value": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z\"/></svg>"
      }
    }
  ...
},

Setup

  1. Deploy the code to a secure public host
  2. Follow the instructions in the Kentico Kontent documentation to add the element to a content model.
    • The Hosted code URL is where you deployed to in step 1
    • No JSON parameters are necessary

Deploying

Netlify has made this easy. If you click the deploy button below, it will guide you through the process of deploying it to Netlify and leave you with a copy of the repository in your GitHub account as well.

Deploy to Netlify

Development

You can use following to set up the development environment

Prerequisites:

  • Node.js
  • git
git clone https://github.com/Simply007/kontent-custom-element-font-awesome-selector-svg
cd kc-tui-editor-custom-element
npm install
npm run start

To build for production, run:

npm run build

then deploy the contents of the build folder.


This project was bootstrapped with Create React App.

Team

This project was part of Kentico Kontent Consulting and DevRel hackaton!


Ondřej Chrastina
Github
Twitter

Richard Šustek
Github
 

Yuriy Sountsov
Github
Twitter

Rui Wang
Github
Twitter

kontent-custom-element-font-awesome-selector-svg's People

Contributors

enngage avatar simply007 avatar

Watchers

 avatar  avatar  avatar  avatar

kontent-custom-element-font-awesome-selector-svg's Issues

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.