Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rafed/ramium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafed Muhammad Yasir <rafed123@yahoo.com>2020-05-09 02:38:22 +0300
committerRafed Muhammad Yasir <rafed123@yahoo.com>2020-05-09 02:38:22 +0300
commiteb0c2c00517e7be5e798e4f32ff3e0f8b6ec2fd2 (patch)
tree781f2dcf9ba1ed7c2da34550b7a7b116a84e6264
parent3fe5fc0ba1a1e7d757e2ea8e635aefdf72dfe598 (diff)
Added shortcode for local image
-rw-r--r--content/introduction-to-ramium/1. About Ramium.md2
-rw-r--r--content/introduction-to-ramium/2. Features of Ramium.md2
-rw-r--r--themes/ramium/layouts/_default/single.html4
-rw-r--r--themes/ramium/layouts/shortcodes/local-img.html14
-rw-r--r--themes/ramium/layouts/shortcodes/local-link.html (renamed from themes/ramium/layouts/shortcodes/local.html)0
-rw-r--r--themes/ramium/static/css/ramium.css6
6 files changed, 22 insertions, 6 deletions
diff --git a/content/introduction-to-ramium/1. About Ramium.md b/content/introduction-to-ramium/1. About Ramium.md
index a0909cd..b81c6ef 100644
--- a/content/introduction-to-ramium/1. About Ramium.md
+++ b/content/introduction-to-ramium/1. About Ramium.md
@@ -8,4 +8,4 @@ Ramium is an awesome hugo theme for creating personal blogs. Apparently, none of
Special thanks go to [Hugo](https://gohugo.io/), which is not only the world’s fastest framework for building websites but an amazing one as well. This theme exists because Hugo exists. Also a big thanks to [Bulma](https://bulma.io/), which is an open source CSS framework based on Flexbox. It was eye refreshing to see a site with layouts not from bootstrap.
-Check out all the {{<local href="/introduction-to-ramium/features-of-ramium/" text="features of Ramium">}} Or start using Ramium by following the {{<local href="/getting-started-with-ramium/" text="tutorial here.">}}
+Check out all the {{<local-link href="/introduction-to-ramium/features-of-ramium/" text="features of Ramium">}} Or start using Ramium by following the {{<local-link href="/getting-started-with-ramium/" text="tutorial here.">}}
diff --git a/content/introduction-to-ramium/2. Features of Ramium.md b/content/introduction-to-ramium/2. Features of Ramium.md
index 2a193cd..4d543cf 100644
--- a/content/introduction-to-ramium/2. Features of Ramium.md
+++ b/content/introduction-to-ramium/2. Features of Ramium.md
@@ -14,7 +14,7 @@ Ramium is Packed with awesome features that makes your blog powerful and easy to
- Social sharing bar (facebook, twitter, reddit)
- Comments with Disqus
- Customizable navbar
-- {{<local href="/admin" text="Admin panel">}} (Not a real admin panel though. It simply shows the summary of the total number of posts, tags and sections)
+- {{<local-link href="/admin" text="Admin panel">}} (Not a real admin panel though. It simply shows the summary of the total number of posts, tags and sections)
- Mobile responsive- works great across desktops, tablets and mobiles
- SEO friendly (Opengraph, Twitter cards)
diff --git a/themes/ramium/layouts/_default/single.html b/themes/ramium/layouts/_default/single.html
index 0c953be..3a30fb3 100644
--- a/themes/ramium/layouts/_default/single.html
+++ b/themes/ramium/layouts/_default/single.html
@@ -36,7 +36,9 @@
<div class="blog-text">
{{ with .Params.image }}
- <img src="{{ . | relURL }}">
+ <figure>
+ <img src="{{ . | relURL }}">
+ </figure>
{{ end }}
{{ .Content }}
diff --git a/themes/ramium/layouts/shortcodes/local-img.html b/themes/ramium/layouts/shortcodes/local-img.html
new file mode 100644
index 0000000..3fe9e52
--- /dev/null
+++ b/themes/ramium/layouts/shortcodes/local-img.html
@@ -0,0 +1,14 @@
+{{ if .IsNamedParams }}
+
+<figure>
+ <img src="{{.Get "src" | relURL }}"
+ {{ if .Get "caption" }}
+ alt="{{.Get "caption"}}"
+ {{ end }}
+ >
+ {{ if .Get "caption" }}
+ <figcaption>{{.Get "caption"}}</figcaption>
+ {{ end }}
+</figure>
+
+{{ end }} \ No newline at end of file
diff --git a/themes/ramium/layouts/shortcodes/local.html b/themes/ramium/layouts/shortcodes/local-link.html
index 75938ea..75938ea 100644
--- a/themes/ramium/layouts/shortcodes/local.html
+++ b/themes/ramium/layouts/shortcodes/local-link.html
diff --git a/themes/ramium/static/css/ramium.css b/themes/ramium/static/css/ramium.css
index 1f6fa5f..c9ad24d 100644
--- a/themes/ramium/static/css/ramium.css
+++ b/themes/ramium/static/css/ramium.css
@@ -84,12 +84,12 @@ input:focus::placeholder {
}
.blog-text img {
- max-width: 85%;
+ /* max-width: 85%; */
display: block;
margin-left: auto;
margin-right: auto;
- margin-top: 1em;
- margin-bottom: 1.5em;
+ /* margin-top: 1em;
+ margin-bottom: 1.5em; */
}
.blog .blog-text p {