OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Mon, 6 Jul 2020 14:55:06 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Mon, 6 Jul 2020 14:55:06 +0000 (23:55 +0900)
_layouts/2017/home.html
_layouts/2017/sheet.html
_sass/2017/components/h3-section.scss
_sass/2017/components/headline-pub.scss
_sass/2017/markdown/code.scss
_sass/2017/variables.scss
enzyme.md
httpie.md
promise.md

index fd23b74..352b54c 100644 (file)
@@ -10,7 +10,7 @@
 %}
 {% include 2017/head.html critical='home' %}
 
-</head><body>
+</head><body class='UseCompactHeader HighlightPubFirstLine'>
 
 {% include 2017/top-nav.html page=page is_home=true noedit=true noback=true %}
 
index 14f5a40..0073d7b 100644 (file)
@@ -4,7 +4,7 @@
 {% include 2017/head.html critical='sheet' %}
 {% include 2017/article-schema.html page=page %}
 
-</head><body>
+</head><body class='UseCompactHeader HighlightPubFirstLine'>
 
 {% include 2017/top-nav.html page=page %}
 
index 4273b81..3d6e68c 100644 (file)
@@ -3,7 +3,8 @@
  */
 
 .h3-section > .body {
-  & > pre {
+  & > pre,
+  & > .gatsby-highlight > pre {
     margin: 0;
     padding: 16px;
   }
   /* Description paragraphs */
   & p {
     background: $gray-bg;
-    color: $gray-text;
+    color: $base-text;
 
     /* Links */
     & a,
index a93b279..abdab2e 100644 (file)
@@ -78,7 +78,9 @@ $placeholder-bg-size: 450px;
 
   // Hide placeholders after carbon has loaded
   #carbonads ~ .placeholder {
-    display: none;
+    opacity: 0;
+    transition: opacity 250ms linear;
+    pointer-events: none;
   }
 
   & > .placeholder {
@@ -135,6 +137,10 @@ $placeholder-bg-size: 450px;
     text-align: left;
   }
 
+  .HighlightPubFirstLine & > div > span:first-line {
+    font-weight: bold;
+  }
+
   // Clearfix
   & > div > span::after {
     content: '';
@@ -149,6 +155,10 @@ $placeholder-bg-size: 450px;
   }
 }
 
+#carbonads {
+  animation: 250ms ease-out pub-text-enter;
+}
+
 @keyframes placeholder-swish {
   0% {
     background-position: ($placeholder-bg-size * -1 / 3) 0%;
@@ -162,3 +172,14 @@ $placeholder-bg-size: 450px;
     background-position: ($placeholder-bg-size * 2 / 3) 0%;
   }
 }
+
+@keyframes pub-text-enter {
+  0% {
+    opacity: 0;
+    transform: scale(0.97);
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
index cfb1e36..339fca8 100644 (file)
@@ -86,7 +86,7 @@
   $cB: $base-c;
   $cB-3: adjust-color($cB, $lightness: 8%, $hue: -10deg);
 
-  $cM: #aaa; // Mute
+  $cM: #669; // Mute
 
   &.tag,
   &.keyword {
     color: $cA-3;
   }
 
-  &.comment,
   &.punctuation,
   &.operator {
     color: $cM;
   }
+
+  &.comment {
+    color: #569;
+  }
 }
index ad1e8be..f13d61c 100644 (file)
@@ -27,7 +27,7 @@ $base-body: #f1f3f5;
 $base-panel: white;
 $base-head: #111;
 $base-text: #345;
-$base-mute: #667788; // gray
+$base-mute: #556677; // gray
 
 $base-a: adjust-color(#8370bd, $lightness: -5%); // indigo
 $base-b: adjust-color(#2b72a2, $lightness: -5%); // blue
@@ -46,7 +46,7 @@ $body-bg: $base-body;
 $gray-bg: mix($base-body, $base-panel, 50%);
 $gray-text: $base-mute;
 
-$line-color: rgba($base-mute, 0.1);
+$line-color: rgba($base-mute, 0.18);
 $dark-line-color: rgba($base-mute, 0.3);
 
 //
@@ -67,11 +67,11 @@ $shadow2:
 
 $shadow3:
   0 6px 8px rgba($base-mute, 0.03),
-  0 1px 2px rgba($base-mute, 0.30);
+  0 1px 1px rgba($base-mute, 0.40);
 
 $shadow6:
   0 6px 8px rgba($base-mute, 0.03),
-  0 1px 2px rgba($base-mute, 0.30),
+  0 1px 1px rgba($base-mute, 0.40),
   0 8px 12px rgba($base-b3, 0.1);
 
 /*
index 13f879a..b8339b9 100644 (file)
--- a/enzyme.md
+++ b/enzyme.md
@@ -16,6 +16,7 @@ keywords:
 ## Getting started
 
 ### Introduction
+{: .-intro}
 
 [Enzyme](http://airbnb.io/enzyme) lets you write unit tests for React components. This guide covers Enzyme 3.x.
 
index 7d8f08a..13836cc 100644 (file)
--- a/httpie.md
+++ b/httpie.md
@@ -47,8 +47,7 @@ $ echo '{"hello": "world"}' | http POST example.com/post
 
 ### Options
 
-Print options:
-{: .-setup}
+#### Printing options
 
 ```bash
 -v, --verbose            # same as --print=HhBb --all
index 03a33d5..730839c 100644 (file)
@@ -1,12 +1,20 @@
 ---
 title: Promises
 category: JavaScript
-intro: A quick reference to the [Promise API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+layout: 2017/sheet
 ---
 
 ## Reference
 {:.-three-column}
 
+### Introduction
+{: .-intro}
+
+intro: A quick reference to the JavaScript [Promise API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+
+- [Using Promises guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) _(developer.mozilla.org)_
+- [Promise documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) _(developer.mozilla.org)_
+
 ### Creating promises
 
 ```js