Skip to content

DeAnnoy euronews.com [papo] (autohide header, menu by papo

Details

Authorpapo

LicenseCC BY-NC-SA 4.0

Categoryeuronews

Created

Updated

Size4.0 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

See @description in the Source Code.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           DeAnnoy euronews.com [papo] (autohide header, menu)
@namespace      github.com/paponius/userstyles
@version        1.0.7
@description    Updated: 2024-12. [m] Notes and feedback: https://github.com/paponius/userstyles/. Removed distracting and annoying elements. Check what it does in style Options, or read @var descriptions on top of the code.
@author         Papo
@homepageURL    https://github.com/paponius/userstyles/
@supportURL     https://github.com/paponius/userstyles/
@license        CC BY-NC-SA 4.0
@preprocessor   less

# --- END: common block ---

@var checkbox UnstickHeader          "Unstick the header" 1
@var checkbox HideTopHeader          'Hide top navi header on article pages. (When ON, Go to Home Page to access it.)' 0
@var select   TopHeaderHeight        'Top header height (if not hidden by the above)' ["orig:Original height", "smaller:Smaller height", 'tiny:Tiny height']
@var checkbox blockPopupMenus        "Block popup menus, opening on hover over page content. (When ON, use Menu icon to see the same menu.)" 1
@var checkbox HideSwiper             'Hide prev/next buttons on article pages.' 1
@var checkbox ExpandAlwaysHeroPicCaption 'Always expand hero pic caption ("i")' 1
@var checkbox HideMidArticleUnrelated 'Hide mid-article unrelated "Related boxes"' 0

@var select debug-test "debug" {
  '0:Normal': '{ --debug: 0; }',
  "1:debug. It just shows testing elements in yellow. No useful purpose for daily use.": "{ --debug: 1; color: yellow !important; background: violet !important; }"
}

==/UserStyle== */
/* tpl: 1.2.2 24-11 */
@-moz-document domain("euronews.com") {

/* HP does not have body.is-template-article, article pages seems to have */

/* fix */
.tp-outbrain {
	min-height: 0;
	/* --was-min-height: 3800px; */
}


& when (@UnstickHeader = 1) {
	.o-site-hr {
		position: static;
		/* --was-position: sticky; */
	}
}

& when (@TopHeaderHeight = orig) {
}
& when (@TopHeaderHeight = smaller) or (@TopHeaderHeight = tiny) {
	.o-site-hr__first-level__container {
		height: unset;
		/* --was-height: calc(var(--o-site-hr-top-medium)*-1); */
	}
	.o-site-hr__first-level .c-language-switcher__btn {
		height: unset;
		/* --was-height: 40px; */
	}
	header.o-site-hr {
		top: -32px;
	}
}
& when (@TopHeaderHeight = tiny) {
	.c-search-form__input.c-search-engine__input {
		height: unset;
	}
	header.o-site-hr {
		top: -18px;
	}
}

& when (@HideTopHeader = 1) {
	body.is-template-article .o-site-hr__first-level {
		display: none;
	}
	/* weird way the orig site moves the parent to accommodate the TopHeader */
	header.o-site-hr {
		top: 0;
	}
}

& when (@blockPopupMenus = 1) {
@media (hover: hover) {
    .o-site-hr__second-level__dropdown:hover, :hover + .o-site-hr__second-level__dropdown {
		display: none;
		/* --was-display: initial; */
    }

    .o-site-hr__second-level__dropdown:hover + .o-site-hr__second-level__dropdown-mask, :hover + .o-site-hr__second-level__dropdown + .o-site-hr__second-level__dropdown-mask {
		display: none;
		/* --was-display: initial; */
    }
}
}

& when (@HideSwiper = 1) {
	.c-swiper--full-article .js-swip-btn {
		display: none;
	}
}



& when (@ExpandAlwaysHeroPicCaption = 1) {
	.c-article-caption__content {
		display: flex !important;
		padding: 7px 7px 0;
	}
	.c-article-caption {
	bottom: 8px;
		/* --was-inotherrule-position: absolute; */
		position: static;
	}
	.c-article-image-copyright {
/* 		padding-top: 0; */
/* 		padding-left: 1rem; */
		background: #002e44e6;
/* 		padding-bottom: 7px; */
		text-align: right;
/* 		padding-right: 1rem; */
		padding: 5px;

	}
	/* hide "i" and "x" */
	#article-tooltip-svg
	, .c-article-caption__close-button
	{
		display: none;
	}
	.c-article-caption__text {
		font-size: 14px;
	}
/* 	TM is twice */
	& when not (@debug-test[--debug] = 1) {
		.u-color-white:has(+ .c-article-caption__copyright)
		, .c-article-caption__copyright
		, .c-article-caption__credit
		{
			display: none;
		}
	}
}



& when (@HideMidArticleUnrelated = 1) {
	.c-widget-related {
		display: none;
	}
}

}

Reviews

No reviews yet.