Styling for "Media Links"

This commit is contained in:
2023-02-03 13:33:31 -05:00
parent 680f139aa5
commit f0177cab35
11 changed files with 116 additions and 23 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ using Umbraco.Web;
using Umbraco.ModelsBuilder; using Umbraco.ModelsBuilder;
using Umbraco.ModelsBuilder.Umbraco; using Umbraco.ModelsBuilder.Umbraco;
[assembly: PureLiveAssembly] [assembly: PureLiveAssembly]
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "6fea264bcbe4c9ae")] [assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "77978d0a2336cd8e")]
[assembly:System.Reflection.AssemblyVersion("0.0.0.1")] [assembly:System.Reflection.AssemblyVersion("0.0.0.1")]
+1 -1
View File
@@ -19,7 +19,7 @@ using Umbraco.ModelsBuilder;
using Umbraco.ModelsBuilder.Umbraco; using Umbraco.ModelsBuilder.Umbraco;
[assembly: PureLiveAssembly] [assembly: PureLiveAssembly]
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "6fea264bcbe4c9ae")] [assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "77978d0a2336cd8e")]
[assembly:System.Reflection.AssemblyVersion("0.0.0.1")] [assembly:System.Reflection.AssemblyVersion("0.0.0.1")]
namespace Umbraco.Web.PublishedContentModels namespace Umbraco.Web.PublishedContentModels
+1 -1
View File
@@ -1 +1 @@
6fea264bcbe4c9ae 77978d0a2336cd8e
+1 -1
View File
@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files * A new version will invalidate both client and server cache and create new persisted files
--> -->
<clientDependency version="2026732746" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco"> <clientDependency version="2027227464" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!-- <!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true. This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
+23
View File
@@ -100,6 +100,27 @@ a.banner-alert:hover {
text-decoration: none; text-decoration: none;
background: #6b7f52; } background: #6b7f52; }
.media-link {
white-space: normal;
display: inline-block;
padding: 20px 30px 5px 30px;
margin-top: 6px;
margin-bottom: 20px;
background: #000000;
background: rgba(0, 0, 0, 0.05);
-moz-border-radius: 10px;
border-radius: 10px;
/* standards-compliant: (IE) */ }
.media-link .glyphicon, .media-link .fa {
margin-left: 10px;
color: #337ab7; }
a.media-link:hover {
text-decoration: none;
background: rgba(0, 0, 0, 0.1); }
a.media-link:hover .glyphicon {
color: #88a1b7; }
h1.headline { h1.headline {
font-size: 2.9em; font-size: 2.9em;
text-align: center; text-align: center;
@@ -125,6 +146,8 @@ h1.headline {
content: "\f007"; } content: "\f007"; }
.headline-icon.headline-icon-list h1:after { .headline-icon.headline-icon-list h1:after {
content: "\f00b"; } content: "\f00b"; }
.headline-icon.headline-icon-search h1:after {
content: "\f002"; }
.status { .status {
white-space: nowrap; white-space: nowrap;
+1 -1
View File
File diff suppressed because one or more lines are too long
+30
View File
@@ -134,6 +134,32 @@ a.banner-alert:hover {
background: #6b7f52; background: #6b7f52;
} }
.media-link {
white-space: normal;
display: inline-block;
padding: 20px 30px 5px 30px;
margin-top: 6px;
margin-bottom: 20px;
background: #000000;
background: rgba(0, 0, 0, .05);
-moz-border-radius: 10px;
border-radius: 10px; /* standards-compliant: (IE) */
.glyphicon, .fa {
margin-left: 10px;
color: #337ab7;
}
}
a.media-link:hover {
text-decoration: none;
background: rgba(0, 0, 0, 0.1);
.glyphicon {
color: #88a1b7;
}
}
$text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.8), 1px 1px 0 rgba(0, 0, 0, 0.4), 5px 5px 10px rgba(0, 0, 0, 0.4); $text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.8), 1px 1px 0 rgba(0, 0, 0, 0.4), 5px 5px 10px rgba(0, 0, 0, 0.4);
h1.headline { h1.headline {
@@ -178,6 +204,10 @@ h1.headline {
&.headline-icon-list h1:after { &.headline-icon-list h1:after {
content: "\f00b"; content: "\f00b";
} }
&.headline-icon-search h1:after {
content: "\f002";
}
} }
.status { .status {
+4 -7
View File
@@ -16,13 +16,10 @@
@if (user == null) @if (user == null)
{ {
<div class="row justify-content-center mb-4"> <div class="row justify-content-center mb-4">
<div class="col-auto text-light bg-secondary p-2"> <a href="/membership/register" class="text-white col-auto text-light bg-secondary p-2 rounded">
New! New - Data Search! Register
<a href="/membership/register" class="text-white"> a LeafWeb <i class="fa fa-leaf" style="color: rgb(172, 214, 118)"></i> account to begin
Register </a>
a LeafWeb <i class="fa fa-leaf" style="color: rgb(172, 214, 118)"></i> account
</a>
</div>
</div> </div>
} }
<div class="container-lg"> <div class="container-lg">
@@ -0,0 +1,12 @@
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var link = Model.MacroParameters["Link"];
var title = Model.MacroParameters["Title"];
var description = Model.MacroParameters["Description"];
var faicon = Model.MacroParameters["FaIcon"];
var url = link; //new UmbracoHelper(UmbracoContext.Current).TypedContent(link).Url;
}
<a class="media-link" href="@url" target="_blank">
<h4>@title <span class="fa @faicon"></span></h4>
<p>@description</p>
</a>
+41 -11
View File
@@ -26,12 +26,10 @@
grid.Columns( grid.Columns(
grid.Column("Identifier", "Identifier", data => data.LeafInput.Identifier), // TODO: link to LeafInput details grid.Column("Identifier", "Identifier", data => data.LeafInput.Identifier), // TODO: link to LeafInput details
grid.Column("SiteId", "Site Id", data => data.LeafInput.SiteId), grid.Column("SiteId", "Site Id", data => data.LeafInput.SiteId),
grid.Column("", "Location: Lat., Long., Elev.", data => FormatLatLongEl(data.Site)), grid.Column("Major Species", "Species", data => data.MajorSpecies),
grid.Column("CO2S", "CO2S [umol/mol]", data => data.CO2S_Range?.ToString("#.##")), grid.Column("", "Location: Lat., Long., Elev.", data => FormatLocation(data.Site)),
grid.Column("PARi", "PARi [umol/m2/s]", data => data.PARi_Range?.ToString("#.##")), grid.Column("", "Curve Variation Ranges", data => FormatRanges(data.Value)),
grid.Column("Tleaf", "Tleaf [oC]", data => data.Tleaf_Range?.ToString("#.##")), grid.Column("", format: data => Actions(data.LeafInput), canSort: false)
grid.Column("PhiPS2", "PhiPS2", data => data.PhiPS2_Range?.ToString("#.##")),
grid.Column("", "", data => ChartLink(data.LeafInput))
), ),
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" } htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
) )
@@ -49,16 +47,48 @@ else
<p>No results. <a href="@UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.LeafInputCreate)">Click here to submit Leaf Data.</a></p> <p>No results. <a href="@UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.LeafInputCreate)">Click here to submit Leaf Data.</a></p>
} }
@helper FormatLatLongEl(LeafInputDataSite site) @helper FormatLocation(LeafInputDataSite site)
{ {
<text>@(site.Latitude?.ToString("#.00"))</text>if (site.Latitude != null){<text>&#176;</text>if (site.Longitude != null){<text>, </text>} } <text>@(site.Latitude?.ToString("#.00"))</text>if (site.Latitude != null)
<text>@(site.Longitude?.ToString("#.00"))</text>if (site.Longitude != null){<text>&#176;</text>if (site.Elevation != null){<text>, </text>}} {<text>&#176;</text>if (site.Longitude != null)
<text>@(site.Elevation?.ToString("#.#m"))</text> {<text>, </text>}
}
<text>@(site.Longitude?.ToString("#.00"))</text>if (site.Longitude != null)
{<text>&#176;</text>if (site.Elevation != null)
{<text>, </text>}
}
<text>@(site.Elevation?.ToString("#.#m"))</text>
}
@helper FormatRanges(LeafInputData data)
{
var line = new List<string>();
if (data.CO2S_Range != null)
{
line.Add(data.CO2S_Range?.ToString("CO2S: " + "#.##" + "[umol/mol]"));
}
if (data.PARi_Range != null)
{
line.Add(data.PARi_Range?.ToString("PARi: " + "#.##" + "[umol/m2/s]"));
}
if (data.Tleaf_Range != null)
{
line.Add(data.Tleaf_Range?.ToString("Tleaf: " + "#.##" + "[oC]"));
}
if (data.PhiPS2_Range != null)
{
line.Add(data.PhiPS2_Range?.ToString("PhiPS2: " + "#.##"));
}
foreach (var l in line)
{
<text>@l</text><br/>
}
} }
@helper ChartLink(LeafInput item) @helper ChartLink(LeafInput item)
{ {
@Html.Partial("DisplayTemplates/_ChartLink", item.Id) @Html.Partial("DisplayTemplates/_ChartLink", item.Id)
} }
@helper Actions(LeafInput leafInput) @helper Actions(LeafInput leafInput)
+1
View File
@@ -1087,6 +1087,7 @@
<Content Include="Views\Results\LeafInputData.cshtml" /> <Content Include="Views\Results\LeafInputData.cshtml" />
<Content Include="Views\Results\LeafInput.cshtml" /> <Content Include="Views\Results\LeafInput.cshtml" />
<Content Include="Views\Results\NoResults.cshtml" /> <Content Include="Views\Results\NoResults.cshtml" />
<Content Include="Views\MacroPartials\MediaLink.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>