Template:新版首页/styles.css

模板页面
/* _addText: "[[Category:首页模板]]" */

.mainpage-code {
	display: none;
}

#mainpage {
	/* border-radius: 0.5em; */

	/* display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	gap: 1em; */
}

.mainpage {
	line-height: 1.5;
}

.mainpage h2 {
	padding: 0.5em;
	border: none;
	border-radius: 0.2em;
	margin: 0 auto 1em;
	background: #36d;
	color: #fff;
	font-size: 1.25em;
	font-weight: normal;
	text-align: center;
}

.mainpage h2::after {
	border: none;
}

.mainpage h2 .mw-headline::before,
.mainpage h2 .mw-headline::after {
	color: #fff;
	font-weight: normal;
}

.mainpage h2 .mw-headline::before {
	margin-right: 0.5em;
	content: '[';
}

.mainpage h2 .mw-headline::after {
	margin-left: 0.5em;
	content: ']';
}

.mainpage a.new {
	color: inherit;
}

.mainpage ul.gallery {
	margin: auto;
	text-align: center;
}

.mainpage li.gallerybox div.thumb {
	border: 0;
	background: none;
}

.mainpage-header img {
	max-width: 75vw;
	object-fit: contain;
}

.mainpage-row img {
	max-width: 50vw;
	object-fit: contain;
}

.mainpage .card .background img {
	max-width: unset;
	object-fit: cover;
}

.mainpage div.caption {
	margin: 0.5em auto;
	font-size: 0.95em;
	line-height: 1.2;
	text-align: center;
}

.mainpage-header,
.mainpage-row,
.mainpage-footer {
	display: flex;
    max-width: 100%;
	flex-flow: row wrap;
	justify-content: space-between;
	padding: 0;
	margin-bottom: 1em;
}

.mainpage-body-row {
	/* min-height: 240px; */
}

.mainpage-footer {
	/* min-height: 125px; */
}

.mainpage-header-box,
.mainpage-box,
.mainpage-footer-box {
	flex: 1 1 340px;
	padding: 0;
	break-inside: avoid;
}

.mainpage-header-box > *,
.mainpage-box > div,
.mainpage-footer-box > div {
	margin: 0 1vw;
}

.mainpage-header-box {
	padding: 1.5em 0.5em;
	border: 1px solid rgba(51,102,221,0.25);
	border-radius: 0.2em;
	background-attachment: fixed;
	background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)), url("https://tu.zhongwen.wiki/images/qiuwen/thumb/7/7d/Qiuwen_Icon_Background_%28faded%29.svg/130px-Qiuwen_Icon_Background_%28faded%29.svg.png");
	background-repeat: repeat repeat;
}

.mainpage-row {
	flex: 1 1 100%;
	gap: 1em;
}

.mainpage-header .mainpage-header-bio {
	display: flex;
	flex-flow: column wrap;
	gap: 1em;

	/* text-align: left; */
}

.mainpage-header .mainpage-header-bio * {
	margin: auto;
}

.mainpage-header .mainpage-slogan {
	margin: auto;
	color: #484848;
}

.mainpage-header .mainpage-slogan img {
	margin-bottom: 0.25em;
}

.mainpage-header .mainpage-articlecount {
	color: #666;
	font-size: 1.125em;
	font-weight: normal;
}

.mainpage-header .mainpage-search {
	padding: 1em 0;
}

.mainpage-header .mainpage-search input {
	max-width: 75vw;
}

.mainpage-header .mainpage-search div {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25em 0;
}

.mainpage-link-button {
	padding: 0.25em;
}

.mainpage-link-button a {
	padding: 0.25em 0.5em;
	border: none;
	border-radius: 0.5em;
	cursor: pointer;
}

.mainpage-link-button a:hover,
.mainpage-link-button a.external:hover,
.mainpage-link-button a.extiw:hover,
.mainpage-link-button a:visited:hover,
.mainpage-link-button a.external:visited:hover,
.mainpage-link-button a.extiw:visited:hover {
	background: #36c;
	color: #fff;
	text-decoration: none;
}

@media screen and (max-width: 1024px) {
	.mainpage-header,
	.mainpage-row,
	.mainpage-footer {
		min-height: 125px;
	}

	.mainpage-header-box,
	.mainpage-box,
	.mainpage-footer-box {
		margin: 0 auto;
	}

	.mainpage-header .mainpage-header-bio {
		align-items: center;
		justify-content: center;
	}
	
	.mainpage-header .mainpage-search {
		padding: 1em 0 0;
	}

	.mainpage div.floatleft,
	.mainpage table.floatleft,
	.mainpage div.floatright,
	.mainpage table.floatright {
		margin: 1em !important;
		text-align: center;
	}
}

@media screen and (min-width: 1024px) {
	.mainpage-header-box {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.mainpage-header .mainpage-header-bio {
		flex: 2.5 1;

		/* margin: 0 0.5em 0 auto; */
	}
}

.mainpage .guidelist ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: auto;
	gap: 0.25em;
}

.mainpage .guidelist li {
	font-size: 1.1em;
	list-style-type: none;
	text-align: center;
}

.mainpage .guidelist li::marker {
	content: '';
}

#mainpage-sisterproject-box .guidelist {
	display: flex;
	flex-direction: column;
	gap: 1em;
}

#mainpage-sisterproject-box .guidelist .mainpage-sisterproject-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 1em;
}

#mainpage-sns-box .guidelist {
	display: flex;
	flex-wrap: wrap;
	align-content: space-around;
	align-items: flex-end;
	justify-content: space-evenly;
	gap: 1em;
}

#mainpage-copyright,
#mainpage-feedback {
	padding: 0.5em 2.5em;
	margin: 0 0 auto auto;
	text-align: right;
}

#mainpage-copyright {
	font-size: 0.5em;
}

#mainpage-copyright,
#mainpage-copyright a {
	color: #aaa;
}

#mainpage-feedback {
	font-size: 0.875em;
}

/* Normalize */

.mainpage div.thumbinner {
	background: transparent;
}

.mainpage .thumbcaption {
	text-align: center;
}

.mainpage img {
	border-radius: 0;
}