mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-25 11:46:56 +02:00
feat: Move to static site
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
.block-ad {
|
||||
background: #e6e6e6;
|
||||
border-radius: 0.25rem;
|
||||
padding: 1rem;
|
||||
margin: 0 auto;
|
||||
max-width: 15rem;
|
||||
}
|
||||
|
||||
/* Ads */
|
||||
.carbon-img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.carbon-poweredby {
|
||||
display: block;
|
||||
font-size: 0.75rem;
|
||||
text-align: right;
|
||||
}
|
||||
.carbon-text {
|
||||
display: block;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
.demo__live {
|
||||
height: 32rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.demo__html {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
15
styles/blocks/_card.scss
Normal file
15
styles/blocks/_card.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
.card__item {
|
||||
background-color: #fff;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.1);
|
||||
padding: 0.5rem 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card__link {
|
||||
color: #6366f1;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
30
styles/blocks/_category.scss
Normal file
30
styles/blocks/_category.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
:root {
|
||||
--category__name-font-size: 1.5rem;
|
||||
--category__post-num-columns: 1;
|
||||
}
|
||||
.category__name {
|
||||
font-size: var(--category__name-font-size);
|
||||
}
|
||||
.category__posts {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(var(--category__post-num-columns), 1fr);
|
||||
column-gap: 1rem;
|
||||
row-gap: 1rem;
|
||||
}
|
||||
.category__link {
|
||||
background: #4338ca;
|
||||
border-radius: 9999px;
|
||||
color: #fff;
|
||||
display: block;
|
||||
padding: 0.5rem 1rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
margin: 1rem auto;
|
||||
width: 12rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
:root {
|
||||
--category__name-font-size: 2rem;
|
||||
--category__post-num-columns: 2;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
.block-code {
|
||||
font-size: 0.875rem;
|
||||
font-family: 'Source code pro';
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
.block-cover {
|
||||
align-items: center;
|
||||
color: var(--color-gray-9);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding: 1rem;
|
||||
text-decoration: none;
|
||||
width: 7rem;
|
||||
}
|
||||
.block-cover__name {
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding-top: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.block-cover {
|
||||
width: 8rem;
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
.block-cssscan {
|
||||
font-family: -apple-system, system-ui, Roboto, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.block-cssscan__inner {
|
||||
max-width: 1024px;
|
||||
background: #c2fbd7;
|
||||
border-radius: 1rem;
|
||||
padding: 2.5rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0 1px 2px 0;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.block-cssscan__title {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.block-cssscan__desc {
|
||||
opacity: 0.8;
|
||||
color: #333;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.block-cssscan__more {
|
||||
margin: 0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.block-cssscan__image {
|
||||
position: absolute;
|
||||
transform: rotate(-7deg);
|
||||
transition: all 0.3s;
|
||||
top: 14%;
|
||||
right: -37%;
|
||||
width: 95%;
|
||||
height: 95%;
|
||||
}
|
||||
|
||||
.block-cssscan__inner:hover {
|
||||
.block-cssscan__more {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.block-cssscan__image {
|
||||
transform: scale(1.1) rotate(-7deg);
|
||||
top: 10%;
|
||||
right: -35%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 0px) and (max-width: 1010px) {
|
||||
.block-cssscan {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.block-cssscan__inner {
|
||||
margin-top: 2em;
|
||||
min-height: 300px;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.block-cssscan__image {
|
||||
top: initial;
|
||||
bottom: -14%;
|
||||
width: 45%;
|
||||
height: 45%;
|
||||
right: -5%;
|
||||
}
|
||||
|
||||
.block-cssscan__inner:hover .block-cssscan__image {
|
||||
top: initial;
|
||||
bottom: -10%;
|
||||
right: -5%;
|
||||
transform: scale(1.1) rotate(-7deg);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,29 @@
|
||||
.block-follow {
|
||||
background-color: #0465eb;
|
||||
.follow {
|
||||
background: #fff;
|
||||
border-radius: 0.5rem;
|
||||
color: #fff;
|
||||
margin: 2rem auto;
|
||||
padding: 1rem;
|
||||
position: relative;
|
||||
max-width: 20rem;
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
&::after {
|
||||
background-image: linear-gradient(45deg, #9333ea, #ea580c);
|
||||
border-radius: inherit;
|
||||
content: '';
|
||||
|
||||
/* Absolute position */
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
|
||||
margin: -0.5rem;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.follow__link {
|
||||
color: #2563eb;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,46 @@
|
||||
/* Footer */
|
||||
.block-footer {
|
||||
border-top: 1px solid #e1e1e1;
|
||||
padding-top: 4rem;
|
||||
:root {
|
||||
--footer-num-columns: 1;
|
||||
}
|
||||
.block-footer__copyright {
|
||||
color: #afafaf;
|
||||
margin: 2rem 0 4rem 0;
|
||||
padding: 1rem 0;
|
||||
text-align: center;
|
||||
|
||||
.footer {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(var(--footer-num-columns), 1fr);
|
||||
column-gap: var(--footer-column-gap, 0);
|
||||
font-size: 0.9rem;
|
||||
row-gap: 1rem;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.footer__heading {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
.footer__list {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.footer__item {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
.footer__link {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.footer__link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.footer__author {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--footer-num-columns: 3;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
:root {
|
||||
--footer-column-gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
.block-header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e4e4e4;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
.block-header__inner {
|
||||
.header {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 3rem;
|
||||
justify-content: space-between;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
.block-header__cta {
|
||||
.header__breadcrumb {
|
||||
align-items: center;
|
||||
background-color: var(--mgd-color-primary);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.header__link {
|
||||
align-items: center;
|
||||
color: #222;
|
||||
display: flex;
|
||||
padding: 0.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
.header__link--primary {
|
||||
background: #6366f1;
|
||||
border-radius: 9999px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
font-weight: 600;
|
||||
height: 2rem;
|
||||
padding: 0 1.5rem;
|
||||
padding: 0.5rem 1rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
31
styles/blocks/_hero.scss
Normal file
31
styles/blocks/_hero.scss
Normal file
@@ -0,0 +1,31 @@
|
||||
:root {
|
||||
--hero-margin: 2rem;
|
||||
--hero-width: 100%;
|
||||
--hero__heading-font-size: 2rem;
|
||||
}
|
||||
.hero {
|
||||
margin: var(--hero-margin) auto;
|
||||
text-align: center;
|
||||
width: var(--hero-width);
|
||||
}
|
||||
.hero__heading {
|
||||
font-size: var(--hero__heading-font-size);
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
margin: 2rem auto;
|
||||
text-align: center;
|
||||
}
|
||||
.hero__button {
|
||||
background: #6366f1;
|
||||
border-radius: 9999px;
|
||||
color: #fff;
|
||||
padding: 1rem 2rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
:root {
|
||||
--hero-margin: 3rem;
|
||||
--hero-width: 75%;
|
||||
--hero__heading-font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
.block-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 64rem;
|
||||
}
|
||||
.block-hero {
|
||||
text-align: center;
|
||||
}
|
||||
.block-hero__heading--secondary {
|
||||
color: #808080;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
41
styles/blocks/_nav.scss
Normal file
41
styles/blocks/_nav.scss
Normal file
@@ -0,0 +1,41 @@
|
||||
:root {
|
||||
--nav-flex-direction: column;
|
||||
--nav__item-margin-bottom: 1rem;
|
||||
--nav__item--next-margin-left: 0;
|
||||
--nav__item--prev-margin-right: 0;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: var(--nav-flex-direction);
|
||||
justify-content: space-between;
|
||||
}
|
||||
.nav__item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
||||
background: #60a5fa;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
||||
color: #f9fafb;
|
||||
margin-bottom: var(--nav__item-margin-bottom);
|
||||
padding: 0.25rem 1rem;
|
||||
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav__item--next {
|
||||
margin-left: var(--nav__item--next-margin-left);
|
||||
}
|
||||
.nav__item--prev {
|
||||
margin-right: var(--nav__item--prev-margin-right);
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
:root {
|
||||
--nav-flex-direction: row;
|
||||
--nav__item-margin-bottom: 0;
|
||||
--nav__item--next-margin-left: 1rem;
|
||||
--nav__item--prev-margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
127
styles/blocks/_post.scss
Normal file
127
styles/blocks/_post.scss
Normal file
@@ -0,0 +1,127 @@
|
||||
:root {
|
||||
--post__heading-font-size: 2rem;
|
||||
--post__heading-line-height: 1.25;
|
||||
--post__content-heading-line-height: 1.25;
|
||||
}
|
||||
|
||||
.post {
|
||||
background-color: #fff;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.1);
|
||||
margin: 2rem 0 2rem 0;
|
||||
padding: 2rem 1rem 1rem 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.post__heading {
|
||||
color: #6366f1;
|
||||
font-size: var(--post__heading-font-size);
|
||||
font-weight: 700;
|
||||
line-height: var(--post__heading-line-height);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.post__content {
|
||||
line-height: 1.5;
|
||||
|
||||
a {
|
||||
color: #6366f1;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0.5rem;
|
||||
margin: 1rem 0;
|
||||
padding: 0.25rem 1rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 600;
|
||||
line-height: var(--post__content-heading-line-height);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
line-height: var(--post__content-heading-line-height);
|
||||
}
|
||||
|
||||
hr {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
height: 1px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
ol {
|
||||
counter-reset: ol-step-counter;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol li {
|
||||
counter-increment: ol-step-counter;
|
||||
padding-bottom: 0.25rem;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
ol li::before {
|
||||
background-color: #e5e7eb;
|
||||
border-radius: 50%;
|
||||
content: counter(ol-step-counter);
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
margin-left: -2rem;
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
thead {
|
||||
background: #d1d5db;
|
||||
}
|
||||
|
||||
tr {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
:root {
|
||||
--post__heading-font-size: 2.5rem;
|
||||
--post__content-heading-line-height: 1.5;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user