I'm trying to add disqus to my blog and I tried following this guide to do so:
http://disqus.com/docs/patch-blogger/
However their instructions are completely off with what I have on my custom template.
Here is the template:
http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<b:skin><![CDATA[/*-----------------------------------------------
Blogger Template Style
Name: Picture Window
Designer: Josh Peterson
URL: www.noaesthetic.com
----------------------------------------------- */
/* Variable definitions
====================
http://themes.googleusercontent.com/image?id=1OACCYOE0-eoTRTfsBuX1NMN9nz599ufI1Jh0CggPFA_sK80AGkIr8pLtYRpNUKPmwtEa) repeat-x fixed top center" value="#9a927f url(http://themes.googleusercontent.com/image?id=0BwVBOzw_-hbMODUwNDk4YWQtMjg4NS00MzlmLWJhNzMtYzM5ZmIzYzdkZDRj) no-repeat fixed top center /* Credit: peeterv (http://www.istockphoto.com/googleimages.php?id=2646746&platform=blogger) */"/>
http://www.blogblog.com/1kt/transparent/white80.png) repeat scroll top left"/>
http://www.blogblog.com/1kt/transparent/header_gradient_shade.png)"/>
http://www.blogblog.com/1kt/transparent/tabs_gradient_shade.png)"/>
http://www.blogblog.com/1kt/transparent/white80.png)" value="url(http://www.blogblog.com/1kt/transparent/tabs_gradient_shade.png)"/>
http://www.blogblog.com/1kt/transparent/black50.png) repeat scroll top left" value="transparent none no-repeat scroll top left"/>
http://www.blogblog.com/1kt/transparent/white80.png) repeat scroll top left" value="transparent none repeat scroll top center"/>
http://www.blogblog.com/1kt/transparent/black50.png) repeat scroll top left" value="transparent url(http://www.blogblog.com/1kt/transparent/black50.png) repeat scroll top left"/>
*/
/* Content
----------------------------------------------- */
body {
font: $(body.font);
color: $(body.text.color);
}
html body .region-inner {
min-width: 0;
max-width: 100%;
width: auto;
}
.content-outer {
font-size: 90%;
}
a:link {
text-decoration:none;
color: $(link.color);
}
a:visited {
text-decoration:none;
color: $(link.visited.color);
}
a:hover {
text-decoration:underline;
color: $(link.hover.color);
}
.body-fauxcolumn-outer {
background: $(body.background);
}
.content-outer {
background: $(content.background);
-moz-border-radius: $(content.border.radius);
-webkit-border-radius: $(content.border.radius);
-goog-ms-border-radius: $(content.border.radius);
border-radius: $(content.border.radius);
-moz-box-shadow: 0 0 $(content.shadow.spread) rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 $(content.shadow.spread) rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 0 $(content.shadow.spread) rgba(0, 0, 0, .15);
box-shadow: 0 0 $(content.shadow.spread) rgba(0, 0, 0, .15);
margin: $(content.margin) auto;
}
.content-inner {
padding: $(content.padding);
}
/* Header
----------------------------------------------- */
.header-outer {
background: $(header.background.color) $(header.background.gradient) repeat-x scroll top left;
_background-image: none;
color: $(header.text.color);
-moz-border-radius: $(header.border.radius);
-webkit-border-radius: $(header.border.radius);
-goog-ms-border-radius: $(header.border.radius);
border-radius: $(header.border.radius);
}
.Header img, .Header #header-inner {
-moz-border-radius: $(header.border.radius);
-webkit-border-radius: $(header.border.radius);
-goog-ms-border-radius: $(header.border.radius);
border-radius: $(header.border.radius);
}
.header-inner .Header .titlewrapper,
.header-inner .Header .descriptionwrapper {
padding-left: $(header.padding);
padding-right: $(header.padding);
}
.Header h1 {
font: $(header.font);
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
.Header h1 a {
color: $(header.text.color);
}
.Header .description {
font-size: 130%;
}
/* Tabs
----------------------------------------------- */
.tabs-inner {
margin: .5em $(tabs.margin.sides) $(tabs.margin.bottom);
padding: 0;
}
.tabs-inner .section {
margin: 0;
}
.tabs-inner .widget ul {
padding: 0;
background: $(tabs.background.color) $(tabs.background.gradient) repeat scroll bottom;
-moz-border-radius: $(tabs.border.radius);
-webkit-border-radius: $(tabs.border.radius);
-goog-ms-border-radius: $(tabs.border.radius);
border-radius: $(tabs.border.radius);
}
.tabs-inner .widget li {
border: none;
}
.tabs-inner .widget li a {
display: block;
padding: .5em 1em;
margin-$endSide: $(tabs.spacing);
color: $(tabs.text.color);
font: $(tabs.font);
-moz-border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
-webkit-border-top-left-radius: $(tab.border.radius);
-webkit-border-top-right-radius: $(tab.border.radius);
-goog-ms-border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
background: $(tab.background);
border-$endSide: 1px solid $(tabs.separator.color);
}
.tabs-inner .widget li:first-child a {
padding-$startSide: 1.25em;
-moz-border-radius-top$startSide: $(tab.first.border.radius);
-moz-border-radius-bottom$startSide: $(tabs.border.radius);
-webkit-border-top-$startSide-radius: $(tab.first.border.radius);
-webkit-border-bottom-$startSide-radius: $(tabs.border.radius);
-goog-ms-border-top-$startSide-radius: $(tab.first.border.radius);
-goog-ms-border-bottom-$startSide-radius: $(tabs.border.radius);
border-top-$startSide-radius: $(tab.first.border.radius);
border-bottom-$startSide-radius: $(tabs.border.radius);
}
.tabs-inner .widget li.selected a,
.tabs-inner .widget li a:hover {
position: relative;
z-index: 1;
background: $(tabs.selected.background.color) $(tab.selected.background.gradient) repeat scroll bottom;
color: $(tabs.selected.text.color);
-moz-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
}
/* Headings
----------------------------------------------- */
h2 {
font: $(widget.title.font);
text-transform: $(widget.title.text.transform);
color: $(widget.title.text.color);
margin: .5em 0;
}
/* Main
----------------------------------------------- */
.main-outer {
background: $(main.background);
-moz-border-radius: $(main.border.radius.top) $(main.border.radius.top) 0 0;
-webkit-border-top-left-radius: $(main.border.radius.top);
-webkit-border-top-right-radius: $(main.border.radius.top);
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-goog-ms-border-radius: $(main.border.radius.top) $(main.border.radius.top) 0 0;
border-radius: $(main.border.radius.top) $(main.border.radius.top) 0 0;
-moz-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
}
.main-inner {
padding: 15px $(main.padding.sides) 20px;
}
.main-inner .column-center-inner {
padding: 0 0;
}
.main-inner .column-left-inner {
padding-left: 0;
}
.main-inner .column-right-inner {
padding-right: 0;
}
/* Posts
----------------------------------------------- */
h3.post-title {
margin: 0;
font: $(post.title.font);
}
.comments h4 {
margin: 1em 0 0;
font: $(post.title.font);
}
.post-outer {
background-color: $(post.background.color);
border: solid 1px $(post.border.color);
-moz-border-radius: $(post.border.radius);
-webkit-border-radius: $(post.border.radius);
border-radius: $(post.border.radius);
-goog-ms-border-radius: $(post.border.radius);
padding: 15px 20px;
margin: 0 $(post.margin.sides) 20px;
}
.post-body {
line-height: 1.4;
font-size: 110%;
}
.post-header {
margin: 0 0 1.5em;
color: $(post.footer.text.color);
line-height: 1.6;
}
.post-footer {
margin: .5em 0 0;
color: $(post.footer.text.color);
line-height: 1.6;
}
blog-pager {
font-size: 140%
}
comments .comment-author {
padding-top: 1.5em;
border-top: dashed 1px #ccc;
border-top: dashed 1px rgba(128, 128, 128, .5);
background-position: 0 1.5em;
}
comments .comment-author:first-child {
padding-top: 0;
border-top: none;
}
.avatar-image-container {
margin: .2em 0 0;
}
/* Widgets
----------------------------------------------- */
.widget ul, .widget #ArchiveList ul.flat {
padding: 0;
list-style: none;
}
.widget ul li, .widget #ArchiveList ul.flat li {
border-top: dashed 1px #ccc;
border-top: dashed 1px rgba(128, 128, 128, .5);
}
.widget ul li:first-child, .widget #ArchiveList ul.flat li:first-child {
border-top: none;
}
.widget .post-body ul {
list-style: disc;
}
.widget .post-body ul li {
border: none;
}
/* Footer
----------------------------------------------- */
.footer-outer {
color:$(footer.text.color);
background: $(footer.background);
-moz-border-radius: $(footer.border.radius.top) $(footer.border.radius.top) $(footer.border.radius.bottom) $(footer.border.radius.bottom);
-webkit-border-top-left-radius: $(footer.border.radius.top);
-webkit-border-top-right-radius: $(footer.border.radius.top);
-webkit-border-bottom-left-radius: $(footer.border.radius.bottom);
-webkit-border-bottom-right-radius: $(footer.border.radius.bottom);
-goog-ms-border-radius: $(footer.border.radius.top) $(footer.border.radius.top) $(footer.border.radius.bottom) $(footer.border.radius.bottom);
border-radius: $(footer.border.radius.top) $(footer.border.radius.top) $(footer.border.radius.bottom) $(footer.border.radius.bottom);
-moz-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
box-shadow: 0 $(region.shadow.offset) $(region.shadow.spread) rgba(0, 0, 0, .15);
}
.footer-inner {
padding: 10px $(main.padding.sides) 20px;
}
.footer-outer a {
color: $(footer.link.color);
}
.footer-outer a:visited {
color: $(footer.link.visited.color);
}
.footer-outer a:hover {
color: $(footer.link.hover.color);
}
.footer-outer .widget h2 {
color: $(footer.widget.title.text.color);
}
]]>
<b:template-skin>
<b:variable default='930px' name='content.width' type='length' value='930px'/>
<b:variable default='0' name='main.column.left.width' type='length' value='180px'/>
<b:variable default='360px' name='main.column.right.width' type='length' value='180px'/>
<![CDATA[
body {
min-width: $(content.width);
}
.content-outer, .region-inner {
min-width: $(content.width);
max-width: $(content.width);
_width: $(content.width);
}
.main-inner .columns {
padding-left: $(main.column.left.width);
padding-right: $(main.column.right.width);
}
.main-inner .fauxcolumn-center-outer {
left: $(main.column.left.width);
right: $(main.column.right.width);
/* IE6 does not respect left and right together */
_width: expression(this.parentNode.offsetWidth -
parseInt("$(main.column.left.width)") -
parseInt("$(main.column.right.width)") + 'px');
}
.main-inner .fauxcolumn-left-outer {
width: $(main.column.left.width);
}
.main-inner .fauxcolumn-right-outer {
width: $(main.column.right.width);
}
.main-inner .column-left-outer {
width: $(main.column.left.width);
right: $(main.column.left.width);
margin-right: -$(main.column.left.width);
}
.main-inner .column-right-outer {
width: $(main.column.right.width);
margin-right: -$(main.column.right.width);
}
#layout {
min-width: 0;
}
#layout .content-outer {
min-width: 0;
width: 800px;
}
#layout .region-inner {
min-width: 0;
width: auto;
}
]]>
</b:template-skin>
<header>
<div class='header-outer'>
<div class='header-cap-top cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left header-fauxborder-left'>
<div class='fauxborder-right header-fauxborder-right'/>
<div class='region-inner header-inner'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<div class='tabs-outer'>
<div class='tabs-cap-top cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left tabs-fauxborder-left'>
<div class='fauxborder-right tabs-fauxborder-right'/>
<div class='region-inner tabs-inner'>
<b:section class='tabs' id='crosscol' maxwidgets='1' showaddelement='yes'>
<div class='main-outer'>
<div class='main-cap-top cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left main-fauxborder-left'>
<div class='fauxborder-right main-fauxborder-right'/>
<div class='region-inner main-inner'>
<div class='columns fauxcolumns'>
<div class='fauxcolumn-outer fauxcolumn-center-outer'>
<div class='cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left'>
<div class='fauxborder-right'/>
<div class='fauxcolumn-inner'>
</div>
</div>
<div class='cap-bottom'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
</div>
<div class='fauxcolumn-outer fauxcolumn-left-outer'>
<div class='cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left'>
<div class='fauxborder-right'/>
<div class='fauxcolumn-inner'>
</div>
</div>
<div class='cap-bottom'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
</div>
<div class='fauxcolumn-outer fauxcolumn-right-outer'>
<div class='cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left'>
<div class='fauxborder-right'/>
<div class='fauxcolumn-inner'>
</div>
</div>
<div class='cap-bottom'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
</div>
<!-- corrects IE6 width calculation -->
<div class='columns-inner'>
<div class='column-center-outer'>
<div class='column-center-inner'>
<b:section class='main' id='main' showaddelement='no'>
<div class='column-left-outer'>
<div class='column-left-inner'>
<aside>
<macro:include id='main-column-left-sections' name='sections'>
<macro:param default='0' name='num' value='1'/>
<macro:param default='sidebar-left' name='idPrefix'/>
<macro:param default='sidebar' name='class'/>
<macro:param default='true' name='includeBottom'/>
</macro:include>
</aside>
</div>
</div>
<div class='column-right-outer'>
<div class='column-right-inner'>
<aside>
<macro:include id='main-column-right-sections' name='sections'>
<macro:param default='2' name='num' value='1'/>
<macro:param default='sidebar-right' name='idPrefix'/>
<macro:param default='sidebar' name='class'/>
<macro:param default='true' name='includeBottom'/>
</macro:include>
</aside>
</div>
</div>
</div>
<div style='clear: both'/>
<!-- columns -->
</div>
<!-- main -->
</div>
</div>
<div class='main-cap-bottom cap-bottom'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
</div>
<footer>
<div class='footer-outer'>
<div class='footer-cap-top cap-top'>
<div class='cap-left'/>
<div class='cap-right'/>
</div>
<div class='fauxborder-left footer-fauxborder-left'>
<div class='fauxborder-right footer-fauxborder-right'/>
<div class='region-inner footer-inner'>
<macro:include id='footer-sections' name='sections'>
<macro:param default='2' name='num' value='3'/>
<macro:param default='footer' name='idPrefix'/>
<macro:param default='foot' name='class'/>
<macro:param default='false' name='includeBottom'/>
</macro:include>
<!-- outside of the include in order to lock Attribution widget -->
<b:section class='foot' id='footer-3' showaddelement='no'>
document.body.className = document.body.className.replace('loading', '');
<macro:if cond='data:col.num >= 2'>
<table border='0' cellpadding='0' cellspacing='0' mexpr:class='"section-columns columns-" + data:col.num'>
<tbody>
<tr>
<td class='first columns-cell'>
<b:section mexpr:class='data:col.class' mexpr:id='data:col.idPrefix + "-2-1"'/>
</td>
<td class='columns-cell'>
<b:section mexpr:class='data:col.class' mexpr:id='data:col.idPrefix + "-2-2"'/>
</td>
<macro:if cond='data:col.num >= 3'>
<td class='columns-cell'>
<b:section mexpr:class='data:col.class' mexpr:id='data:col.idPrefix + "-2-3"'/>
</td>
</macro:if>
<macro:if cond='data:col.num >= 4'>
<td class='columns-cell'>
<b:section mexpr:class='data:col.class' mexpr:id='data:col.idPrefix + "-2-4"'/>
</td>
</macro:if>
</tr>
</tbody>
</table>
<macro:if cond='data:col.includeBottom'>
<b:section mexpr:class='data:col.class' mexpr:id='data:col.idPrefix + "-3"' showaddelement='no'/>
</macro:if>
</macro
Related
So the difficulty I have, is that I cannot get an addEventListener for each day in my calender.
I want to add an event listener, so that when the user clicks on it, it displays the plans they have for that day.
Whenever I try to run it, it sometimes gives me an error, and then other times nothing happens. I am aware this has something to do with closures, but I am relatively new to javascript.
I tried querySelectorAll, but that did not work either
window.addEventListener("load", function() {
/*****************************
1. When confirm button clicked, gather information and put it in a data base
2. Reset the planifier
3. Put info in the corresponding date
4. When hovering over a date with a plan, show the plans
5. When the next/previous month button clicked, change the month
7. Reset the plan
6. Update the month UI
7. Add correspond dates and remove last plans from the UI
*****************************/
// UI CONTROLLER
var UIController = (function() {
// Sets all inputs
var DOMStrings = {
calenderMonth: ".calender-month",
confirmButton: ".confirm",
inputDate: ".ask-date",
inputItem1: ".ask-item1",
inputItem2: ".ask-item2",
inputItem3: ".ask-item3",
inputItem4: ".ask-item4",
warningText: ".warning"
}
return {
calenderDefault: function() {
//
var now, currentDay, weekDays, currentWeekDay, calenderRow, months, currentMonth, currentYear, firstDayThisMonth, prevMonth, lastDayOfMonth, lastWeekDayLastMonth;
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
now = new Date();
currentYear = now.getFullYear(); //2020
currentDay = now.getDate();
currentWeekDay = weekDays[now.getDay()];
currentMonth = months[now.getMonth()];
firstDayThisMonth = new Date(now.getFullYear(), now.getMonth(), 1).getDay();
prevMonth = new Date(now.getFullYear(), now.getMonth(), 0);
lastWeekDayLastMonth = prevMonth.getDay();
lastDayOfMonth = (new Date(now.getFullYear(), now.getMonth() + 1, 0)).getDate();
// Clears out boxes in the first row that don't belong to the current month as well as adding the correct numbers to the date
function replace(a) {
var i;
for (i = 0; i < 7; i++) {
if (counter > lastDayOfMonth) {
counter++;
document.getElementById(a + "-" + weekDays[i]).textContent = "";
document.getElementById(a + "-" + weekDays[i]).style.borderColor = "#ff9999";
} else if (counter <= lastDayOfMonth) {
document.getElementById(a + "-" + weekDays[i]).textContent = counter;
counter++;
}
}
}
for (var a = 1; a <= 6; a++) {
var counter;
if (a === 1) {
counter = 1;
for (i = lastWeekDayLastMonth; i >= 0; i--) {
document.getElementById(a + "-" + weekDays[i]).textContent = "";
document.getElementById(a + "-" + weekDays[i]).style.borderColor = "#ff9999";
}
for (i = lastWeekDayLastMonth + 1; i < 7; i++) {
document.getElementById(a + "-" + weekDays[i]).textContent = counter;
counter++;
}
} else if (a === 2) {
replace(a);
} else if (a === 3) {
replace(a);
} else if (a === 4) {
replace(a);
} else if (a === 5) {
replace(a);
} else if (a === 6) {
replace(a);
}
}
// This sets the title of the calender AKA the h2
document.querySelector(DOMStrings.calenderMonth).textContent = currentMonth + ", " + currentYear;
// This makes the border of the current day black (or another color if I change it)
if (currentDay < (7 - firstDayThisMonth)) {
calenderRow = 1;
} else if (currentDay < (14 - firstDayThisMonth)) {
calenderRow = 2;
} else if (currentDay < (21 - firstDayThisMonth)) {
calenderRow = 3;
} else if (currentDay < (28 - firstDayThisMonth)) {
calenderRow = 4;
} else if (currentDay < (35 - firstDayThisMonth)) {
calenderRow = 5;
} else {
calenderRow = 6;
}
document.getElementById(calenderRow + "-" + currentWeekDay).style.borderColor = "black";
},
resetValues: function() {
//reset values
document.querySelector(DOMStrings.inputDate).value = "";
document.querySelector(DOMStrings.inputItem1).value = "";
document.querySelector(DOMStrings.inputItem2).value = "";
document.querySelector(DOMStrings.inputItem3).value = "";
document.querySelector(DOMStrings.inputItem4).value = "";
//clear the warning
document.querySelector(DOMStrings.warningText).textContent = "";
},
getValues: function() {
return {
date: document.querySelector(DOMStrings.inputDate).value,
item1: document.querySelector(DOMStrings.inputItem1).value,
item2: document.querySelector(DOMStrings.inputItem2).value,
item3: document.querySelector(DOMStrings.inputItem3).value,
item4: document.querySelector(DOMStrings.inputItem4).value,
}
},
getDOMStrings: function() {
return DOMStrings;
}
};
})();
// DATA CONTROLLER
var dataController = (function() {
return {
data: {
plans: [],
}
};
})();
// APP CONTROLLER
var appController = (function(UICtrl, DATACtrl) {
var DOM;
var setUpEventListeners = function() {
var weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
DOM = UICtrl.getDOMStrings();
// If confirm button clicked, do this
document.querySelector(DOM.confirmButton).addEventListener("click", planify);
document.getElementById("1-Monday").addEventListener("click", showPlans);
// STACK OVERFLOW USERS HERE
for (var a = 1; a < 7; a++) {
for (var i = 0; i < 7; i++) {
document.getElementById(a + "-" + weekDays[i]).addEventListener("click", showPlans);
}
}
};
var checkInput = function(input) {
if (input.date === "") {
document.querySelector(DOM.warningText).textContent = "Please put a date";
} else if (input.item1 === "" && input.item2 === "" && input.item3 === "" && input.item4 === "") {
document.querySelector(DOM.warningText).textContent = "Please put atleast one, ONE ITEM. thank you :)";
} else if (input.item1 == false) {
document.querySelector(DOM.warningText).textContent = "You couldn't be normal and just put it in the first slot ey?";
} else {
// store values in data
DATACtrl.data.plans.push(input);
console.log(DATACtrl.data.plans);
// reset the values
UICtrl.resetValues();
}
};
var planify = function(event) {
var input;
//get values
input = UICtrl.getValues();
// check if values are in the input
checkInput(input);
//put values on UI
// 1. put icon to show it is there
// 2. when clicked, it shows the box with the values
};
var showPlans = function() {
DATACtrl.data.plans.push("asdadasda");
console.log(DATACtrl.data.plans);
}
return {
init: function() {
// 1. Set calender month and year to current time
UIController.calenderDefault();
// 2. Set up event listeners
setUpEventListeners();
}
};
})(UIController, dataController);
appController.init();
});
* {
font-family: "Helvetica", "arial";
}
body {
margin: 0;
background-color: #1f1f60;
}
div {
margin: 0;
}
/* Top panel with mountains image*/
.panel {
background: url(mountains.jpg);
box-shadow: 0px 0px 10px 1px black;
height: 400px;
width: 100%;
background-position: 10% 40%;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
text-align: center;
margin: 10
}
.boxes {
display: inline-block;
position: relative;
top: 100px;
}
.container {
text-align: center;
}
/* Left box in .panel */
.left-box {
box-shadow: 0px 0px 10px 1px black;
display: inline-block;
background-color: white;
width: auto;
padding: 26px 25px 26px 25px;
border-radius: 15px;
vertical-align: bottom;
margin: 0 5px 0 5px;
}
.statisticsTitle {
padding: 10px 20px 10px 20px;
font-size: 30px;
}
.information-plans {
background: rgb(255, 51, 51);
background: linear-gradient(35deg, rgba(255, 51, 51, 1) 0%, rgba(255, 175, 62, 1) 100%);
padding: 15px 10px 15px 10px;
border: 1px solid;
border-radius: 10px;
color: white;
}
.totalPlans {
padding: 5px;
}
.totalPlans-title {
display: inline-block;
}
.totalPlans-output {
display: inline-block;
}
.completedPlans {
padding: 5px;
}
.completedPlans-title {
display: inline-block;
}
.completedPlans-output {
display: inline-block;
}
/* Right box in .panel */
.right-box {
box-shadow: 0px 0px 10px 1px black;
display: inline-block;
background: white;
width: auto;
padding: 25px;
border-radius: 15px;
margin: 0 5px 0 5px;
}
.information-all {
z-index: 5;
}
.planifierTitle {
padding: 10px 20px 10px 20px;
font-size: 30px;
}
.inputFields {}
.ask {
color: white;
background: rgb(255, 51, 51);
background: linear-gradient(35deg, rgba(255, 51, 51, 1) 0%, rgba(255, 175, 62, 1) 100%);
display: inline-block;
padding: 15px 10px 15px 10px;
border: 1px solid;
border-radius: 10px;
vertical-align: top;
}
input {
padding: 3px 2px 3px 2px;
display: block;
width: 125px;
border: 1px solid white;
border-radius: 7px;
height: 20px;
margin-top: 10px;
}
.btn-confirm {
display: inline-block;
border: 1px solid #00ff99;
border-radius: 11.5px;
}
.confirm {
color: white;
height: 88px;
width: 153px;
border: 1px solid #00ff99;
border-radius: 10px;
font-size: 25px;
background-color: #00ff99;
}
button:hover {
cursor: pointer;
}
.warning {
position: absolute;
color: red;
font-size: 14px;
}
.planPresenter {
position: relative;
display: inline-block;
vertical-align: center;
box-shadow: 0px 0px 10px 1px black;
padding: 0 0 50px 0;
background: rgb(255, 51, 51);
background: linear-gradient(35deg, rgba(255, 51, 51, 1) 0%, rgba(255, 175, 62, 1) 100%);
top: -30px;
width: 1010px;
height: auto;
text-align: center;
border: 1px solid #ff3333;
border-radius: 10px;
margin: 10px;
z-index: -1;
}
.calender-box {
display: inline-block;
margin: 30px 20px 20px 20px;
}
.calender-row {
margin: 0;
padding: ;
}
.calender-day {
vertical-align: top;
display: inline-block;
height: 100px;
width: 100px;
border: 1px solid white;
background: white;
margin: 2px 0 2px 0;
padding: 8px;
border-radius: 2px;
}
.calender-week {
height: 20px;
text-align: center;
vertical-align: center;
}
.pastMonth {
position: absolute;
top: 440px;
left: 10px;
display: inline-block;
background: rgba(255, 255, 255, 0);
border: 0px;
}
.nextMonth {
position: absolute;
display: inline-block;
background-color: rgba(255, 255, 255, 0);
border: 0px;
top: 440px;
right: 10px;
}
.current-day {
background: #ff4d4d;
}
.planList-box {
width: 400px;
margin: 10px;
vertical-align: top;
border: 0px;
border-radius: 10px;
background: white;
display: inline-block;
position: relative;
top: -70px;
padding: 20px;
padding-top: 60px;
z-index: -1;
height: 904.31px;
box-shadow: 0px 0px 10px 1px black;
}
.planList-title {}
.planList-items {}
.planList-item {
border: 0px solid white;
border-radius: 4px;
text-align: left;
background: rgb(255, 51, 51);
background: linear-gradient(35deg, rgba(255, 51, 51, 1) 0%, rgba(255, 175, 62, 1) 100%);
padding: 5px 10px 5px 10px;
margin: 10px;
max-width: 100%;
}
.planList-box::-webkit-scrollbar {
width: 10px;
margin-right: 10px;
}
.planList-box::-webkit-scrollbar-track {
margin: 20px 10px 20px 0px;
padding: 10px;
}
.planList-box::-webkit-scrollbar-thumb {
background: #1f1f60;
border: 0px;
border-radius: 5px;
width: 12px;
}
.planList-box::-webkit-scrollbar-thumb:hover {
background: #13133a;
}
<!doctype html>
<html lang="en">
<head>
<title>Daily Planning Tool</title>
</head>
<body>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<div class="container">
<div class="panel">
<div class="boxes">
<div class="left-box">
<div class="information-all">
<div class="statisticsTitle">Statistics</div>
<div class="information-plans">
<div class="totalPlans">
<div class="totalPlans-output">%12%</div>
<div class="totalPlans-title">total plans</div>
</div>
<div class="completedPlans">
<div class="completedPlans-output">%22%</div>
<div class="completedPlans-title">completed plans</div>
</div>
</div>
</div>
</div>
<div class="right-box">
<div class="information-all">
<div class="planifierTitle">Planifier</div>
<div class="inputFields">
<div class="ask">Select Date<input class="ask-date" type="date"></div>
<div class="ask">Item 1<input class="ask-item1" type="text" placeholder="e.g. Math"></div>
<div class="ask">Item 2<input class="ask-item2" type="text" placeholder="e.g. Science"></div>
<div class="ask">Item 3<input class="ask-item3" type="text" placeholder="e.g. English"></div>
<div class="ask">Item 4<input class="ask-item4" type="text" placeholder="e.g. Art"></div>
<div class="btn-confirm"><button class="confirm">confirm</button></div>
<div class="warning"></div>
</div>
</div>
</div>
</div>
</div>
<div class="planPresenter">
<button class="pastMonth"><i class="fa fa-chevron-left" style="font-size: 50px; color: white;"></i></button>
<div class="calenderID" id="calender-0">
<div class="calender-box">
<h2 class="calender-month">%month%, %year%</h2>
<div class="calender-row">
<div class="calender-day calender-week">Sunday</div>
<div class="calender-day calender-week">Monday</div>
<div class="calender-day calender-week">Tuesday</div>
<div class="calender-day calender-week">Wednesday</div>
<div class="calender-day calender-week">Thursday</div>
<div class="calender-day calender-week">Friday</div>
<div class="calender-day calender-week">Saturday</div>
</div>
<div class="calender-row">
<div class="calender-day" id="1-Sunday">1</div>
<div class="calender-day" id="1-Monday">2</div>
<div class="calender-day" id="1-Tuesday">3</div>
<div class="calender-day" id="1-Wednesday">4</div>
<div class="calender-day" id="1-Thursday">5</div>
<div class="calender-day" id="1-Friday">6</div>
<div class="calender-day" id="1-Saturday">7</div>
</div>
<div class="calender-row">
<div class="calender-day" id="2-Sunday">8</div>
<div class="calender-day" id="2-Monday">9</div>
<div class="calender-day" id="2-Tuesday">10</div>
<div class="calender-day" id="2-Wednesday">11</div>
<div class="calender-day" id="2-Thursday">12</div>
<div class="calender-day" id="2-Friday">13</div>
<div class="calender-day" id="2-Saturday">14</div>
</div>
<div class="calender-row">
<div class="calender-day" id="3-Sunday">15</div>
<div class="calender-day" id="3-Monday">16</div>
<div class="calender-day" id="3-Tuesday">17</div>
<div class="calender-day" id="3-Wednesday">18</div>
<div class="calender-day" id="3-Thursday">19</div>
<div class="calender-day" id="3-Friday">20</div>
<div class="calender-day" id="3-Saturday">21</div>
</div>
<div class="calender-row">
<div class="calender-day" id="4-Sunday">22</div>
<div class="calender-day" id="4-Monday">23</div>
<div class="calender-day" id="4-Tuesday">24</div>
<div class="calender-day" id="4-Wednesday">25</div>
<div class="calender-day" id="4-Thursday">26</div>
<div class="calender-day" id="4-Friday">27</div>
<div class="calender-day" id="4-Saturday">28</div>
</div>
<div class="calender-row">
<div class="calender-day" id="5-Sunday">29</div>
<div class="calender-day" id="5-Monday">30</div>
<div class="calender-day" id="5-Tuesday">31</div>
<div class="calender-day" id="5-Wednesday">NaN</div>
<div class="calender-day" id="5-Thursday">NaN</div>
<div class="calender-day" id="5-Friday">NaN</div>
<div class="calender-day" id="5-Saturday">NaN</div>
</div>
<div class="calender-row">
<div class="calender-day" id="6-Sunday">29</div>
<div class="calender-day" id="6-Monday">30</div>
<div class="calender-day" id="6-Tuesday">31</div>
<div class="calender-day" id="6-Wednesday">NaN</div>
<div class="calender-day" id="6-Thursday">NaN</div>
<div class="calender-day" id="6-Friday">NaN</div>
<div class="calender-day" id="6-Saturday">NaN</div>
</div>
</div>
</div>
<!--
<div class="calender-box" id="calender-2">
<h2 class="calender-month">%month%, %year%</h2>
<div class="calender-row">
<div class="calender-day calender-week">Sunday</div>
<div class="calender-day calender-week">Monday</div>
<div class="calender-day calender-week">Tuesday</div>
<div class="calender-day calender-week">Wednesday</div>
<div class="calender-day calender-week">Thursday</div>
<div class="calender-day calender-week">Friday</div>
<div class="calender-day calender-week">Saturday</div>
</div>
<div class="calender-row">
<div class="calender-day" id="1-Sunday">1</div>
<div class="calender-day" id="1-Monday">2</div>
<div class="calender-day" id="1-Tuesday">3</div>
<div class="calender-day" id="1-Wednesday">4</div>
<div class="calender-day" id="1-Thursday">5</div>
<div class="calender-day" id="1-Friday">6</div>
<div class="calender-day" id="1-Saturday">7</div>
</div>
<div class="calender-row">
<div class="calender-day" id="2-Sunday">8</div>
<div class="calender-day" id="2-Monday">9</div>
<div class="calender-day" id="2-Tuesday">10</div>
<div class="calender-day" id="2-Wednesday">11</div>
<div class="calender-day" id="2-Thursday">12</div>
<div class="calender-day" id="2-Friday">13</div>
<div class="calender-day" id="2-Saturday">14</div>
</div>
<div class="calender-row">
<div class="calender-day" id="3-Sunday">15</div>
<div class="calender-day" id="3-Monday">16</div>
<div class="calender-day" id="3-Tuesday">17</div>
<div class="calender-day" id="3-Wednesday">18</div>
<div class="calender-day" id="3-Thursday">19</div>
<div class="calender-day" id="3-Friday">20</div>
<div class="calender-day" id="3-Saturday">21</div>
</div>
<div class="calender-row">
<div class="calender-day" id="4-Sunday">22</div>
<div class="calender-day" id="4-Monday">23</div>
<div class="calender-day" id="4-Tuesday">24</div>
<div class="calender-day" id="4-Wednesday">25</div>
<div class="calender-day" id="4-Thursday">26</div>
<div class="calender-day" id="4-Friday">27</div>
<div class="calender-day" id="4-Saturday">28</div>
</div>
<div class="calender-row">
<div class="calender-day" id="5-Sunday">29</div>
<div class="calender-day" id="5-Monday">30</div>
<div class="calender-day" id="5-Tuesday">31</div>
<div class="calender-day" id="5-Wednesday">NaN</div>
<div class="calender-day" id="5-Thursday">NaN</div>
<div class="calender-day" id="5-Friday">NaN</div>
<div class="calender-day" id="5-Saturday">NaN</div>
</div>
</div>
-->
<button class="nextMonth"><i class="fa fa-chevron-right" style="font-size: 50px; color: white;"></i></button>
</div>
<div class="planList-box">
<div class="planID" id="plan-0">
<h3 class="planList-title">%month% %day%</h3>
<div class="planList-items">
<div class="planList-item1 planList-item">• Do this and that</div>
<div class="planList-item2 planList-item">• do this and that plus it and at</div>
<div class="planList-item3 planList-item">• so you're a hacker ey?, add discord</div>
<div class="planList-item4 planList-item">• my discord is JinXz#1643 I wanna have a talk, because this is not right, and you know that</div>
</div>
</div>
</div>
</div>
<link rel="stylesheet" href="stylesheet.css">
<script src="script.js"></script>
</body>
</html>
answer: I just figured out that this is not working, because I set the z-index of the element to -1, making it go under the .container layer.
I am trying to port the Adblocker Genesis Plus extension from Google Chrome to Firefox, but the popup.html is showing big scrollbars (I am using it as a temporary extension through about:debugging). How do I make it look the way it does in Chrome?
I tried defining the width and height with css but the scrollbars were still there.
Here is the popup.html (not my code, this is copied from the Chrome version)
<!DOCTYPE html>
<html id="uBO-popup-panel">
<head>
<meta name="viewport" content="width=470"> <meta charset="UTF-8"><!-- When showing as a tab in fennec, scale to full size (150px + 320px) -->
<meta charset="utf-8">
<link rel="stylesheet" href="css/common.css" type="text/css">
<link rel="stylesheet" href="css/popup.css" type="text/css">
<title>uBlock</title>
</head>
<body>
<span id="appname"> </span> <span id="version"> </span><span class="fa"></span>
<div id="panes">
<div class="tooltipContainer">
<p id="switch" data-i18n-tip="popupPowerSwitchInfo" data-tip-position="under"><span class="fa"></span></p>
<h2 id="dfToggler" data-i18n="popupBlockedRequestPrompt"> </h2>
<p class="statName">
<span data-i18n="popupBlockedOnThisPagePrompt"> </span>
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker"></span>
</p>
<p class="statValue" id="page-blocked">?</p>
<div id="refresh" class="fa"></div>
<p class="statName">
<span data-i18n="popupBlockedSinceInstallPrompt"> </span>
</p>
<p class="statValue" id="total-blocked">?</p>
<h2 data-i18n="popupHitDomainCountPrompt"> </h2>
<p class="statValue" id="popupHitDomainCount"> </p>
<div id="extraTools">
<span id="no-popups" class="hnSwitch fa" data-i18n-tip="popupTipNoPopups"><span class="badge"></span><span></span></span>
<span id="no-large-media" class="hnSwitch fa" data-i18n-tip="popupTipNoLargeMedia"><span class="badge"></span><span></span></span>
<span id="no-cosmetic-filtering" class="hnSwitch fa" data-i18n-tip="popupTipNoCosmeticFiltering"><span class="badge"></span><span></span></span>
<span id="no-remote-fonts" class="hnSwitch fa" data-i18n-tip="popupTipNoRemoteFonts"><span class="badge"></span><span></span></span>
</div>
</div><!-- DO NOT REMOVE --><div class="tooltipContainer">
<div id="firewallContainer" class="minimized">
<div><span data-i18n="popupAnyRulePrompt"></span><span data-src="/" data-des="*" data-type="*" data-i18n-tip="popupTipGlobalRules" data-tip-position="under"> </span><span data-src="." data-des="*" data-type="*" data-i18n-tip="popupTipLocalRules" data-tip-position="under"> </span></div>
<div><span data-i18n="popupImageRulePrompt"></span><span data-src="/" data-des="*" data-type="image"> </span><span data-src="." data-des="*" data-type="image"> </span></div>
<div><span data-i18n="popup3pAnyRulePrompt"></span><span data-src="/" data-des="*" data-type="3p"> </span><span data-src="." data-des="*" data-type="3p"> </span></div>
<div><span data-i18n="popupInlineScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="inline-script"> </span><span data-src="." data-des="*" data-type="inline-script"> </span></div>
<div><span data-i18n="popup1pScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="1p-script"> </span><span data-src="." data-des="*" data-type="1p-script"> </span></div>
<div><span data-i18n="popup3pScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-script"> </span><span data-src="." data-des="*" data-type="3p-script"> </span></div>
<div><span data-i18n="popup3pFrameRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-frame"> </span><span data-src="." data-des="*" data-type="3p-frame"> </span></div>
</div><div id="rulesetTools"><span id="saveRules" class="fa" data-i18n-tip="popupTipSaveRules" data-tip-position="under"></span><span id="revertRules" class="fa" data-i18n-tip="popupTipRevertRules" data-tip-position="under"></span></div>
</div>
</div>
<div id="templates" style="display: none">
<div><span></span><span data-src="/" data-des="" data-type="*"></span><span data-src="." data-des="" data-type="*"></span><span data-src="." data-des="" data-type="*"></span></div>
<div id="actionSelector"><span id="dynaAllow"></span><span id="dynaNoop"></span><span id="dynaBlock"></span></div>
<div id="hotspotTip"></div>
<div id="tooltip"></div>
</div>
<script src="lib/punycode.js"></script>
<script src="js/vapi-common.js"></script>
<script src="js/vapi-client.js"></script>
<script src="js/udom.js"></script>
<script src="js/i18n.js"></script>
<script src="js/popup.js"></script>
</body>
</html>
popup.css
body {
background-color: white;
border: 0;
float: left;
margin: 0;
opacity: 1;
overflow: hidden;
padding: 0;
white-space: nowrap;
}
body.fullsize {
overflow: auto;
}
body.mobile {
overflow-y: auto;
}
/**
https://github.com/gorhill/uBlock/issues/83
.portrait = portrait mode = width is constrained = optimize layout accordingly.
*/
body.portrait {
width: 100%;
}
h2 {
background-color: #eee;
border: 0;
color: #666;
cursor: pointer;
font-size: 100%;
font-weight: normal;
margin: 1em 0 0.8em 0;
padding: 0.2em;
text-align: center;
}
h2:nth-of-type(1) {
margin-top: 0;
}
a {
color: inherit;
text-decoration: none;
}
:focus {
outline: 0;
}
#gotoPrefs {
background-color: #444;
border: 0;
color: #bbb;
cursor: pointer;
display: block;
font-size: 85%;
line-height: 1.2;
margin: 0;
padding: calc(0.1em + 1px) 0;
position: relative;
text-align: center;
}
#version {
font-size: 90%;
font-weight: normal;
}
#gotoPrefs > span:nth-of-type(3) {
opacity: 0.5;
position: absolute;
top: 50%;
transform: translate(0, -50%);
}
body[dir="ltr"] #gotoPrefs > span:nth-of-type(3) {
left: 3px;
}
body[dir="rtl"] #gotoPrefs > span:nth-of-type(3) {
right: 3px;
}
body[dir="ltr"] #panes {
direction: rtl;
}
body[dir="rtl"] #panes {
direction: ltr;
}
body, #panes {
text-align: right; /* this helps the popup render better at "intermediate" widths */
}
#panes > div {
display: inline-block;
position: relative;
vertical-align: top;
}
body.portrait #panes > div {
display: block;
width: 100%;
}
body[dir="ltr"] #panes > div {
direction: ltr;
}
body[dir="rtl"] #panes > div {
direction: rtl;
}
#panes > div:nth-of-type(2) {
font-family: "Noto Sans", sans-serif;
overflow-y: auto;
overflow-x: hidden;
width: 24em;
}
/**
Scroll bar to the left.
*/
body[dir="ltr"] #panes > div:nth-of-type(2) {
direction: rtl;
margin-right: 1px;
}
/**
Scroll bar to the right.
Firefox bug: when popup is rendered inside hamburger menu panel, Firefox is
unable to render the scroll bar to the left.
Maybe <https://bugzilla.mozilla.org/show_bug.cgi?id=1139306>?
*/
body[dir="rtl"] #panes > div:nth-of-type(2),
body.portrait[dir="ltr"] #panes > div:nth-of-type(2) {
direction: ltr;
margin-left: 1px;
}
#panes:not(.dfEnabled) > div:nth-of-type(2) {
display: none;
}
#panes > div:nth-of-type(1) {
min-width: 11em;
padding: 0;
}
p {
text-align: center;
white-space: nowrap;
}
.fa {
font-size: 120%;
}
#switch {
margin: 8px 0;
}
#switch .fa {
color: #0046ff;
cursor: pointer;
font-size: 700%;
margin: 0;
}
#switch .fa:hover {
opacity: 0.9;
}
body.off #switch .fa {
color: #ccc;
}
#page-blocked {
font-size: 1.25em;
}
.statName {
color: #888;
font-size: 85%;
margin: 0.8em 0.2em 0.4em 0.2em;
text-align: center;
}
.statValue {
margin: 0;
text-align: center;
}
.tool {
color: #aaa;
cursor: pointer;
display: none;
unicode-bidi: embed;
}
.tool.enabled {
display: inline;
}
.tool:hover {
color: #444;
}
#extraTools {
background-color: #eee;
border: 0;
color: #aaa;
margin: 0.8em 0 0 0;
padding: 4px 0;
text-align: center;
}
#extraTools > span {
cursor: pointer;
font-size: 1.2em;
margin: 0 0.4em;
position: relative;
}
#extraTools > span > span.badge {
color: #222;
bottom: -1px;
font: x-small sans-serif;
position: absolute;
}
body[dir="ltr"] #extraTools > span > span.badge {
left: 100%;
}
body[dir="rtl"] #extraTools > span > span.badge {
right: 100%;
}
#extraTools > span.on > span:last-of-type {
color: #e00;
font-size: 1.1em;
left: 0;
position: absolute;
text-align: center;
top: 0;
width: 100%;
}
#extraTools > span.on > span:last-of-type:after {
content: '\2715';
}
#extraTools > span:hover {
color: #444;
}
#refresh {
background-color: #ffe;
border: 1px solid #ddc;
border-radius: 4px;
color: #888;
cursor: pointer;
display: none;
font-size: 3.5em;
left: 4px;
line-height: 1;
padding: 4px 8px;
position: absolute;
right: 4px;
text-align: center;
}
body.dirty #refresh {
display: block;
}
body.dirty #refresh:hover {
color: black;
}
#tooltip {
background-color: #ffffee;
border: 1px solid gray;
border-radius: 3px;
box-shadow: 1px 1px 3px gray;
box-sizing: border-box;
color: black;
cursor: pointer;
direction: ltr;
font: 12px sans-serif;
left: 5%;
line-height: 130%;
margin: 0.5em 0;
opacity: 0;
padding: 4px 6px;
pointer-events: none;
position: absolute;
text-align: center;
visibility: hidden;
white-space: pre-line;
width: 90%;
z-index: 100;
}
body[dir="rtl"] #tooltip {
direction: rtl;
}
#tooltip.show {
transition: opacity 0.15s 0.5s;
-webkit-transition: opacity 0.15s 0.5s;
visibility: visible;
opacity: 1;
}
#firewallContainer {
border: 0;
font-size: 85%;
margin: 0;
padding: 0;
text-align: right;
}
#firewallContainer > div {
background-color: #e6e6e6;
border: 0;
direction: ltr;
margin: 0;
padding: 0;
}
#firewallContainer > div:hover {
background-color: #f0f0f0;
}
#firewallContainer > div:first-child ~ div:not([class]) {
display: none;
}
#firewallContainer.minimized > div.isSubDomain {
display: none;
}
#firewallContainer > div > span {
background-color: transparent;
border: none;
border-bottom: 1px solid white;
box-sizing: border-box;
-moz-box-sizing: border-box;
color: #000;
display: inline-block;
height: 1.9em;
line-height: 1.9em;
overflow: hidden;
position: relative;
vertical-align: top;
}
#firewallContainer > div:nth-of-type(1) > span:nth-of-type(1) {
cursor: pointer;
}
#firewallContainer > div > span:nth-of-type(1) {
padding-right: 2px;
position: relative;
text-overflow: ellipsis;
width: calc(100% - 4em);
}
#firewallContainer > div > span:nth-of-type(2) {
display: none;
}
#firewallContainer > div > span:nth-of-type(1) ~ span {
border-left: 1px solid white;
width: 4em;
}
#firewallContainer > div > span:nth-of-type(3),
#firewallContainer > div > span:nth-of-type(4) {
color: #444;
text-align: center;
}
#firewallContainer > div > span:nth-of-type(4) {
display: none;
}
#firewallContainer > div.isDomain > span:nth-of-type(1) {
font-weight: bold;
}
#firewallContainer > div:nth-of-type(1) > span:nth-of-type(1):before {
color: #aaa;
content: '\2012';
padding-right: 0.25em;
}
#firewallContainer.minimized > div:nth-of-type(1) > span:nth-of-type(1):before {
content: '+';
}
#firewallContainer.minimized > div.isDomain > span:nth-of-type(3) {
display: none;
}
#firewallContainer.minimized > div.isDomain > span:nth-of-type(4) {
display: inline-block;
}
#firewallContainer > div > span[data-acount]:before,
#firewallContainer > div > span[data-bcount]:after {
position: absolute;
}
#firewallContainer > div > span[data-acount]:before {
left: 0.1em;
}
#firewallContainer > div > span[data-acount="1"]:before {
content: '+';
}
#firewallContainer > div > span[data-acount="2"]:before {
content: '++';
}
#firewallContainer > div > span[data-acount="3"]:before {
content: '+++';
}
#firewallContainer > div > span[data-bcount]:after {
right: 0.1em;
}
#firewallContainer > div > span[data-bcount="1"]:after {
content: '\2212';
}
#firewallContainer > div > span[data-bcount="2"]:after {
content: '\2212\2212';
}
#firewallContainer > div > span[data-bcount="3"]:after {
content: '\2212\2212\2212';
}
body.advancedUser #firewallContainer > div > span:nth-of-type(1) {
width: calc(100% - 8em);
}
body.advancedUser #firewallContainer > div > span:nth-of-type(2) {
display: inline-block;
}
body.advancedUser #firewallContainer > div:first-child ~ div:not([class]) {
display: block;
}
body.advancedUser #firewallContainer > div > span:nth-of-type(1) ~ span {
cursor: pointer;
}
/**
Small coloured label at the left of a row
*/
#firewallContainer > div.allowed > span:nth-of-type(1):before,
#firewallContainer > div.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
box-sizing: border-box;
content: '';
display: inline-block;
height: 100%;
left: 0;
opacity: 0.4;
position: absolute;
width: 7px;
}
/**
Source for color-blind color scheme from https://github.com/WyohKnott:
https://github.com/chrisaljoudi/uBlock/issues/467#issuecomment-95177219
*/
#firewallContainer > div.allowed > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before {
background-color: rgb(0, 160, 0);
}
#firewallContainer.colorBlind > div.allowed > span:nth-of-type(1):before,
#firewallContainer.colorBlind.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before {
background-color: rgb(255, 194, 57);
}
#firewallContainer > div.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(192, 0, 0);
}
#firewallContainer.colorBlind > div.blocked > span:nth-of-type(1):before,
#firewallContainer.colorBlind.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(0, 19, 110);
}
#firewallContainer > div.allowed.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(192, 160, 0);
}
/* Rule cells */
body.advancedUser #firewallContainer > div > span.aRule {
background-color: rgba(0, 160, 0, 0.3);
}
body.advancedUser #firewallContainer.colorBlind > div > span.aRule {
background-color: rgba(255, 194, 57, 0.4);
}
body.advancedUser #firewallContainer > div > span.bRule {
background-color: rgba(192, 0, 0, 0.3);
}
body.advancedUser #firewallContainer.colorBlind > div > span.bRule {
background-color: rgba(0, 19, 110, 0.4);
}
body.advancedUser #firewallContainer > div > span.nRule {
background-color: rgba(108, 108, 108, 0.3);
}
body.advancedUser #firewallContainer.colorBlind > div > span.nRule {
background-color: rgba(96, 96, 96, 0.4);
}
body.advancedUser #firewallContainer > div > span.ownRule {
color: white;
}
body.advancedUser #firewallContainer > div > span.aRule.ownRule {
background-color: rgba(0, 160, 0, 1);
}
body.advancedUser #firewallContainer.colorBlind > div > span.aRule.ownRule {
background-color: rgba(255, 194, 57, 1);
}
body.advancedUser #firewallContainer > div > span.bRule.ownRule {
background-color: rgba(192, 0, 0, 1);
}
body.advancedUser #firewallContainer.colorBlind > div > span.bRule.ownRule {
background-color: rgba(0, 19, 110, 1);
}
body.advancedUser #firewallContainer > div > span.nRule.ownRule {
background-color: rgba(108, 108, 108, 1);
}
#actionSelector {
bottom: 0;
left: 0;
position: absolute;
top: 0;
width: 4em;
z-index: 1;
}
#actionSelector > span {
display: inline-block;
height: 100%;
opacity: 0.2;
}
#actionSelector > span:nth-of-type(1) {
width: 33%;
}
#actionSelector > span:nth-of-type(2) {
width: 33.5%;
}
#actionSelector > span:nth-of-type(3) {
width: 33.5%;
}
#actionSelector > span:hover {
opacity: 0.75;
}
#actionSelector > span:nth-of-type(1) {
background-color: rgb(0, 160, 0);
}
#actionSelector.colorBlind > span:nth-of-type(1) {
background-color: rgb(255, 194, 57);
}
#actionSelector > span:nth-of-type(2) {
background-color: rgb(108, 108, 108);
}
#actionSelector > span:nth-of-type(3) {
background-color: rgb(192, 0, 0);
}
#actionSelector.colorBlind > span:nth-of-type(3) {
background-color: rgb(0, 19, 110);
}
#rulesetTools {
background-color: transparent;
border: 0;
color: #888;
display: none;
left: 4px;
padding: 0;
position: fixed;
top: 4px;
}
#rulesetTools > span {
background-color: #ffe;
border: 1px solid #ddc;
border-radius: 4px;
cursor: pointer;
display: inline-block;
font-size: 1.8em;
line-height: 1.0;
margin: 0;
margin-right: 0.1em;
padding: 0.2em 0.4em;
text-align: center;
width: 1em;
}
#firewallContainer.dirty ~ #rulesetTools {
display: block;
}
#firewallContainer.dirty ~ #rulesetTools > span:hover {
color: black;
}
Here is a link to some screenshots (and the whole extension if the problem is somewhere else like the popup.js):
https://drive.google.com/drive/folders/1R3niphX6HxgT-MdbhzsRswGXMEV2VSRl?usp=sharing
I expect the Firefox popup to look like the Chrome one.
I was editing the wrong css file. Regular methods of hiding scrollbars are working now!
I'm trying to put hexagons made with CSS around a circle. I already got the circle and the hexagons (they are stocked on top of each other), I just can't get the code of organizing them to work (it's on the CSS part of the code). http://imgur.com/Sv82DB0 (I'm aiming this effect).
$darkPrimary: #ffa000;
$primaryYellow: #ffc107;
$lightPrimaryColor: #ffecb3;
$darkGray: #212121;
$redOrange: #ff5722;
$lightGray: #757575;
$dividerColor: #bdbdbd;
// $rot // rotation for the current item
$nb-items: 4;
$angle: (360deg / $nb-items); // angle between two items
// $nb-items // number of item
$rot: 0;
$circle-size: 21.875em;
#mixin placingElements () {
#for $i from 1 through $nb-items {
.shapes__circle:nth-child(#{$i}) {
// Rotate the axis
rotate: ($rot * 1);
// Move the item from the center
translate: $circle-size / 2;
// Rotate the item back to its default position
rotate: ($rot * -1);
}
$rot: $rot+$angle;
}
//Increments the '$rot' variable for the next item
}
.shapes {
position: absolute;
display: block;
margin-left: 30px;
&__circle {
#include placingElements();
position: relative;
top: 60px;
border: 19px solid $primaryYellow;
border-radius: 50%;
box-shadow: 0 0 1px 0 rgb(255, 255, 255);
width: 350px;
height: 350px;
z-index: 1;
}
&__hexagon {
width: 120px;
height: 80px;
background: $redOrange;
position: absolute;
top: -50px;
left: 90px;
margin: 10px auto;
z-index: 2;
&::before {
content: "";
width: 0;
height: 0;
position: absolute;
top: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-bottom: 45px solid $redOrange;
}
&::after {
content: "";
width: 0;
height: 0;
position: absolute;
bottom: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-top: 45px solid $redOrange;
}
&--inside-img {
position: absolute;
height: 55px;
width: 55px;
left: 25%;
top: 32%;
}
&--inside-text {
position: absolute;
top: -14%;
left: 5%;
font-family: 'Overpass Mono', monospace;
font-size: 1rem;
color: $darkGray;
font-weight: 600;
}
}
}
<div class="shapes__circle">
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
</div>
<!-- __section-img--circle -->
I have found a solution from http://codepen.io/SitePoint/pen/bNYBZX but it i incomplete.
<section class="image-grid">
<div class="image__cell is-collapsed">
<div class="image--basic">
<a href="#expand-jump-1">
<img id="expand-jump-1" class="basic__img" src="http://lorempixel.com/250/250/fashion/1" alt="Fashion 1" />
</a>
<div class="arrow--up"></div>
</div>
<div class="image--expand">
<img class="image--large" src="http://lorempixel.com/400/400/fashion/1" alt="Fashion 1" />
</div>
</div>
</section>
I need to have a side gallery for images to load in the preview section on click just like google image search. Here is the image of what I want to do Google Image search layout preview
Thanks.
I Did a codepen with the solution I wanted. http://codepen.io/bahiirwa/pen/BKmmzm
HTML
<section class="image-grid">
<div class="image__cell is-collapsed">
<div class="image--basic">
<a href="#expand-jump-1">
<img id="expand-jump-1"
class="basic__img"
src="http://yourdigitalblend.com/wp-content/uploads/2016/03/DB_Team_Bio_jz.png" alt="Fashion 1">
</a>
<div class="arrow--up"></div>
</div>
<div class="image--expand">
<img class="image--large"
src="http://yourdigitalblend.com/wp-content/uploads/2016/03/DB_Team_Bio_jz.png" alt="Fashion 1">
</div>
</div>
<div class="image__cell is-collapsed">
<div class="image--basic">
<a href="#expand-jump-2">
<img id="expand-jump-2"
class="basic__img"
src="http://yourdigitalblend.com/wp-content/uploads/2016/03/DB_Team_Bio-ed.jpg" alt="Fashion 1">
</a>
<div class="arrow--up"></div>
</div>
<div class="image--expand">
<img class="image--large"
src="http://yourdigitalblend.com/wp-content/uploads/2016/03/DB_Team_Bio-ed.jpg" alt="Fashion 1">
</div>
</div>
...
</section>
CSS
html {box-sizing: border-box;}
*, *:before, *:after { box-sizing: inherit; }
.image-grid {
width: 100%;
max-width: 1310px;
margin: 0 auto;
overflow: hidden;
padding: 10px 5px 0;
}
.image__cell {
float: left;
position: relative;
width: 20%;
}
.image--basic {
padding: 0 5px;
}
.basic__img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
}
.image__cell.is-collapsed .arrow--up {
display: block;
height: 10px;
width: 100%;
}
.image--large {
max-width: 100%;
height: auto;
display: block;
padding: 40px;
margin: 0 auto;
box-sizing: border-box;
}
.image__cell.is-collapsed .image--basic {
cursor: pointer;
}
.image__cell.is-expanded .image--expand {
max-height: 500px;
margin-bottom: 10px;
}
.image--expand {
position: relative;
left: -5px;
padding: 0 5px;
box-sizing: content-box;
overflow: hidden;
background: #222;
max-height: 0;
transition: max-height .3s ease-in-out,
margin-bottom .1s .2s;
width: 500%;
}
.image__cell:nth-of-type(5n+2) .image--expand {
margin-left: -100%;
}
.image__cell:nth-of-type(5n+3) .image--expand {
margin-left: -200%;
}
.image__cell:nth-of-type(5n+4) .image--expand {
margin-left: -300%;
}
.image__cell:nth-of-type(5n+5) .image--expand {
margin-left: -400%;
}
.image__cell:nth-of-type(5n+6) {
clear: left;
}
.image__cell.is-expanded .arrow--up {
display: block;
border-bottom: 8px solid #222;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
height: 0;
width: 0;
margin: 2px auto 0;
}
.expand__close {
position: absolute;
top: 10px;
right: 20px;
color: #454545;
font-size: 50px;
line-height: 50px;
text-decoration: none;
}
.expand__close:before {
content: '×';
}
.expand__close:hover {
color: #fff;
}
JS
var $cell = $('.image__cell');
$cell.find('.image--basic').click(function() {
var $thisCell = $(this).closest('.image__cell');
if ($thisCell.hasClass('is-collapsed')) {
$cell.not($thisCell).removeClass('is-expanded').addClass('is-collapsed');
$thisCell.removeClass('is-collapsed').addClass('is-expanded');
} else {
$thisCell.removeClass('is-expanded').addClass('is-collapsed');
}
});
$cell.find('.expand__close').click(function() {
var $thisCell = $(this).closest('.image__cell');
$thisCell.removeClass('is-expanded').addClass('is-collapsed');
});
Or you can query SerpAPI to get a JSON response.
Then you can easily loop over the images in the json.
https://serpapi.com/images-results
How to use images instead of text labels?
I need the menu to slide down when the .logo (bird) image button is clicked
How can I link text label with a logo image on the menu bar?
PS: the menu slides down when the .logo (bird) is clicked BUT there are two birds, I need the menu to slide down when the bird image sitting on the menu is clicked, AND yes I need only one bird image
/* ------------------------------------------ */
/* BASIC SETUP */
/* ------------------------------------------ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
/* ------------------------------------------ */
/* HEADER */
/* ------------------------------------------ */
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
/* ----- NAVIGATION -----*/
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
/* ----- LOGO -----*/
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
/* ----- MENU BUTTON -----*/
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
/* ------------------------------------------ */
/* PAGE CONTENT TOP BAR */
/* ------------------------------------------ */
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>
OK So I have found out all I needed to do was to replace
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
with
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
JSFiddle https://jsfiddle.net/heumnzLe/4/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.page-wrap {
width: 1216px;
margin: 0 auto;
}
.row-basic {
max-width: 1216px;
}
html,
body {
text-align:justify
color: #fff;
font-size: 19px;
text-rendering: optimizeLegibility;
background: #333;
background-position: center;
height: 100vh;
background-attachment: fixed;
}
header {
background-color: rgba(246, 149, 149, 0.06);
height: 81px;
width: auto;
padding-top: 24px;
margin-top: 26px;
margin-bottom: 0px;
display:flex;
justify-content: space-between;
}
nav {
display:flex;
align-items: center;
}
nav ul {
display:flex;
}
.user-tools {
display:flex;
align-items: center;
}
.user-tools :focus {
outline:none;
}
.logo {
position: relative;
cursor: pointer;
height: 68px;
width: auto;
margin-right: 21px;
margin-left: 31px;
z-index: 1;
}
.mobile-nav-toggle {
height: 50px;
width: 35px;
margin-right: 31px;
display: flex;
align-items: center;
cursor: pointer;
}
.mobile-nav-toggle span,
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
border-radius: 2px;
content: "";
display: block;
height: 6px;
width: 100%;
background: #fff;
position: relative;
}
.mobile-nav-toggle span::before {
top: 11px;
}
.mobile-nav-toggle span::after {
bottom: 17px;
}
.box1 {
height: 26px;
width: 300px;
background: #8242b1;
}
.box2 {
height: 26px;
width: 300px;
background: #b14242;
}
.box3 {
height: 26px;
width: 300px;
background: #424bb1;
}
.page-content {
display:flex;
justify-content: center;
transition: all 0.3s ease-in-out 0s;
position:relative;
margin-top: -260px;
z-index: 0; }
.toggle {
transition: all 0.3s ease-in-out 0s;
text-decoration: none;
font-size: 30px;
color: #eaeaea;
position:relative;
top: -225px;
left: 20px;
z-index: 1; }
.toggle:hover {
color:#cccccc; }
.topbar {
display:flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease-in-out 0s;
position: relative;
top: -220px;
bottom: 0px;
left: 0px;
height: 220px;
width: auto;
padding: 30px;
background: #333;
z-index: 1; }
.topbar li {
display:flex;
justify-content: center;
list-style: none;
color: rgba(255, 255, 255,0.8);
font-size: 16px;
margin-bottom: 16px;
cursor: pointer; }
.topbar li:hover {
color: rgba(255, 255, 255,1); }
#topbartoggler {
display: none; }
#topbartoggler:checked + .page-wrap .topbar {
top: -4px; }
#topbartoggler:checked + .page-wrap .toggle {
top: -5px; }
#topbartoggler:checked + .page-wrap .page-content {
padding-top: 220px; }
<body>
<input type="checkbox" id="topbartoggler" name="" value="">
<div class="page-wrap">
<div class="topbar">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Clients</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
<label for="topbartoggler" class="toggle"><img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo"></label>
<div class="page-content">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>
<header class="row-basic">
<nav>
<img src="http://bower.io/img/bower-logo.png" alt="logo" class="logo">
</nav>
<div class="user-tools">
<div class="toggle"></div>
<div class="mobile-nav-toggle">
<span></span>
</div>
</div>
</header>
</div>
</body>