Fixing problem with margins.
This commit is contained in:
parent
611bed7985
commit
cb5959ae46
@ -6,11 +6,16 @@ require('tablesort/src/sorts/tablesort.number');
|
||||
window.onload = () => {
|
||||
const menu_expand = document.querySelector('a.menu-expand');
|
||||
const mobile_foldable = document.querySelector('nav.mobile-foldable');
|
||||
const first_box = document.querySelector('#first-box');
|
||||
const tables = document.querySelectorAll('table')
|
||||
|
||||
if (menu_expand !== null && mobile_foldable !== null) {
|
||||
menu_expand.addEventListener('click', () => {
|
||||
mobile_foldable.classList.toggle('show');
|
||||
if (first_box !== null) {
|
||||
console.log('hola')
|
||||
first_box.classList.toggle('margin');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ body {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
body div#first-box.margin {
|
||||
margin-top: 60px; }
|
||||
body div.padding {
|
||||
padding: 1%; }
|
||||
body div.title-image {
|
||||
|
@ -14,6 +14,9 @@ html {
|
||||
}
|
||||
|
||||
body {
|
||||
div#first-box.margin {
|
||||
margin-top: 60px;
|
||||
}
|
||||
div.padding {
|
||||
padding: 1%;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\nwindow.Tablesort = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n__webpack_require__(/*! tablesort/src/sorts/tablesort.number */ \"./node_modules/tablesort/src/sorts/tablesort.number.js\");\n\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const tables = document.querySelectorAll('table')\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n });\n }\n\n for (const table of tables) {\n const header = table.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n if (th.getAttribute('data-sort-method') == null) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n }\n new (tablesort__WEBPACK_IMPORTED_MODULE_0___default())(table)\n }\n};\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.ts?");
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\nwindow.Tablesort = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n__webpack_require__(/*! tablesort/src/sorts/tablesort.number */ \"./node_modules/tablesort/src/sorts/tablesort.number.js\");\n\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const first_box = document.querySelector('#first-box');\n const tables = document.querySelectorAll('table')\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n if (first_box !== null) {\n console.log('hola')\n first_box.classList.toggle('margin');\n }\n });\n }\n\n for (const table of tables) {\n const header = table.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n if (th.getAttribute('data-sort-method') == null) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n }\n new (tablesort__WEBPACK_IMPORTED_MODULE_0___default())(table)\n }\n};\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.ts?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
% my $posts = stash 'posts';
|
||||
% layout 'default', current_category_slug => $category->{slug}, description_og => $description_og;
|
||||
% title $attribute->{title};
|
||||
<div class="description">
|
||||
<div id="first-box" class="description margin">
|
||||
<h1><%= $attribute->{title} %></h1>
|
||||
<%== $attribute->{description} %>
|
||||
%= include 'page/_list_posts', posts => $posts;
|
||||
|
@ -12,7 +12,7 @@
|
||||
% $description_og = Mojo::DOM->new($description_og)->all_text;
|
||||
% layout 'default', current_category => $current_category, description_og => $description_og, ogimage => "$base_url/@{[$current_category->{slug}]}-preview.png";
|
||||
% title $current_category->{title};
|
||||
<div class="description">
|
||||
<div id="first-box" class="description margin">
|
||||
% if (defined $current_category->{image}) {
|
||||
<div class="title-image">
|
||||
<img alt="Portada de la categoría: <%= $current_category->{title} %>" src="<%=$current_category->{image}%>"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
% my $base_url = config 'base_url';
|
||||
% layout 'default', current_category_slug => $current_category->{slug}, categories => $categories, description_og => $description_og, ogimage => "$base_url/posts/$post->{slug}-preview.png?v=4";
|
||||
% title $post->{title};
|
||||
<div class="description">
|
||||
<div id="first-box" class="description margin">
|
||||
<h1><%= $post->{title} %></h1>
|
||||
% my $user_agent = stash 'useragent';
|
||||
% if ($user_agent !~ /LinkedInBot/) {
|
||||
|
Loading…
Reference in New Issue
Block a user