[Style] rwd for Intro (sm, md, lg)

This commit is contained in:
hyperbola 2021-01-20 18:41:59 +08:00
parent 2d23cbfac3
commit ca4e9bdeb8
5 changed files with 290 additions and 114 deletions

View File

@ -17,7 +17,19 @@ $zm-korea-fish: -10;
$zm-first-card: -9;
$zm-blue-bar: -8;
$zm-second-card: -7;
$zm-third-card: -6;
// general
#cfp-bg {
.card {
transform: rotate(15deg);
box-shadow: 0 3px 12px 0 rgba(89, 120, 206, 0.56);
border-radius: 30px;
background: $white;
}
}
// lg
#cfp-bg {
width: 100vw;
z-index: $z-section;
@ -50,12 +62,11 @@ $zm-second-card: -7;
.cards {
.first-card {
transform: rotate(15deg);
box-shadow: 0 3px 12px 0 rgba(89, 120, 206, 0.56);
border-radius: 30px;
position: relative;
top: 72px;
right: 0px;
width: 1000px;
height: 950px;
z-index: $z-first-card;
}
@ -82,31 +93,19 @@ $zm-second-card: -7;
}
.card2-wrapper {
height: 1300px;
height: 1600px;
overflow: hidden;
position: relative;
margin-top: -300px;
z-index: $z-second-card;
.second-card {
transform: rotate(15deg);
box-shadow: 0 3px 12px 0 rgba(89, 120, 206, 0.56);
border-radius: 30px;
z-index: $z-second-card;
position: relative;
top: 240px;
right: 240px;
}
}
}
}
@media screen and (min-width: 1921px) {
#cfp-bg {
.korea-fish {
.radial {
margin-top: calc(576px - 30vw);
width: 100vw;
width: 1500px;
height: 1200px;
}
}
}
@ -128,7 +127,113 @@ $zm-second-card: -7;
width: 1666px;
}
}
.cards {
.first-card {
position: relative;
top: 172px;
right: 108px;
width: 1400px; // enough
height: 1100px;
z-index: $zm-first-card;
}
.blue-bar {
z-index: $zm-blue-bar;
width: 3600px; // this is enough
height: 240px;
position: relative;
right: 160px;
top: 400px;
p {
padding-top: 20px;
padding-left: 180px;
z-index: $zm-blue-bar;
}
}
.card2-wrapper {
z-index: $zm-second-card;
.second-card {
z-index: $zm-second-card;
position: relative;
height: 900px;
top: 362px;
right: 90px;
}
}
}
}
}
@include sm {
#cfp-bg {
.korea-fish {
.sitcon-apple {
margin-top: 320px;
width: 216px;
}
.ellipse {
margin-top: 280px;
width: 420px;
}
.radial {
margin-top: 0;
width: 1666px;
}
}
.cards {
.first-card {
position: relative;
top: 0px;
right: 180px;
height: 1500px;
}
.blue-bar {
position: relative;
right: 160px;
top: 240px;
p {
padding-top: 20px;
padding-left: 180px;
z-index: $zm-blue-bar;
}
}
.card2-wrapper {
z-index: $zm-second-card;
.second-card {
z-index: $zm-second-card;
position: relative;
height: 1000px;
top: 198px;
right: 90px;
}
}
}
}
}
/*
@media screen and (min-width: 1921px) {
#cfp-bg {
.korea-fish {
.radial {
margin-top: calc(576px - 30vw);
width: 100vw;
}
}
}
}
@include md {
}
@include sm {
@ -168,3 +273,4 @@ $zm-second-card: -7;
}
}
}
*/

View File

@ -21,6 +21,10 @@ $fontColor: $mid-blue;
.h1 {
font-size: 42pt;
font-weight: 900;
@include sm {
font-size: 38pt;
}
}
h2,
@ -33,6 +37,9 @@ $fontColor: $mid-blue;
.h3 {
font-size: 22pt;
font-weight: 900;
@include sm {
font-size: 19pt;
}
}
}
@ -47,6 +54,9 @@ $fontColor: $mid-blue;
.mt-1 {
margin-top: 1em;
}
.mb-1 {
margin-bottom: 1em;
}
}
#cfp-intro {
@ -130,89 +140,129 @@ $fontColor: $mid-blue;
}
}
@include md {
//for width 786px
#cfp-intro {
h1,
h2,
h3 {
margin-bottom: 12pt;
}
p {
font-size: 14pt;
line-height: 1.75;
width: 85vw;
}
p:not(:last-child) {
margin-bottom: 2em;
}
}
#cfp-intro {
.box-back {
margin-bottom: -42em;
margin-left: -6em;
.first-box {
transform: rotate(12deg) scale(1.2);
bottom: 520px;
left: 100px;
}
.introd-text {
top: 120px;
}
.past-sitcon {
.thumbnails {
.thumb-wrapper {
width: 200.5px; //25vw;
.thumb-title,
.thumb-subtitle {
width: 185.5px; //25vw;
}
}
}
}
}
}
#cfp-intro {
.box-bluearea {
height: 200px;
z-index: 0;
transform: rotate(12deg);
}
}
@include lg {
#cfp-intro {
padding-left: 135px;
padding-right: 135px;
.box-back2 {
margin-top: 1em;
margin-left: -2em;
.second-box {
transform: rotate(12deg);
bottom: 1030px;
left: -5em;
}
}
}
#cfp-intro {
//button util
.mr-2 {
margin-right: 0.5em;
}
.ml-2 {
margin-left: 0.5em;
}
.mt-1 {
margin-top: 1em;
width: initial;
}
}
}
@include md {
#cfp-intro {
padding-top: 72px;
padding-bottom: 144px;
padding-left: 0px;
padding-right: 0px;
color: $fontColor;
.box {
width: 632px;
margin: 0 auto;
}
.box-back {
padding-top: 120px;
padding-bottom: 90px;
.past-sitcon {
.cfp-img {
width: 180px; //225
height: 121px; //152
}
.thumbnails {
.thumb-wrapper {
&:not(:last-child) {
margin-right: 1em;
}
}
}
}
}
.box-back2 {
padding-top: 280px;
.topic-intro {
.cfp-deadline {
.cfp-deadline-content {
display: initial;
}
}
}
.give-me-money {
margin-top: 240px;
}
}
}
}
@include sm {
#cfp-intro {
padding-top: 96px;
padding-bottom: 60px;
padding-left: 36px;
padding-right: 36px;
color: $fontColor;
p {
font-size: 0.9em;
}
.box {
width: initial;
margin: 0;
}
.box-back {
padding-top: 0px;
padding-bottom: 90px;
height: 1240px;
.past-sitcon {
.cfp-img {
width: 180px; //225
height: 121px; //152
}
.thumbnails {
display: flex;
flex-direction: column;
align-items: start;
.thumb-wrapper {
&:not(:last-child) {
margin-right: 0;
margin-bottom: 1em;
}
}
}
}
}
.box-back2 {
padding-top: 380px;
.topic-intro {
.cfp-deadline {
.cfp-deadline-content {
display: initial;
}
}
}
.give-me-money {
margin-top: 140px;
}
}
}
}
/*
@include sm {
//for width 600px
@ -549,3 +599,4 @@ $fontColor: $mid-blue;
}
}
}
*/

View File

@ -23,6 +23,7 @@ $w414: 414px;
}
}
// WTF is this
@mixin ss {
@media screen and (max-width: $w523 - 1px) {
@content;
@ -34,3 +35,15 @@ $w414: 414px;
@content;
}
}
.desktop-only {
@media screen and (max-width: $w1366 - 1px) {
display: none;
}
}
.mobile-only {
@media screen and (min-width: $w1366) {
display: none;
}
}

View File

@ -90,6 +90,7 @@
<div class="cfp-deadline">
<h3>徵稿時間</h3>
<div class="cfp-deadline-content">
<p class="desktop-only">
<span class="h3">01/15 02/22</span
><span class="ml-2 mr-2">詳細時程請見</span
><a
@ -104,6 +105,25 @@
href="https://forms.gle/XoXJSD2P8dL8X8s2A"
>我知道了快讓我投稿</a
>
</p>
<p class="mobile-only mb-1">
<span class="h3">01/15 02/22</span
><span class="ml-2">詳細時程請見</span>
</p>
<p class="mobile-only">
<a
class="btn btn-primary mr-2"
rel="noopener"
href="/2021/cfp/news"
>投稿資訊</a
><a
class="btn btn-primary"
rel="noopener"
target="_blank"
href="https://forms.gle/XoXJSD2P8dL8X8s2A"
>快讓我投稿</a
>
</p>
</div>
</div>
</div>

View File

@ -7,28 +7,14 @@
<img class="sitcon-apple" src="~@/assets/images/CFP/sitcon-apple.svg" />
</div>
<div class="cards">
<svg width="1000" height="950" class="first-bozzx first-card">
<rect
width="1000"
height="950"
style="fill: rgb(255, 255, 255)"
></rect>
</svg>
<div class="first-card card" />
<div class="box-bluearea blue-bar">
<p>Descendents of The Abacus</p>
<p class="desktop-only">Descendents of The Abacus</p>
<p class="mobile-only">Descendents of<br />The Abacus</p>
</div>
<div class="card2-wrapper">
<svg
width="1500"
height="1200"
class="second-box second-card"
>
<rect
width="1500"
height="1200"
style="fill: rgb(255, 255, 255)"
></rect>
</svg>
<div class="second-card card" />
<div class="third-card card mobile-only" />
</div>
</div>
</div>