diff --git a/sites/all/themes/custom/edlptheme/.gitignore b/sites/all/themes/custom/edlptheme/.gitignore new file mode 100644 index 000000000..aa9916495 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +.npm-debug-log +bower_components/ diff --git a/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.history.js b/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.history.js new file mode 100644 index 000000000..20f8c9e08 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.history.js @@ -0,0 +1 @@ +typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;s.length&&(s.removeItem("History.store"),s.setItem("History.store",n))}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window) \ No newline at end of file diff --git a/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.hotkeys.js b/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.hotkeys.js new file mode 100644 index 000000000..6ff401365 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/dist/bower/jquery.hotkeys.js @@ -0,0 +1,196 @@ +/*jslint browser: true*/ +/*jslint jquery: true*/ + +/* + * jQuery Hotkeys Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Based upon the plugin by Tzury Bar Yochay: + * http://github.com/tzuryby/hotkeys + * + * Original idea by: + * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ + */ + +/* + * One small change is: now keys are passed by object { keys: '...' } + * Might be useful, when you want to pass some other data to your handler + */ + +(function(jQuery) { + + jQuery.hotkeys = { + version: "0.8", + + specialKeys: { + 8: "backspace", + 9: "tab", + 10: "return", + 13: "return", + 16: "shift", + 17: "ctrl", + 18: "alt", + 19: "pause", + 20: "capslock", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 45: "insert", + 46: "del", + 59: ";", + 61: "=", + 96: "0", + 97: "1", + 98: "2", + 99: "3", + 100: "4", + 101: "5", + 102: "6", + 103: "7", + 104: "8", + 105: "9", + 106: "*", + 107: "+", + 109: "-", + 110: ".", + 111: "/", + 112: "f1", + 113: "f2", + 114: "f3", + 115: "f4", + 116: "f5", + 117: "f6", + 118: "f7", + 119: "f8", + 120: "f9", + 121: "f10", + 122: "f11", + 123: "f12", + 144: "numlock", + 145: "scroll", + 173: "-", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'" + }, + + shiftNums: { + "`": "~", + "1": "!", + "2": "@", + "3": "#", + "4": "$", + "5": "%", + "6": "^", + "7": "&", + "8": "*", + "9": "(", + "0": ")", + "-": "_", + "=": "+", + ";": ": ", + "'": "\"", + ",": "<", + ".": ">", + "/": "?", + "\\": "|" + }, + + // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url + textAcceptingInputTypes: [ + "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", + "datetime-local", "search", "color", "tel"], + + options: { + filterTextInputs: true + } + }; + + function keyHandler(handleObj) { + if (typeof handleObj.data === "string") { + handleObj.data = { + keys: handleObj.data + }; + } + + // Only care when a possible input has been specified + if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { + return; + } + + var origHandler = handleObj.handler, + keys = handleObj.data.keys.toLowerCase().split(" "); + + handleObj.handler = function(event) { + // Don't fire in text-accepting inputs that we didn't directly bind to + if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) || + (jQuery.hotkeys.options.filterTextInputs && + jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { + return; + } + + var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], + character = String.fromCharCode(event.which).toLowerCase(), + modif = "", + possible = {}; + + jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { + + if (event[specialKey + 'Key'] && special !== specialKey) { + modif += specialKey + '+'; + } + }); + + // metaKey is triggered off ctrlKey erronously + if (event.metaKey && !event.ctrlKey && special !== "meta") { + modif += "meta+"; + } + + if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { + modif = modif.replace("alt+ctrl+shift+", "hyper+"); + } + + if (special) { + possible[modif + special] = true; + } + else { + possible[modif + character] = true; + possible[modif + jQuery.hotkeys.shiftNums[character]] = true; + + // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" + if (modif === "shift+") { + possible[jQuery.hotkeys.shiftNums[character]] = true; + } + } + + for (var i = 0, l = keys.length; i < l; i++) { + if (possible[keys[i]]) { + return origHandler.apply(this, arguments); + } + } + }; + } + + jQuery.each(["keydown", "keyup", "keypress"], function() { + jQuery.event.special[this] = { + add: keyHandler + }; + }); + +})(jQuery || this.jQuery || window.jQuery); diff --git a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js new file mode 100644 index 000000000..63c0654d3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js @@ -0,0 +1,22 @@ +(function($) { + + + EdlpTheme = function(){ + + + function init(){ + console.log("EdlpTheme init()"); + + }; + + + init(); + } + + + $(document).ready(function($) { + var edlptheme = new EdlpTheme(); + }); + + +})(jQuery); diff --git a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.css b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.css new file mode 100644 index 000000000..aaf66ca45 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.css @@ -0,0 +1,14 @@ +body { + background: white; } + +.btn--hollow { + background: red; + display: inline-block; + padding: 10px; } + +body, html { + position: relative; + width: 100%; + height: 100%; + font-family: Georgia, serif; + font-style: normal; } diff --git a/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css new file mode 100644 index 000000000..ad9a43b94 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css @@ -0,0 +1,31 @@ +body { + background: white; } + +.btn--hollow { + background: red; + display: inline-block; + padding: 10px; } + +body, html { + position: relative; + width: 100%; + height: 100%; + font-family: Georgia, serif; + font-style: normal; } + +div.layout-container { + position: relative; + width: 100%; + height: 100%; + padding: 1em; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +header[role="banner"] { + outline: 1px solid blue; } + +main[role="main"] { + outline: 1px solid green; } + +footer[role="contentinfo"] { + outline: 1px solid pink; } diff --git a/sites/all/themes/custom/edlptheme/assets/scripts/main.js b/sites/all/themes/custom/edlptheme/assets/scripts/main.js new file mode 100644 index 000000000..63c0654d3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/scripts/main.js @@ -0,0 +1,22 @@ +(function($) { + + + EdlpTheme = function(){ + + + function init(){ + console.log("EdlpTheme init()"); + + }; + + + init(); + } + + + $(document).ready(function($) { + var edlptheme = new EdlpTheme(); + }); + + +})(jQuery); diff --git a/sites/all/themes/custom/edlptheme/assets/styles/app.scss b/sites/all/themes/custom/edlptheme/assets/styles/app.scss new file mode 100644 index 000000000..d9eb02e65 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/styles/app.scss @@ -0,0 +1,36 @@ +@import 'base/reset'; + +@import 'base/vars'; +@import 'base/grid'; +@import 'base/colors'; +@import 'base/buttons'; + + +body, html{ + position: relative; + width: 100%; + height:100%; + font-family: Georgia, serif; + font-style: normal; +} + + +div.layout-container{ + position: relative; + width:100%; height:100%; + padding:1em; + box-sizing: border-box; +} + +header[role="banner"]{ + outline: 1px solid blue; +} + + +main[role="main"]{ + outline:1px solid green; +} + +footer[role="contentinfo"]{ + outline: 1px solid pink; +} diff --git a/sites/all/themes/custom/edlptheme/assets/styles/base/_buttons.scss b/sites/all/themes/custom/edlptheme/assets/styles/base/_buttons.scss new file mode 100644 index 000000000..9368d0fe8 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/styles/base/_buttons.scss @@ -0,0 +1,25 @@ + +// Buttons +// +// Buttons +// +// Markup: +// Button +// +// .btn--hollow - Hollow button +// .btn--hollow-white - Hollow button +// .btn--blue - Blue button +// .btn--block - Block button +// .btn--small - Small button +// .btn--plain - Plain button +// +// Styleguide Common.Buttons + + +.btn { + &--hollow { + background: red; + display: inline-block; + padding: 10px; + } +} \ No newline at end of file diff --git a/sites/all/themes/custom/edlptheme/assets/styles/base/_colors.scss b/sites/all/themes/custom/edlptheme/assets/styles/base/_colors.scss new file mode 100644 index 000000000..e69de29bb diff --git a/sites/all/themes/custom/edlptheme/assets/styles/base/_grid.scss b/sites/all/themes/custom/edlptheme/assets/styles/base/_grid.scss new file mode 100644 index 000000000..e69de29bb diff --git a/sites/all/themes/custom/edlptheme/assets/styles/base/_reset.scss b/sites/all/themes/custom/edlptheme/assets/styles/base/_reset.scss new file mode 100644 index 000000000..dd412f413 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/assets/styles/base/_reset.scss @@ -0,0 +1,3 @@ +body { + background: white; +} \ No newline at end of file diff --git a/sites/all/themes/custom/edlptheme/assets/styles/base/_vars.scss b/sites/all/themes/custom/edlptheme/assets/styles/base/_vars.scss new file mode 100644 index 000000000..e69de29bb diff --git a/sites/all/themes/custom/edlptheme/bower.json b/sites/all/themes/custom/edlptheme/bower.json new file mode 100644 index 000000000..a23642fb3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/bower.json @@ -0,0 +1,20 @@ +{ + "name": "edlp_d8_theme", + "version": "1.0.0", + "authors": [ + "Bachir Soussi Chiadmi " + ], + "license": "MIT", + "homepage": "http://encyclopediedelaparole.org", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "history.js": "latest", + "jquery.hotkeys": "latest" + } +} diff --git a/sites/all/themes/custom/edlptheme/edlptheme.info.yml b/sites/all/themes/custom/edlptheme/edlptheme.info.yml new file mode 100644 index 000000000..95a7b1965 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/edlptheme.info.yml @@ -0,0 +1,31 @@ +name: edlp +description: 'EDLP Drupal 8 theme with gulp' +type: theme +base theme: classy +core: 8.x +libraries: + - core/normalize + - edlptheme/global-css + - edlptheme/history-js + - edlptheme/global-js + +# stylesheets-remove: +# - core/assets/vendor/normalize-css/normalize.css +# - core/modules/system/css/system.module.css +# - core/modules/system/css/system.theme.css +# - core/modules/views/css/views.module.css + +# regions: +# content: Content +# content_top: 'Content Top' +# content_bottom: 'Content Bottom' +# nav: Navigation +# front_one: 'Front One' +# front_two: 'Front Two' +# front_three: 'Front Three' +# front_four: 'Front Four' +# front_five: 'Front Five' +# front_six: 'Front Six' +# front_seven: 'Front Seven' +# front_eight: 'Front Eight' +# footer: Footer diff --git a/sites/all/themes/custom/edlptheme/edlptheme.libraries.yml b/sites/all/themes/custom/edlptheme/edlptheme.libraries.yml new file mode 100644 index 000000000..b3826f5c6 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/edlptheme.libraries.yml @@ -0,0 +1,17 @@ +global-css: + version: VERSION + css: + base: + assets/dist/styles/app.min.css: {} + +global-js: + version: VERSION + js: + bower_components/history.js/scripts/bundled/html4+html5/jquery.history.js: { scope: footer } + assets/dist/bower/jquery.hotkeys.js: { scope: footer } + assets/dist/scripts/main.min.js: { scope: footer } + dependencies: + - core/matchmedia + - core/matchmedia.addListener + - core/jquery + - core/jquery.once diff --git a/sites/all/themes/custom/edlptheme/gulpfile.js b/sites/all/themes/custom/edlptheme/gulpfile.js new file mode 100644 index 000000000..673ea7840 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/gulpfile.js @@ -0,0 +1,60 @@ +'use strict'; + +var gulp = require('gulp'); +var util = require('gulp-util'); +var sass = require('gulp-sass'); +var watch = require('gulp-watch'); +var autoprefixer = require('gulp-autoprefixer'); +var jsmin = require('gulp-jsmin'); +var cssmin = require('gulp-cssmin'); +var rename = require('gulp-rename'); +var mainBowerFiles = require('main-bower-files'); + +function handleError(err) { + console.log(err.toString()); +} + +var config = { + assetsDir : './assets', + production: !!util.env.production +} + +gulp.task('scripts', function () { + gulp.src('./assets/scripts/main.js') + .pipe(config.production ? jsmin() : util.noop()) + .pipe(rename({suffix: '.min'})) + .pipe(gulp.dest('./assets/dist/scripts/')); +}); + +gulp.task('styles', function () { + gulp.src('./assets/styles/app.scss') + .pipe(sass().on('error', sass.logError)) + .pipe(autoprefixer({ + browsers: ['last 2 versions'], + cascade: false + })).on('error', handleError) + .pipe(config.production ? cssmin() : util.noop()) + .pipe(rename({suffix: '.min'})) + .pipe(gulp.dest('./assets/dist/styles/')); +}); + +gulp.task('bower', function() { + gulp.src(mainBowerFiles({ + "overrides":{ + "history.js":{ + "main":"scripts/bundled/html4+html5/jquery.history.js" + }, + "jquery":{ + "ignore":true + } + } + })) + .pipe(gulp.dest('./assets/dist/bower/')); +}); + +// default gulp task +gulp.task('default', ['bower', 'scripts', 'styles'], function() { + gulp.watch('./assets/styles/*.scss', ['styles']); + gulp.watch('./assets/styles/*/*.scss', ['styles']); + gulp.watch('./assets/scripts/*.js', ['scripts']); +}); diff --git a/sites/all/themes/custom/edlptheme/package.json b/sites/all/themes/custom/edlptheme/package.json new file mode 100644 index 000000000..eef020ffc --- /dev/null +++ b/sites/all/themes/custom/edlptheme/package.json @@ -0,0 +1,22 @@ +{ + "name": "edlpd8theme", + "version": "0.0.1", + "description": "A theme for drupal.", + "main": "gulpfile.js", + "author": "Bachir Soussi Chiadmi", + "license": "GPLv3", + "homepage": "https://encyclopediedelaparole.org", + "devDependencies": { + "gulp": "latest", + "gulp-autoprefixer": "latest", + "gulp-cssmin": "latest", + "gulp-jsmin": "latest", + "gulp-rename": "latest", + "gulp-sass": "latest", + "gulp-strip-debug": "latest", + "gulp-util": "latest", + "gulp-watch": "latest", + "main-bower-files": "latest" + }, + "dependencies": {} +} diff --git a/sites/all/themes/custom/edlptheme/templates/block/block--system-branding-block.html.twig b/sites/all/themes/custom/edlptheme/templates/block/block--system-branding-block.html.twig new file mode 100644 index 000000000..7c3b7dea1 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/block/block--system-branding-block.html.twig @@ -0,0 +1,30 @@ +{% extends "block.html.twig" %} +{# +/** + * @file + * Theme override for a branding block. + * + * Each branding element variable (logo, name, slogan) is only available if + * enabled in the block configuration. + * + * Available variables: + * - site_logo: Logo for site as defined in Appearance or theme settings. + * - site_name: Name for site as defined in Site information settings. + * - site_slogan: Slogan for site as defined in Site information settings. + */ +#} +{% block content %} + {% if site_logo %} + + {% endif %} + {% if site_name %} + + {% endif %} + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +{% endblock %} diff --git a/sites/all/themes/custom/edlptheme/templates/layout/html.html.twig b/sites/all/themes/custom/edlptheme/templates/layout/html.html.twig new file mode 100644 index 000000000..4fe57a01c --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/layout/html.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override for the basic structure of a single Drupal page. + * + * Variables: + * - logged_in: A flag indicating if user is logged in. + * - root_path: The root path of the current page (e.g., node, admin, user). + * - node_type: The content type for the current node, if the page is a node. + * - head_title: List of text elements that make up the head_title variable. + * May contain one or more of the following: + * - title: The title of the page. + * - name: The name of the site. + * - slogan: The slogan of the site. + * - page_top: Initial rendered markup. This should be printed before 'page'. + * - page: The rendered page markup. + * - page_bottom: Closing rendered markup. This variable should be printed after + * 'page'. + * - db_offline: A flag indicating if the database is offline. + * - placeholder_token: The token for generating head, css, js and js-bottom + * placeholders. + * + * @see template_preprocess_html() + */ +#} +{% + set body_classes = [ + logged_in ? 'user-logged-in', + not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class, + node_type ? 'page-node-type-' ~ node_type|clean_class, + db_offline ? 'db-offline', + ] +%} + + + + + {{ head_title|safe_join(' | ') }} + + + + + {# + Keyboard navigation/accessibility link to main content section in + page.html.twig. + #} + + {{ page_top }} + {{ page }} + {{ page_bottom }} + + + diff --git a/sites/all/themes/custom/edlptheme/templates/layout/maintenance-page.html.twig b/sites/all/themes/custom/edlptheme/templates/layout/maintenance-page.html.twig new file mode 100644 index 000000000..7463b0238 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/layout/maintenance-page.html.twig @@ -0,0 +1,65 @@ +{# +/** + * @file + * Theme override to display a single Drupal page while offline. + * + * All available variables are mirrored in page.html.twig. + * Some may be blank but they are provided for consistency. + * + * @see template_preprocess_maintenance_page() + */ +#} +
+ +
+ {% if logo %} + + {{ 'Home'|t }} + + {% endif %} + + {% if site_name or site_slogan %} +
+ {% if site_name %} +

+ {{ site_name }} +

+ {% endif %} + + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +
{# /.name-and-slogan #} + {% endif %} + +
+ +
+ {% if title %} +

{{ title }}

+ {% endif %} + + {{ page.highlighted }} + + {{ page.content }} +
+ + {% if page.sidebar_first %} + {# /.layout-sidebar-first #} + {% endif %} + + {% if page.sidebar_second %} + {# /.layout-sidebar-second #} + {% endif %} + + {% if page.footer %} +
+ {{ page.footer }} +
+ {% endif %} + +
{# /.layout-container #} diff --git a/sites/all/themes/custom/edlptheme/templates/layout/page.html.twig b/sites/all/themes/custom/edlptheme/templates/layout/page.html.twig new file mode 100644 index 000000000..0f5ba83f2 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/layout/page.html.twig @@ -0,0 +1,87 @@ +{# +/** + * @file + * Theme override to display a single page. + * + * The doctype, html, head and body tags are not in this template. Instead they + * can be found in the html.html.twig template in this directory. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. Will usually be + * "/" unless you have installed Drupal in a sub-directory. + * - is_front: A flag indicating if the current page is the front page. + * - logged_in: A flag indicating if the user is registered and signed in. + * - is_admin: A flag indicating if the user has permission to access + * administration pages. + * + * Site identity: + * - front_page: The URL of the front page. Use this instead of base_path when + * linking to the front page. This includes the language domain or prefix. + * + * Page content (in order of occurrence in the default page.html.twig): + * - node: Fully loaded node, if there is an automatically-loaded node + * associated with the page and the node ID is the second argument in the + * page's path (e.g. node/12345 and node/12345/revisions, but not + * comment/reply/12345). + * + * Regions: + * - page.header: Items for the header region. + * - page.primary_menu: Items for the primary menu region. + * - page.secondary_menu: Items for the secondary menu region. + * - page.highlighted: Items for the highlighted content region. + * - page.help: Dynamic help text, mostly for admin pages. + * - page.content: The main content of the current page. + * - page.sidebar_first: Items for the first sidebar. + * - page.sidebar_second: Items for the second sidebar. + * - page.footer: Items for the footer region. + * - page.breadcrumb: Items for the breadcrumb region. + * + * @see template_preprocess_page() + * @see html.html.twig + */ +#} +
+ +
+ {{ page.header }} +
+ + {{ page.primary_menu }} + {{ page.secondary_menu }} + + {{ page.breadcrumb }} + + {{ page.highlighted }} + + {{ page.help }} + +
+ {# link is in html.html.twig #} + +
+ {{ page.content }} +
{# /.layout-content #} + + {% if page.sidebar_first %} + + {% endif %} + + {% if page.sidebar_second %} + + {% endif %} + +
+ + {% if page.footer %} +
+ {{ page.footer }} +
+ {% endif %} + +
{# /.layout-container #} diff --git a/sites/all/themes/custom/edlptheme/templates/layout/region.html.twig b/sites/all/themes/custom/edlptheme/templates/layout/region.html.twig new file mode 100644 index 000000000..95e71cec3 --- /dev/null +++ b/sites/all/themes/custom/edlptheme/templates/layout/region.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override to display a region. + * + * Available variables: + * - content: The content for this region, typically blocks. + * - attributes: HTML attributes for the region
. + * - region: The name of the region variable as defined in the theme's + * .info.yml file. + * + * @see template_preprocess_region() + */ +#} +{% + set classes = [ + 'region', + 'region-' ~ region|clean_class, + ] +%} +{% if content %} + + {{ content }} +
+{% endif %} diff --git a/sites/all/themes/custom/edlptheme/theme.theme b/sites/all/themes/custom/edlptheme/theme.theme new file mode 100644 index 000000000..e45b0e99f --- /dev/null +++ b/sites/all/themes/custom/edlptheme/theme.theme @@ -0,0 +1,6 @@ +