
內容簡介
e.nigma buttons是一款輕量級的WordPress外掛程式,可以解決許多使用WordPress的人所遇到的共同問題:視覺突顯連結(例如下載鏈接)。其中一個好的解決方案就是使用按鈕。
按鈕的目的是明確的。你按下該按鈕時,就會發生某些事情。這是大多數用戶都知道的一個熟悉的原則。相比普通文本連結(例如下載鏈接),按鈕更容易被注意到,特別是如果你與圖標結合使用。
e.nigma buttons可以讓你使用簡單的短碼環境輕鬆地創建這些視覺上有吸引力的按鈕。
外掛程式的開發是一個開放的過程。當前版本可在github上獲得:
https://github.com/chemiker/enigma-buttons
歡迎通過github做出貢獻、修正錯誤或提供改進意見。
短碼和屬性
e.nigma buttons在你的安裝中添加了短碼[button]。你可以使用以下選項來調整按鈕以滿足你的需求:
label: 按鈕標籤
icon: 按鈕圖標
link: 按鈕鏈接
color: 按鈕顏色
border: yes(預設)或no
size: 小,中(預設)或大
class: 附加CSS類,將添加到您的按鈕圖標中
大多數短碼屬性都是自我說明的。但需要注意的是,可以使用修改後的Font Awesome短碼來填寫icon屬性。
例如: 如果你想使用GitHub圖標,你需要在所有圖標的列表中搜索該圖標。你會發現對應的CSS類。對於e.nigma buttons,使用圖標的名稱(如果去掉CSS類開始的“fa-”)即可。對於GitHub,CSS類為fa-github。因此,github是您icon屬性的值。
顏色
以下顏色可用:
* 綠色
* 橙色
* 紫色
* 青色
* 白色
* 紅色
* 黑色
除了這些值之外,您還可以使用16進位色碼(例如#ff3600)
圖標
e.nigma buttons使用Dave Gandy的Font Awesome作為圖標資源。您可以在其網站上找到所有可用圖標的概述。
示例
[button label="My GitHub account" icon="github" color="orange" link="https://github.com/chemiker"]
帶有連結的中型橙色按鈕,帶有GitHub圖標和標籤“My GitHub account”。
[button icon="github" color="orange" link="https://github.com/chemiker" size="large"]
帶有連結的大型橙色GitHub圖標。
外掛標籤
開發者團隊
原文外掛簡介
e.nigma buttons is a lightweight plugin that adresses a common problem that applies to many WordPress users: Visually highlight a link (e.g. a download link). One great solution is the use of buttons
The purpose of a button is clear. You press that button and something happens. This is a well known principle that most users are aware of. In contrast to regular text links (e.g. a download link), buttons are more likely to be noticed, especially if you use them in combination with an icon.
e.nigma buttons allows you to easily create those visually attractive buttons using a simple shortcode environment.
Development of the plugin is an open process. The current version is available on github:
https://github.com/chemiker/enigma-buttons
Feel free to contribute and to fix errors or send improvements via github.
Shortcodes & Attributes
e.nigma buttons adds the shortcode [button] to your installation. The following options can be used to adjust the button for your needs:
label: The label of your button
icon: The icon of your button
link: The link of your button
color: The color of button
border: yes (default) or no
size: small, medium (default) or large
class: Additional CSS classes that will be added to your buttons icon
Most of the shortcodes attributes are self explaining. However, it must be noted that the icon attribute can be filled by using modififed Font Awesome shortcodes.
For instance: If you want to use the GitHub icon you would search for that icon in the list of all icons. What you will find is the corresponding CSS class. For e.nigma buttons the name of the icon (which is obtained if stripping the “fa-” in the beginning of the CSS class) is used. For GitHub the CSS class would be fa-github. Thus, github is your value for the icon attribute.
Colors
The following colors are avaible:
* green
* orange
* purple
* cyan
* white
* red
* black
In addition to those values you can also use a hex color code (e.g. #ff3600)
Icons
e.nigma buttons uses Font Awesome by Dave Gandy as icon resource. An overview over all available icons can be found on their website.
Examples
[button label="My GitHub account" icon="github" color="orange" link="https://github.com/chemiker"]
Brings you an linked, medium-sized, orange button that has a GitHub icon and the label “My GitHub account”.
[button icon="github" color="orange" link="https://github.com/chemiker" size="large"]
Brings you an orange, large-sized, linked GitHub icon.
