Giter Site home page Giter Site logo

porrey / razor-tools Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 3.82 MB

Tools to allow JQuery or JavaScript objects to be embedded in Razor pages using C# code based on fluent API and unobtrusive JavaScript.

License: GNU Lesser General Public License v3.0

C# 96.44% HTML 3.15% CSS 0.29% JavaScript 0.07% Batchfile 0.05%
razor mvc aspnetcore aspcorenetmvc asp-net-core aspnet-core asp-net-core-mvc razorpages razor-components razor-engine

razor-tools's Introduction

GitHub Build Status

RazorTools

The Razor Tools library is designed to wrap JavaScript and JQuery objects into C# methods. Objects can be easily added to Razor views with basic C# code. All objects are created and initialized using unobtrusive JavaScript techniques and fluent API. This allows complex objects to be created within your views with simple C# statements.

Dependencies

The current version of these libraries are built for .NET Core with dependencies on netstandard2.1 and Microsoft.AspNetCore.Mvc.ViewFeatures.

Concept

The basic concept of RazorTools is to provide fluent APIs to create JQuery and JavScript objects in Razor views. Syntax such as

@Create<FancyObject>().WithStyle(Style.Cool).UsingData("Home", "Data")

can be used to generate complex objects that interact with the controller to retrieve data while keeping the view code clean and straight forward. In some cases, objects can also be render using simple statements such as

@Html.BeginObject(new FancyObject("fancyObject123")
{
	DataUrl = this.Url.Action("Home", "Data")
})

Documentation

See the Wiki pages for more detailed information.

There are currently two libraries: Charts and Font Awesome.

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.