This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ChevronLeft, ChevronRight} from 'lucide-react'; | |
import {useEffect, useState} from 'react'; | |
export function Pagination({carousel}: {carousel: HTMLElement}) { | |
// Scroll by 1 page in the given direction (-1 or +1). | |
// This uses the width of the carousel minus the padding and gap between items. | |
// Use behavior: 'smooth' and the browser will animate the scrolling. | |
let scroll = (dir: number) => { | |
let style = window.getComputedStyle(carousel); | |
carousel.scrollBy({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
<div id="logo"> | |
<div id="mask"></div> | |
<div id="curve4" class="left"></div> | |
<div id="curve3" class="left"></div> | |
<div id="curve2" class="right"></div> | |
<div id="curve1" class="right"></div> | |
<div id="curve5"></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<div class="wrapper"> | |
<section class="row"> | |
<div class="container-item"> | |
<div class="item"> | |
<div class="item-overlay"> | |
<a href="#" class="item-button play"><i class="play"></i></a> | |
<a href="#" class="item-button share share-btn"><i class="play"></i></a> | |
<div class="sale-tag"><span>SALE</span></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Colors by Louie Mantia | |
http://dribbble.com/shots/1118715-Colors?list=playoffs --> | |
<div class="color"> | |
<div class='red'></div> | |
<div class='orange'></div> | |
<div class='yellow'></div> | |
<div class='green'></div> | |
<div class='lightblue'></div> | |
<div class='blue'></div> | |
<div class='darkblue'></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
... | |
// Removes X-AspNetMvc-Version:4.0 from Response Headers | |
MvcHandler.DisableMvcResponseHeader = true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.web> | |
<!-- Removes Response Header X-AspNet-Version --> | |
<httpRuntime enableVersionHeader="false" /> | |
... | |
</system.web> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_PreSendRequestHeaders(object sender, EventArgs e) | |
{ | |
HttpContext.Current.Response.Headers.Remove("Server"); | |
HttpContext.Current.Response.Headers.Remove("X-Powered-By"); // Disabled in config | |
HttpContext.Current.Response.Headers.Remove("X-AspNet-Version"); // Disabled in config | |
HttpContext.Current.Response.Headers.Remove("X-AspNetMvc-Version"); // Disabled on Application_Start | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Creates a System.Web.Mvc.JsonResult object that serializes the specified object to JavaScript Object Notation (JSON). | |
/// </summary> | |
/// <param name="data">The JavaScript object graph to serialize.</param> | |
/// <param name="contentType">The content type (MIME type).</param> | |
/// <param name="contentEncoding">The content encoding.</param> | |
/// <param name="behavior">The JSON request behavior</param> | |
/// <returns> | |
/// The JSON result object that serializes the specified object to JSON format. | |
/// The result object that is prepared by this method is written to the response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace MvcJson.Net.Models | |
{ | |
public class EnumerableWrapper<T> | |
{ | |
public EnumerableWrapper(IEnumerable<T> items) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data (like the default JsonResult) is the Model being serialized. | |
Type type = this.Data.GetType(); | |
// Wrap Enumerables to avoid potential Json Hijacking. | |
if (TypeHelper.TryWrappingForIEnumerableGenericOrSame(ref type)) | |
{ | |
this.Data = TypeHelper.GetTypeRemappingConstructor(type).Invoke(new object[] { this.Data }); | |
} | |
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(response.Output) { CloseOutput = false }) | |
{ |
NewerOlder