Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
core-services
jekyll-theme-lcsb-frozen-components
Commits
18070cfe
Commit
18070cfe
authored
Dec 06, 2019
by
Jacek Lebioda
Browse files
Added new components that should be shared
parent
0e37ef70
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/jekyll-theme-lcsb-frozen-components.rb
View file @
18070cfe
require
'jekyll/tags/alert'
require
'jekyll/tags/alert_header'
require
'jekyll/tags/rblock'
require
'jekyll/tags/rgridblock'
require
'jekyll/tags/rtitle'
lib/jekyll/tags/alert.rb
0 → 100644
View file @
18070cfe
module
Jekyll
module
Tags
class
AlertTag
<
Liquid
::
Block
def
initialize
(
tag_name
,
block_options
,
liquid_options
)
super
@class
=
block_options
.
strip
end
def
render
(
context
)
context
.
stack
do
context
[
"class"
]
=
@class
@content
=
super
end
output
=
<<~
EOS
<div class="alert
#{
@class
}
">
#{
@content
}
</div>
EOS
end
end
end
end
Liquid
::
Template
.
register_tag
(
'alert'
,
Jekyll
::
Tags
::
AlertTag
)
lib/jekyll/tags/alert_header.rb
0 → 100644
View file @
18070cfe
module
Jekyll
module
Tags
class
AlertHeaderTag
<
Liquid
::
Block
def
initialize
(
tag_name
,
block_options
,
liquid_options
)
super
end
def
render
(
context
)
context
.
stack
do
@content
=
super
end
output
=
"<h3>
#{
@content
}
</h3>"
end
end
end
end
Liquid
::
Template
.
register_tag
(
'alert_header'
,
Jekyll
::
Tags
::
AlertHeaderTag
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment