1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-16 17:43:14 +02: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 {
padding: 0 $spacer;
padding: 0 $spacer / $line-height;
width: 100%;
@media (min-width: $screen-sm) {

View File

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

View File

@ -1,12 +1,10 @@
@import 'variables';
@import 'mixins';
.actions {
@include divider;
@include divider-top;
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) {
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 {
display: block;
margin: 0;
padding-left: 1.75rem;
padding-right: $spacer / 2;
position: relative;
text-align: left;
&:first-child {
margin-bottom: $spacer * 2;
margin-bottom: $spacer * $line-height;
}
@media (min-width: $screen-xs) {
flex: 1 1 48%;
flex: 1 1 50%;
&:first-child {
margin-bottom: 0;
}
}
&:hover,
&:focus {
.link,
.actionTitle,
.actionText {
color: $link-color-hover;
}
}
&:active {
.link,
.actionTitle,
.actionText {
transition: none;
color: $link-color-active;
}
}
svg {
position: absolute;
left: 0;
top: .2rem;
top: .4rem;
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 {
font-size: $font-size-small;
font-size: $font-size-base;
margin-top: $spacer * 2;
color: $brand-grey-light;
}
.byline,
@ -72,6 +73,9 @@
color: $text-color;
margin-left: $spacer / 2;
margin-right: $spacer / 2;
margin-bottom: $spacer / 2;
white-space: nowrap;
display: inline-block;
&::before {
color: $brand-grey-light;

View File

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

View File

@ -1,4 +1,5 @@
/* stylelint-disable */
@import 'variables';
/*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -11,8 +12,11 @@ copyright Copyright (C) 2017 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
.nord {
margin-left: -($spacer);
margin-right: -($spacer);
@media (min-width: $screen-sm) {
max-height: 500px;
margin-left: -($spacer);
margin-right: -($spacer);
}
> pre {
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%);
$link-color: $brand-cyan;
$link-color-hover: lighten($link-color, 10%);
$link-color-active: darken($link-color, 10%);
// Base Typography
/////////////////////////////////////
@ -49,9 +51,9 @@ $font-size-mini: .7rem;
$font-size-h1: 2.5rem;
$font-size-h2: 2rem;
$font-size-h3: 1.5rem;
$font-size-h4: $font-size-large;
$font-size-h5: $font-size-base;
$font-size-h6: $font-size-small;
$font-size-h4: 1.2rem;
$font-size-h5: $font-size-large;
$font-size-h6: $font-size-base;
$line-height: 1.5;
$line-height-small: 1.1428571429;

View File

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