Skip to content

Commit

Permalink
Merge pull request #48 from hidao80/hidao80-patch-1
Browse files Browse the repository at this point in the history
Hidao80 patch 1
  • Loading branch information
hidao80 committed Mar 3, 2020
2 parents 162a8d9 + 5151423 commit c2ca356
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 230 deletions.
1 change: 0 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
git clone https://github.com/hidao80/TsumiQiita.git
cd TsumiQiita/src
npm i
npm run build-css
npm run build
```
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ node.jsでビルドします。<wbr>**インストール方法は[INSTALL.md](IN

## 主な機能

- 選択したファイルをQiitaに限定公開として投稿
- 選択したファイルをQiitaに状態を指定して投稿(限定公開投稿可)
- 選択したMarkdownファイルをプレビュー
- PCのストレージから任意のMarkdownファイルを開く
- 新規Markdownファイルの作成
Expand All @@ -25,8 +25,10 @@ node.jsでビルドします。<wbr>**インストール方法は[INSTALL.md](IN
- タグをつけて投稿
- 同一フォルダ内の Markdown ファイルをリストにして常時表示
- Windows / macOS / Linux でほぼ同一の UI を提供
- twitter連携オプション可
- Qiita team用オプション可

以上の機能により、<wbr>**限定公開の草案をローカルに際限なく貯めることを可能にします**<wbr>。
以上の機能により、<wbr>**記事の草案をローカルに際限なく貯めることを可能にします**<wbr>。

### ユースケース

Expand All @@ -35,13 +37,30 @@ node.jsでビルドします。<wbr>**インストール方法は[INSTALL.md](IN

## 注意

プレビューはQiitaやGitHubでの表示と異なります。あくまで参考程度とご理解ください。

### 動作検証済み環境

- Win10 Version 1709, 1803
- macOS 10.13
- Ubuntu 18.04
1. プレビューはQiitaやGitHubでの表示と異なります。あくまで参考程度とご理解ください。
1. 既存の記事とまったく同じ記事が投稿できます。上書きされません。

### Qiita記事のヘッダ書式

---
title: 記事のタイトル
tags: タグA:0.0.1 タグB
tweet: false
private: false
coediting: false
group_url_name: dev
---
# 見出し1
本文...

フィールド | 必須 | Type | 説明
---|---|---|---
title | 〇 | string | 記事のタイトル
tags | 〇 | string | タグ。バージョン併記可。5つまで。
tweet | | true/false | Twitterに投稿するかどうか (Twitter連携を有効化している場合のみ有効)
private | | true/false | 限定共有状態かどうかを表すフラグ (Qiita Teamでは無効)
coedition | | true/false | この記事が共同更新状態かどうか (Qiita Teamでのみ有効)
group_url_name | | null/string | この投稿を公開するグループの url_name (null で全体に公開。Qiita Teamでのみ有効)

### TODO

Expand All @@ -57,4 +76,5 @@ node.jsでビルドします。<wbr>**インストール方法は[INSTALL.md](IN
- [x] ~~タグを登録できる~~
- [x] ~~シンタックスハイライトに対応~~
- [x] ~~CommonMarkdown に作表と打ち消し線、チェックボックス表示機能を追加~~
- [x] ~~Qiita風のコードブロック(ファイル名表示機能付)~~
- [x] ~~Qiita風のコードブロック(ファイル名表示機能付)~~
- [x] ~~投稿できない~~
4 changes: 4 additions & 0 deletions src/css/tsumiqiita.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ body {
display: flex;
}
#working-area {
width: 100%;
}
#preview {
overflow-x: hidden;
Expand Down Expand Up @@ -109,6 +110,9 @@ pre {
background-color: #272822;
color: #F8F8F2;
}
dialog > span {
font-size: 1rem;
}
.code-frame {
margin: 1.2em 3px 3px 3px;
position: relative;
Expand Down
16 changes: 5 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,12 @@
</dialog>
</div>
<div class='menu-item-div'>
<input type='radio' class='menu-item-radio' name='menu' id='post' onclick='post()'><label for='post' class='menu-item-label'>Qiitaに限定公開</label>
<input type='radio' class='menu-item-radio' name='menu' id='post' onclick='post()'><label for='post' class='menu-item-label'>Qiitaに投稿</label>
</div>
<div>
<dialog id="ok-dialog">
限定公開されました!<br>
<button onclick="document.querySelector('#ok-dialog').close()">閉じる</button>
</dialog>
</div>
<div>
<dialog id="ng-dialog">
限定公開に失敗しました…<br>
<button onclick="document.querySelector('#ng-dialog').close()">閉じる</button>
<dialog id="msg-dialog">
<span id="message"></span><br>
<button onclick="document.querySelector('#msg-dialog').close()">閉じる</button>
</dialog>
</div>
</div data-comment="end nav-content">
Expand All @@ -54,7 +48,7 @@
</div data-comment="end controls">
<div id="working-area">
<div id="preview" class="markdown-content"></div>
<lable for="tsumiqiita-editor" id="tags-label">1行目にタグを半角スペース区切りで入力してください。6項目目以降は投稿されません</lable>
<lable for="tsumiqiita-editor" id="tags-label"><a href="https://github.com/hidao80/TsumiQiita/tree/master#qiita%E8%A8%98%E4%BA%8B%E3%81%AE%E3%83%98%E3%83%83%E3%83%80%E6%9B%B8%E5%BC%8F" target="_blank">Qiitaの記事ヘッダを参照</a>してください。titleとtagsは必須です</lable>
<textarea id="tsumiqiita-editor" oninput="rendaring();autoSave()"></textarea>
</div>
<script>
Expand Down
Loading

0 comments on commit c2ca356

Please sign in to comment.