mirror of
https://github.com/nicolabs/mastodon-timeline-widget.git
synced 2025-09-07 16:19:12 +02:00
license add info + update files
This commit is contained in:
parent
efaaa63188
commit
c5275edeb7
7
LICENSE.txt
Normal file
7
LICENSE.txt
Normal file
|
@ -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.
|
41
README.md
41
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) 下記のコードをホームページに入れてください:
|
||||
|
||||
|
||||
<link rel="stylesheet" href="mastodon.widget.css">
|
||||
|
@ -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
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
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のコンテナを追加して下さい:
|
||||
|
||||
<div id="myTimeline" class="mastodon-timeline mastodon-timeline-dark"></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ファイルを参照下さい。
|
||||
|
||||
|
|
55
README_en.md
Normal file
55
README_en.md
Normal file
|
@ -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:
|
||||
|
||||
|
||||
<link rel="stylesheet" href="mastodon.widget.css">
|
||||
<script type="text/javascript" src="mastodon.widget.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// jQUERY is required!
|
||||
var mapi = new MastodonApi({
|
||||
target_selector : '#myTimeline'
|
||||
,instance_uri : '[MASTODON INSTANCE]'
|
||||
,access_token : '[ACCESS TOKEN]'
|
||||
,account_id : '[ACCOUNT ID]'
|
||||
// optional parameters
|
||||
//,toots_limit : 5
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
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:
|
||||
|
||||
<div id="myTimeline" class="mastodon-timeline mastodon-timeline-dark"></div>
|
||||
|
||||
## 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.
|
|
@ -1,3 +1,13 @@
|
|||
/**
|
||||
* Mastodon User Timeline Widget
|
||||
* Copyright (c) 2017 有限会社アゼット
|
||||
* ライセンスに関して、LICENSEファイルを参照下さい。
|
||||
* see license file for details.
|
||||
*
|
||||
* @author Azet <https://azet.jp>
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/* main container >>> */
|
||||
.mastodon-timeline {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/**
|
||||
* Mastodon User Timeline Widget
|
||||
* Copyright (c) 2017 有限会社アゼット
|
||||
* ライセンスに関して、LICENSEファイルを参照下さい。
|
||||
* see license file for details.
|
||||
*
|
||||
* @author Azet <https://azet.jp>
|
||||
* @version 1.0
|
||||
* @param object params_
|
||||
* instance_uri : the instance to fetch messages from
|
||||
* access_token : widget's application access token (can be generated from http://azet.jp/mastodon-usertimeline-widget/)
|
||||
|
@ -9,6 +13,7 @@
|
|||
* target_selector : HTML node selector (jquery/css style)
|
||||
*/
|
||||
var MastodonApi = function(params_) {
|
||||
this.build = 1;
|
||||
|
||||
// endpoint access settings
|
||||
this.INSTANCE_URI = params_.instance_uri;
|
||||
|
|
Loading…
Reference in a new issue