テーマコンテストの期限も迫ってきているので(-2/26(金))、そろそろ覚悟を決めて公開することにした。今回はBoilerplateのコードを変更して緑色調のテーマとして投稿した。
特徴としては、クリックすると上に戻るボタン、ダークモード、グローバルメニューのCSSを実装している。このうち上に戻るボタンとグローバルメニューはヘッダやフッタに適切なHTMLコードを記述すれば、あらかじめ実装されたCSSによりただちに機能するようになっている。
1. 上に戻るボタンの設定
動作にjQueryを使用するので、例えばはてなのデザイン設定、ヘッダ内にjQueryを読み込む以下のHTMLコードを記述する。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
はてなのデザイン設定、フッタ内に以下のコードを記述する。CSSはpage-top
, move-page-top
をidとして実装しているので、それ以外はカスタマイズ可能になっている。
<div id="page-top" title="トップへ"> <a id="move-page-top"><i class="blogicon-chevron-up lg"></i></a> </div> <script> $(window).scroll(function(){ var now = $(window).scrollTop(); if(now > 500){ $("#page-top").fadeIn("slow"); }else{ $("#page-top").fadeOut("slow"); } }); $("#move-page-top").click(function(){ $("html,body").animate({scrollTop:0},"slow"); }); </script>
2. グローバルメニュー
クラス名を"manubar"としてCSS実装している。ヘッダ内に以下のコードを記述して、リンクやメニュー名、リストなど適宜書き換えれば、マウスオーバーでサブメニューがあらわれるようになっている。
<div class="menubar"> <ul> <li><a href="#" title="メイン1" >メイン1</a> <div> <ul> <li><a href="#">サブ11</a></li> <li><a href="#">サブ12</a></li> </ul> </div> </li> <li><a href="#" title="メイン2">メイン2</a> <div> <ul> <li><a href="#">サブ21</a></li> <li><a href="#">サブ22</a></li> </ul> </div> <li><a href="#" title="メイン3">メイン3</a> <div> <ul> <li><a href="#">サブ31</a></li> <li><a href="#">サブ32</a></li> </ul> </div> <li><a href="#" title="About" >About</a></li> </ul> </div>
3. ダークモード
今回のテーマはあらかじめダークモードの画面を設定している。ダークモード時は以下のような配色になる。
3. レスポンシブデザイン
おおまかには以下のメディアクエリで以下のサイズで幅、間隔を調整しているが、ディスプレイサイズによってはレイアウトが崩れるかもしれない。 ブラウザでサイズを変えながらタイトルなど1部サイズを微調整しているところがある。(詳細はコード参照)
@media (min-width: 768px) { #content-inner { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } } @media (max-width: 480px) { #title { margin-top: 0rem; } #title a { font-size: 1.5rem; color: white; } #blog-description { margin-top: -1.5rem; font-size: 0.7rem; } #main { padding: 0; } } @media (max-width: 480px) { #blog-title { width: 360px !important; height: 140px; } #title { padding: 2rem; font-size: 1.5rem; } #title a { font-size: 1.5rem; } #blog-description { font-size: 0.80rem; } .menubar { display: none; } #container { width: 360px !important; } #content-inner { width: 360px !important; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: left; -ms-flex-align: left; align-items: left; margin: 0px; padding: 0px; } #wrapper { width: 360px !important; } #main { width: 360px !important; } #box2 { width: 360px !important; } #footer { width: 360px !important; } .table-of-contents { margin-left: 0rem !important; padding: 1.5rem 1.5rem !important; line-height: 1.5rem !important; } .hatena-module-profile { font-size: 90%; } }
以下は使用しているCSSコード全て掲載
CSSコード(長い)を展開
@charset "UTF-8";
/*
Theme: boilerplate
Author: Hatena Blog Team
Responsive: yes
Description:
はてなブログのデザインCSSカスタマイズの土台に適したデザインテーマです。
このテーマをもとにしてCSSを書くと比較的楽にカスタマイズできます。
特定の部分(例えば記事本文の書式やコメント欄のスタイルなど)だけをコピーして使ってもかまいません。
もちろんそのままの状態でも、シンプルなテーマとして使うことができます。
このCSSおよびSCSSファイルは自由に複製・再配布できます。
このテーマをもとにしたデザインテーマの配布も自由です。
Released under the MIT License.
*/
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
line-height: 1.15;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
-webkit-box-sizing: content-box;
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
}
/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
/* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif;
/* 1 */
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
/* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
-webkit-box-sizing: border-box;
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
-webkit-box-sizing: border-box;
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details,
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
html,
body {
font-family: "メイリオ", Meiryo, "游ゴシック", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "MS ゴシック", sans-serif;
color: #454545;
background-color: #fff;
line-height: 1.6;
font-size: 1.02rem;
}
a {
color: green;
}
a:hover {
color: #004d00;
}
a.keyword {
text-decoration: none;
border-bottom: 1px dotted #ddd;
color: #454545;
}
h1, h2, h3, h4, h5, h6 {
color: #333;
line-height: 1.3;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
color: #333;
text-decoration: none;
}
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
color: #004d00;
}
/* ヘッダ(グローバルヘッダ)
グローバルヘッダの中はiframeですが、
#globalheader-container に背景色や文字色を指定することでiframeの中にも色が反映されます。
*/
#globalheader-container {
background-color: #454545;
color: #fff;
/*border: solid 2px yellow;*/
}
/* container */
#container {
/*border: dashed 5px blue;*/
width: 1200px !important;
marign: 0;
padding: 0;
}
@media (min-width: 768px) {
#container {
width: 720px;
margin: auto;
padding-left: 0;
padding-right: 0;
}
}
@media (min-width: 992px) {
#container {
width: 940px;
}
}
#container-inner {
/*border: solid 4px orange;*/
width: 100%;
margin-top: -2.5em;
}
/*ナビゲーションメニュー*/
.menubar {
width: 1200px;
margin-top: -3.0em;
margin-left: 0em;
}
.menubar ul {
display: table;
width: 100%;
margin: 0 auto;
padding: 0;
background-color: #FFFFFF;
}
.menubar li {
display: table-cell;
width: 25%;
padding: 0;
background-color: #002200;
}
.menubar li a {
display: block;
margin: 0 auto;
padding: 5px;
border: 1px solid #FFFFFF;
text-decoration: none;
font-family: "メイリオ", Meiryo, "游ゴシック", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "MS ゴシック", sans-serif;
color: #FFFFFF;
text-align: center;
font-weight: bold;
}
.menubar li a:hover {
background-color: #008800;
}
.menubar > ul > li > div {
border-top: 0;
line-height: 15px;
display: none;
margin: 0 0 0 -1em;
position: absolute;
width: 18em;
}
.menubar > ul > li > a {
color: #fff;
line-height: 2em;
padding: 0 10px;
text-align: center;
text-decoration: none;
}
.menubar > ul > li:hover > div {
display: table-row;
}
.menubar > ul > li > div ul > li {
display: table-row;
}
.menubar > ul > li > div ul > li > a {
color: #ffffff;
display: block;
text-decoration: none;
text-align: center;
}
.menubar > ul > li > div ul > li > a:hover {
background-color: mediumseagreen;
}
/*上に戻る*/
#page-top {
display: none;
position: fixed;
right: 10px;
bottom: 20px;
margin: 0;
padding: 0;
text-align: center;
}
#page-top a {
color: #3f98ef;
font-size: 300%;
}
#move-page-top {
color: rgba(0, 0, 0, 0.4);
text-decoration: none;
display: block;
cursor: pointer;
}
/* 2カラムレイアウト */
#content-inner {
/*border: solid 2px red;*/
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
width: 1200px;
background: lightcyan;
padding: 1rem;
margin-left: 0;
margin-right: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@media (min-width: 768px) {
#content-inner {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
}
}
#main {
/*border: solid 2px black;*/
padding-right: 2rem;
width: 840px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#wrapper {
/*border: solid 2px lime;*/
width: 840px !important;
}
#box2 {
/*border: dashed 2px magenta;*/
}
/* ヘッダ */
#blog-title {
/*border: solid 2px lime;*/
background: darkslategray;
background-position: center;
background-repeat: no-repeat;
margin: 3em 0;
/*background-size:cover;*/
text-align: left;
width: 1200px;
height: 180px;
/*
@media (min-width: 768px) {
margin: 3em 0;
text-align: left;
}*/
}
#title {
/*border: solid 2px blue;*/
padding: 2rem;
font-size: 4.5rem;
}
@media (min-width: 992px) {
#title {
font-size: 1.5rem;
}
}
#title a {
font-size: 2.5rem;
color: #ffff99;
}
#blog-description {
/*border: solid 2px red;*/
margin-top: -2rem;
padding-left: 2rem;
font-weight: bold;
color: #00ffcc;
font-size: 1.2rem;
}
@media screen and (min-width: 768px) and (max-width: 1000px) {
#title {
margin-top: -2rem;
}
#title a {
font-size: 2.0rem;
/*color:white;*/
}
#blog-description {
margin-top: -5rem;
font-size: 1.0rem;
}
.menubar {
display: none;
}
}
@media screen and (min-width: 360px) and (max-width: 768px) {
#title {
margin-top: -2rem;
}
#title a {
font-size: 2.0rem;
}
#blog-description {
margin-top: -5rem;
font-size: 1.0rem;
}
.menubar {
display: none;
}
#main {
padding: 0;
}
}
@media (max-width: 360px) {
#main {
padding: 0;
}
}
/* ヘッダ画像を設定したとき */
.header-image-enable #blog-title {
margin: 0 0 2em;
}
.header-image-enable #blog-title-inner {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.header-image-enable #blog-title-content {
margin-left: 10px;
margin-right: 10px;
}
/* タイトル下HTML */
#top-editarea {
margin-bottom: 2em;
}
/* パンくず(カテゴリー、記事ページで表示されます) */
.breadcrumb {
font-size: .9rem;
}
/* entry */
.entry {
position: relative;
margin-bottom: 4em;
padding-left:5px;
}
.entry-header {
padding-bottom: 1em;
margin-bottom: 2em;
border-bottom: 1px solid #ddd;
position: relative;
}
.date {
margin-bottom: .5em;
font-size: .9rem;
}
.date a {
color: #454545;
text-decoration: none;
}
.date a:hover {
text-decoration: underline;
}
.entry-title {
margin: 0 0 .3em;
font-size: 1.5rem;
}
@media (min-width: 992px) {
.entry-title {
font-size: 1.6rem;
}
}
.categories {
margin: .5em 0;
font-size: .9rem;
}
.categories a {
margin-right: .5em;
}
/* 「編集する」ボタン */
.entry-header-menu {
position: absolute;
top: 0;
right: 0;
}
/* 記事内の書式 */
.entry-content img,
.entry-content video {
max-width: 100%;
height: auto;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
margin: 1em 0 0.8em 0;
}
.entry-content h1 {
font-size: 1.5rem;
}
@media (min-width: 992px) {
.entry-content h1 {
font-size: 1.7rem;
}
}
.entry-content h2 {
font-size: 1.3rem;
padding: 0.25em 0.5em;
/*上下 左右の余白*/
background: transparent;
/*背景透明に*/
border-left: solid 5px #7db4e6;
/*左線*/
}
@media (min-width: 992px) {
.entry-content h2 {
font-size: 1.5rem;
}
}
.entry-content h3 {
font-size: 1.2rem;
padding: 0.15em 0.4em;
/*上下 左右の余白*/
background: transparent;
/*背景透明に*/
border-left: solid 5px springgreen;
/*左線*/
}
@media (min-width: 992px) {
.entry-content h3 {
font-size: 1.3rem;
}
}
.entry-content h4 {
font-size: 1.1rem;
padding: 0.1em 0.3em;
/*上下 左右の余白*/
background: transparent;
/*背景透明に*/
border-left: solid 5px gold;
/*左線*/
}
.entry-content h5 {
font-size: 1rem;
}
.entry-content h6 {
font-size: .9rem;
}
.entry-content ul,
.entry-content ol,
.entry-content dd {
margin: 0 0 1em 1.5em;
padding: 0;
}
.entry-content ul li ul, .entry-content ul li ol,
.entry-content ol li ul,
.entry-content ol li ol,
.entry-content dd li ul,
.entry-content dd li ol {
margin-bottom: 0;
}
.entry-content table {
border-collapse: collapse;
border-spacing: 0;
border-bottom: 1em;
margin-bottom: 1em;
width: 100%;
overflow: auto;
display: block;
font-size: 1rem;
}
@media (min-width: 992px) {
.entry-content table {
font-size: .9rem;
}
}
.entry-content table th,
.entry-content table td {
border: 1px solid #888888;
/*罫線の設定, 太さ,線種,色*/
padding: 5px 10px;
}
.entry-content table th {
background: #E6FFE9;
/*セル色*/
}
.entry-content blockquote {
border: 1px solid #ddd;
background: antiquewhite;
margin: 0 0 10px;
padding: 20px;
}
.entry-content blockquote p:first-child {
margin-top: 0;
}
.entry-content blockquote p:last-child {
margin-bottom: 0;
}
.entry-content blockquote:before {
font-family: "blogicon";
content: '\f009';
font-size: 2em;
color: tan;
font-weight: bold;
}
.entry-content pre,
.entry-content code {
font-family: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;
}
.entry-content pre {
background: #222222;
border: none;
white-space: pre-wrap;
text-overflow: ellipsis;
line-height: 1.3;
font-size: .8rem;
color: gainsboro;
padding: 10px;
}
.entry-content pre > code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background-color: transparent;
font-family: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;
}
.entry-content code {
font-size: 90%;
margin: 0 2px;
padding: 0px 5px;
background-color: #f5f5f5;
border-radius: 3px;
}
.entry-content hr {
width: 50%;
border: 0;
border: none;
border-top: 1px solid #ddd;
margin: 2em auto;
}
.entry-content .table-of-contents {
width: 70%;
padding: 1.5rem 2rem;
line-height: 2em;
font-weight: bold;
border: solid 2px green;
background: #F3FFD8;
border-radius: 8px;
}
/* 記事下 */
.entry-footer .social-buttons {
margin-bottom: 1em;
}
.entry-footer-section {
color: #999;
font-size: .9rem;
}
.entry-footer-section a {
color: #999;
}
/* コメント */
.comment-box {
margin: 1em 0;
}
.comment-box .comment {
list-style: none;
margin: 0 0 15px 0;
padding: 0;
line-height: 1.7;
font-size: .85rem;
}
@media (min-width: 768px) {
.comment-box .comment {
font-size: .9rem;
}
}
.comment-box .entry-comment {
padding: 10px 0 10px 60px;
border-bottom: 1px solid #ddd;
position: relative;
}
.comment-box .entry-comment:first-child {
border-top: 1px solid #ddd;
}
.comment-box .read-more-comments {
padding: 10px 0;
}
.comment-box .hatena-id-icon {
position: absolute;
top: 10px;
left: 0;
width: 50px !important;
height: 50px !important;
border-radius: 3px;
}
.comment-user-name {
margin: 0 0 .4em 0;
font-weight: bold;
}
.comment-content {
margin: 0 0 .4em 0;
word-wrap: break-word;
color: #454545;
font-size: .85rem;
}
.comment-content p {
margin: 0 0 .6em 0;
}
.comment-metadata {
color: #999;
margin: 0;
font-size: .8rem;
}
.comment-metadata a {
color: #999;
}
.leave-comment-title {
padding: .6em 1em;
font-size: .85rem;
border: 1px solid #ddd;
}
/* Pager */
.pager {
margin: 2em 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
/* サイドバーモジュール */
/* カテゴリー */
.hatena-module-category .hatena-module-body ul li {
display: inline-block;
border-radius: 8px;
padding: 0.3em;
margin: 0.2em;
font-size: .9rem;
}
.hatena-module-category .hatena-module-body ul li:hover {
background: rgba(144, 238, 144, 0.3);
}
.hatena-module-category .hatena-module-title:before {
font-family: "blogicon";
content: '\f003';
position: relative;
left: 0.1em;
}
.hatena-module {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-bottom: 3em;
font-size: 1.2rem;
}
@media (min-width: 768px) {
.hatena-module {
font-size: .9rem;
}
}
.hatena-module-title {
padding: 0.1em 0.1em;
/*文字の上下 左右の余白*/
background: rgba(144, 238, 144, 0.1);
/*背景色*/
border: solid 2px #8FBC8F;
/*下線*/
border-radius: 8px;
-webkit-box-shadow: 0px 3px 5px rgba(85, 107, 47, 0.5);
box-shadow: 0px 3px 5px rgba(85, 107, 47, 0.5);
font-weight: bold;
font-size: 1.2rem;
text-align: center;
}
.hatena-module-title a {
color: #454545;
text-decoration: none;
}
.hatena-module-title a:hover {
text-decoration: underline;
}
/* Profile module */
.hatena-module-profile .profile-icon {
float: left;
margin: 15px 10px 10px 0;
}
.hatena-module-profile .id {
display: block;
font-weight: bold;
margin-bottom: .5em;
margin-top: 10px;
}
.hatena-module-profile .profile-description p {
margin-top: 0;
}
.hatena-module-profile .hatena-module-title:before {
font-family: "blogicon";
content: '\f00b';
/* アイコンフォント */
position: relative;
left: 0.1em;
}
/* urllist module */
.hatena-urllist {
font-size: .9rem;
list-style: none;
margin: 0;
padding: 0;
}
.hatena-urllist li {
padding: .5em 0;
}
.hatena-urllist li:last-child {
padding-bottom: 0;
}
.hatena-urllist li a {
text-decoration: none;
color: #454545;
}
.hatena-urllist li a:hover {
text-decoration: underline;
}
.hatena-urllist .urllist-category-link {
font-size: 1rem;
padding: .1em .3em;
}
.hatena-urllist .urllist-date-link a {
color: #999;
}
.hatena-urllist .urllist-entry-body {
margin-top: .3em;
}
.hatena-module-links .hatena-module-title:before {
font-family: "blogicon";
content: '\f04e';
position: relative;
left: 0.1em;
}
/* Search module */
.hatena-module-search-box .search-form {
border: 1px solid #ddd;
border-radius: 3px;
width: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-top: 15px;
}
.hatena-module-search-box .search-module-input {
-webkit-box-flex: 1;
-ms-flex: 1 0;
flex: 1 0;
padding: 5px;
color: #454545;
background: none;
border: none;
outline: none;
height: 20px;
}
.hatena-module-search-box .search-module-button {
width: 24px;
height: 24px;
margin-right: 5px;
background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Esearch%3C/title%3E%3Cpath d='M16.7,15l-3.4-3.3h-.1a5.4,5.4,0,0,0,.9-3.1,5.6,5.6,0,1,0-5.6,5.6,5.4,5.4,0,0,0,3.1-.9.1.1,0,0,0,.1.1L15,16.7a1.1,1.1,0,0,0,.8.3,1.6,1.6,0,0,0,.9-.3,1.4,1.4,0,0,0,0-1.7M8.5,12.3A3.8,3.8,0,0,1,4.8,8.5,3.8,3.8,0,0,1,8.5,4.7a3.9,3.9,0,0,1,3.8,3.8,3.8,3.8,0,0,1-3.8,3.8'/%3E%3Crect class='a' width='20' height='20'/%3E%3C/svg%3E") no-repeat center;
background-size: 20px 20px;
border: none;
outline: none;
color: transparent;
overflow: hidden;
opacity: .5;
cursor: pointer;
}
.hatena-module-search-box .search-module-button:hover {
opacity: .85;
}
.hatena-module-search-box .hatena-module-title:before {
font-family: "blogicon";
content: '\f01a';
position: relative;
left: 0.1em;
}
/* About ページ */
.page-about .entry-content dt {
font-weight: bold;
border-bottom: 1px solid #ddd;
margin-bottom: .5em;
}
.page-about .entry-content dd {
margin-left: 0;
margin-bottom: 2em;
}
/* Archive */
.archive-header-category {
text-align: center;
}
.page-archive .archive-entry {
margin-bottom: 3em;
margin-left: auto;
margin-right: auto;
line-height: 1.3;
}
.page-archive .entry-title {
margin: .3em auto;
}
.page-archive .entry-thumb {
width: 80px;
height: 80px;
background-size: cover;
}
@media (min-width: 768px) {
.page-archive .entry-thumb {
width: 120px;
height: 120px;
}
}
.page-archive .entry-description {
margin: 0;
font-size: .85rem;
}
@media (min-width: 768px) {
.page-archive .entry-description {
font-size: .9rem;
}
}
.page-archive .social-buttons {
display: block;
margin-top: .3em;
}
.hatena-module-archive .hatena-module-title:before {
font-family: "blogicon";
content: '\f022';
position: relative;
left: 0.1em;
}
/*----最新記事----*/
.hatena-module-recent-entries .hatena-module-title:before {
font-family: "blogicon";
content: '\f013';
position: relative;
left: 0.1em;
}
/*----関連記事----*/
.hatena-module-related-entries .hatena-module-title:before {
font-family: "blogicon";
content: '\f014';
/* アイコンフォント */
position: relative;
left: 0.1em;
}
/*----注目記事----*/
.hatena-module-entries-access-ranking .hatena-module-title:before {
font-family: "blogicon";
content: '\f01b';
position: relative;
left: -0.1em;
}
/* footer */
#footer {
/*border: solid 2px blue;*/
color: #FFFFFF;
background: -webkit-gradient(linear, left top, right top, from(#1d4350), to(#a43931));
background: linear-gradient(to right, #1d4350, #a43931);
margin-top: 0em;
width: 100%;
padding: 1.5em 0em 1.5em 0em;
text-align: center;
font-size: 100%;
}
#footer a {
color: #ccff99;
}
.hatena-follow-button {
font-size: 150%;
border: solid 2px #8FBC8F;
-webkit-box-shadow: 0px 5px 8px rgba(85, 107, 47, 0.5);
box-shadow: 0px 5px 8px rgba(85, 107, 47, 0.5);
}
/*1カラム */
@media (min-width: 768px) {
#content-inner {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
}
#title a {
/*color:blue;*/
}
}
@media (max-width: 480px) {
#title {
margin-top: 0rem;
}
#title a {
font-size: 1.5rem;
color: white;
}
#blog-description {
margin-top: -1.5rem;
font-size: 0.7rem;
}
#main {
padding: 0;
}
}
@media (max-width: 480px) {
#blog-title {
width: 360px !important;
height: 140px;
}
#title {
padding: 2rem;
font-size: 1.5rem;
}
#title a {
font-size: 1.5rem;
}
#blog-description {
font-size: 0.80rem;
}
.menubar {
display: none;
}
#container {
width: 360px !important;
}
#content-inner {
width: 360px !important;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: left;
-ms-flex-align: left;
align-items: left;
margin: 0px;
padding: 0px;
}
#wrapper {
width: 360px !important;
}
#main {
width: 360px !important;
}
#box2 {
width: 360px !important;
}
#footer {
width: 360px !important;
}
.table-of-contents {
margin-left: 0rem !important;
padding: 1.5rem 1.5rem !important;
line-height: 1.5rem !important;
}
.hatena-module-profile {
font-size: 90%;
}
}
/*---- END 1カラム */
@media (prefers-color-scheme: dark) {
#container-inner, body {
background-color: darkolivegreen;
}
#container-inner #top-box, body #top-box {
color: cyan;
}
#container-inner #top-box a, body #top-box a {
color: cyan;
}
#content-inner{
background: #67876A;
}
#box2 {
background: #67876A;
color: gold;
}
#box2 a {
color: gold;
}
.entry {
background-color: darkkhaki;
}
.entry a {
color: blue;
}
img {
-webkit-filter: contrast(85%) brightness(85%);
filter: contrast(85%) brightness(85%);
}
}