diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..9fdf228 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2017 Azet Limited company + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 501b273..bf3bde8 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ +[English version](README_en.md) -# Mastodon.widget +# Mastodon.widgetについて -The idea of this little script is to allow users to display their Mastodon timeline on their blog/website. +このJSで作られたウィジェットは自分のホームページに自分のタイムラインを表示します。 -## Requirements +## 要件 - jQuery - - access token from the mastodon instance you want to display the timeline from + - ステータスの表示したいマストドンのインスタンスのアクセストーケン -To help you create a token, we'll soon provide a page on our website that will guide you through the requiered steps. +設定がしやすい用に、ウィザードを作りましたので、よろしければご利用下さい。 +[Azet.jpのマストドンウィジェットウィザード](https://azet.jp/mastodon.wizard/wizard_jp.html) -## Installation +## 設定 -1) Download the required files (only one JS and one CSS). +1) 必要のファイルをダウンロードをして下さい(CSSファイルとJSファイルは1つずつ). -2) Simply paste the code bellow in you website: +2) 下記のコードをホームページに入れてください: @@ -24,30 +26,31 @@ To help you create a token, we'll soon provide a page on our website that will g // jQUERY is required! var mapi = new MastodonApi({ target_selector : '#myTimeline' - ,instance_uri : '[MASTODON INSTANCE]' - ,access_token : '[ACCESS TOKEN]' - ,account_id : '[ACCOUNT ID]' + ,instance_uri : '[マストドンのインスタンスURL]' + ,access_token : '[アクセス トーケン]' + ,account_id : '[ユーザのアカウントID]' // optional parameters //,toots_limit : 5 }); }); -In the sample above, you have to replace the folowing: +以上のサンプルの中に、下記の情報を正しく設定して下さい: - - [MASTODON INSTANCE] => i.e : https://mastodon.technology - - [ACCESS TOKEN] => token you created for your app and linked with your Mastodon instance account - - [ACCOUNT ID] => your user ID on Mastodon instance + - [マストドンのインスタンスURL] => 例: https://mastodon.technology + - [アクセス トーケン] => マストドンのインスタンスのアクセストーケン + - [ユーザのアカウントID] => タイムラインの表示したいユーザのID -3) Add a container for your timeline where you want in the body of your website: +3) タイムラインの為に、DIVのコンテナを追加して下さい:
-## Customization +## カストマイズ -You have the choice between 2 basic themes: +以下の2つのテーマが用意されております: - mastodon-timeline-light - mastodon-timeline-dark -Or you can create your own. Please have a look in the CSS file for more details. +又は、オリジナルテーマ作成も可能です。詳しくはCSSファイルを参照下さい。 + diff --git a/README_en.md b/README_en.md new file mode 100644 index 0000000..ece1579 --- /dev/null +++ b/README_en.md @@ -0,0 +1,55 @@ +# Mastodon.widget + +The idea of this little script is to allow users to display their Mastodon timeline on their blog/website. + +You can use our wizard to generate an access token very easily. Simply follow the link below: +[Azet.jp's Mastodon Widget Generator](https://azet.jp/mastodon.wizard/wizard_en.html) + +## Requirements + + - jQuery + - access token from the mastodon instance you want to display the timeline from + +To help you create a token, we'll soon provide a page on our website that will guide you through the requiered steps. + +## Installation + +1) Download the required files (only one JS and one CSS). + +2) Simply paste the code bellow in you website: + + + + + + +In the sample above, you have to replace the folowing: + + - [MASTODON INSTANCE] => i.e : https://mastodon.technology + - [ACCESS TOKEN] => token you created for your app and linked with your Mastodon instance account + - [ACCOUNT ID] => your user ID on Mastodon instance + +3) Add a container for your timeline where you want in the body of your website: + + + +## Customization + +You have the choice between 2 basic themes: + + - mastodon-timeline-light + - mastodon-timeline-dark + +Or you can create your own. Please have a look in the CSS file for more details. diff --git a/mastodon.widget.css b/mastodon.widget.css index 0266811..f9e3aec 100644 --- a/mastodon.widget.css +++ b/mastodon.widget.css @@ -1,3 +1,13 @@ +/** + * Mastodon User Timeline Widget + * Copyright (c) 2017 有限会社アゼット + * ライセンスに関して、LICENSEファイルを参照下さい。 + * see license file for details. + * + * @author Azet