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

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Aguiar <rmaguiar@tuta.io>2022-08-12 23:55:05 +0300
committerRaphael Aguiar <rmaguiar@tuta.io>2022-08-12 23:55:05 +0300
commit1d4c030669b181547541c9d1ee41339f2f42d025 (patch)
tree57047815d0603d0022adecc6b25064b2e6366bfc
parent69e4cecc5cc295da87e820cddb60f0591006a4fb (diff)
Remove leftovers, update Medium URL structure and social shortcode
* Remove leftovers * Update Medium URL structure and social shortcode
-rw-r--r--data/old/default.toml73
-rw-r--r--data/old/what.toml27
-rw-r--r--data/social.json40
-rw-r--r--layouts/shortcodes/social.html14
4 files changed, 27 insertions, 127 deletions
diff --git a/data/old/default.toml b/data/old/default.toml
deleted file mode 100644
index 92357f5..0000000
--- a/data/old/default.toml
+++ /dev/null
@@ -1,73 +0,0 @@
-# File dedicated to storing some default values
-
-[search]
- minLength = 3
- maxLength = 32
-
-[style]
- darkAccent = "1dbc91"
- lightAccent = "1f676b"
-
- changeTransition = ".3s ease"
-
-[notFound]
- title = "Page not found"
- description = "This page was not found."
- paragraph = "Nothing to see here, buddy."
-
-[libs]
- fusejs = "6.6.2"
- katex = "0.15.6"
-
-
-[imageProcessing]
-
- autoResize = true
-
- # Convert "tiff" files to the format below
- # since the most used browsers don't support it
- fallbackOptions = "jpeg"
-
- #defaultResize = "960x"
-
- openGraphFill = "1200x630"
- twitterFill = "1280x640"
-
- #markupAutoResizeWidth = 1280
-
- #[[imageProcessing.extraFormats]]
- #formatOptions = "avif"
- #mediaType = "image/avif"
- #minVersion = "?"
-
- [[imageProcessing.extraFormats]]
- formatOptions = "webp"
- mediaType = "image/webp"
- minVersion = "0.83"
-
- # Keep the sizes in descending order
- [[imageProcessing.sizes]]
- resizeOptions = "1280x"
- label = "1280w"
- minWidth = 1280
-
- [[imageProcessing.sizes]]
- resizeOptions = "960x"
- label = "960w"
- minWidth = 960
-
- [[imageProcessing.sizes]]
- resizeOptions = "640x q90"
- label = "640w"
- minWidth = 640
- #defaultResize = true
-
- #[[imageProcessing.sizes]]
- #resizeOptions = "320x q90"
- #label = "320w"
- #minWidth = 320
-
- #[[imageProcessing.sizes]]
- #resizeOptions = "160x q90"
- #label = "160w"
- #minWidth = 160
diff --git a/data/old/what.toml b/data/old/what.toml
deleted file mode 100644
index 570a811..0000000
--- a/data/old/what.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-# File dedicated to storing some default values
-
-[search]
- minLength = 3
- maxLength = 32
-
-[imageProc]
- highRes = [ "1280x", "1280w" ]
- mediumRes = [ "960x", "960w" ]
- lowRes = [ "640x q90", "640w" ]
-
- markupAutoResizeWidth = 1280
-
-[style]
- darkAccent = "#1dbc91"
- lightAccent = "#1f676b"
-
- changeTransition = ".3s ease"
-
-[notFound]
- title = "Page not found"
- description = "This page was not found."
- paragraph = "Nothing to see here, buddy."
-
-[libs]
- fuse = "6.5.3"
- katex = "0.15.3"
diff --git a/data/social.json b/data/social.json
index c7de59e..5101e8f 100644
--- a/data/social.json
+++ b/data/social.json
@@ -2,7 +2,7 @@
{
"entry": "facebook",
"label": "Facebook",
- "base": "https://facebook.com/",
+ "base": "https://facebook.com/<username>",
"icon": {
"id": "facebook",
"source": "Font-Awesome"
@@ -11,7 +11,7 @@
{
"entry": "flickr",
"label": "Flickr",
- "base": "https://www.flickr.com/",
+ "base": "https://www.flickr.com/<username>",
"icon": {
"id": "flickr",
"source": "Font-Awesome"
@@ -29,7 +29,7 @@
{
"entry": "github",
"label": "GitHub",
- "base": "https://github.com/",
+ "base": "https://github.com/<username>",
"icon": {
"id": "github",
"source": "Font-Awesome"
@@ -38,7 +38,7 @@
{
"entry": "gitlab",
"label": "GitLab",
- "base": "https://gitlab.com/",
+ "base": "https://gitlab.com/<username>",
"icon": {
"id": "gitlab",
"source": "Font-Awesome"
@@ -47,7 +47,7 @@
{
"entry": "instagram",
"label": "Instagram",
- "base": "https://www.instagram.com/",
+ "base": "https://www.instagram.com/<username>",
"icon": {
"id": "instagram",
"source": "Font-Awesome"
@@ -56,7 +56,7 @@
{
"entry": "keybase",
"label": "Keybase",
- "base": "https://keybase.io/",
+ "base": "https://keybase.io/<username>",
"icon": {
"id": "keybase",
"source": "Font-Awesome"
@@ -65,7 +65,7 @@
{
"entry": "linkedin",
"label": "LinkedIn",
- "base": "https://www.linkedin.com/in/",
+ "base": "https://www.linkedin.com/in/<username>",
"icon": {
"id": "linkedin",
"source": "Font-Awesome"
@@ -92,7 +92,7 @@
{
"entry": "medium",
"label": "Medium",
- "base": "https://medium.com/",
+ "base": "https://<username>.medium.com/",
"icon": {
"id": "medium",
"source": "Font-Awesome"
@@ -119,7 +119,7 @@
{
"entry": "reddit",
"label": "Reddit",
- "base": "https://www.reddit.com/user/",
+ "base": "https://www.reddit.com/user/<username>",
"icon": {
"id": "reddit",
"source": "Font-Awesome"
@@ -137,7 +137,7 @@
{
"entry": "snapchat",
"label": "Snapchat",
- "base": "https://www.snapchat.com/add/",
+ "base": "https://www.snapchat.com/add/<username>",
"icon": {
"id": "snapchat",
"source": "Font-Awesome"
@@ -146,7 +146,7 @@
{
"entry": "soundcloud",
"label": "SoundCloud",
- "base": "https://soundcloud.com/",
+ "base": "https://soundcloud.com/<username>",
"icon": {
"id": "soundcloud",
"source": "Font-Awesome"
@@ -155,7 +155,7 @@
{
"entry": "stackOverflow",
"label": "Stack Overflow",
- "base": "https://stackoverflow.com/users/",
+ "base": "https://stackoverflow.com/users/<username>",
"icon": {
"id": "stack-overflow",
"source": "Font-Awesome"
@@ -164,7 +164,7 @@
{
"entry": "strava",
"label": "Strava",
- "base": "https://www.strava.com/athletes/",
+ "base": "https://www.strava.com/athletes/<username>",
"icon": {
"id": "strava",
"source": "Font-Awesome"
@@ -173,7 +173,7 @@
{
"entry": "telegram",
"label": "Telegram",
- "base": "https://t.me/",
+ "base": "https://t.me/<username>",
"icon": {
"id": "telegram",
"source": "Font-Awesome"
@@ -182,7 +182,7 @@
{
"entry": "twitch",
"label": "Twitch",
- "base": "https://www.twitch.tv/",
+ "base": "https://www.twitch.tv/<username>",
"icon": {
"id": "twitch",
"source": "Font-Awesome"
@@ -191,7 +191,7 @@
{
"entry": "twitter",
"label": "Twitter",
- "base": "https://twitter.com/",
+ "base": "https://twitter.com/<username>",
"icon": {
"id": "twitter",
"source": "Font-Awesome"
@@ -200,7 +200,7 @@
{
"entry": "vimeo",
"label": "Vimeo",
- "base": "https://vimeo.com/",
+ "base": "https://vimeo.com/<username>",
"icon": {
"id": "vimeo",
"source": "Font-Awesome"
@@ -209,7 +209,7 @@
{
"entry": "whatsapp",
"label": "WhatsApp",
- "base": "https://wa.me/",
+ "base": "https://wa.me/<username>",
"icon": {
"id": "whatsapp",
"source": "Font-Awesome"
@@ -218,7 +218,7 @@
{
"entry": "xing",
"label": "XING",
- "base": "https://www.xing.com/profile/",
+ "base": "https://www.xing.com/profile/<username>",
"icon": {
"id": "xing",
"source": "Font-Awesome"
@@ -227,7 +227,7 @@
{
"entry": "youtube",
"label": "YouTube",
- "base": "https://youtube.com/channel/",
+ "base": "https://youtube.com/channel/<username>",
"icon": {
"id": "youtube",
"source": "Font-Awesome"
diff --git a/layouts/shortcodes/social.html b/layouts/shortcodes/social.html
index 5f16551..4ec526a 100644
--- a/layouts/shortcodes/social.html
+++ b/layouts/shortcodes/social.html
@@ -9,21 +9,21 @@
<div class="social">
-
+
{{ range .Site.Data.social }}
-
+
{{ $currentEntry := .entry }}
{{ $currentLabel := .label }}
{{ $currentBase := .base }}
{{ $currentIcon := .icon.id }}
-
+
{{ if not .decentralized }}
-
+
{{ with (index $centralized $currentEntry) }}
-
- {{ $url := printf "%s%s" $currentBase (index . 0) }}
- {{ $label := $currentLabel }}
+ {{ $url := $currentBase | replaceRE "<username>" (index . 0) }}
+ {{ $label := $currentLabel }}
+
{{ with (index . 1) }}
{{ $label = . }}
{{ end }}