-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove octicons altogether from gollum-lib. (#441)
* Remove octicons altogether from gollum-lib. * Rename Octicon macro to Icon. Leave finding and rendering the actual icon to frontend (gollum). * Remove hardcoded octicon names from gollum-lib. * Add Flash macro that comes without default icon. * Upgrade minitest-reporters.
- Loading branch information
1 parent
e144af1
commit 63dd863
Showing
10 changed files
with
41 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Gollum | ||
class Macro | ||
class Flash < Gollum::Macro | ||
def render(message, icon='', type='') | ||
flash_type = ['warn', 'error', 'success'].include?(type) ? "flash-#{type}" : '' | ||
flash_icon = icon.empty? ? '' : %Q(data-gollum-icon="#{icon}") | ||
%Q(<div class="flash #{flash_type} my-2" #{flash_icon}>#{message}</div>) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Gollum | ||
class Macro | ||
class Icon < Gollum::Macro | ||
def render(icon) | ||
%Q(<div class="gollum-icon" data-gollum-icon="#{icon}"></div>) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters