All Projects → wangkanai → Responsive

wangkanai / Responsive

Licence: Apache-2.0 license
ASP.NET Core Responsive middleware for routing base upon request client device detection to specific view

Programming Languages

C#
18002 projects
shell
77523 projects
powershell
5483 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Responsive

Detection
ASP.NET Core Detection with Responsive View for identifying details about client device, browser, engine, platform, & crawler. Responsive middleware for routing base upon request client device detection to specific view.
Stars: ✭ 335 (+830.56%)
Mutual labels:  responsive, detection, aspnet-core
Ngx Responsive
Superset of RESPONSIVE DIRECTIVES to show or hide items according to the size of the device screen and another features in Angular 9
Stars: ✭ 300 (+733.33%)
Mutual labels:  responsive, detection
Frontend-Learning-Journey
Tutorials, definitions, frameworks and some of the projects i made when starting to learn frontend web developement
Stars: ✭ 28 (-22.22%)
Mutual labels:  responsive
svelto
Modular front end framework for modern browsers, with battery included: 100+ widgets and tools.
Stars: ✭ 61 (+69.44%)
Mutual labels:  responsive
darknet
php ffi darknet
Stars: ✭ 21 (-41.67%)
Mutual labels:  detection
ofxOpenCvDnnObjectDetection
OpenCV based DNN Object Detection Library for Openframeworks
Stars: ✭ 34 (-5.56%)
Mutual labels:  detection
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (-50%)
Mutual labels:  responsive
detect-browser-language
Detect browser language
Stars: ✭ 35 (-2.78%)
Mutual labels:  detection
ThePhish
ThePhish: an automated phishing email analysis tool
Stars: ✭ 676 (+1777.78%)
Mutual labels:  detection
hugo-lamp
A light Hugo AMP responsive theme for blogger ⚡.
Stars: ✭ 51 (+41.67%)
Mutual labels:  responsive
react-native-bootstrap-styles
Bootstrap style library for React Native
Stars: ✭ 95 (+163.89%)
Mutual labels:  responsive
speedy-math
An application which allows user (small kids) to practice basic Mathematics operations
Stars: ✭ 28 (-22.22%)
Mutual labels:  responsive
Authorization-Workshop
No description or website provided.
Stars: ✭ 14 (-61.11%)
Mutual labels:  aspnet-core
AspNetCorePostgreSQLDocker
ASP.NET Core Docker EF Core
Stars: ✭ 22 (-38.89%)
Mutual labels:  aspnet-core
d2-advance
(重构中) 🧗 Advanced, colorful front-end integration practice. be inspired by D2Admin --- D2 探索版,追求更好的前端工程实践
Stars: ✭ 99 (+175%)
Mutual labels:  responsive
website
Fully responsive website built with NextJS, React and Fluent UI, with the aim of providing services and access to all groups of didactic courses and general purposes to students of the University of Milan.
Stars: ✭ 29 (-19.44%)
Mutual labels:  responsive
front-end-learning
A list of resources for both learning & keeping up with web development.
Stars: ✭ 27 (-25%)
Mutual labels:  responsive
deTiN
DeTiN is designed to measure tumor-in-normal contamination and improve somatic variant detection sensitivity when using a contaminated matched control.
Stars: ✭ 46 (+27.78%)
Mutual labels:  detection
tensorflow object detection helper tool
tensorflow object detection api helper tool ( custom object detection )
Stars: ✭ 30 (-16.67%)
Mutual labels:  detection
multiple-windows
This project is a chrome extension. It provide to create windows to different sizes and multiple for front-end developers.
Stars: ✭ 16 (-55.56%)
Mutual labels:  responsive

This repo is now marked at Acheived and merged in Wangkanai.Detection

ASP.NET Core Responsive

Build status NuGet Pre Release

ASP.NET Core Responsive

ASP.NET Core Responsive middleware for routing base upon request client device detection to specific view. Being to target difference client devices with seperation of concern is crucial, due to you can mininize what is sent to the client directly from the service to only what is needed and nothing more. This increase performance and lower bandwidth usage.

Installation

Installation of Responsive library will bring in all dependency packages.

PM> install-package Wangkanai.Responsive -pre

Configure Service

Responsive is configured in the ConfigureServices method:

public void ConfigureServices(IServiceCollection services)
{
    // Add responsive services.
    services.AddResponsive()
        .AddViewSuffix()
        .AddViewSubfolder();

    // Add framework services.
    services.AddMvc();  
}
  • AddResponsive() Adds the Responsive services to the services container.

  • AddViewSuffix() Adds support for device view files to Suffix. In this sample view Responsive is based on the view file suffix.

    Ex *views/[controller]/[action]/index.mobile.cshtml*

  • AddViewSubfolder() Adds support for device view files to Subfolder. In this sample view Responsive is based on the view file subfolder.

    Ex *views/[controller]/[action]/mobile/index.cshtml*

Configure Middleware

The current device on a request is set in the Responsive middleware. The Responsive middleware is enabled in the Configure method of Startup.cs file.

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    app.UseResponsive();

    app.UseMvc(routes =>
    {
        routes.MapRoute(
            name: "default",
            template: "{controller=Home}/{action=Index}/{id?}");
    });
}
  • UseResponsive() Add the responsive middleware into the http pipeline. Its will capture the request and resolve the device to responsive services container.

Customized able options (beta 3)

This enable the middleware to customized the default response for any type of request device to the configured options.

app.UseResponsive(new ResponsiveOptions
{
    TabletDefault = DeviceType.Mobile
});
  • ResponsiveOptions has 3 default configurable via DesktopDefault, TabletDefault, and MobileDefault.

Directory Structure

  • src - The code of this project lives here
  • test - Unit tests of this project to valid that everything pass specs
  • sample - Contains sample web application of usage

Contributing

All contribution are welcome, please contact the author.

Related projects

See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].