1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 17:05:32 -04:00

clean up a bunch of layouts, especially social-images function

also made even more config.toml parameters optional, will help when finally releasing theme
This commit is contained in:
2020-06-25 10:35:59 -04:00
parent 0a48ce296f
commit f3198e0235
31 changed files with 167 additions and 162 deletions

View File

@@ -8,25 +8,28 @@
// Generate the needed variables, this seems like a lot of repetition, but it
// makes our script availble for multple destination which prevents us to
// need multiple scripts. The minified version stays small.
var https = "https:";
var version = 3;
var functionName = "sa_event";
var pageviewsText = "pageview";
var https = "https:";
var protocol = https + "//";
var con = window.console;
var slash = "/";
var fullApiUrl = protocol + baseUrl;
var doc = window.document;
var con = window.console;
var nav = window.navigator;
var screen = window.screen;
var loc = window.location;
var locationHostname = loc.hostname;
var doc = window.document;
var userAgent = nav.userAgent;
var notSending = "Not sending requests ";
var documentElement = doc.documentElement || {};
var addEventListenerFunc = window.addEventListener;
var encodeURIComponentFunc = encodeURIComponent;
var decodeURIComponentFunc = decodeURIComponent;
var stringify = JSON.stringify;
var thousand = 1000;
var addEventListenerFunc = window.addEventListener;
var fullApiUrl = protocol + baseUrl;
var undefinedVar = undefined;
var documentElement = doc.documentElement || {};
var notSending = "Not sending requests ";
var language = "language";
var Height = "Height";
var Width = "Width";
@@ -35,14 +38,12 @@
var offsetHeight = "offset" + Height;
var clientHeight = "client" + Height;
var clientWidth = "client" + Width;
var screen = window.screen;
var functionName = "sa_event";
var bot = /(bot|spider|crawl)/i.test(userAgent);
var payload = {
version: 3,
version: version,
};
var bot = /(bot|spider|crawl)/i.test(userAgent);
if (bot) payload.bot = true;
var options = {

View File

@@ -113,6 +113,7 @@ button {
img.emoji {
height: 1.1em;
width: 1.1em;
margin: 0;
padding: 0 0.09em;
vertical-align: -0.18em;

View File

@@ -2,7 +2,7 @@
// NOTE: all variables set by Hugo's config.toml MUST go here:
// prettier-ignore
$max-width: "{{ printf "%d%s" .Site.Params.pageMaxWidth "px" }}";
$max-width: "{{ printf "%d%s" .Site.Params.maxWidth "px" }}";
$base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}" + "/";
// those values need quotes because, even though prettier & stylelint are correct