Skip to content

Commit 1aecc9f

Browse files
Assembly information is updated and Key.snk file is added.
1 parent 520b139 commit 1aecc9f

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

src/GravatarTagHelpers/GravatarImgTagHelper.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ public class GravatarImgTagHelper : TagHelper
5555
/// </summary>
5656
public string Alt { get; set; }
5757

58+
/// <summary>
59+
/// CSS class
60+
/// </summary>
61+
public string Class { get; set; }
62+
63+
/// <summary>
64+
/// Id attribute for an image
65+
/// </summary>
66+
public string Id { get; set; }
67+
5868
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
5969
{
6070
output.TagName = "img";
@@ -73,9 +83,18 @@ public override Task ProcessAsync(TagHelperContext context, TagHelperOutput outp
7383

7484
output.Attributes.Add("src", gravatarImageUrl);
7585

86+
// Add alt tag
7687
if(!string.IsNullOrWhiteSpace(Alt))
7788
output.Attributes.Add("alt", Alt);
7889

90+
// Add CSS class
91+
if (!string.IsNullOrWhiteSpace(Class))
92+
output.Attributes.Add("class", Class);
93+
94+
// Add id attribute
95+
if (!string.IsNullOrWhiteSpace(Id))
96+
output.Attributes.Add("id", Id);
97+
7998
return base.ProcessAsync(context, output);
8099
}
81100
}

src/GravatarTagHelpers/Key.snk

596 Bytes
Binary file not shown.

src/GravatarTagHelpers/Properties/AssemblyInfo.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8+
[assembly: AssemblyTitle("GravatarTagHelpers .NET Standard 1.6")]
9+
[assembly: AssemblyDescription("A simple tag helper to display the Gravatar image using email address.")]
810
[assembly: AssemblyConfiguration("")]
9-
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyCompany("Manoj Kulkarni")]
12+
[assembly: AssemblyVersion("1.0.0.*")]
1013
[assembly: AssemblyProduct("GravatarTagHelpers")]
14+
[assembly: AssemblyCopyright("Copyright © Manoj Kulkarni 2017")]
1115
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyKeyFile("Key.snk")]
1217

1318
// Setting ComVisible to false makes the types in this assembly not visible
1419
// to COM components. If you need to access a type in this assembly from

src/GravatarTagHelpers/project.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
"packOptions": {
1313
"projectUrl": "https://github.com/manojkulkarni30/GravatarTagHelpers",
14-
"tags": [ "gravatar, tag helper" ],
14+
"tags": [ "Gravatar, Tag Helper", "AspNetCore","Mvc","Core" ],
1515
"releaseNotes": "Initial Version",
1616
"licenseUrl": "https://github.com/manojkulkarni30/GravatarTagHelpers/blob/master/License.txt",
1717
"owners": [ "Manoj Kulkarni" ],
@@ -27,6 +27,8 @@
2727
},
2828

2929
"frameworks": {
30+
"net451": {},
31+
3032
"netstandard1.6": {
3133
"imports": "dnxcore50"
3234
}

0 commit comments

Comments
 (0)