diff --git a/i18n/en.yml b/i18n/en.yml index e1406ef..7e0620f 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -165,6 +165,7 @@ sc: twitter: { other: 'Twitter' } repo: forks: { other: 'Forks' } + language: { other: 'Language' } license: { other: 'License' } stargazers: { other: 'Stars' } subscribers: { other: 'Watchers' } @@ -179,6 +180,7 @@ sc: twitter: { other: 'Twitter' } repo: forks: { other: 'Forks' } + language: { other: 'Language' } license: { other: 'License' } stargazers: { other: 'Stars' } gitlab: diff --git a/i18n/ru.yml b/i18n/ru.yml index d7041ac..974b66d 100644 --- a/i18n/ru.yml +++ b/i18n/ru.yml @@ -165,6 +165,7 @@ sc: twitter: { other: 'Twitter' } repo: forks: { other: 'Вилки' } + language: { other: 'Язык разработки' } license: { other: 'Лицензия' } stargazers: { other: 'Звёзды' } subscribers: { other: 'Подписки' } @@ -179,6 +180,7 @@ sc: twitter: { other: 'Twitter' } repo: forks: { other: 'Вилки' } + language: { other: 'Язык разработки' } license: { other: 'Лицензия' } stargazers: { other: 'Подписки' } gitlab: diff --git a/layouts/shortcodes/ghRepo.html b/layouts/shortcodes.old/gh-repo.html similarity index 97% rename from layouts/shortcodes/ghRepo.html rename to layouts/shortcodes.old/gh-repo.html index bc546b7..d055cf5 100644 --- a/layouts/shortcodes/ghRepo.html +++ b/layouts/shortcodes.old/gh-repo.html @@ -7,7 +7,7 @@ @examples - {{< ghRepo "github/docs" >}} + {{< gh-repo "github/docs" >}} */ -}} {{- if (.Get 0) -}} @@ -30,7 +30,7 @@
{{ if ($repo.owner.avatar_url) }}
- + {{ ($repo.name) }} diff --git a/layouts/shortcodes/ghUser.html b/layouts/shortcodes.old/gh-user.html similarity index 97% rename from layouts/shortcodes/ghUser.html rename to layouts/shortcodes.old/gh-user.html index fc95ae8..d3ecb65 100644 --- a/layouts/shortcodes/ghUser.html +++ b/layouts/shortcodes.old/gh-user.html @@ -7,7 +7,7 @@ @examples - {{< ghUser "octocat" >}} + {{< gh-user "octocat" >}} */ -}} {{- if (.Get 0) -}} @@ -29,7 +29,7 @@
{{ if ($user.avatar_url) }}
- + {{ (($user.name) | default ($user.login)) }} diff --git a/layouts/shortcodes.old/gitlab-group.html b/layouts/shortcodes.old/gitlab-group.html deleted file mode 100644 index 44571f1..0000000 --- a/layouts/shortcodes.old/gitlab-group.html +++ /dev/null @@ -1,116 +0,0 @@ -{{ $group := ((.Get 0) | default "") }} -{{ $view := ((.Get 1) | default "") }} -{{ $token := $.Site.Data.api.gitlab.token }} -{{ $url := "https://gitlab.com/api/v4" }} -{{ $data := getJSON $url "/groups/" $group "?access_token=" $token }} - -{{ $cols := "2" }} -{{ if (eq $view "projects") }}{{ $cols = "1" }}{{ end }} - -
-
-
-
-
-
- -
-
- -
-
-
-

{{ $data.description | markdownify }}

-
-
-
-
-
- -{{ if (eq $view "projects") }} -
- {{ range where $data.projects ".visibility" "!=" "private" }} -
-
-
-
-
- -
-
- -
-
-
-

{{ .description | markdownify }}

-
-
-
-
- {{ end }} -
-{{ end }} diff --git a/layouts/shortcodes.old/gitlab-repo.html b/layouts/shortcodes.old/gitlab-repo.html deleted file mode 100644 index f0c5bac..0000000 --- a/layouts/shortcodes.old/gitlab-repo.html +++ /dev/null @@ -1,59 +0,0 @@ -{{ $repo := ((.Get 0) | default "") }} -{{ $token := $.Site.Data.api.gitlab.token }} -{{ $url := "https://gitlab.com/api/v4" }} -{{ $data := getJSON $url "/projects/" $repo "?access_token=" $token }} - -
-
-
-
-
-
- -
-
- -
-
-
-

{{ $data.description | markdownify }}

-
-
-
-
-
diff --git a/layouts/shortcodes.old/gitlab-user.html b/layouts/shortcodes.old/gitlab-user.html deleted file mode 100644 index 968b783..0000000 --- a/layouts/shortcodes.old/gitlab-user.html +++ /dev/null @@ -1,92 +0,0 @@ -{{ $user := ((.Get 0) | default "") }} -{{ $token := $.Site.Data.api.gitlab.token }} -{{ $url := "https://gitlab.com/api/v4" }} -{{ $data := getJSON $url "/users/" $user "?access_token=" $token }} - -
-
-
-
-
-
- -
-
-
    -
  • - - {{ $data.name }} -
  • - {{ if $data.location }} -
  • - - {{ $data.location }} -
  • - {{ end }} - {{ if $data.job_title }} -
  • - - {{ $data.job_title }} -
  • - {{ end }} - {{ if $data.organization }} -
  • - - {{ $data.organization }} -
  • - {{ end }} - {{ if $data.created_at }} -
  • - - {{ dateFormat "2006/01/02 15:04:05 MST" $data.created_at }} -
  • - {{ end }} -
-
-
-
-

{{ $data.bio }}

-
-
- -
-
-
diff --git a/layouts/shortcodes/accordionItem.html b/layouts/shortcodes/accordion-item.html similarity index 100% rename from layouts/shortcodes/accordionItem.html rename to layouts/shortcodes/accordion-item.html diff --git a/layouts/shortcodes/ghFile.html b/layouts/shortcodes/gh-file.html similarity index 98% rename from layouts/shortcodes/ghFile.html rename to layouts/shortcodes/gh-file.html index 9fee0bc..b08fbe9 100644 --- a/layouts/shortcodes/ghFile.html +++ b/layouts/shortcodes/gh-file.html @@ -9,7 +9,7 @@ @examples - {{< ghFile file="github/docs/README.md" lang="md" >}} + {{< gh-file file="github/docs/README.md" lang="md" >}} */ -}} {{- if (.IsNamedParams) -}} diff --git a/layouts/shortcodes/ghOrg.html b/layouts/shortcodes/gh-org.html similarity index 97% rename from layouts/shortcodes/ghOrg.html rename to layouts/shortcodes/gh-org.html index c138f85..4d97276 100644 --- a/layouts/shortcodes/ghOrg.html +++ b/layouts/shortcodes/gh-org.html @@ -7,7 +7,7 @@ @examples - {{< ghOrg "github" >}} + {{< gh-org "github" >}} */ -}} {{- if (.Get 0) -}} @@ -29,7 +29,7 @@
{{ if ($org.avatar_url) }}
- + {{ (($org.name) | default ($org.login)) }} diff --git a/layouts/shortcodes/gh-repo.html b/layouts/shortcodes/gh-repo.html new file mode 100644 index 0000000..833284b --- /dev/null +++ b/layouts/shortcodes/gh-repo.html @@ -0,0 +1,75 @@ +{{- /* +*/ -}} + +{{- if (.Get 0) -}} + + {{ $repos := (split (.Get 0) "|") }} + +
+
+ {{ range ($repos) }} +
+
+
+ +
+
+
+
+
+ +
+
+

+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ {{ end }} +
+
+ +{{- else -}} + + {{ (partial "alerts/no_params" .) }} + +{{- end -}} diff --git a/layouts/shortcodes/ghUserOrg.html b/layouts/shortcodes/gh-user-org.html similarity index 97% rename from layouts/shortcodes/ghUserOrg.html rename to layouts/shortcodes/gh-user-org.html index 308aabc..264f58f 100644 --- a/layouts/shortcodes/ghUserOrg.html +++ b/layouts/shortcodes/gh-user-org.html @@ -7,7 +7,7 @@ @examples - {{< ghUserOrg "octocat" >}} + {{< gh-user-org "octocat" >}} */ -}} {{- if (.Get 0) -}} @@ -31,7 +31,7 @@
{{ if ($org.avatar_url) }}
- + {{ (($org.name) | default ($org.login)) }} diff --git a/layouts/shortcodes/ghUserRepo.html b/layouts/shortcodes/gh-user-repo.html similarity index 97% rename from layouts/shortcodes/ghUserRepo.html rename to layouts/shortcodes/gh-user-repo.html index 7f9313c..0fa22e5 100644 --- a/layouts/shortcodes/ghUserRepo.html +++ b/layouts/shortcodes/gh-user-repo.html @@ -7,7 +7,7 @@ @examples - {{< ghUserRepo "octocat" >}} + {{< gh-user-repo "octocat" >}} */ -}} {{- if (.Get 0) -}} @@ -31,7 +31,7 @@
{{ if (.owner.avatar_url) }}
- + {{ (.name) }} diff --git a/layouts/shortcodes/gh-user.html b/layouts/shortcodes/gh-user.html new file mode 100644 index 0000000..40cb7c1 --- /dev/null +++ b/layouts/shortcodes/gh-user.html @@ -0,0 +1,67 @@ +{{- /* +*/ -}} + +{{- if (.Get 0) -}} + + {{ $users := (split (.Get 0) "|") }} + +
+
+ {{ range ($users) }} +
+
+
+ +
+
+
+
+
+ +
+

+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ {{ end }} +
+
+ +{{- else -}} + + {{ (partial "alerts/no_params" .) }} + +{{- end -}} diff --git a/layouts/shortcodes/glFile.html b/layouts/shortcodes/gl-file.html similarity index 96% rename from layouts/shortcodes/glFile.html rename to layouts/shortcodes/gl-file.html index ad2de08..322ceda 100644 --- a/layouts/shortcodes/glFile.html +++ b/layouts/shortcodes/gl-file.html @@ -10,7 +10,7 @@ @examples - {{< glFile project="278964" file="README.md" ref="master" lang="md" >}} + {{< gl-file project="278964" file="README.md" ref="master" lang="md" >}} */ -}} {{- if (.IsNamedParams) -}} diff --git a/layouts/shortcodes/glGroup.html b/layouts/shortcodes/gl-group.html similarity index 93% rename from layouts/shortcodes/glGroup.html rename to layouts/shortcodes/gl-group.html index daf2c1e..ccbe426 100644 --- a/layouts/shortcodes/glGroup.html +++ b/layouts/shortcodes/gl-group.html @@ -7,7 +7,7 @@ @examples - {{< glGroup "9970" >}} + {{< gl-group "9970" >}} */ -}} {{- if (.Get 0) -}} @@ -30,7 +30,7 @@