1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-06-01 11:34:04 +02:00

Add a <body> td-example-notification attribute for example notifications

This commit is contained in:
chylex 2016-09-25 16:52:22 +02:00
parent fa64309909
commit 5f249d4603

View File

@ -55,7 +55,7 @@ public static TweetNotification ExampleTweet{
build.Append(@"</div></div></article>"); build.Append(@"</div></div></article>");
return new TweetNotification(build.ToString(), "", 95); return new TweetNotification(build.ToString(), "", 95, true);
} }
} }
@ -84,11 +84,15 @@ public string Url{
private readonly string html; private readonly string html;
private readonly string url; private readonly string url;
private readonly int characters; private readonly int characters;
private readonly bool isExample;
public TweetNotification(string html, string url, int characters){ public TweetNotification(string html, string url, int characters) : this(html, url, characters, false){}
private TweetNotification(string html, string url, int characters, bool isExample){
this.html = html; this.html = html;
this.url = url; this.url = url;
this.characters = characters; this.characters = characters;
this.isExample = isExample;
} }
public int GetDisplayDuration(int value){ public int GetDisplayDuration(int value){
@ -106,7 +110,7 @@ public string GenerateHtml(){
} }
build.Append("</head>"); build.Append("</head>");
build.Append("<body class='hearty'><div class='app-columns-container'><div class='column scroll-styled-v' style='width:100%;overflow-y:auto'>"); build.Append("<body class='hearty'").Append(isExample ? " td-example-notification" : "").Append("><div class='app-columns-container'><div class='column scroll-styled-v' style='width:100%;overflow-y:auto'>");
build.Append(html); build.Append(html);
build.Append("</div></div></body>"); build.Append("</div></div></body>");
build.Append("</html>"); build.Append("</html>");