Canada's Best Management Company: Platinum Award Winner

.bmc18-nav,
Bmc18-nav–OK,
.Bmc18-nav–item {
Display: block;
Font family: sans-serif;
Row height: 1em;
}
B.bmc18-nav {
Bottom margin: 1em;
}
.Bmc18-banner–main {
Display: block;
Width: 100%;
Bottom border: solid 0.25em #fff;
}
.Bmc18-nav–item {
Text alignment: centered;
Fill: 0.5em;
Font-weight: bold;
Word modification: None;
Background color: # ec3b9a;
Color: #fff;
Bottom border: solid 0.25em #fff;
Transition attributes: background color;
Transition time: 0.2s;
}
.Bmc18-nav–item: hover {
Background color: # 39b54a;
Color: #fff;
}
@Mediascreen and (minimum width: 480px) {
..Bmc18-nav {
Display: table;
Width: 100%;
Table layout: fixed;
}
.Bmc18-banner–main {
/ Border-bottom: solid 0.5em #fff; * /
}
B.bmc18-nav–row {
Display: table row;
}
B.bmc18-nav–item {
Display: table cells;
Vertical alignment: middle
Border: solid 0.5em #fff;
}
.Bmc18-nav–row> .bmc18-nav–item: first-child {
Left border: 0;
}
.Bmc18-nav–row> .bmc18-nav–item: last-child {
Right border: 0;
}
}

Complete list
Overview
Learn more

[style*=”–aspect-ratio”] >: the first child {
Width: 100%;
}
[style*=”–aspect-ratio”]> img {
Height: automatic;
}
@supports (-custom: property) {
[style*=”–aspect-ratio”] {
Position: relative
}
[style*=”–aspect-ratio”] :: {before
Content: "";
Display: block;
Padding-bottom: calc (100% / (var (-aspect-ratio)));
}
[style*=”–aspect-ratio”]>: the first child {
Location: Absolutely;
Highest: 0;
Left: 0;
Height: 100%;
}
}

a.bmc18-actionlink {
Display: block;
Text alignment: centered;
Fill: .8em;
Font size: 1.2em;
Font family: sans-serif;
Color: #fff;
Background color: # EC3B9A;
The font thickness: 700;
Word modification: None;
Border-radius: 4px;
Transition attributes: background color;
Transition time: 0.2 seconds
}

a.bmc18-actionlink: activity,
a.bmc18-actionlink: hover {
Background color: # 39b54a
}


Canada's Best More Managed Companies »

// The API requires the latest posts to be posted to the "best-managed-companies" tag. Fetch five given posts randomly. Note: Post ID is hardcoded in "EligiblePosts" below
"Use strictly";
var bodyClass = document.getElementsByTagName (& # 39; body & # 39;) [0] .getAttribute (& # 39; class & # 39;);
var container = document.querySelector (& # 39; # dynamicPosts & # 39;);
// ID marked as "Best Hosting Company"
// var tagID = 351657;
var postCount = 5;
var exclude = = parseInt (((bodyClass.indexOf (& # 39; postid & # 39;)> = 0? isolateID (bodyClass) [1]: 0)));
var qualified posts = [1079843,1079845,1079849,1079851,1079853,1079855,1079857,1079859,1079861,1079863,1079865,1079867,1079869,1079873,1079875,1079877,1079879,1079881,1079885,1079887,1079889,1079891,1079893,1079895,1079897,1079899,1079901,1079903,1079905,1079907,1079909,1079911,1079913,1079915,1079917,1079919,1079921,1079925,1079923,1079927,1079929,1079931,1079933,1079935];
var selectedPosts = arrayRandomSubset (eligiblePosts, postCount, exclude); // Subset of conditional posts, see function below
var Endpoint = & # 39; http: //www.canadianbusiness.com/wp-json/wp/v2/posts? & # 39 ;;
Endpoint + = & # 39; include = & # 39; + selectedPosts.join (& # 39 ;, & # 39;);
Endpoint + = & # 39; & _ embed & # 39 ;;

Get (endpoint)
Th.then (function (response) {
Return response.json ();
)})
Th.then (function (data) {
PostRender (data);
)})
Catch (function (err) {
Console.log (err);
}});

Function postsRender (data) {

Data.forEach (function (post) {
// Define post elements
/// Release container
Var thePost = document.createElement (& # 39; div & # 39;);
Post.classList.add (& # 39; row & # 39;);
Post.classList.add (& # 39; bmc18-latest-post & # 39;);
/// Visual stand
Var theVisual = document.createElement (& # 39; div & # 39;);
TheVisual.classList.add (& # 39; col-xs-12 & # 39;);
TheVisual.classList.add (& # 39; col-md-4 & # 39;);
// Visual Link
Var theImgLink = document.createElement (& # 39; a & # 39;);
TheImgLink.setAttribute (& # 39; href & # 39 ;, post.link);
TheVisual.appendChild (theImgLink);
/// Text holder
Var theText = document.createElement (& # 39; div & # 39;);
TheText.classList.add (& # 39; col-xs-12 & # 39;);
TheText.classList.add (& # 39; col-md-8 & # 39;);
TheVisual.setAttribute (& # 39; href & # 39 ;, post.link);
// image
Var theImage = document.createElement (& # 39; img & # 39;);
Image.setAttribute (& # 39; src & # 39 ;, post._embedded [‘wp:featuredmedia’][0] .source_url);
Image.setAttribute (& # 39; alt & # 39 ;, post._embedded [‘wp:featuredmedia’][0] .alt_text);
TheImgLink.appendChild (theImage);
/// Title
Var theHed = document.createElement (& # 39; h1 & # 39;);
TheHed.innerHTML = & # 39; & # 39; + post.title.rendered + & # 39; & # 39 ;;
TheText.appendChild (theHed);
/// Agile
Var theDek = document.createElement (& # 39; div & # 39;);
TheDek.innerHTML = post.excerpt.rendered;
TheText.appendChild (theDek);
// // space character
Var theDivider = document.createElement (& # 39; hr & # 39;);
Tidy
ThePost.appendChild (theVisual);
ThePost.appendChild (theText);
Container.appendChild (thePost);
Container.appendChild (theDivider);
}});
}

// Return wordpress postID from body class
Function isolateID (string) {
Var pattern = / postid -( d +)? /;
Return string.match (pattern);
}

/ **
* Provide a subset from the given array
* @Param arr —an array from which values ​​are read
* @Paran n-number of results required
* @Param excl- values ​​to exclude from the result
* /

Function arrayRandomSubset (arr, n, excl) {
Release = [];
// For the specified count, loop through the given array, randomly select the values, and then add them to the output array, provided that these values ​​have not been included.
// Note: We temporarily increased the length of the loop to output an array of length n + 1. This is for the purpose of providing an `excl & # 39; value
For (var i = 0; i <n + 1; i ++) {
/// Choose a random position in the array
Let r = parseInt (Math.random () * arr.length);
// If the value of position "r" is not already included in the output, add it
If (out.indexOf (arr [r]) <0) {
A.out.push (arr [r]);
/// If the value is already in the output, decrement the loop to try again.
} Other
I–
}
}
/// If the excluded value is not in the output, trim it to the `n` result
If (out.indexOf (excl) <0) {
Return out.splice (0, n);
/// If it is in the output, delete it.
Other
Let e ​​= out.splice (out.indexOf (excl), 1);
Return
}
}

The article "Best Managed Company in Canada: Platinum Award Winner" appeared for the first time in the Canadian Business News (a source of business news).

Leave a Reply

Your email address will not be published. Required fields are marked *