[Update] apply RWD for home and header (min-width: 1500, 1800)

This commit is contained in:
barrystone 2021-03-30 21:17:43 +08:00
parent c11b12d78e
commit 796c6b1c44
4 changed files with 191 additions and 45 deletions

View File

@ -1,7 +1,28 @@
@import "./color.scss"; @import "./color.scss";
@import "./breakpoint.scss";
$font-header-link: "Noto Serif CJK TC -Bold"; $font-header-link: "Noto Serif CJK TC -Bold";
$font-header-apply: "Noto Serif CJK TC -Black"; $font-header-apply: "Noto Serif CJK TC -Black";
@mixin headerLinksFontSize {
font-size: 12pt;
@media screen and (min-width: $max-width-big) {
font-size: 13.5pt;
}
@media screen and (min-width: $max-width-big-0) {
font-size: 15pt;
}
}
@mixin headerLinksWidth {
width: 600px;
@media screen and (min-width: $max-width-big) {
width: 630px;
}
@media screen and (min-width: $max-width-big-0) {
width: 680px;
}
}
.header { .header {
position: relative; position: relative;
z-index: 99; z-index: 99;
@ -29,17 +50,21 @@ $font-header-apply: "Noto Serif CJK TC -Black";
left: 35px; left: 35px;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
width: 150px;
} }
&__right { &__right {
float: right; float: right;
width: 80%; width: 80%;
// background-color: lightgoldenrodyellow;
} }
&-links { &-links {
// background-color: lightgray;
font-family: $font-header-link; font-family: $font-header-link;
float: right; float: right;
width: 600px; @include headerLinksWidth;
// width: 600px;
margin-right: 92px; margin-right: 92px;
height: 100%; height: 100%;
height: 50px; height: 50px;
@ -64,7 +89,7 @@ $font-header-apply: "Noto Serif CJK TC -Black";
// } // }
a { a {
font-size: 12pt; @include headerLinksFontSize;
color: $black; color: $black;
padding-bottom: 15px; padding-bottom: 15px;
} }
@ -89,8 +114,8 @@ $font-header-apply: "Noto Serif CJK TC -Black";
transform: translateY(-50%); transform: translateY(-50%);
a { a {
color: $white;
font-size: 13pt; font-size: 13pt;
color: $white;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 40%; left: 40%;

View File

@ -1,17 +1,141 @@
@import "../color.scss"; @import "../color.scss";
@import "../breakpoint.scss";
$font-home: "Noto Serif CJK TC -SemiBold"; $font-home: "Noto Serif CJK TC -SemiBold";
$font-home-h1: "Noto Serif CJK TC -Bold"; $font-home-h1: "Noto Serif CJK TC -Bold";
$font-home-h2: "Letter Gothic Std Bold"; $font-home-h2: "Letter Gothic Std Bold";
$font-home-button: "Noto Serif CJK TC -Black"; $font-home-button: "Noto Serif CJK TC -Black";
//default screen size width: 1440px
//section
@mixin sectionTitleHeight {
height: 583px;
@media screen and (min-width: $max-width-big) {
height: 635px;
}
@media screen and (min-width: $max-width-big-0) {
height: 700px;
}
}
@mixin sectionContentHeight {
height: 1900px;
@media screen and (min-width: $max-width-big) {
height: 2050px;
}
@media screen and (min-width: $max-width-big-0) {
height: 2150px;
}
}
// -------------------------------------------
//home__title
@mixin homeTitleFontsize {
font-size: 18pt;
@media screen and (min-width: $max-width-big) {
font-size: 22pt;
}
@media screen and (min-width: $max-width-big-0) {
font-size: 25pt;
}
}
@mixin homeTitleTopicWidth {
width: 500px;
@media screen and (min-width: $max-width-big) {
width: 600px;
}
@media screen and (min-width: $max-width-big-0) {
width: 700px;
}
}
// -------------------------------------------
//home__info
@mixin homeInfoTitleH1Fontsize {
font-size: 26pt;
@media screen and (min-width: $max-width-big) {
font-size: 30pt;
}
@media screen and (min-width: $max-width-big-0) {
font-size: 35pt;
}
}
@mixin homeInfoTitleH2Fontsize {
&--small {
font-size: 19pt;
}
&--mid {
font-size: 23pt;
}
&--big {
font-size: 31pt;
}
@media screen and (min-width: $max-width-big) {
&--small {
font-size: 22pt;
}
&--mid {
font-size: 27pt;
}
&--big {
font-size: 35pt;
}
}
@media screen and (min-width: $max-width-big-0) {
&--small {
font-size: 26pt;
}
&--mid {
font-size: 32pt;
}
&--big {
font-size: 40pt;
}
}
}
@mixin homeInfoParagraphFontsize {
font-size: 12pt;
@media screen and (min-width: $max-width-big) {
font-size: 15pt;
}
@media screen and (min-width: $max-width-big-0) {
font-size: 18pt;
}
}
@mixin homeInfoButtonBox {
height: 50px;
width: 245px;
margin-top: 40px;
// background-color: burlywood;
@media screen and (min-width: $max-width-big) {
transform: scale(1.2) translateX(8%) translateY(20%);
}
@media screen and (min-width: $max-width-big-0) {
transform: scale(1.4) translateX(14%) translateY(25%);
}
}
//home__info <img>
@mixin homeInfoImgWidth {
width: 120px;
@media screen and (max-width: $max-width-medium-0) {
width: 80px;
}
@media screen and (min-width: $max-width-big) {
width: 130px;
}
@media screen and (min-width: $max-width-big-0) {
width: 150px;
}
}
// ----------------------------------------------------------------------------------------------
.section { .section {
&-title { &-title {
margin-top: 150px; margin-top: 150px;
height: 583px; @include sectionTitleHeight;
// background-color: chartreuse; // background-color: chartreuse;
} }
&-content { &-content {
height: 1900px; @include sectionContentHeight;
// background-color: cornsilk; // background-color: cornsilk;
} }
} }
@ -20,7 +144,9 @@ $font-home-button: "Noto Serif CJK TC -Black";
font-family: $font-home; font-family: $font-home;
position: relative; position: relative;
&__title { &__title {
width: 600px; // width: 600px;
width: 75%;
// width: 60%;
text-align: center; text-align: center;
// background-color: cornflowerblue; // background-color: cornflowerblue;
margin: 0 auto; margin: 0 auto;
@ -33,24 +159,28 @@ $font-home-button: "Noto Serif CJK TC -Black";
margin-bottom: 20px; margin-bottom: 20px;
// background-color: chocolate; // background-color: chocolate;
height: 80px; height: 80px;
width: 600px; // width: 600px;
width: 100%;
p { p {
font-size: 18pt; @include homeTitleFontsize;
} }
} }
&-topic { &-topic {
margin: 0 auto;
@include homeTitleTopicWidth;
} }
&-box2 { &-box2 {
text-align: center; text-align: center;
// background-color: chocolate; // background-color: chocolate;
height: 80px; height: 80px;
width: 600px; // width: 600px;
width: 100%;
margin: 0 auto; margin: 0 auto;
margin-top: 80px; margin-top: 80px;
p { p {
font-size: 18pt; @include homeTitleFontsize;
} }
} }
} }
@ -67,33 +197,28 @@ $font-home-button: "Noto Serif CJK TC -Black";
&-container { &-container {
width: 75%; width: 75%;
margin-left: 15%; margin-left: 15%;
// background-color: blanchedalmond;
} }
&-title { &-title {
// width: 80%;
margin: 0 auto;
// background-color: darkgray; // background-color: darkgray;
position: relative;
// height: 100px; // height: 100px;
h1 { h1 {
font-family: $font-home-h1; font-family: $font-home-h1;
font-size: 26pt; @include homeInfoTitleH1Fontsize;
padding-top: 25px; padding-top: 25px;
} }
h2 { h2 {
font-family: $font-home-h2; font-family: $font-home-h2;
// font-size: 32pt;
padding-top: 25px; padding-top: 25px;
} }
&-h2 { &-h2 {
&--small { @include homeInfoTitleH2Fontsize;
font-size: 19pt;
}
&--mid {
font-size: 23pt;
}
&--big {
font-size: 31pt;
}
} }
} }
@ -101,7 +226,7 @@ $font-home-button: "Noto Serif CJK TC -Black";
padding-top: 30px; padding-top: 30px;
// background-color: yellow; // background-color: yellow;
p { p {
font-size: 12pt; @include homeInfoParagraphFontsize;
line-height: 33px; line-height: 33px;
a { a {
text-decoration: underline; text-decoration: underline;
@ -111,16 +236,14 @@ $font-home-button: "Noto Serif CJK TC -Black";
} }
&-buttonsBox { &-buttonsBox {
height: 50px; @include homeInfoButtonBox;
width: 245px;
margin-top: 40px;
// background-color: burlywood;
} }
} }
&-button { &-button {
font-family: $font-home-button; // transform: scale(2);
font-size: 12.5pt; font-size: 12.5pt;
font-family: $font-home-button;
position: relative; position: relative;
top: 15px; top: 15px;
color: $white; color: $white;
@ -134,12 +257,16 @@ $font-home-button: "Noto Serif CJK TC -Black";
&-squareImg { &-squareImg {
position: absolute; position: absolute;
left: 0; left: 0;
transform: translateX(-130%);
@include homeInfoImgWidth;
} }
&-appleImg { &-appleImg {
position: absolute; position: absolute;
top: -30px; top: 0;
right: 80px; right: 0;
transform: translateX(25%) translateY(-12%);
@include homeInfoImgWidth;
} }
&-sponsorsImg { &-sponsorsImg {

View File

@ -4,11 +4,7 @@
<div class="header__left"> <div class="header__left">
<div class="header-logo"> <div class="header-logo">
<a href="/2021/"> <a href="/2021/">
<img <img src="~@/assets/images/home/home-headerIcon.svg" width="100%" />
class="sitcon-apple"
src="~@/assets/images/home/home-headerIcon.svg"
height="35"
/>
</a> </a>
</div> </div>
</div> </div>

View File

@ -6,7 +6,7 @@
<p>SITCON 學生計算機年會 2021</p> <p>SITCON 學生計算機年會 2021</p>
</div> </div>
<div class="home__title-topic"> <div class="home__title-topic">
<img src="~@/assets/images/home/home-topic.svg" width="500" /> <img src="~@/assets/images/home/home-topic.svg" width="100%" />
</div> </div>
<div class="home__title-box2"> <div class="home__title-box2">
<p> <p>
@ -17,13 +17,12 @@
</section> </section>
<section class="section-content"> <section class="section-content">
<section class="home__info"> <section class="home__info">
<div class="home__info-container">
<div class="home__info-title">
<img <img
class="home-squareImg" class="home-squareImg"
src="~@/assets/images/home/home-icon-square.svg" src="~@/assets/images/home/home-icon-square.svg"
width="120"
/> />
<div class="home__info-container">
<div class="home__info-title">
<h1>算盤的後裔</h1> <h1>算盤的後裔</h1>
<h2 class="home__info-title-h2--big">Descendants of the abacus</h2> <h2 class="home__info-title-h2--big">Descendants of the abacus</h2>
</div> </div>
@ -40,13 +39,12 @@
</div> </div>
</section> </section>
<section class="home__info"> <section class="home__info">
<div class="home__info-container">
<div class="home__info-title">
<img <img
class="home-appleImg" class="home-appleImg"
src="~@/assets/images/home/home-icon-apple.svg" src="~@/assets/images/home/home-icon-apple.svg"
width="120"
/> />
<div class="home__info-container">
<div class="home__info-title">
<h1>關於 SITCON</h1> <h1>關於 SITCON</h1>
<h2 class="home__info-title-h2--small"> <h2 class="home__info-title-h2--small">
Students' Information Technology Conference Students' Information Technology Conference