Styling for "Media Links"
This commit is contained in:
@@ -8,7 +8,7 @@ using Umbraco.Web;
|
||||
using Umbraco.ModelsBuilder;
|
||||
using Umbraco.ModelsBuilder.Umbraco;
|
||||
[assembly: PureLiveAssembly]
|
||||
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "6fea264bcbe4c9ae")]
|
||||
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "77978d0a2336cd8e")]
|
||||
[assembly:System.Reflection.AssemblyVersion("0.0.0.1")]
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ using Umbraco.ModelsBuilder;
|
||||
using Umbraco.ModelsBuilder.Umbraco;
|
||||
|
||||
[assembly: PureLiveAssembly]
|
||||
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "6fea264bcbe4c9ae")]
|
||||
[assembly:ModelsBuilderAssembly(PureLive = true, SourceHash = "77978d0a2336cd8e")]
|
||||
[assembly:System.Reflection.AssemblyVersion("0.0.0.1")]
|
||||
|
||||
namespace Umbraco.Web.PublishedContentModels
|
||||
|
||||
@@ -1 +1 @@
|
||||
6fea264bcbe4c9ae
|
||||
77978d0a2336cd8e
|
||||
@@ -10,7 +10,7 @@ NOTES:
|
||||
* 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
|
||||
-->
|
||||
<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.
|
||||
|
||||
@@ -100,6 +100,27 @@ a.banner-alert:hover {
|
||||
text-decoration: none;
|
||||
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 {
|
||||
font-size: 2.9em;
|
||||
text-align: center;
|
||||
@@ -125,6 +146,8 @@ h1.headline {
|
||||
content: "\f007"; }
|
||||
.headline-icon.headline-icon-list h1:after {
|
||||
content: "\f00b"; }
|
||||
.headline-icon.headline-icon-search h1:after {
|
||||
content: "\f002"; }
|
||||
|
||||
.status {
|
||||
white-space: nowrap;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -134,6 +134,32 @@ a.banner-alert:hover {
|
||||
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);
|
||||
|
||||
h1.headline {
|
||||
@@ -178,6 +204,10 @@ h1.headline {
|
||||
&.headline-icon-list h1:after {
|
||||
content: "\f00b";
|
||||
}
|
||||
|
||||
&.headline-icon-search h1:after {
|
||||
content: "\f002";
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
|
||||
@@ -16,13 +16,10 @@
|
||||
@if (user == null)
|
||||
{
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col-auto text-light bg-secondary p-2">
|
||||
New!
|
||||
<a href="/membership/register" class="text-white">
|
||||
Register
|
||||
a LeafWeb <i class="fa fa-leaf" style="color: rgb(172, 214, 118)"></i> account
|
||||
</a>
|
||||
</div>
|
||||
<a href="/membership/register" class="text-white col-auto text-light bg-secondary p-2 rounded">
|
||||
New - Data Search! Register
|
||||
a LeafWeb <i class="fa fa-leaf" style="color: rgb(172, 214, 118)"></i> account to begin
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<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>
|
||||
@@ -26,12 +26,10 @@
|
||||
grid.Columns(
|
||||
grid.Column("Identifier", "Identifier", data => data.LeafInput.Identifier), // TODO: link to LeafInput details
|
||||
grid.Column("SiteId", "Site Id", data => data.LeafInput.SiteId),
|
||||
grid.Column("", "Location: Lat., Long., Elev.", data => FormatLatLongEl(data.Site)),
|
||||
grid.Column("CO2S", "CO2S [umol/mol]", data => data.CO2S_Range?.ToString("#.##")),
|
||||
grid.Column("PARi", "PARi [umol/m2/s]", data => data.PARi_Range?.ToString("#.##")),
|
||||
grid.Column("Tleaf", "Tleaf [oC]", data => data.Tleaf_Range?.ToString("#.##")),
|
||||
grid.Column("PhiPS2", "PhiPS2", data => data.PhiPS2_Range?.ToString("#.##")),
|
||||
grid.Column("", "", data => ChartLink(data.LeafInput))
|
||||
grid.Column("Major Species", "Species", data => data.MajorSpecies),
|
||||
grid.Column("", "Location: Lat., Long., Elev.", data => FormatLocation(data.Site)),
|
||||
grid.Column("", "Curve Variation Ranges", data => FormatRanges(data.Value)),
|
||||
grid.Column("", format: data => Actions(data.LeafInput), canSort: false)
|
||||
),
|
||||
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>
|
||||
}
|
||||
|
||||
@helper FormatLatLongEl(LeafInputDataSite site)
|
||||
@helper FormatLocation(LeafInputDataSite site)
|
||||
{
|
||||
<text>@(site.Latitude?.ToString("#.00"))</text>if (site.Latitude != null){<text>°</text>if (site.Longitude != null){<text>, </text>} }
|
||||
<text>@(site.Longitude?.ToString("#.00"))</text>if (site.Longitude != null){<text>°</text>if (site.Elevation != null){<text>, </text>}}
|
||||
<text>@(site.Elevation?.ToString("#.#m"))</text>
|
||||
<text>@(site.Latitude?.ToString("#.00"))</text>if (site.Latitude != null)
|
||||
{<text>°</text>if (site.Longitude != null)
|
||||
{<text>, </text>}
|
||||
}
|
||||
<text>@(site.Longitude?.ToString("#.00"))</text>if (site.Longitude != null)
|
||||
{<text>°</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)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", item.Id)
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", item.Id)
|
||||
}
|
||||
|
||||
@helper Actions(LeafInput leafInput)
|
||||
|
||||
@@ -1087,6 +1087,7 @@
|
||||
<Content Include="Views\Results\LeafInputData.cshtml" />
|
||||
<Content Include="Views\Results\LeafInput.cshtml" />
|
||||
<Content Include="Views\Results\NoResults.cshtml" />
|
||||
<Content Include="Views\MacroPartials\MediaLink.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
Reference in New Issue
Block a user