Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piyopiyo-code #16

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 15.x
cache: npm
- run: npm install
- run: npm run build
2 changes: 1 addition & 1 deletion bs-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
files: ['build/boilerplate.css'],
files: ['build/piyopiyo-code.css'],
server: {
baseDir: "build"
},
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "hatena-blog-theme-boilerplate",
"name": "hatena-blog-theme-cocodrips",
"version": "2.0.0",
"description": "Boilerplate for Hatena Blog theme",
"description": "Hatena Blog theme",
"author": "Hatena Blog",
"license": "MIT",
"scripts": {
"prestart": "npm run build",
"start": "npm-run-all -p watch server",
"build": "npm-run-all scss autoprefixer",
"scss": "node-sass scss/boilerplate.scss build/boilerplate.css --output-style expanded --indent-width 4 --source-map build/",
"autoprefixer": "postcss --use autoprefixer -r build/boilerplate.css",
"scss": "node-sass scss/piyopiyo_code/main.scss build/piyopiyo-code.css --output-style expanded --indent-width 4 --source-map build/",
"autoprefixer": "postcss --use autoprefixer -r build/piyopiyo-code.css",
"server": "browser-sync start -c bs-config.js",
"watch": "chokidar \"scss/\" -c \"npm run build\""
"watch": "chokidar \\\\\\\"scss/\\\\\\\" -c \\\\\\\"npm run build\\\\\\\""
},
"devDependencies": {
"autoprefixer": "^7.1.4",
Expand All @@ -22,4 +22,4 @@
"npm-run-all": "^4.1.1",
"postcss-cli": "^4.1.1"
}
}
}
2 changes: 2 additions & 0 deletions scss/lib/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ body {
}
a {
color: $link;
text-decoration: underline;
&:hover {
color: $hover;
text-decoration: none;
}
&.keyword {
text-decoration: none;
Expand Down
2 changes: 1 addition & 1 deletion scss/lib/_variable.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Variables

// Font
$font-family-base: 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', 'MS PGothic';
$font-family-base: 'Helvetica Neue', 'Helvetica','Segoe UI', 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', 'MS PGothic';
$font-family-monospace: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;

// Background color
Expand Down
54 changes: 54 additions & 0 deletions scss/piyopiyo_code/_core.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
a {
color: $text;
text-decoration: underline;
}


// 1 column
#content-inner {
flex-direction: column;
align-items: center;
}

#wrapper {
@media #{$mq-sm} {
width: 100%;
}
@media #{$mq-md} {
max-width: 720px;
}
}

#box2 {
width: 100%;
@media #{$mq-sm} {
width: 100%;
}
@media #{$mq-md} {
width: 100%;
}
}

#box2-inner {
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: flex-start;
@media #{$mq-sm} {
margin-left: -20px;
flex-direction: row;
}
@media #{$mq-md} {
margin-left: -30px;
}
}

.hatena-module {
width: 100%;
@media #{$mq-sm} {
width: 50%;
}
@media #{$mq-md} {
padding-left: 30px;
}
}
216 changes: 216 additions & 0 deletions scss/piyopiyo_code/_entry.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
// Header
.entry-header {
margin: 4rem 0 .3rem;
flex-direction: column;
display: flex;
border-bottom: 0;
}

// line
header.entry-header::after {
display: block;
content: "";
width: 15%;
height: 1px;
margin-top: 1em;
background: $text;
}

.entry-title {
margin: 0 0 .3rem;
font-size: 2rem;
line-height: 3rem;
@media #{$mq-md} {
font-size: 2rem;
}
}

.date {
margin-bottom: 0.05rem;

.date-year::after, .date-month::after {
content: ".";
}

.hyphen {
position: absolute;
width: 1rem;
height: 1rem;
overflow: hidden;
text-indent: -1rem;
}
}


.categories {
margin: .5em 0;
font-size: .9rem;
display: none;

a {
color: $text-light;
text-decoration: none;
margin-right: .5em;
padding: 2px 10px;
border: 1px solid $text-light;
}

}

.entry-content {
font-size: $base-font-size;
line-height: $base-font-size * 2;
letter-spacing: 0.4px;

p {
margin: $base-font-size * 1.5 0;

a[title] {
vertical-align: super;
font-size: 0.7rem;
}
}

h1,
h2 {
margin: 3em 0 -0.3em 0;
}

h3,
h4,
h5,
h6 {
margin: 2em 0 -0.3em 0;
}

h1 {
font-size: 1.4rem;
@media #{$mq-md} {
font-size: 1.6rem;
}
}

h2 {
font-size: 1.4rem;
@media #{$mq-md} {
font-size: 1.4rem;
}
}

h3 {
font-size: 1.2rem;
@media #{$mq-md} {
font-size: 1.3rem;
}
}

h4 {
font-size: 1.1rem;
}

h5 {
font-size: 1rem;
}

h6 {
font-size: .9rem;
}

ul,
ol,
dd {
margin: 0;
background-color: $light-bg;
padding: 1.5rem 3rem;

li {
ul, ol {
margin-bottom: 0;
}
}
}

table {
border-collapse: collapse;
border-spacing: 0;
border-bottom: 1em;
margin-bottom: 1em;
width: 100%;
overflow: auto;
display: block;
font-size: .8rem;
@media #{$mq-md} {
font-size: .9rem;
}
}

table th,
table td {
border: 1px solid $border;
padding: 5px 10px;
}

table th {
background: $bg-light;
}

blockquote {
border: 1px solid $border;
margin: 0 0 10px;
padding: 20px;

p:first-child {
margin-top: 0;
}

p:last-child {
margin-bottom: 0;
}
}

pre,
code {
font-family: $font-family-monospace;
}

pre {
background: $bg-light;
border: none;
white-space: pre-wrap;
text-overflow: ellipsis;
line-height: 1.3;
font-size: .8rem;
padding: 10px;

& > code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background-color: transparent;
font-family: $font-family-monospace;
}
}

code {
font-size: 90%;
margin: 0 2px;
padding: 0px 5px;
background-color: $bg-light;
border-radius: 3px;
}

hr {
width: 50%;
border: 0;
border: none;
border-top: 1px solid $border;
margin: 2em auto;
}

.table-of-contents {
padding: 1em 1em 1em 2em;
margin: 1em 0;
border: 1px solid $border;
}
}
17 changes: 17 additions & 0 deletions scss/piyopiyo_code/_module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.hatena-module-body {
font-size: $base-font-size - 2;
line-height: ($base-font-size - 2)*1.5;
}

.hatena-module-category {
.hatena-module-body {
li {

display: inline;
}

li::after {
content: " / ";
}
}
}
Loading