diff --git a/_includes/tm/index-xdefallo.html b/_includes/tm/index-xdefallo.html new file mode 100644 index 0000000..d2ec674 --- /dev/null +++ b/_includes/tm/index-xdefallo.html @@ -0,0 +1,18 @@ + + +{% assign xtm = include.xtm %} +{% assign h_1sx = include.initiale_html_hN %} +{% assign h_2sx = h_1sx | plus: 1 %} +{% assign h_3sx = h_2sx | plus: 1 %} + +{% assign h1sx = h_1sx | prepend: 'h' %} +{% assign h2sx = h_2sx | prepend: 'h' %} +{% assign h3sx = h_3sx | prepend: 'h' %} + +{% _🗣️ opus_in_progressu_emoji_nomen 🗣_️ %} + +{% for rem in xtm.alternativum %} +
+ {% include tm/item.html tm=rem initiale_html_hN=h_3sx multiplum_linguam=true %} +
+{% endfor %} diff --git a/_includes/tm/index.html b/_includes/tm/index.html new file mode 100644 index 0000000..dfdb34b --- /dev/null +++ b/_includes/tm/index.html @@ -0,0 +1,58 @@ + + +{% assign h_1sx = include.initiale_html_hN %} +{% assign h_2sx = h_1sx | plus: 1 %} +{% assign h_3sx = h_2sx | plus: 1 %} + +{% assign h1sx = h_1sx | prepend: 'h' %} +{% assign h2sx = h_2sx | prepend: 'h' %} +{% assign h3sx = h_3sx | prepend: 'h' %} + +{% for xschemam_global in site.data.hapi.xschemam %} + {% if xschemam_global.collectionem_xschemam[0] %} +
+ <{{ h1sx }} id="{% _🗣️ 🔎🔕🔍 Hapi_schemam_slug 🔎🔕🔍 🗣️_ %}--{{ xschemam_global.gid }}"> + {{ xschemam_global.nomen }} + + + {% for xschemam in xschemam_global.collectionem_xschemam %} + + {%- if xschemam.alternativum_linguam contains page.linguam and page.linguam != 'mul-Zyyy' -%} + {% assign rem = xschemam.alternativum | where: 'linguam', page.linguam | first %} +
+ {% include schemam/item.html schemam=rem initiale_html_hN=h_2sx multiplum_linguam=false %} +
+ + {%- else -%} + +
+ <{{ h2sx }} id="{% _🗣️ 🔎🔕🔍 Hapi_schemam_slug 🔎🔕🔍 🗣️_ %}--{{ xschemam.lid | slugify }}"> + 🔗 + {{ xschemam.lid }} + + + {% unless page.linguam == 'mul-Zyyy' %} +

+ _[por] TODO: Sem idioma disponível. Apresentando todas as opções. [por]_ +

+ {% endunless %} + + {% for rem in xschemam.alternativum %} + {% comment %} {% if api_alt.url == xapi.url %} + {% continue %} + {% endif %} {% endcomment %} + +
+ {% include schemam/item.html schemam=rem initiale_html_hN=h_3sx multiplum_linguam=true %} +
+ + {% endfor %} + +
+ + {%- endif -%} + + {% endfor %} +
+ {% endif %} +{% endfor %} diff --git a/_includes/tm/item.html b/_includes/tm/item.html new file mode 100644 index 0000000..d57aef6 --- /dev/null +++ b/_includes/tm/item.html @@ -0,0 +1,76 @@ + +{% assign schemam = include.schemam %} +{% assign multiplum_linguam = include.multiplum_linguam %} + +{% assign h_1 = include.initiale_html_hN %} +{% assign h_2 = h_1 | plus: 1 %} +{% assign h_3 = h_2 | plus: 1 %} +{% assign h_4 = h_3 | plus: 1 %} +{% assign h1 = h_1 | prepend: 'h' %} +{% assign h2 = h_2 | prepend: 'h' %} +{% assign h3 = h_3 | prepend: 'h' %} +{% assign h4 = h_4 | prepend: 'h' %} + +
+
+ 🗣{{ schemam.linguam }}🗣 + {% if schemam.opus_in_progressu %} + {% _🗣️ opus_in_progressu_emoji_nomen 🗣️_ %} + {% endif %} +
+
+ + <{{ h1 }} class="card-title" id="{{ schemam.url | slugify }}" > + {% if multiplum_linguam %} + {{ schemam.linguam }} - {{ schemam.nomen }} + {% else -%} + {{ schemam.nomen }} + {%- endif -%} + + +

+ {{ schemam.summarius }} +

+ + + {% _🗣️ abbreviationem_XZ_URL_canonicum_nomen 🗣️_ %} + + + {%- if schemam.datum.archivum %} + + {%- if schemam.datum.archivum.schemam.graphql %} + {% for rem in schemam.datum.archivum.schemam.graphql %} + + {% _🗣️ graphql_schemam_nomen 🗣️_ %} + + {%- endfor %} + {% endif %} + + {%- if schemam.datum.archivum.schemam.json %} + {% for rem in schemam.datum.archivum.schemam.json %} + + {% _🗣️ json_schemam_nomen 🗣️_ %} + + {%- endfor %} + {% endif %} + + {%- if schemam.datum.archivum.schemam.sql %} + {% for rem in schemam.datum.archivum.schemam.sql %} + + {% _🗣️ SQL_abbreviationem_nomen 🗣️_ %} + + {%- endfor %} + {% endif %} + + {% endif %} + +
+ +
+ diff --git a/_layouts/xtm.html b/_layouts/xtm.html index 0e55b3e..0dbe447 100644 --- a/_layouts/xtm.html +++ b/_layouts/xtm.html @@ -13,5 +13,5 @@ {% include xdefallo-linguam-notitia.html %} -{% include schemam/index-xdefallo.html xschemam=page initiale_html_hN=2 %} +{% include tm/index-xdefallo.html xtm=page initiale_html_hN=2 %} diff --git a/_plugins/hapi/hic_sunt_dracones.rb b/_plugins/hapi/hic_sunt_dracones.rb index e47ad17..50e89d5 100644 --- a/_plugins/hapi/hic_sunt_dracones.rb +++ b/_plugins/hapi/hic_sunt_dracones.rb @@ -50,19 +50,6 @@ module Hapi module HSD # rubocop:disable Metrics/ModuleLength module_function - # # _[eng] Global Anti-pattern of global variable without global variable [eng]_ - # class Site - # include Singleton - - # def jekyll_site - # Jekyll.sites.last - # end - - # def jekyll_data - # Jekyll.sites.last.data - # end - # end - def initiale_after_reset(site) schemam_fontem_path = File.join(site.source, '/_data/schemam.yml') hapi_referens_path = File.join(site.source, '/_data/referens.yml') @@ -210,7 +197,7 @@ def data? Jekyll.sites.last.data end - def l10n_simplex(codicem, linguam) + def l10n_simplex(codicem, _linguam) # puts "TODO: l10n_simplex #{codicem} #{linguam}" codicem diff --git a/_plugins/hapi/paginam/api.rb b/_plugins/hapi/paginam/api.rb index 695d3f9..9889beb 100644 --- a/_plugins/hapi/paginam/api.rb +++ b/_plugins/hapi/paginam/api.rb @@ -17,8 +17,8 @@ # - 'expandendum' # - https://en.wiktionary.org/wiki/expando#Latin module Hapi - # HapiApiGenerator is (TODO: document) - class HapiApiGenerator < Jekyll::Generator + # ApiGenerator is (TODO: document) + class ApiGenerator < Jekyll::Generator safe true def generate(site) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength @@ -53,7 +53,7 @@ def generate(site) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength # _[eng] Subclasse de `Jekyll::Page` com customizações nos métodos [eng]_ # class ApiPaginam < Jekyll::Page class ApiPaginam < Hapi::HapiPaginamCommune - attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :experimentum_est + attr_accessor :datum, :gid, :uid, :experimentum_est # Attributes for Liquid templates ATTRIBUTES_FOR_LIQUID = %w[ @@ -109,16 +109,6 @@ def initialize(site, api_datum, _debug) # rubocop:disable Metrics/AbcSize,Metric @xdefallo_est = !!api_datum['xdefallo_est'] @opus_in_progressu = !!api_datum['opus_in_progressu'] # rubocop:disable Style/DoubleNegation @experimentum_est = api_datum['experimentum_est'] ? true : false - # puts api_datum['opus_in_progressu'] - # puts api_datum - # @trivum = 'teste' - - # Hapi::HapiApiGenerator.quod_datum_api_liquify(site, '/data/api.json') - # HapiApiGenerator.quod_datum_api_liquify(site, '/data/api.json') - - # site.pages.each do |paginam| - # puts JSON.parse(paginam.content) if paginam.url == '/data/api.json' - # end process(name) # read_yaml(PathManager.join(base, dir), name) @@ -159,22 +149,6 @@ def alternativum resultatum end - # # Trivia - # # - 'digitum' - # # - https://en.wiktionary.org/wiki/digitus#Latin - # # - 'signātūrum' - # # - https://en.wiktionary.org/wiki/signaturus#Latin - # def digitum_signaturum - # Utilitatem.digitum_premendum(relative_path) - # end - - # # Trivia - # # - 'gid' - # # - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - # def gid_est?(gid) - # @gid == gid - # end - def html_body_class [ 'paginam-typum-api', @@ -191,20 +165,6 @@ def openapi_filum @datum['jekyll-page']['openapi_filum2'] end - # # @deprecated use experimentum_est - # def opus_in_progressu - # !!@opus_in_progressu - # end - - # # TODO: remove obsolete parts - # def summarius - # unless @datum['jekyll-page'].nil? - # @summarius || @datum['jekyll-page']['summarius'] || 'Nulla summarius. Adiuva me 🥺' - # end - - # @summarius || @datum['summarius'] - # end - # TODO: remove obsolete parts # TODO: Hapi::HapiCommunePaginam.titulum? def titulum @@ -216,27 +176,6 @@ def nomen @titulum || @nomen || @title end - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # def trivium - # @datum - # end - - # _[eng] Returns the object as a debug String [eng]_ - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb - # # . - # def inspect - # # puts 'datum' - # # puts @datum - - # # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" - # "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" - # end - # _[eng] Returns the object as a debug String [eng]_ # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb @@ -248,17 +187,6 @@ def to_s # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" end - - # attr_reader :xdefallo - - # # _[eng] Is this an xdefallo API? [eng]_ - # # _[por] Esta é uma API xdefallo? [por]_ - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # attr_reader :xdefallo_est end end diff --git a/_plugins/hapi/paginam/commune.rb b/_plugins/hapi/paginam/commune.rb index 5c61d82..4dbbbc0 100644 --- a/_plugins/hapi/paginam/commune.rb +++ b/_plugins/hapi/paginam/commune.rb @@ -16,7 +16,8 @@ module Hapi # _[eng] Subclass of `Jekyll::Page` with custom method definitions. [eng]_ # _[eng] Subclasse de `Jekyll::Page` com customizações nos métodos [eng]_ class HapiPaginamCommune < Jekyll::Page # rubocop:disable Metrics/ClassLength - attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :experimentum_est + # attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :experimentum_est + attr_accessor :datum, :gid, :uid, :experimentum_est # Attributes for Liquid templates ATTRIBUTES_FOR_LIQUID = %w[ diff --git a/_plugins/hapi/paginam/schemam.rb b/_plugins/hapi/paginam/schemam.rb index 94e445a..b785968 100644 --- a/_plugins/hapi/paginam/schemam.rb +++ b/_plugins/hapi/paginam/schemam.rb @@ -22,37 +22,18 @@ require 'json' module Hapi - # HapiSchemamGenerator is (TODO: document) - class HapiSchemamGenerator < Jekyll::Generator + # SchemamGenerator is (TODO: document) + class SchemamGenerator < Jekyll::Generator safe true def generate(site) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize @debug_all = false - # unless site.data['l10n']['apil10n'] && site.data['l10n']['referensl10n'] - # puts "\n\n\t[🔎ℹ️ #{self.class.name}:#{__LINE__}] requīrendum: 'bundle exec jekyll build' !!!" - # return nil - # end - unless site.data['l10n']['schemaml10n'] && site.data['l10n']['referensl10n'] puts "\n\n\t[🔎ℹ️ #{self.class.name}:#{__LINE__}] requīrendum: 'bundle exec jekyll build' !!!" return nil end - # # @apis = Utilitatem.expandendum_api_datum(site.data['api'], site.data['referens']) - # @apis = Utilitatem.expandendum_api_datum( - # site.data['l10n']['apil10n'], - # site.data['l10n']['referensl10n'] - # ) - # # puts 'oooooi' - # # _[eng] We override site.data.api [eng]_ - # # _[por] Sobrescrevemos o site.data.api [por]_ - # site.data['api'] = @apis - - # site.data['api'].each do |api_datum| - # @debug_est = @debug_all or api_datum['debug'] - # site.pages << SchemamPaginam.new(site, api_datum, @debug_est) - # end schemam_collectionem = site.data['l10n']['schemaml10n'] schemam_collectionem.each do |item| @@ -106,15 +87,13 @@ def initialize(site, archivum, schemam) # rubocop:disable Metrics/MethodLength,L end end - # require_relative './hapi/commune_paginam' - # require_relative './hapi/paginam/commune' require_relative './commune' # _[eng] Subclass of `Hapi::HapiCommunePaginam` with custom method definitions. [eng]_ # _[eng] Subclasse de `Hapi::HapiCommunePaginam` com customizações nos métodos [eng]_ # class SchemamPaginam < Jekyll::Page class SchemamPaginam < Hapi::HapiPaginamCommune - attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :experimentum_est + attr_accessor :datum, :gid, :uid, :experimentum_est # Attributes for Liquid templates ATTRIBUTES_FOR_LIQUID = %w[ @@ -219,30 +198,6 @@ def alternativum resultatum end - # # Trivia - # # - 'digitum' - # # - https://en.wiktionary.org/wiki/digitus#Latin - # # - 'signātūrum' - # # - https://en.wiktionary.org/wiki/signaturus#Latin - # def digitum_signaturum - # Utilitatem.digitum_premendum(relative_path) - # end - - # # Trivia - # # - 'dēscrīptiōnem' - # # - https://en.wiktionary.org/wiki/descriptio#Latin - # def descriptionem - # @datum['summarius'] - # end - - # # Trivia - # # - 'gid' - # # - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - # def gid_est?(gid) - # # puts "gid_est?(gid) #{@gid} #{gid}" - # @gid == gid - # end - def html_body_class [ 'paginam-typum-schemam', @@ -250,46 +205,6 @@ def html_body_class ] end - # def hreflang - # return 'x-default' if @xdefallo_est - - # # TODO: _[eng] maybe initialize this once instead of recalculate [eng]_ - - # site_data = Hapi::HSD.data? - - # Hapi::Utilitatem.linguam_to_html_lang(linguam, site_data['referens']) - # end - - # def keys - # ATTRIBUTES_FOR_LIQUID - # end - - # def linguam - # @datum['linguam'] - # end - - # def nomen - # @datum['nomen'] - # end - - # def openapi_filum - # # @datum['jekyll-page']['openapi_filum2'] || 'Nulla openapi filum. Adiuva me 🥺' - # @datum['jekyll-page']['openapi_filum2'] - # end - - # def opus_in_progressu - # !!@opus_in_progressu - # end - - # # TODO: remove obsolete parts - # def summarius - # unless @datum['jekyll-page'].nil? - # @summarius || @datum['jekyll-page']['summarius'] || 'Nulla summarius. Adiuva me 🥺' - # end - - # @summarius || @datum['summarius'] - # end - def tags # @see Utilitatem.tags_de_api [ @@ -300,6 +215,7 @@ def tags end # TODO: remove obsolete parts + # TODO: Hapi::HapiPaginamCommune.titulum? def titulum # {% _🗣️ schemam_datum_nomen 🗣️_ %}: {{ schemam.nomen }} prefix = Hapi::HSD.l10n_simplex('schemam_datum_nomen', linguam) @@ -308,32 +224,6 @@ def titulum "#{prefix} : #{nomen}" end - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # def trivium - # Hapi::Utilitatem.digitum_premendum(@xdefallo) - # # @datum - # end - - # _[eng] Returns the object as a debug String [eng]_ - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb - # # . - # def inspect - # # puts 'datum' - # # puts @datum - - # # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" - # "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" - # end - - # def slug - # @datum['lid'] - # end - # _[eng] Returns the object as a debug String [eng]_ # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb @@ -345,17 +235,6 @@ def to_s # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" end - - # attr_reader :xdefallo - - # # _[eng] Is this an xdefallo API? [eng]_ - # # _[por] Esta é uma API xdefallo? [por]_ - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # attr_reader :xdefallo_est end end diff --git a/_plugins/hapi/paginam/tm.rb b/_plugins/hapi/paginam/tm.rb index ed3b668..8e9fb04 100644 --- a/_plugins/hapi/paginam/tm.rb +++ b/_plugins/hapi/paginam/tm.rb @@ -16,8 +16,8 @@ # - 'memoriam' # - https://en.wiktionary.org/wiki/memoria#Latin module Hapi - # HapiTranslationemMemoriamGenerator is (TODO: document) - class HapiTranslationemMemoriamGenerator < Jekyll::Generator + # TranslationemMemoriamGenerator is (TODO: document) + class TranslationemMemoriamGenerator < Jekyll::Generator safe true def generate(site) @@ -151,83 +151,19 @@ def alternativum resultatum end - # # Trivia - # # - 'digitum' - # # - https://en.wiktionary.org/wiki/digitus#Latin - # # - 'signātūrum' - # # - https://en.wiktionary.org/wiki/signaturus#Latin - # def digitum_signaturum - # Utilitatem.digitum_premendum(relative_path) - # end - - # # Trivia - # # - 'dēscrīptiōnem' - # # - https://en.wiktionary.org/wiki/descriptio#Latin - # def descriptionem - # @datum['summarius'] - # end - - # # Trivia - # # - 'gid' - # # - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - # def gid_est?(gid) - # # puts "gid_est?(gid) #{@gid} #{gid}" - # @gid == gid - # end - def html_body_class [ - 'paginam-typum-schemam', + 'paginam-typum-tm', "paginam-linguam-#{@datum['linguam']}" ] end - # def hreflang - # return 'x-default' if @xdefallo_est - - # # TODO: _[eng] maybe initialize this once instead of recalculate [eng]_ - - # site_data = Hapi::HSD.data? - - # Hapi::Utilitatem.linguam_to_html_lang(linguam, site_data['referens']) - # end - - # def keys - # ATTRIBUTES_FOR_LIQUID - # end - - # def linguam - # @datum['linguam'] - # end - - # def nomen - # @datum['nomen'] - # end - - # def openapi_filum - # # @datum['jekyll-page']['openapi_filum2'] || 'Nulla openapi filum. Adiuva me 🥺' - # @datum['jekyll-page']['openapi_filum2'] - # end - - # def opus_in_progressu - # !!@opus_in_progressu - # end - - # # TODO: remove obsolete parts - # def summarius - # unless @datum['jekyll-page'].nil? - # @summarius || @datum['jekyll-page']['summarius'] || 'Nulla summarius. Adiuva me 🥺' - # end - - # @summarius || @datum['summarius'] - # end - def tags # @see Utilitatem.tags_de_api [ - 'schemam', - "schemam-linguam-#{linguam}", - "schemam-trivium-#{trivium}" + 'tm', + "tm-linguam-#{linguam}", + "tm-trivium-#{trivium}" ] end @@ -240,32 +176,6 @@ def titulum "#{prefix} : #{nomen}" end - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # def trivium - # Hapi::Utilitatem.digitum_premendum(@xdefallo) - # # @datum - # end - - # _[eng] Returns the object as a debug String [eng]_ - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb - # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb - # # . - # def inspect - # # puts 'datum' - # # puts @datum - - # # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" - # "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" - # end - - # def slug - # @datum['lid'] - # end - # _[eng] Returns the object as a debug String [eng]_ # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/collection.rb # @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/page.rb @@ -277,17 +187,6 @@ def to_s # "#<#{self.class} @relative_path=#{relative_path.inspect} xdefallo=#{@trivum}>" "#<#{self.class} @uid=#{@uid} xdefallo=#{@xdefallo}>" end - - # attr_reader :xdefallo - - # # _[eng] Is this an xdefallo API? [eng]_ - # # _[por] Esta é uma API xdefallo? [por]_ - # # Trivia - # # - 'trivium' - # # - https://en.wiktionary.org/wiki/trivium#Latin - # # - 'xdefallo' - # # - https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages - # attr_reader :xdefallo_est end end