mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Introduce Twitter plugin for embedding tweets etc.
This commit is contained in:
parent
52a414959c
commit
e30330d4be
@ -13,7 +13,8 @@
|
||||
"tiddlywiki/markdown",
|
||||
"tiddlywiki/qrcode",
|
||||
"tiddlywiki/bibtex",
|
||||
"tiddlywiki/savetrail"
|
||||
"tiddlywiki/savetrail",
|
||||
"tiddlywiki/twitter"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
13
plugins/tiddlywiki/twitter/macros.tid
Normal file
13
plugins/tiddlywiki/twitter/macros.tid
Normal file
@ -0,0 +1,13 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/macros
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define twitter-usage(text)
|
||||
For example:
|
||||
|
||||
<$codeblock code="""$text$"""/>
|
||||
|
||||
Renders as:
|
||||
|
||||
$text$
|
||||
\end
|
||||
|
7
plugins/tiddlywiki/twitter/plugin.info
Normal file
7
plugins/tiddlywiki/twitter/plugin.info
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"title": "$:/plugins/tiddlywiki/twitter",
|
||||
"description": "Twitter for TiddlyWiki",
|
||||
"author": "JeremyRuston",
|
||||
"core-version": ">=5.0.0",
|
||||
"list": "readme usage"
|
||||
}
|
19
plugins/tiddlywiki/twitter/rawmarkup.tid
Normal file
19
plugins/tiddlywiki/twitter/rawmarkup.tid
Normal file
@ -0,0 +1,19 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/rawmarkup
|
||||
tags: $:/tags/RawMarkup
|
||||
|
||||
<script>window.twttr = (function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0],
|
||||
t = window.twttr || {};
|
||||
if (d.getElementById(id)) return t;
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = "https://platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
|
||||
t._e = [];
|
||||
t.ready = function(f) {
|
||||
t._e.push(f);
|
||||
};
|
||||
|
||||
return t;
|
||||
}(document, "script", "twitter-wjs"));</script>
|
9
plugins/tiddlywiki/twitter/readme.tid
Normal file
9
plugins/tiddlywiki/twitter/readme.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/readme
|
||||
|
||||
This plugin provides a `<$twitter>` widget that can embed various entities from Twitter's service:
|
||||
|
||||
* Individual tweets and conversations
|
||||
* Buttons for tweeting/mentioning, sharing, following
|
||||
* Various types of timeline: profile, likes, list, collection, url and widget
|
||||
|
||||
The widget only works in the browser, and not in generated static HTML pages.
|
144
plugins/tiddlywiki/twitter/twitter-widget.js
Normal file
144
plugins/tiddlywiki/twitter/twitter-widget.js
Normal file
@ -0,0 +1,144 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/twitter/widget.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Twitter widget
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var TwitterWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
TwitterWidget.prototype = new Widget();
|
||||
|
||||
var optionAttributes = "align ariaPolite borderColor cards chrome conversation count dnt hashtags height height lang linkColor related size text theme tweetLimit via width".split(" "),
|
||||
otherAttributes = "hashtag id ownerScreenName screenName slug tweetID type url userId widgetId".split(" "),
|
||||
allAttributes = Array.prototype.slice.call(optionAttributes,0).concat(otherAttributes);
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
TwitterWidget.prototype.render = function(parent,nextSibling) {
|
||||
var self = this;
|
||||
// Housekeeping
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
// Compose the arguments for the tweet call
|
||||
var method,
|
||||
arg,
|
||||
options = {};
|
||||
$tw.utils.each(optionAttributes,function(attr) {
|
||||
options[attr] = self.getAttribute(attr);
|
||||
});
|
||||
switch(this.getAttribute("type")) {
|
||||
case "shareButton":
|
||||
method = "createShareButton";
|
||||
arg = this.getAttribute("url");
|
||||
break;
|
||||
case "followButton":
|
||||
method = "createFollowButton";
|
||||
arg = this.getAttribute("screenName");
|
||||
break;
|
||||
case "hashtagButton":
|
||||
method = "createHashtagButton";
|
||||
arg = this.getAttribute("hashtag");
|
||||
break;
|
||||
case "mentionButton":
|
||||
method = "createMentionButton";
|
||||
arg = this.getAttribute("screenName");
|
||||
break;
|
||||
case "tweet":
|
||||
method = "createTweet";
|
||||
arg = this.getAttribute("tweetID");
|
||||
break;
|
||||
case "timelineProfile":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "profile",
|
||||
screenName: this.getAttribute("screenName"),
|
||||
userId: this.getAttribute("userId")
|
||||
};
|
||||
break;
|
||||
case "timelineLikes":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "likes",
|
||||
screenName: this.getAttribute("screenName"),
|
||||
userId: this.getAttribute("userId")
|
||||
};
|
||||
break;
|
||||
case "timelineList":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "list",
|
||||
ownerScreenName: this.getAttribute("ownerScreenName"),
|
||||
slug: this.getAttribute("slug"),
|
||||
id: this.getAttribute("id")
|
||||
};
|
||||
break;
|
||||
case "timelineCollection":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "collection",
|
||||
id: this.getAttribute("id")
|
||||
};
|
||||
break;
|
||||
case "timelineUrl":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "url",
|
||||
url: this.getAttribute("url")
|
||||
};
|
||||
break;
|
||||
case "timelineWidget":
|
||||
method = "createTimeline";
|
||||
arg = {
|
||||
sourceType: "widget",
|
||||
widgetId: this.getAttribute("widgetId")
|
||||
};
|
||||
break;
|
||||
}
|
||||
// Render the tweet into a div
|
||||
var div = this.document.createElement("div");
|
||||
if(!this.document.isTiddlyWikiFakeDom && window.twttr && method) {
|
||||
twttr.ready(function(twttr) {
|
||||
window.twttr.widgets[method](arg,div,options);
|
||||
});
|
||||
} else {
|
||||
div.appendChild(this.document.createTextNode("Can't render tweet"));
|
||||
}
|
||||
// Insert it into the DOM
|
||||
parent.insertBefore(div,nextSibling);
|
||||
this.domNodes.push(div);
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
TwitterWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(allAttributes.find(function(attr) {
|
||||
return $tw.utils.hop(changedAttributes,attr);
|
||||
})) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
exports.twitter = TwitterWidget;
|
||||
|
||||
})();
|
5
plugins/tiddlywiki/twitter/usage.tid
Normal file
5
plugins/tiddlywiki/twitter/usage.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage
|
||||
|
||||
The `<$twitter>` widget can be used to embed several different entities:
|
||||
|
||||
<$macrocall $name="tabs" state=<<qualify "$:/state/twitter/usage">> tabsList="[all[tiddlers+shadows]tag[$:/tags/TwitterUsage]]" default="$:/plugins/tiddlywiki/twitter/usage/tweet" class="tc-vertical"/>
|
27
plugins/tiddlywiki/twitter/usage/collectiontimeline.tid
Normal file
27
plugins/tiddlywiki/twitter/usage/collectiontimeline.tid
Normal file
@ -0,0 +1,27 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/collectiontimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Collection Timeline
|
||||
|
||||
!! Embedding Collection Timelines
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineCollection" |none |"timelineCollection" |
|
||||
|''id'' |ID of the collection |none | |
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineCollection" id="393773266801659904"/>
|
||||
""">>
|
21
plugins/tiddlywiki/twitter/usage/followbutton.tid
Normal file
21
plugins/tiddlywiki/twitter/usage/followbutton.tid
Normal file
@ -0,0 +1,21 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/followbutton
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Follow Button
|
||||
|
||||
!! Embedding Follow Buttons
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"followButton" |none |"followButton" |
|
||||
|''screenName'' |Screen name of the account to be followed |none | |
|
||||
|''count'' |"none", "horizontal" |"horizontal" | |
|
||||
|''text'' |Any string |none |The default, highlighted text a user sees in the Tweet web intent |
|
||||
|''hashtags'' |A comma-separated list of hashtags |none |A list of hashtags to be appended to default Tweet text where appropriate |
|
||||
|''align'' |"left", "right" |locale dependent (left or right, depending on the text direction of the language) |The alignment of the button within an iframe; use this to ensure flush layout when aligning buttons |
|
||||
|''size'' |"medium", "large" |medium |Size of button |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="followButton" screenName="TiddlyWiki"/>
|
||||
""">>
|
19
plugins/tiddlywiki/twitter/usage/hashtagbutton.tid
Normal file
19
plugins/tiddlywiki/twitter/usage/hashtagbutton.tid
Normal file
@ -0,0 +1,19 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/hashtagbutton
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Hashtag Button
|
||||
|
||||
!! Embedding Hashtag Buttons
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"hashtagButton" |none |"hashtagButton" |
|
||||
|''hashtag'' |Hashtag to be tweeted and displayed on the button |none | |
|
||||
|''text'' |Any string |none |The default, highlighted text a user sees in the Tweet web intent |
|
||||
|''align'' |"left", "right" |locale dependent (left or right, depending on the text direction of the language) |The alignment of the button within an iframe; use this to ensure flush layout when aligning buttons |
|
||||
|''size'' |"medium", "large" |medium |Size of button |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="hashtagButton" hashtag="TiddlyWiki"/>
|
||||
""">>
|
28
plugins/tiddlywiki/twitter/usage/likestimeline.tid
Normal file
28
plugins/tiddlywiki/twitter/usage/likestimeline.tid
Normal file
@ -0,0 +1,28 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/likestimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Likes Timeline
|
||||
|
||||
!! Embedding Likes Timelines
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineLikes" |none |"timelineLikes" |
|
||||
|''screenName'' |Screen name of the account |none |Either ''screenName'' or ''userId'' must be provided |
|
||||
|''userId'' |User ID of the account |none |~|
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineLikes" screenName="tiddlywiki"/>
|
||||
""">>
|
29
plugins/tiddlywiki/twitter/usage/listtimeline.tid
Normal file
29
plugins/tiddlywiki/twitter/usage/listtimeline.tid
Normal file
@ -0,0 +1,29 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/listtimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: List Timeline
|
||||
|
||||
!! Embedding List Timelines
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineList" |none |"timelineList" |
|
||||
|''ownerScreenName'' |Screen name of the account |none |Either both ''ownerScreenName'' and ''slug'' must be provided, or just ''id'' |
|
||||
|''slug'' |The string identifier for a list |none |~|
|
||||
|''id'' |ID of the list |none |~|
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineList" ownerScreenName="isaach" slug="home-timeline"/>
|
||||
""">>
|
20
plugins/tiddlywiki/twitter/usage/mentionbutton.tid
Normal file
20
plugins/tiddlywiki/twitter/usage/mentionbutton.tid
Normal file
@ -0,0 +1,20 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/mentionbutton
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Mention Button
|
||||
|
||||
!! Embedding Mention Buttons
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"mentionButton" |none |"mentionButton" |
|
||||
|''screenName'' |Screen name of the account to be mentioned |none | |
|
||||
|''text'' |Any string |none |The default, highlighted text a user sees in the Tweet web intent |
|
||||
|''hashtags'' |A comma-separated list of hashtags |none |A list of hashtags to be appended to default Tweet text where appropriate |
|
||||
|''align'' |"left", "right" |locale dependent (left or right, depending on the text direction of the language) |The alignment of the button within an iframe; use this to ensure flush layout when aligning buttons |
|
||||
|''size'' |"medium", "large" |medium |Size of button |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="mentionButton" screenName="TiddlyWiki"/>
|
||||
""">>
|
29
plugins/tiddlywiki/twitter/usage/profiletimeline.tid
Normal file
29
plugins/tiddlywiki/twitter/usage/profiletimeline.tid
Normal file
@ -0,0 +1,29 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/profiletimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Profile Timeline
|
||||
|
||||
!! Embedding Profile Timelines
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineProfile" |none |"timelineProfile" |
|
||||
|''screenName'' |Screen name of the account |none |Either ''screenName'' or ''userId'' must be provided |
|
||||
|''userId'' |User ID of the account |none |~|
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineProfile" screenName="tiddlywiki"/>
|
||||
""">>
|
||||
|
20
plugins/tiddlywiki/twitter/usage/sharebutton.tid
Normal file
20
plugins/tiddlywiki/twitter/usage/sharebutton.tid
Normal file
@ -0,0 +1,20 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/sharebutton
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Share Button
|
||||
|
||||
!! Embedding Share Buttons
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"shareButton" |none |"shareButton" |
|
||||
|''url'' |The URL to be shared |none | |
|
||||
|''text'' |Any string |none |The default, highlighted text a user sees in the Tweet web intent |
|
||||
|''hashtags'' |A comma-separated list of hashtags |none |A list of hashtags to be appended to default Tweet text where appropriate |
|
||||
|''align'' |"left", "right" |locale dependent (left or right, depending on the text direction of the language) |The alignment of the button within an iframe; use this to ensure flush layout when aligning buttons |
|
||||
|''size'' |"medium", "large" |medium |Size of button |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="shareButton" url="http://tiddlywiki.com/" text="Mind blown!"/>
|
||||
""">>
|
22
plugins/tiddlywiki/twitter/usage/tweet.tid
Normal file
22
plugins/tiddlywiki/twitter/usage/tweet.tid
Normal file
@ -0,0 +1,22 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/tweet
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Tweet
|
||||
|
||||
!! Embedding Tweets
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"tweet" |none |"tweet" |
|
||||
|''tweetID'' |ID of the tweet to render |none | |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |true, false |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="tweet" tweetID="750677030589587456"/>
|
||||
""">>
|
27
plugins/tiddlywiki/twitter/usage/urltimeline.tid
Normal file
27
plugins/tiddlywiki/twitter/usage/urltimeline.tid
Normal file
@ -0,0 +1,27 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/urltimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Url Timeline
|
||||
|
||||
!! Embedding Profile Timelines
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineUrl" |none |"timelineUrl" |
|
||||
|''url'' |Absolute URL of a Twitter profile, likes, list, or collection |none | |
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineUrl" url="https://twitter.com/TiddlyWiki"/>
|
||||
""">>
|
29
plugins/tiddlywiki/twitter/usage/widgettimeline.tid
Normal file
29
plugins/tiddlywiki/twitter/usage/widgettimeline.tid
Normal file
@ -0,0 +1,29 @@
|
||||
title: $:/plugins/tiddlywiki/twitter/usage/widgettimeline
|
||||
tags: $:/tags/TwitterUsage
|
||||
caption: Widget Timeline
|
||||
|
||||
!! Embedding Widget Timelines
|
||||
|
||||
To power an embedded timeline with a widget configuration generated at https://twitter.com/settings/widgets.
|
||||
|
||||
|!Attribute |!Values |!Default |!Notes |
|
||||
|''type'' |"timelineWidget" |none |"timelineWidget" |
|
||||
|''widgetId'' |ID of the widget |none |~|
|
||||
|''chrome'' |"noheader", "nofooter", "noborders", "transparent", "noscrollbar" |none |Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
|
||||
|''height'' |Positive integer |600 |Set a fixed height of the embedded widget |
|
||||
|''tweetLimit'' |Range: 1-20 |none |Render a timeline statically, displaying only n number of Tweets |
|
||||
|''borderColor'' |Hexadecimal color |Varies by theme |Adjust the color of borders inside the widget |
|
||||
|''ariaPolite'' |"polite", "assertive", "rude" |"polite" |Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
|
||||
|''conversation'' |"none", "all" |"all" |Tweets in response to another Tweet will display a compact version of the previous Tweet by default. Use "none" to hide the parent Tweet in the conversation |
|
||||
|''cards'' |"hidden", "visible"|visible |Hide photos, videos, and link previews powered by Twitter Cards |
|
||||
|''width'' |Positive integer |"auto", derived from container size |Set the maximum width of the embedded Tweet |
|
||||
|''align'' |"left", "right", "center" |none |Float the embedded Tweet to the left or right so that text wraps around it, or align center so it floats in the middle of a paragraph |
|
||||
|''theme'' |"dark", "light" |"light" |Toggle the default color scheme of the embedded Tweet |
|
||||
|''linkColor'' |Hexadecimal color |"#2b7bb9" |Adjust the color of links, including hashtags and @mentions, inside the widget |
|
||||
|''lang'' |An ISO 639-1 language code |en |The language in which to render a widget, if supported |
|
||||
|''dnt'' |"true", "false" |false |Enable Do Not Track for this widget |
|
||||
|''related'' |Any comma-separated list of valid Twitter screen names |none |A list of Twitter screen names to be suggested for following after a Tweet or Tweet action is posted |
|
||||
|''via'' |Any valid Twitter screen name |none |A Twitter user mentioned in the default Tweet text as via @user where appropriate |
|
||||
|
||||
<<twitter-usage """<$twitter type="timelineWidget" widgetId="570670821065379840"/>
|
||||
""">>
|
Loading…
Reference in New Issue
Block a user