ميدياويكي:Epub.css

من ويكي مصدر، المكتبة الحرة

ملاحظة: بعد النشر، أنت قد تحتاج إلى إفراغ الكاش الخاص بمتصفحك لرؤية التغييرات.

  • فايرفوكس / سافاري: أمسك Shift أثناء ضغط Reload، أو اضغط على إما Ctrl-F5 أو Ctrl-R (⌘-R على ماك)
  • جوجل كروم: اضغط Ctrl-Shift-R (⌘-Shift-R على ماك)
  • إنترنت إكسبلورر/إيدج: أمسك Ctrl أثناء ضغط Refresh، أو اضغط Ctrl-F5
  • أوبرا: اضغط Ctrl-F5.
/*
	بعد التحديث يتوجب حذف الكاش عبر URL: http://tools.wmflabs.org/wsexport/tool/book.php?refresh=true&lang=ar
*/

@page { 
	margin-top: 0.8em;
	margin-bottom: 0.8em;
	
}
body { 
	margin-left: 0.5em;
	margin-right: 0.5em;
	text-align: justify;
	font-family: Calibri, Amiri, 'Noto Naskh Arabic', sans-serif;
	line-height: 1.8em;
}

/* تعريفات كتل النص */
p { 
	text-indent: 1em;
	margin-top: 6px;
	margin-bottom:6px;
	display:block;
	/* line-height:120%; */
}
.center {text-align: center; text-indent: 0; width:100%;}
.right {text-align: right; text-indent: 0;; width:100%;}
.alineanegatif {text-indent:-2em; padding-left:2em; margin-top: 6px; margin-bottom:6px; display:block;}

/* العناوين */
h1, h2, h3, h4, h5, h6 {
	text-align: center;
	font-weight: normal;
	line-height: inherit;
	break-after: avoid; page-break-after: avoid;
	break-inside: avoid; page-break-inside: avoid;
}
h1 {
	font-size: 200%;
	margin-top:72px;
	margin-bottom:48px;
}
h2 {
	font-size: 150%;
	margin-top: 48px;
	margin-bottom: 32px;
}
h3 {
	font-size: 120%;
	margin-top: 36px;
	margin-bottom: 24px;
}
h4 {
	font-size: 100%;
	margin-top: 24px;
	margin-bottom: 18px;
}
h5 {
	font-size: 100%;
}
h6 {
	font-size: 90%;
}

a:link, a:visited {
	color: inherit;
	text-decoration-color:gray;
}
/* Notes */
.references {font-size: 80%; line-height: normal; }
sup.reference {padding-right: 1.07pt; }

/* 
 * Left/right-floated images
 * e.g. [[File:Foo.jpg|left]]
 */
.floatleft {
	float: left;
	clear: left;
}
.floatright {
	float: right;
	clear: right;
}

/* centered image */
.mw-halign-center {
	display: table;
	margin: auto;
}

/*
 * Force images to fit in their containers.
 * Specifically, this is to avoid them extending off the page
 */
.content a > img,
.content noscript > img {
  max-width:100% !important;
  height:auto !important
}

/*
 * Sidenotes
 */
.wst-sidenote-right,
.wst-sidenote-left {
  margin:0.5em;
  padding:3px;
  max-width:9em;
  text-indent:0;
  text-align:left;
}

.wst-sidenote-right {
   float:right;
}

.wst-sidenote-left{
  float:left;
}

/*
 * Use the same formatting choices as on-wiki for consistency
 */
dt {
  font-weight: bold;
  margin-bottom: 0.1em;
}

/**
 * Remove this forced background color as the dots are not exported
 */
.toc-line-entry-text {
	background: transparent !important;
}

/* Prevent huge DHR's which usually result in content disappearing over page
 * breaks */
.wst-dhr {
	line-height: 100% !important;
}

/* Make sure tables fit on the page (even if a manual size if set) */
/* and generally avoid breaking in the middle of them */
table {
	max-width: 100%;
	break-inside: avoid;
}

/*
 * Centre table header like on-wiki 
 */
table caption {
	text-align: center;
}

/*
 * The double-float for the drop initials works for the margins on the inner
 * initial, but it trips up some Epub engine, so nerf it for now.
 * Eventually, the margins on {{di}} should be set on the top element and this
 * will be easier.
 */
.ws-poem-hi span.dropinitial-initial {
	float:none;
}

/*
 * Disable "helpful" auto-indents for poems in some e-readers
 * (note: this means using <poem> is better than <br/>, which has no semantic
 * content and can't be used to target this styling)
 */
.poem, .poem p {
	text-indent: 0;
}

/*
 * Disable the indented-page pagenumber margin styles
 */
.indented-page, .prose {
	margin: inherit;
	padding: inherit;
}

/* This generally doesn't export well, so fall back on the inner em-dashes
 * revisit this if it can be improved in readers */
.wst-bar-inner {
	color: inherit !important;
}
.wst-bar {
	text-decoration: inherit !important;
}

/* normally this would not be included anyway as exports don't come from the page NS,
 * but sometimes it's useful to do so when debugging EPUBs */
.prp-page-qualityheader {
	display: none;
}

/* ضبط الحواشي */
.reference a::after {
  content: ']';
}

.reference a::before {
  content: '[';
}

.ref-arabic-indic .reference a::after {
  content: ')';
}

.ref-arabic-indic .reference a::before {
  content: '(';
}

.reflist-arabic-indic .references li::marker {
  content: '(' counter( mw-references, arabic-indic ) ')';
}

/* تنسيقات تتبع القوالب الشائعة */

/* ==== أبيات==== */

.abyat-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  text-align: justify;
  text-align-last: justify;
  margin: auto;
}

.abyat-wrapper.mashtoor {
	grid-template-columns: 1fr;
	padding-left: 0; 
}

.abyat-single_bayt {
  grid-column: 2 / 4;
  padding-left: 0.5em;
  padding-right: 0.5em;
}
.abyat-wrapper > div {
    white-space: nowrap;
    break-inside: avoid;
    page-break-inside:avoid;
}

.abyat-sdr {
	grid-column: 1 / 3;
    padding-left: 1em;
}

.abyat-ajz {
	grid-column: 3 / 5;
    padding-right: 1em;
}

/* تنسيق شطر شطر */
.abyat-wrapper.abyat-shaterbyshater {
	grid-template-columns: 1fr;	
}

.abyat-shaterbyshater .abyat-single_bayt {
  grid-column: unset;
  padding-left: 2.5em;
  padding-right: 2.5em;
}
.abyat-shaterbyshater .abyat-sdr {
	grid-column: unset;
    padding-left: 5em;
}
.abyat-shaterbyshater .abyat-ajz {
	grid-column: unset;
    padding-right: 5em;
}
@media screen and (max-width: 600px) {
	.abyat-wrapper {
		grid-template-columns: 1fr;	
	}
	
	.abyat-single_bayt {
	  grid-column: unset;
	  padding-left: 2.5em;
	  padding-right: 2.5em;
	}
	.abyat-sdr {
		grid-column: unset;
	    padding-left: 5em;
	}
	.abyat-ajz {
		grid-column: unset;
	    padding-right: 5em;
	}
}