Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jekyll-theme-lcsb-frozen-components
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
outreach
themes
jekyll-theme-lcsb-frozen-components
Merge requests
!1
Added the frozen-plugins files
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added the frozen-plugins files
1-put-frozen-plugins-into-the-repository
into
master
Overview
0
Commits
1
Pipelines
0
Changes
4
Merged
Jacek Lebioda
requested to merge
1-put-frozen-plugins-into-the-repository
into
master
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
4
Expand
Closes
#1 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
b0ba9b34
1 commit,
5 years ago
4 files
+
111
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
_plugins/rblock.rb
0 → 100644
+
54
−
0
Options
module
Jekyll
module
Tags
class
RblockTag
<
Liquid
::
Block
def
split_params
(
params
)
params
.
split
(
"|"
).
map
(
&
:strip
)
end
def
initialize
(
tag_name
,
block_options
,
liquid_options
)
super
args
=
split_params
(
block_options
)
@title
=
args
[
0
]
if
args
.
length
>
1
@icon
=
args
[
1
]
else
#default icon
@icon
=
"fas fa-code"
end
end
def
render
(
context
)
rgridblockID
=
context
[
"rgridblockID"
]
#content = super
site
=
context
.
registers
[
:site
]
converter
=
site
.
find_converter_instance
(
::
Jekyll
::
Converters
::
Markdown
)
content
=
converter
.
convert
(
super
)
#Because we’re not changing the context, there’s no need to push the context stack as with the rgridblock.
# generate collapsible card HTML
output
=
<<~
EOS
<div class="rblock">
<h3>
<i class="
#{
@icon
}
"></i>
#{
@title
}
</h3>
<hr>
<p>
#{
content
}
</p>
</div>
EOS
output
end
end
end
end
Liquid
::
Template
.
register_tag
(
'rblock'
,
Jekyll
::
Tags
::
RblockTag
)
Loading