From 813fc7c14f6c5342a0e5282ee8204e7b03fcf07d Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 3 Jan 2017 15:45:30 -0800 Subject: [PATCH] Moved sticky/floating machine classes to common.css, which is unique to Node, allowing Jekyll to define its own classes --- docs/pcx86/examples/components.css | 2 -- modules/shared/lib/sticky.js | 6 +++--- modules/shared/templates/common.css | 13 +++++++++++++ modules/shared/templates/components.css | 14 -------------- versions/c1pjs/1.32.0/common.css | 13 +++++++++++++ versions/pc8080/1.32.0/common.css | 13 +++++++++++++ versions/pc8080/1.32.0/components.css | 2 -- versions/pcx86/1.32.0/common.css | 13 +++++++++++++ versions/pcx86/1.32.0/components.css | 2 -- versions/pdpjs/1.32.0/common.css | 13 +++++++++++++ versions/pdpjs/1.32.0/components.css | 2 -- 11 files changed, 68 insertions(+), 25 deletions(-) diff --git a/docs/pcx86/examples/components.css b/docs/pcx86/examples/components.css index 929ab5987..283fddcd6 100644 --- a/docs/pcx86/examples/components.css +++ b/docs/pcx86/examples/components.css @@ -223,7 +223,6 @@ .pcjs-copyright a { text-decoration: none; } - @media screen and (max-width: 800px) { .pcjs-textarea { width: 100% !important; @@ -242,7 +241,6 @@ padding-right: 0 !important; } } - @media screen and (min-width: 1200px) { .machine-left { max-width: 48%; diff --git a/modules/shared/lib/sticky.js b/modules/shared/lib/sticky.js index baf393d2b..f70abdfd0 100644 --- a/modules/shared/lib/sticky.js +++ b/modules/shared/lib/sticky.js @@ -53,12 +53,12 @@ function addStickyMachine(idMachine) if (topMachine < 0) { topMachine = findTop(machine); } - machine.className = machine.className.replace(/pcjs-machine-(floating|sticky) /g, ''); + machine.className = machine.className.replace(/machine-(floating|sticky) /g, ''); if (window.pageYOffset <= topMachine) { - machine.className = 'pcjs-machine-floating ' + machine.className; + machine.className = 'machine-floating ' + machine.className; if (machineSibling) machineSibling.style.paddingTop = 0; } else { - machine.className = 'pcjs-machine-sticky ' + machine.className; + machine.className = 'machine-sticky ' + machine.className; if (machineSibling) machineSibling.style.paddingTop = machine.offsetHeight + 'px'; } if (prevOnScroll) prevOnScroll(); diff --git a/modules/shared/templates/common.css b/modules/shared/templates/common.css index 67204f2b9..c423b528a 100644 --- a/modules/shared/templates/common.css +++ b/modules/shared/templates/common.css @@ -83,6 +83,19 @@ pre a, code a { text-align: center; font-weight: bold; } +.machine-floating { + position: relative; + z-index: auto; + background-color: transparent; + padding-right: 0; +} +.machine-sticky { + position: fixed !important; + z-index: 1 !important; + background-color: #404040 !important; + padding-right: 16px !important; + top: 0 !important; +} .common-top { background: #202020; font-size: small; diff --git a/modules/shared/templates/components.css b/modules/shared/templates/components.css index ec888e4c9..387b764f5 100644 --- a/modules/shared/templates/components.css +++ b/modules/shared/templates/components.css @@ -228,19 +228,6 @@ .pcjs-copyright a { text-decoration: none; } -.pcjs-machine-floating { - position: relative; - z-index: auto; - background-color: transparent; - padding-right: 0; -} -.pcjs-machine-sticky { - position: fixed !important; - z-index: 1 !important; - background-color: #404040 !important; - padding-right: 16px !important; - top: 0 !important; -} @media screen and (max-width: 800px) { .pcjs-textarea { width: 100% !important; @@ -259,7 +246,6 @@ padding-right: 0 !important; } } - @media screen and (min-width: 1200px) { .machine-left { max-width: 48%; diff --git a/versions/c1pjs/1.32.0/common.css b/versions/c1pjs/1.32.0/common.css index 5f3b43f18..a569abc64 100644 --- a/versions/c1pjs/1.32.0/common.css +++ b/versions/c1pjs/1.32.0/common.css @@ -79,6 +79,19 @@ pre a, code a { text-align: center; font-weight: bold; } +.machine-floating { + position: relative; + z-index: auto; + background-color: transparent; + padding-right: 0; +} +.machine-sticky { + position: fixed !important; + z-index: 1 !important; + background-color: #404040 !important; + padding-right: 16px !important; + top: 0 !important; +} .common-top { background: #202020; font-size: small; diff --git a/versions/pc8080/1.32.0/common.css b/versions/pc8080/1.32.0/common.css index 5f3b43f18..a569abc64 100644 --- a/versions/pc8080/1.32.0/common.css +++ b/versions/pc8080/1.32.0/common.css @@ -79,6 +79,19 @@ pre a, code a { text-align: center; font-weight: bold; } +.machine-floating { + position: relative; + z-index: auto; + background-color: transparent; + padding-right: 0; +} +.machine-sticky { + position: fixed !important; + z-index: 1 !important; + background-color: #404040 !important; + padding-right: 16px !important; + top: 0 !important; +} .common-top { background: #202020; font-size: small; diff --git a/versions/pc8080/1.32.0/components.css b/versions/pc8080/1.32.0/components.css index 929ab5987..283fddcd6 100644 --- a/versions/pc8080/1.32.0/components.css +++ b/versions/pc8080/1.32.0/components.css @@ -223,7 +223,6 @@ .pcjs-copyright a { text-decoration: none; } - @media screen and (max-width: 800px) { .pcjs-textarea { width: 100% !important; @@ -242,7 +241,6 @@ padding-right: 0 !important; } } - @media screen and (min-width: 1200px) { .machine-left { max-width: 48%; diff --git a/versions/pcx86/1.32.0/common.css b/versions/pcx86/1.32.0/common.css index 5f3b43f18..a569abc64 100644 --- a/versions/pcx86/1.32.0/common.css +++ b/versions/pcx86/1.32.0/common.css @@ -79,6 +79,19 @@ pre a, code a { text-align: center; font-weight: bold; } +.machine-floating { + position: relative; + z-index: auto; + background-color: transparent; + padding-right: 0; +} +.machine-sticky { + position: fixed !important; + z-index: 1 !important; + background-color: #404040 !important; + padding-right: 16px !important; + top: 0 !important; +} .common-top { background: #202020; font-size: small; diff --git a/versions/pcx86/1.32.0/components.css b/versions/pcx86/1.32.0/components.css index 929ab5987..283fddcd6 100644 --- a/versions/pcx86/1.32.0/components.css +++ b/versions/pcx86/1.32.0/components.css @@ -223,7 +223,6 @@ .pcjs-copyright a { text-decoration: none; } - @media screen and (max-width: 800px) { .pcjs-textarea { width: 100% !important; @@ -242,7 +241,6 @@ padding-right: 0 !important; } } - @media screen and (min-width: 1200px) { .machine-left { max-width: 48%; diff --git a/versions/pdpjs/1.32.0/common.css b/versions/pdpjs/1.32.0/common.css index 5f3b43f18..a569abc64 100644 --- a/versions/pdpjs/1.32.0/common.css +++ b/versions/pdpjs/1.32.0/common.css @@ -79,6 +79,19 @@ pre a, code a { text-align: center; font-weight: bold; } +.machine-floating { + position: relative; + z-index: auto; + background-color: transparent; + padding-right: 0; +} +.machine-sticky { + position: fixed !important; + z-index: 1 !important; + background-color: #404040 !important; + padding-right: 16px !important; + top: 0 !important; +} .common-top { background: #202020; font-size: small; diff --git a/versions/pdpjs/1.32.0/components.css b/versions/pdpjs/1.32.0/components.css index 929ab5987..283fddcd6 100644 --- a/versions/pdpjs/1.32.0/components.css +++ b/versions/pdpjs/1.32.0/components.css @@ -223,7 +223,6 @@ .pcjs-copyright a { text-decoration: none; } - @media screen and (max-width: 800px) { .pcjs-textarea { width: 100% !important; @@ -242,7 +241,6 @@ padding-right: 0 !important; } } - @media screen and (min-width: 1200px) { .machine-left { max-width: 48%;