From 7aa4e3ca3dfc832d18be1fd0cc07c02ecad7e2cc Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 11 Aug 2016 10:14:27 -0400 Subject: [PATCH] Move comments above form elements and add missing English UI text strings --- _data/ui-text.yml | 383 ++++++++++++-------- _includes/comments-providers/staticman.html | 3 +- _includes/comments.html | 76 ++-- _sass/_page.scss | 5 + 4 files changed, 281 insertions(+), 186 deletions(-) diff --git a/_data/ui-text.yml b/_data/ui-text.yml index 83f47ed7..619b9f90 100644 --- a/_data/ui-text.yml +++ b/_data/ui-text.yml @@ -3,35 +3,45 @@ # English (default) # ----------------- en: &DEFAULT_EN - page : "Page" - pagination_previous : "Previous" - pagination_next : "Next" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - toc_label : "On This Page" - ext_link_label : "Direct Link" - less_than : "less than" - minute_read : "minute read" - share_on_label : "Share on" - meta_label : - tags_label : "Tags:" - categories_label : "Categories:" - date_label : "Updated:" - comments_label : "Leave a Comment" - comments_title : "Comments" - more_label : "Learn More" - related_label : "You May Also Enjoy" - follow_label : "Follow:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Website" - email_label : "Email" - recent_posts : "Recent Posts" - undefined_wpm : "Undefined parameter words_per_minute at _config.yml" - comment_success_title : "Comment submitted" - comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." - comment_error_title : "I Am Error" - comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." + page : "Page" + pagination_previous : "Previous" + pagination_next : "Next" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + toc_label : "On This Page" + ext_link_label : "Direct Link" + less_than : "less than" + minute_read : "minute read" + share_on_label : "Share on" + meta_label : + tags_label : "Tags:" + categories_label : "Categories:" + date_label : "Updated:" + comments_label : "Leave a Comment" + comments_title : "Comments" + more_label : "Learn More" + related_label : "You May Also Enjoy" + follow_label : "Follow:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Website" + email_label : "Email" + recent_posts : "Recent Posts" + undefined_wpm : "Undefined parameter words_per_minute at _config.yml" + comment_form_info : "Your email address will not be published. Required fields are marked" + comment_form_comment_label : "Comment" + comment_form_md_info : "Markdown is supported." + comment_form_name_label : "Name" + comment_form_email_label : "Email address" + comment_form_website_label : "Website (optional)" + comment_btn_submit : "Submit Comment" + comment_btn_submitted : "Submitted" + comment_success_title : "Comment submitted" + comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." + comment_error_title : "Error" + comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." + close_btn_label : "close" + loading_label : "Loading..." en-US: <<: *DEFAULT_EN en-CA: @@ -44,30 +54,45 @@ en-AU: # Spanish # -------------- es: &DEFAULT_ES - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Siguiente" - breadcrumb_home_label : "Inicio" - breadcrumb_separator : "/" - toc_label : "Contenidos" - ext_link_label : "Enlace" - less_than : "menos de" - minute_read : "minuto de lectura" - share_on_label : "Compartir" - meta_label : - tags_label : "Etiquetas:" - categories_label : "Categorías:" - date_label : "Actualizado:" - comments_label : "Comentar" - more_label : "Ver más" - related_label : "Podrías ver también" - follow_label : "Seguir:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Sitio web" - email_label : "Email" - recent_posts : "Entradas recientes" - undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml" + page : "Página" + pagination_previous : "Anterior" + pagination_next : "Siguiente" + breadcrumb_home_label : "Inicio" + breadcrumb_separator : "/" + toc_label : "Contenidos" + ext_link_label : "Enlace" + less_than : "menos de" + minute_read : "minuto de lectura" + share_on_label : "Compartir" + meta_label : + tags_label : "Etiquetas:" + categories_label : "Categorías:" + date_label : "Actualizado:" + comments_label : "Comentar" + comments_title : + more_label : "Ver más" + related_label : "Podrías ver también" + follow_label : "Seguir:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Sitio web" + email_label : "Email" + recent_posts : "Entradas recientes" + undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml" + comment_form_info : + comment_form_comment_label : + comment_form_md_info : + comment_form_name_label : + comment_form_email_label : + comment_form_website_label : + comment_btn_submit : + comment_btn_submitted : + comment_success_title : + comment_success_msg : + comment_error_title : + comment_error_msg : + close_btn_label : + loading_label : es-ES: <<: *DEFAULT_ES es-CO: @@ -76,30 +101,45 @@ es-CO: # French # ----------------- fr: &DEFAULT_FR - page : "Page" - pagination_previous : "Précédent" - pagination_next : "Suivant" - breadcrumb_home_label : "Accueil" - breadcrumb_separator : "/" - toc_label : "Sur cette page" - ext_link_label : "Lien direct" - less_than : "plus petit que" - minute_read : "minute de lecture" - share_on_label : "Partager sur" - meta_label : - tags_label : "Tags :" - categories_label : "Catégories :" - date_label : "Mis à jour :" - comments_label : "Laisser un commentaire" - more_label : "Lire plus" - related_label : "Vous pourriez aimer" - follow_label : "Suivez moi" - feed_label : "Flux" - powered_by : "Propulsé par" - website_label : "Site" - email_label : "Email" - recent_posts : "Posts récents" - undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml" + page : "Page" + pagination_previous : "Précédent" + pagination_next : "Suivant" + breadcrumb_home_label : "Accueil" + breadcrumb_separator : "/" + toc_label : "Sur cette page" + ext_link_label : "Lien direct" + less_than : "plus petit que" + minute_read : "minute de lecture" + share_on_label : "Partager sur" + meta_label : + tags_label : "Tags :" + categories_label : "Catégories :" + date_label : "Mis à jour :" + comments_label : "Laisser un commentaire" + comments_title : + more_label : "Lire plus" + related_label : "Vous pourriez aimer" + follow_label : "Suivez moi" + feed_label : "Flux" + powered_by : "Propulsé par" + website_label : "Site" + email_label : "Email" + recent_posts : "Posts récents" + undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml" + comment_form_info : + comment_form_comment_label : + comment_form_md_info : + comment_form_name_label : + comment_form_email_label : + comment_form_website_label : + comment_btn_submit : + comment_btn_submitted : + comment_success_title : + comment_success_msg : + comment_error_title : + comment_error_msg : + close_btn_label : + loading_label : fr-FR: <<: *DEFAULT_FR fr-BE: @@ -110,60 +150,90 @@ fr-CH: # Turkish # ----------------- tr: &DEFAULT_TR - page : "Sayfa" - pagination_previous : "Önceki" - pagination_next : "Sonraki" - breadcrumb_home_label : "Ana Sayfa" - breadcrumb_separator : "/" - toc_label : "İçindekiler" - ext_link_label : "Doğrudan Bağlantı" - less_than : "Şu süreden az: " - minute_read : "dakika tahmini okuma süresi" - share_on_label : "Paylaş" - meta_label : - tags_label : "Etiketler:" - categories_label : "Kategoriler:" - date_label : "Güncelleme tarihi:" - comments_label : "Yorum yapın" - more_label : "Daha fazlasını öğrenin" - related_label : "Bunlar ilginizi çekebilir:" - follow_label : "Takip et:" - feed_label : "RSS" - powered_by : "Emeği geçenler: " - website_label : "Web sayfası" - email_label : "E-posta" - recent_posts : "Son yazılar" - undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi" + page : "Sayfa" + pagination_previous : "Önceki" + pagination_next : "Sonraki" + breadcrumb_home_label : "Ana Sayfa" + breadcrumb_separator : "/" + toc_label : "İçindekiler" + ext_link_label : "Doğrudan Bağlantı" + less_than : "Şu süreden az: " + minute_read : "dakika tahmini okuma süresi" + share_on_label : "Paylaş" + meta_label : + tags_label : "Etiketler:" + categories_label : "Kategoriler:" + date_label : "Güncelleme tarihi:" + comments_label : "Yorum yapın" + comments_title : + more_label : "Daha fazlasını öğrenin" + related_label : "Bunlar ilginizi çekebilir:" + follow_label : "Takip et:" + feed_label : "RSS" + powered_by : "Emeği geçenler: " + website_label : "Web sayfası" + email_label : "E-posta" + recent_posts : "Son yazılar" + undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi" + comment_form_info : + comment_form_comment_label : + comment_form_md_info : + comment_form_name_label : + comment_form_email_label : + comment_form_website_label : + comment_btn_submit : + comment_btn_submitted : + comment_success_title : + comment_success_msg : + comment_error_title : + comment_error_msg : + close_btn_label : + loading_label : tr-TR: <<: *DEFAULT_TR # Brazilian Portguese # ----------------- pt: &DEFAULT_PT - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Próxima" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - toc_label : "Nesta página" - ext_link_label : "Link direto" - less_than : "meno que" - minute_read : "minutos de leitura" - share_on_label : "Compartilhe em" - meta_label : - tags_label : "Tags:" - categories_label : "Categorias:" - date_label : "Atualizado em:" - comments_label : "Deixe um comentário" - more_label : "Aprenda Mais" - related_label : "Você Talvez Goste Também" - follow_label : "Acompanhe em" - feed_label : "Feed" - powered_by : "Feito com" - website_label : "Site" - email_label : "Email" - recent_posts : "Postagens recentes" - undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml" + page : "Página" + pagination_previous : "Anterior" + pagination_next : "Próxima" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + toc_label : "Nesta página" + ext_link_label : "Link direto" + less_than : "meno que" + minute_read : "minutos de leitura" + share_on_label : "Compartilhe em" + meta_label : + tags_label : "Tags:" + categories_label : "Categorias:" + date_label : "Atualizado em:" + comments_label : "Deixe um comentário" + comments_title : + more_label : "Aprenda Mais" + related_label : "Você Talvez Goste Também" + follow_label : "Acompanhe em" + feed_label : "Feed" + powered_by : "Feito com" + website_label : "Site" + email_label : "Email" + recent_posts : "Postagens recentes" + undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml" + comment_form_info : + comment_form_comment_label : + comment_form_md_info : + comment_form_name_label : + comment_form_email_label : + comment_form_website_label : + comment_btn_submit : + comment_btn_submitted : + comment_success_title : + comment_success_msg : + comment_error_title : + comment_error_msg : + close_btn_label : + loading_label : pt-BR: <<: *DEFAULT_PT pt-PT: @@ -172,30 +242,45 @@ pt-PT: # Italian # ----------------- it: &DEFAULT_IT - page : "Pagina" - pagination_previous : "Precedente" - pagination_next : "Prossima" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - toc_label : "Indice della pagina" - ext_link_label : "Link" - less_than : "meno di" - minute_read : "minuto/i di lettura" - share_on_label : "Condividi" - meta_label : - tags_label : "Tags:" - categories_label : "Categorie:" - date_label : "Aggiornato:" - comments_label : "Scrivi un commento" - more_label : "Scopri di più" - related_label : "Potrebbe Piacerti Anche" - follow_label : "Segui:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Website" - email_label : "Email" - recent_posts : "Articoli Recenti" - undefined_wpm : "Parametro words_per_minute non definito in _config.yml" + page : "Pagina" + pagination_previous : "Precedente" + pagination_next : "Prossima" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + toc_label : "Indice della pagina" + ext_link_label : "Link" + less_than : "meno di" + minute_read : "minuto/i di lettura" + share_on_label : "Condividi" + meta_label : + tags_label : "Tags:" + categories_label : "Categorie:" + date_label : "Aggiornato:" + comments_label : "Scrivi un commento" + comments_title : + more_label : "Scopri di più" + related_label : "Potrebbe Piacerti Anche" + follow_label : "Segui:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Website" + email_label : "Email" + recent_posts : "Articoli Recenti" + undefined_wpm : "Parametro words_per_minute non definito in _config.yml" + comment_form_info : + comment_form_comment_label : + comment_form_md_info : + comment_form_name_label : + comment_form_email_label : + comment_form_website_label : + comment_btn_submit : + comment_btn_submitted : + comment_success_title : + comment_success_msg : + comment_error_title : + comment_error_msg : + close_btn_label : + loading_label : it-IT: <<: *DEFAULT_IT diff --git a/_includes/comments-providers/staticman.html b/_includes/comments-providers/staticman.html index 9f478888..30a65ec8 100644 --- a/_includes/comments-providers/staticman.html +++ b/_includes/comments-providers/staticman.html @@ -4,7 +4,7 @@ @@ -26,6 +26,7 @@ success: function (data) { showModal('{{ site.data.ui-text[site.locale].comment_success_title | default: "Comment submitted" }}', '{{ site.data.ui-text[site.locale].comment_success_msg | default: "Thanks for your comment! It will show on the site once it has been approved." }}'); $(form).removeClass('form--loading'); + $('#comment-form-submit').addClass('btn--disabled').html('{{ site.data.ui-text[site.locale].comment_btn_submitted | default: "Submitted" }}'); }, error: function (err) { console.log(err); diff --git a/_includes/comments.html b/_includes/comments.html index e7685fce..84355901 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,52 +1,20 @@ {% include base_path %}
-

{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

+ {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} {% case site.comments.provider %} {% when "disqus" %} +

{{ comments_label }}

{% when "facebook" %} +

{{ comments_label }}

{% when "google-plus" %} +

{{ comments_label }}

Loading Google+ Comments ...
{% when "staticman" %}
{% if site.repository and site.staticman.branch %} - -
-
- - Loading... -
- -
- - -
-
- - -
Your email address will remain private and won't be shared with anyone.
-
-
- - -
-
- - -
Markdown is supported.
-
- -
- -
-
- -
{% if site.data.comments[page.slug] %} @@ -64,6 +32,42 @@ {% endif %}
+ + +

{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}

+

{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} *

+
+
+ + {{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }} +
+ +
+ + + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+
+ {% endif %}
{% when "custom" %} diff --git a/_sass/_page.scss b/_sass/_page.scss index 420dcccb..5692cc64 100644 --- a/_sass/_page.scss +++ b/_sass/_page.scss @@ -300,6 +300,11 @@ text-transform: uppercase; } +.page__comments-form { + padding: 1em; + background: $lighter-gray; +} + .comment { margin: 2em 0;