Package: markyp-fontawesome
markyp-fontawesomeFont Awesome 5 icons for web pages built withmarkyp-html.InstallationThe project is listed on the Python Package Index, it can be installed simply by executingpip install markyp-fontawesome.Getting startedFont Awesome setupFirst of all, you should acquire a Font Awesome kit codehere.Creating icons formarkyp-htmlwebpagesIf you are not familiar with the basic concepts ofmarkyp, please start by having a look at its documentationhere.The following example code shows the creation of a webpage that displays a large, spinning Python logo over a solid square.# markyp-html webpage elementfrommarkyp_htmlimportwebpage# Font Awesome importsfrommarkyp_fontawesomeimportkit_import,brand,solid,stack,IconStyleasIS# Your Font Awesome kit code.fa_kit_code="a076d05399"page=webpage(# 3x-sized Font Awesome icon stackstack.x3(# Solid square icon for the backgroundsolid("square",class_=IS.stacked_size_2x),# Inverse Python brand icon for the foregroundbrand("python",class_=f"{IS.stacked_size_2x}{IS.inverse}{IS.spin}"),),page_title="markyp-fontawesome demo",# Font Awesome kit import with kit codejavascript=[kit_import(fa_kit_code)],)print(page)Things to note from the example:You need to pass the Font Awesome import element to thejavascriptkeyword argument ofwebpage()to be able to display Font Awesome icons on the page.stack()and its factory methods likex3()let you create Font Awesome icon stacks.brandandsolid(and their factory methods) let you create Font Awesome icons of Brands and Solid styles. (Pro styles are also supported.)TheIconStyleenumeration class lets you customize icons by passing its properties to the icons'class_argument.For more details on how this package works, please seemarkypandmarkyp-html.For more details on how to use Font Awesome 5, seethispage.Community guidelinesIn general, please treat each other with respect and follow the below guidelines to interact with the project:Questions, feedback: Open an issue with a[Question] <issue-title>title.Bug reports: Open an issue with a[Bug] <issue-title>title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.Feature requests and ideas: Open an issue with an[Enhancement] <issue-title>title and a clear description of the enhancement proposal.Contribution guidelinesEvery form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.Please follow these guidelines to contribute to the project:Make sure your changes match the documentation and coding style of the project, includingPEP 484type annotations.mypyis used to type-check the codebase, submitted code should not produce typing errors. Seethis pagefor more information onmypy.Smallfixes can be submitted simply by creating a pull request.Non-trivial changes should have an associatedissuein the issue tracker that commits must reference (typically by adding#refs <issue-id>to the end of commit messages).Please writetestsfor the changes you make (if applicable).If you have any questions about contributing to the project, please contact the project owner.As mentioned in thecontribution guidelines, the project is type-checked usingmypy, so first of all, the project must passmypy's static code analysis.The project is tested usingpytest. The chosen test layout is that tests are outside the application code, seethis pagefor details on what it means in practice.Ifpytestis installed, the test set can be executed using thepytest testcommand from within the project directory.Ifpytest-covis also installed, a test coverage report can be generated by executingpytest test --cov markyp_fontawesomefrom the root directory of the project.License - MITThe library is open-sourced under the conditions of the MITlicense.