Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
6
6sem-practice
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Исайчев Данила Олегович
6sem-practice
Commits
bf59251c
Commit
bf59251c
authored
Mar 09, 2022
by
Исайчев Данила Олегович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
247985cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
paragraph.html
paragraph/paragraph.html
+30
-0
No files found.
paragraph/paragraph.html
0 → 100644
View file @
bf59251c
{{ if and (ne (.Get "number") "") (ne (.Get "number") nil) }}
{{ $filename := add (add "shortcodes/paragraph-" (.Get "number")) ".json" }}
{{ with .Site.GetPage .Page.File.Path}}
{{ $resource := (.Resources.GetMatch $filename).RelPermalink }}
{{ $fields := getJSON "content" $resource }}
<div>
{{ if and (ne $fields.title "") (ne $fields.title nil) }}
<h4>
{{ $fields.title }}
</h4>
{{ end }}
{{ range $fields.paragraphs }}
<p>
{{ . }}
</p>
{{ end }}
</div>
{{ end }}
{{ else }}
<div>
{{ if and (ne (.Get "title") "") (ne (.Get "title") nil) }}
<h4>
{{ .Get "title" }}
</h4>
{{ end }}
<p>
{{ .Get "text" }}
</p>
</div>
{{ end }}
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