1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +01:00

actions and spacing tweaks

This commit is contained in:
Matthias Kretschmann 2018-10-14 13:59:18 +02:00
parent a502952403
commit 2e7f53195d
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 84 additions and 46 deletions

View File

@ -9,7 +9,7 @@
} }
.content { .content {
padding: 0 $spacer; padding: 0 $spacer / $line-height;
width: 100%; width: 100%;
@media (min-width: $screen-sm) { @media (min-width: $screen-sm) {

View File

@ -25,29 +25,24 @@ export default class PostActions extends PureComponent {
return ( return (
<aside className={styles.actions}> <aside className={styles.actions}>
<article className={styles.action}> <a
className={styles.action}
href={`https://twitter.com/intent/tweet?text=@kremalicious&url=${url}${slug}`}
>
<Twitter /> <Twitter />
<h1 className={styles.actionTitle}>Have a comment?</h1> <h1 className={styles.actionTitle}>Have a comment?</h1>
<p className={styles.actionText}> <p className={styles.actionText}>
Hit me up{' '} Hit me up <span className={styles.link}>@kremalicious</span>.
<a
href={`https://twitter.com/intent/tweet?text=@kremalicious&url=${url}${slug}`}
>
@kremalicious
</a>
.
</p> </p>
</article> </a>
<article className={styles.action}> <button className={styles.action} onClick={this.toggleModal}>
<Bitcoin /> <Bitcoin />
<h1 className={styles.actionTitle}>Found something useful?</h1> <h1 className={styles.actionTitle}>Found something useful?</h1>
<p className={styles.actionText}> <p className={styles.actionText}>
Say thanks{' '} Say thanks{' '}
<button className="link" onClick={this.toggleModal}> <span className={styles.link}>with Bitcoins or Ether</span>.
with Bitcoins or Ether.
</button>
</p> </p>
</article> </button>
{this.state.showModal && ( {this.state.showModal && (
<ModalThanks <ModalThanks

View File

@ -1,12 +1,10 @@
@import 'variables'; @import 'variables';
@import 'mixins';
.actions { .actions {
@include divider;
@include divider-top;
margin-top: $spacer * 3; margin-top: $spacer * 3;
padding: $spacer * $line-height 0; padding: ($spacer * $line-height) 0 ($spacer * $line-height) 100%;
background: rgba(#fff, .5);
margin-left: -100%;
@media (min-width: $screen-xs) { @media (min-width: $screen-xs) {
display: flex; display: flex;
@ -14,39 +12,69 @@
} }
} }
.link {
transition: .2s ease-out;
color: $link-color;
}
.actionTitle {
font-size: $font-size-h4;
line-height: $line-height;
color: $text-color;
margin-top: 0;
margin-bottom: 0;
transition: color .2s ease-out;
}
.actionText {
font-size: $font-size-base;
color: $brand-grey-light;
margin-bottom: 0;
transition: color .2s ease-out;
}
.action { .action {
display: block;
margin: 0;
padding-left: 1.75rem; padding-left: 1.75rem;
padding-right: $spacer / 2;
position: relative; position: relative;
text-align: left;
&:first-child { &:first-child {
margin-bottom: $spacer * 2; margin-bottom: $spacer * $line-height;
} }
@media (min-width: $screen-xs) { @media (min-width: $screen-xs) {
flex: 1 1 48%; flex: 1 1 50%;
&:first-child { &:first-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
&:hover,
&:focus {
.link,
.actionTitle,
.actionText {
color: $link-color-hover;
}
}
&:active {
.link,
.actionTitle,
.actionText {
transition: none;
color: $link-color-active;
}
}
svg { svg {
position: absolute; position: absolute;
left: 0; left: 0;
top: .2rem; top: .4rem;
fill: $brand-grey-light; fill: $brand-grey-light;
} }
} }
.actionTitle {
font-size: $font-size-base;
line-height: $line-height;
color: $text-color;
margin-top: 0;
margin-bottom: 0;
}
.actionText {
font-size: $font-size-small;
margin-bottom: 0;
}

View File

@ -4,8 +4,9 @@
///////////////////////////////////// /////////////////////////////////////
.entryMeta { .entryMeta {
font-size: $font-size-small; font-size: $font-size-base;
margin-top: $spacer * 2; margin-top: $spacer * 2;
color: $brand-grey-light;
} }
.byline, .byline,
@ -72,6 +73,9 @@
color: $text-color; color: $text-color;
margin-left: $spacer / 2; margin-left: $spacer / 2;
margin-right: $spacer / 2; margin-right: $spacer / 2;
margin-bottom: $spacer / 2;
white-space: nowrap;
display: inline-block;
&::before { &::before {
color: $brand-grey-light; color: $brand-grey-light;

View File

@ -38,8 +38,6 @@ pre {
line-height: $line-height; line-height: $line-height;
color: $code-color; color: $code-color;
background-color: $code-bg; background-color: $code-bg;
margin-left: -($spacer);
margin-right: -($spacer);
border-radius: $border-radius; border-radius: $border-radius;
// make 'em scrollable // make 'em scrollable
@ -49,6 +47,8 @@ pre {
@media (min-width: $screen-sm) { @media (min-width: $screen-sm) {
max-height: 500px; max-height: 500px;
margin-left: -($spacer);
margin-right: -($spacer);
} }
@media (min-width: $screen-md) { @media (min-width: $screen-md) {
@ -71,6 +71,10 @@ pre {
overflow-wrap: normal; overflow-wrap: normal;
word-wrap: normal; word-wrap: normal;
word-break: normal; word-break: normal;
> span {
padding-right: $spacer;
}
} }
} }

View File

@ -1,4 +1,5 @@
/* stylelint-disable */ /* stylelint-disable */
@import 'variables';
/* /*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -11,8 +12,11 @@ copyright Copyright (C) 2017 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/ */
.nord { .nord {
@media (min-width: $screen-sm) {
max-height: 500px;
margin-left: -($spacer); margin-left: -($spacer);
margin-right: -($spacer); margin-right: -($spacer);
}
> pre { > pre {
margin-left: 0; margin-left: 0;

View File

@ -35,6 +35,8 @@ $text-color--dark: lighten($brand-grey-light, 5%);
$text-color-light--dark: lighten($brand-grey-light, 5%); $text-color-light--dark: lighten($brand-grey-light, 5%);
$link-color: $brand-cyan; $link-color: $brand-cyan;
$link-color-hover: lighten($link-color, 10%);
$link-color-active: darken($link-color, 10%);
// Base Typography // Base Typography
///////////////////////////////////// /////////////////////////////////////
@ -49,9 +51,9 @@ $font-size-mini: .7rem;
$font-size-h1: 2.5rem; $font-size-h1: 2.5rem;
$font-size-h2: 2rem; $font-size-h2: 2rem;
$font-size-h3: 1.5rem; $font-size-h3: 1.5rem;
$font-size-h4: $font-size-large; $font-size-h4: 1.2rem;
$font-size-h5: $font-size-base; $font-size-h5: $font-size-large;
$font-size-h6: $font-size-small; $font-size-h6: $font-size-base;
$line-height: 1.5; $line-height: 1.5;
$line-height-small: 1.1428571429; $line-height-small: 1.1428571429;

View File

@ -74,6 +74,7 @@ button {
background: transparent; background: transparent;
border: 0; border: 0;
-webkit-appearance: none; -webkit-appearance: none;
outline: 0;
&:active { &:active {
transition: none; transition: none;
@ -178,12 +179,12 @@ a {
&:hover, &:hover,
&:focus { &:focus {
outline: 0; outline: 0;
color: lighten($link-color, 10%); color: $link-color-hover;
} }
&:active { &:active {
transition: none; transition: none;
color: darken($link-color, 10%); color: $link-color-active;
} }
} }