Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ソーシャルゲームのフロントエンドとASP.NET MVC (Lite)

ソーシャルゲームのフロントエンドとASP.NET MVC (Lite)

Room metro Tokyo #3 (2014-01-18)

Mayuki Sawatari

January 18, 2014
Tweet

More Decks by Mayuki Sawatari

Other Decks in Programming

Transcript

  1. ( )

  2. <div class="block"> <div class="block__element">Hauhau</div> <div class="block__element--modifier">Gaogao</div> </div> <div class="listview"> <div

    class="listview__item">Item1</div> <div class="listview__item--selected">Item2(Selected)</div> </div>
  3. <div class="block"> <div class="block_element">Hauhau</div> <div class="block_element-Modifier">Gaogao</div> </div> <div class="listview"> <div

    class="listview_item">Item1</div> <div class="listview_item-Selected">Item2(Selected)</div> </div>
  4. var content = @ <ul> <li><a href=""#"">1</a></li> <li><a href=""#"">2</a></li> </ul>";

    var htmlFilter = new HtmlFilter(); htmlFilter.AddHandler("li:nth-child(2n)", (ctx, nodeInfo) => { nodeInfo.Attributes["style"] = "color:red;"; return true; }); var sw = new StringWriter(); htmlFilter.Execute(new CarteletContext(content, sw), HtmlParser.Parse(content)); sw.ToString(); // <ul> // <li><a href="#">1</a></li> // <li style="color:red;"><a href="#">2</a></li> // </ul>