From 0a2201c408b339fae185f42f62e780a23131e371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Fri, 18 May 2018 00:39:36 -0500 Subject: [PATCH] Closes #48 --- .vuepress/components/GithubFeed.vue | 289 +++++++++++++++++++++------- .vuepress/scss/_layout.scss | 23 ++- .vuepress/scss/pages/_home.scss | 26 +++ .vuepress/theme/Layout.vue | 6 +- 4 files changed, 268 insertions(+), 76 deletions(-) diff --git a/.vuepress/components/GithubFeed.vue b/.vuepress/components/GithubFeed.vue index 4c13017..bc952f5 100644 --- a/.vuepress/components/GithubFeed.vue +++ b/.vuepress/components/GithubFeed.vue @@ -1,52 +1,63 @@ \ No newline at end of file + @media (min-width: 1301px) { + padding-top: 3.7rem; + } + + @media (min-width: 1001px) and (max-width: 1300px) { + padding-top: 2.95rem; + } + + @media (min-width: 1001px) { + padding-bottom: 2rem; + padding-right: 10%; + padding-left: 2rem; + } + + @media (max-width: 1000px) { + padding-top: 2rem; + padding-bottom: 2rem; + } + + @media (min-width: 901px) { + padding-right: 1rem; + padding-left: 1rem; + } + + @media (max-width: 900px) { + padding-right: 2rem; + padding-left: 2rem; + } + + @media (max-width: 700px) { + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + } + + h3, h5 { + @media (min-width: 1001px) { + text-align: center; + } + } + + h3 { + letter-spacing: 0.1rem; + line-height: 1; + text-transform: uppercase; + width: 100%; + + @media (min-width: 1301px) { + top: 2.15rem; left: 0; + + color: rgba($black, 0.045); + font-size: 4rem; + position: absolute; + } + + @media (max-width: 1300px) { + color: $black; + } + + @media (min-width: 901px) and (max-width: 1300px) { + font-size: 3rem; + } + + @media (max-width: 900px) { + font-size: 2rem; + margin-bottom: 1rem; + } + } + + h5 { + font-style: italic; + font-weight: normal; + + @media (min-width: 1001px) { + margin-bottom: 3rem; + } + + @media (min-width: 901px) and (max-width: 1000px) { + margin-bottom: 2rem; + } + + @media (max-width: 900px) { + margin-bottom: 0.5rem; + position: relative; + top: -1rem; + } + } + } + + .github-feed__event { + line-height: 1.33; + + @media (max-width: 700px) { + display: inline-block; + margin-right: 1.25rem; + vertical-align: top; + width: 200px; + } + + &:not(:last-of-type) { + @media (min-width: 701px) { + margin-bottom: 1.25rem; + } + } + + > a:first-of-type { + display: inline-block; + font-weight: 700; + margin-bottom: 0.5rem; + } + + > p:first-of-type { + @media (min-width: 701px) { + display: inline-block; + margin-left: 0.5rem; + vertical-align: top; + width: calc(100% - 4.5rem); + } + + @media (max-width: 700px) { + top: -3.5rem; left: 5%; + + background-color: $white; + border: 1px solid rgba($gray, 0.1); + border-radius: 3px; + padding: 1rem; + position: relative; + white-space: normal; + width: 90%; + } + } + } + + .github-feed__event__avatar { + border: 1px solid rgba($gray, 0.1); + border-radius: 3px; + object-position: center; + object-fit: cover; + + @media (min-width: 701px) { + width: 2.5rem; height: 2.5rem; + } + + @media (max-width: 700px) { + width: 100%; height: 100%; + } + } + + .github-feed__event__time { + color: $gray; + display: block; + } + diff --git a/.vuepress/scss/_layout.scss b/.vuepress/scss/_layout.scss index a03d50f..36c983a 100644 --- a/.vuepress/scss/_layout.scss +++ b/.vuepress/scss/_layout.scss @@ -23,8 +23,27 @@ main { min-height: 100vh; padding-top: 4rem; - > div:first-of-type { - flex: 1; + &:not(.home) { + > div:first-of-type { + flex: 1; + } + } + + &.home { + @media (min-width: 1001px) { + > div:first-of-type { + display: grid; + grid-gap: 0; + grid-template-areas: + "header header header" + "features features features" + "intro intro github" + "docs docs github" + "contribute contribute contribute" + "develop develop develop" + "community community community"; + } + } } } diff --git a/.vuepress/scss/pages/_home.scss b/.vuepress/scss/pages/_home.scss index 9ddf232..9dbfe08 100644 --- a/.vuepress/scss/pages/_home.scss +++ b/.vuepress/scss/pages/_home.scss @@ -40,6 +40,7 @@ background-position: center; background-repeat: no-repeat; display: flex; + grid-area: header; height: calc(50vh - 4rem); min-height: 300px; justify-content: center; @@ -78,6 +79,8 @@ } &.features { + grid-area: features; + .home__features { align-content: center; border-bottom: 1px solid rgba($black, 0.05); @@ -204,6 +207,21 @@ border-bottom: 1px solid rgba($black, 0.05); } + &.intro, + &.docs { + @media (min-width: 1301px) { + padding-left: 10%; + } + } + + &.intro { + grid-area: intro; + } + + &.docs { + grid-area: docs; + } + &.community, &.contribute { p { @@ -273,6 +291,8 @@ } &.contribute { + grid-area: contribute; + ul { li { @media (min-width: 701px) { @@ -318,7 +338,13 @@ } } + &.develop { + grid-area: develop; + } + &.community { + grid-area: community; + ul { li { @media (min-width: 701px) { diff --git a/.vuepress/theme/Layout.vue b/.vuepress/theme/Layout.vue index fa5b95a..6758eeb 100644 --- a/.vuepress/theme/Layout.vue +++ b/.vuepress/theme/Layout.vue @@ -1,5 +1,5 @@