Browse Source

added icon asset files

master
Claire Davis 4 years ago
parent
commit
7333e99372
  1. 6415
      Assets/400x400 icon.ai
  2. 7283
      Assets/512x512 icon.ai
  3. 5
      Assets/Segoe MDL2 Assets Regular - Edit.svg
  4. 24
      Assets/adaptive-card.svg
  5. 7017
      Assets/icons.ai
  6. 278
      Scripts/template parser.linq

6415
Assets/400x400 icon.ai

File diff suppressed because it is too large diff.load

7283
Assets/512x512 icon.ai

diff.file_suppressed_line_too_long

5
Assets/Segoe MDL2 Assets Regular - Edit.svg

@ -0,0 +1,5 @@
<!-- Exported by Character Map UWP -->
<svg height="100%" viewBox="0 0 1024 1024" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M1024,167.5C1024,189.5 1019.83,210.833 1011.5,231.5C1003.17,252.167 991,270.5 975,286.5L316.5,945L0,1024L79,707.5L737.5,49C753.5,33.0001 771.833,20.8334 792.5,12.5C813.167,4.16669 834.5,0 856.5,0C879.5,0 901.167,4.41669 921.5,13.25C941.833,22.0834 959.583,34.0834 974.75,49.25C989.917,64.4167 1001.92,82.1667 1010.75,102.5C1019.58,122.833 1024,144.5 1024,167.5ZM163,714C198.333,725.667 228.75,744.25 254.25,769.75C279.75,795.25 298.333,825.667 310,861L850.5,320L704,173.5ZM88,936L252.5,895C249.167,879.667 243.75,865.167 236.25,851.5C228.75,837.833 219.667,825.667 209,815C198.333,804.333 186.167,795.25 172.5,787.75C158.833,780.25 144.333,774.833 129,771.5ZM896,274.5C904.333,266.167 912.333,258.333 920,251C927.667,243.667 934.5,235.917 940.5,227.75C946.5,219.583 951.25,210.75 954.75,201.25C958.25,191.75 960,180.667 960,168C960,153.667 957.25,140.25 951.75,127.75C946.25,115.25 938.75,104.25 929.25,94.75C919.75,85.2501 908.75,77.7501 896.25,72.25C883.75,66.7501 870.333,64.0001 856,64C843.333,64.0001 832.25,65.7501 822.75,69.25C813.25,72.7501 804.417,77.5001 796.25,83.5C788.083,89.5001 780.333,96.3334 773,104C765.667,111.667 757.833,119.667 749.5,128Z" fill="#000000">
</path>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

24
Assets/adaptive-card.svg

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="96px" height="96px" viewBox="0 0 96 96" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>adaptive_cards</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="assets" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="adaptive_cards">
<g id="Group-21">
<rect id="Rectangle-17-Copy-22" fill="#3A96DD" x="0" y="0" width="96" height="96" rx="48"></rect>
<g id="Page-1" transform="translate(22.000000, 30.000000)" fill="#FFFFFF">
<g id="Group-3">
<path d="M6.38596491,0.911322807 C2.86091228,0.911322807 0,3.77223509 0,7.29728772 L0,19.9702351 L3.19298246,19.9702351 L3.19298246,7.29728772 C3.19298246,5.53795439 4.62663158,4.10430526 6.38596491,4.10430526 L35.122807,4.10430526 L35.122807,0.911322807 L6.38596491,0.911322807 Z" id="Fill-1"></path>
</g>
<polygon id="Fill-4" points="0 36.0341298 12.922 36.0341298 12.922 32.8411474 5.45042105 32.8411474 15.8052632 22.4894982 13.5478246 20.2320596 3.19298246 30.5837088 3.19298246 23.1632175 0 23.1632175"></polygon>
<g id="Group-8" transform="translate(35.122807, 0.000000)">
<polygon id="Fill-6" points="3.19298246 0.911322807 3.19298246 4.10430526 10.5144912 4.10430526 0.159649123 14.4591474 2.41708772 16.716586 12.7719298 6.36174386 12.7719298 13.6832526 15.9649123 13.6832526 15.9649123 0.911322807"></polygon>
</g>
<path d="M47.8947368,29.6481649 C47.8947368,31.4106912 46.4610877,32.8411474 44.7017544,32.8411474 L16.1149825,32.8411474 L16.1149825,36.0341298 L44.7017544,36.0341298 C48.226807,36.0341298 51.0877193,33.1732175 51.0877193,29.6481649 L51.0877193,16.8762351 L47.8947368,16.8762351 L47.8947368,29.6481649 Z" id="Fill-9"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

7017
Assets/icons.ai

diff.file_suppressed_line_too_long

278
Scripts/template parser.linq

@ -0,0 +1,278 @@
<Query Kind="Program">
<NuGetReference>Newtonsoft.Json</NuGetReference>
<Namespace>Newtonsoft.Json</Namespace>
<Namespace>Newtonsoft.Json.Bson</Namespace>
<Namespace>Newtonsoft.Json.Converters</Namespace>
<Namespace>Newtonsoft.Json.Linq</Namespace>
<Namespace>Newtonsoft.Json.Schema</Namespace>
<Namespace>Newtonsoft.Json.Serialization</Namespace>
</Query>
void Main()
{
string Rendered = JsonFromTemplate(Globals.strTemplate, Globals.strData);
}
// render adaptive card JSON
public string JsonFromTemplate(string strTemplate, string strData)
{
string output = "";
// first create JSON objects out of the input
JObject Template = JObject.Parse(strTemplate);
JObject Data = JObject.Parse(strData);
// body = array of jobjects
JArray TemplateBody = (JArray)Template["body"];
TemplateBody.Dump();
return output;
}
// set up global statics
public class Globals
{
public static Dictionary<string, string> Containers = new Dictionary<string, string>
{
{ "ActionSet", "actions"},
{ "Container", "items" },
{ "ColumnSet", "columns"},
{ "Column", "items"},
{ "FactSet", "facts"},
{ "Fact", ""},
{ "ImageSet", "images"}
};
public static string strData = @"
{
""template"" :
{
""image"" : ""image"",
""clade"" : ""Clades"",
""name"" : ""Common Name"",
""order"" : ""Order"",
""family"" : ""Family"",
""genus"" : ""Genus"",
""species"" : ""Species (Latin Name)""
},
""item"" :
{
""image"" : ""almonds.jpg"",
""clade"" : [
""Tracheophytes"",
""Angiosperms"",
""Eudicots"",
""Rosids""
],
""name"" : ""American Hazelnut"",
""order"" : ""Fagales"",
""family"" : ""Betulaceae"",
""genus"" : ""Corylus"",
""species"" : ""Corylus Americana""
}
}
";
public static string strTemplate = @"
{
""type"": ""AdaptiveCard"",
""body"": [
{
""type"": ""Container"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.name}"",
""size"": ""Large"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Center"",
""color"": ""Accent""
},
{
""type"": ""Image"",
""url"": ""{item.image}"",
""altText"": """"
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.other}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.other}""
}
]
}
]
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.name}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.name}""
}
]
}
]
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.order}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.order}""
}
]
}
]
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.family}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.genus}""
}
]
}
]
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.species}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{item.species}""
}
]
}
]
},
{
""type"": ""ColumnSet"",
""columns"": [
{
""type"": ""Column"",
""width"": ""stretch"",
""horizontalAlignment"": ""Right"",
""items"": [
{
""type"": ""TextBlock"",
""text"": ""{template.clade}"",
""weight"": ""Bolder"",
""horizontalAlignment"": ""Right""
}
]
},
{
""type"": ""Column"",
""width"": ""stretch"",
""items"": [
{
""type"": ""Container"",
""items"": [
{
""$data"": ""{item.clade}"",
""type"": ""TextBlock"",
""text"": ""{$data}""
}
]
}
]
}
]
}
]
}
],
""$schema"": ""http://adaptivecards.io/schemas/adaptive-card.json"",
""version"": ""1.0""
}";
}
Loading…
Cancel
Save