Skip to content

Commit

Permalink
HXL-CPLP/forum#58, hapi-t9n-alpha (#13), mvp-l10n-schemas (#7): modo …
Browse files Browse the repository at this point in the history
…(potencialmente) temporário de copiar CSS/JS/Imagens para site final
  • Loading branch information
fititnt committed Jun 12, 2021
1 parent 6ee632a commit 2b7a157
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 100 deletions.
11 changes: 11 additions & 0 deletions _assets/css/hapi.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@
* [por]_
*/

/* _[eng] API layoyt; Hide some strange SVG not loading [eng]_ */
.swagger-ui>div>svg {
display: none;
}

.incognitum-phrasim:after, .incognitum-phrasim:before {
content: attr(lang);
color:mediumseagreen;
font-style: italic;
vertical-align: sub;
}
72 changes: 2 additions & 70 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ exclude:
- _data/navigationem.l10n.json
- _data/referens.l10n.json
- _data/schema.l10n.json
- _assets/

keep_files:
- _assets/
- assets

# GitHub pages related
# - https://docs.github.com/en/[email protected]/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll
Expand Down Expand Up @@ -90,74 +92,4 @@ defaults:
values:
sitemap: false

# # @see https://github.com/avillafiorita/jekyll-datapage_gen
# page_gen-dirs: true
# page_gen:
# # referens: api-BR-portais-ckan-brasil
# - data: 'api'
# template: 'api'
# # name: 'title'
# name_expr: "record['uid'].split('/').last"
# # name_expr: "record['slug'] or record['lid']"
# # dir: 'uid'
# # "/mul/api/XZ/HXL-Proxy/".chomp("/mul/api/XZ/HXL-Proxy/".split('/').last + "/")
# # record['uid'].chomp(record['uid'].split('/').last + "/")
# dir_expr: "record['uid'].chomp(record['uid'].split('/').last + '/')"
# # dir_expr: "record['uid']"
# # dir_expr: "record['linguam'] + '/' + record['typum'] + '/' + record['gid']"
# # filter_condition: "record['linguam'] != 'mul'"
# # debug: true

# # - data: 'api'
# # template: 'api'
# # name: 'slug'
# # dir: 'eng/api-TEMP/BR'
# # filter_condition: "record['gid'] == '/api/BR' and record['linguam'] == 'por'"
# # debug: true


# @see https://github.com/envygeeks/jekyll-assets
# > TODO: talvez https://rdyar.github.io/2017/10/01/speed-up-jekyll-by-using-gulp-for-sass-and-other-assets/ (?)

# _config.yml
# assets:
# source_maps: true
# destination: "/assets"
# compression: false
# gzip: false
# defaults:
# integrity:
# {css,img,js}: false
# caching:
# enabled: true
# path: ".jekyll-cache/assets"
# type: file
# # --
# # Assets you wish to always have compiled.
# # This can also be combined with raw_precompile which
# # copies assets without running through the pipeline
# # making them ultra fast.
# # --
# precompile: []
# raw_precompile: [
# #
# ]
# # --
# # baseurl: whether or not to append site.baseurl
# # destination: the folder you store them in on the CDN.
# # url: the CDN url (fqdn, or w/ identifier).
# # --
# cdn:
# baseurl: false
# destination: false
# url: null
# # --
# # See lib/jekyll/assets/config.rb
# # for a list of defaults
# # --
# sources:
# - _assets/css
# - _assets/js
# # plugins:
# # css: { autoprefixer: {}}
# # img: { optim: {}}
19 changes: 2 additions & 17 deletions _includes/meta-caput.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,14 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">

<link rel="stylesheet" href="/assets/css/hapi.css?{{ 'now' | date: '%s' }}">

{% if page.noindex %}<meta name="robots" content="noindex,nofollow">{% endif %}

{% if page.layout contains 'api' or page.openapi_filum != nil %}
<link rel="stylesheet" href="https://unpkg.com/[email protected]/swagger-ui.css"
integrity="sha384-cV2XOZCR++vwjNcnG56raZiJn/a7fw78X9BkQ8S4Rgj5BAI1XfOvAMbRm9KmARdg"
crossorigin="anonymous">

<style>
/* Hide some strange SVG not loading */
.swagger-ui>div>svg {
display: none;
}
</style>
{% endif %}

<!-- TODO: _[por] Mover este CSS para algum arquivo dedicado [por]_ -->
<style>
.incognitum-phrasim:after, .incognitum-phrasim:before {
content: attr(lang);
color:mediumseagreen;
font-style: italic;
vertical-align: sub;
}
</style>

</head>
2 changes: 2 additions & 0 deletions _includes/pedem-mul-Zyyy.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
</ul>
</div>
</footer>

<script type="module" src="/assets/js/hapi-globum.mjs?{{ 'now' | date: '%s' }}"></script>
4 changes: 4 additions & 0 deletions _includes/pedem.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"></script>

<script type="module" src="/assets/js/hapi-globum.mjs?{{ 'now' | date: '%s' }}"></script>

{% if page.layout contains 'api' or page.openapi_filum != nil %}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/swagger-ui-bundle.js"
integrity="sha384-TsNPQoWzG+yZglf0QyR2pSxpd230yWkR9JJPog0+qnOLds0Y7XT8MH1zdUeVI65/"
Expand All @@ -31,4 +33,6 @@
render()
}
</script>

<script type="module" src="/assets/js/hapi-api.mjs?{{ 'now' | date: '%s' }}"></script>
{% endif %}
2 changes: 0 additions & 2 deletions _layouts/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ <h2>{% _🗣️ licentiam_nomen 🗣️_ %}</h2>
{% de_markdown %}{% _🗣️ Hapi_licentiam_Hapi_descriptionem 🗣️_ %}{% endde_markdown %}
</section>

{%- include pedem.html -%}

{%- include peritum-modum/instrumentum-balteum.html -%}
62 changes: 51 additions & 11 deletions _plugins/jekyll_hapi_hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,7 @@

require 'fileutils'

# if !File.file?(File.join(site.dest, '/assets/css/hapi.css')) || \
# (!FileUtils.compare_file(
# File.join(site.dest, '/assets/css/hapi.css'),
# File.join(site.source, '/_assets/css/hapi.css')
# ))
# puts 'jekyll_hapi_hooks: cp _assets/css/hapi.css _site/assets/css/hapi.css'
# FileUtils.cp(
# File.join(site.source, '/_assets/css/hapi.css'),
# File.join(site.dest, '/assets/css/hapi.css')
# )
# end
#### /data/ __________________________________________________________________

if File.file?(File.join(site.dest, '/data/api.l10n.json')) && \
(!File.file?(File.join(site.source, '/_data/l10n/api.l10n.json')) || !FileUtils.compare_file(
Expand Down Expand Up @@ -121,6 +111,56 @@
)
end

#### /assets _________________________________________________________________

if !File.directory?(File.join(site.dest, '/assets/'))
FileUtils.mkdir(File.join(site.dest, '/assets/'))
end
if !File.directory?(File.join(site.dest, '/assets/css'))
FileUtils.mkdir(File.join(site.dest, '/assets/css'))
end
if !File.directory?(File.join(site.dest, '/assets/js'))
FileUtils.mkdir(File.join(site.dest, '/assets/js'))
end

# if !File.file?(File.join(site.dest, '/assets/css/hapi.css'))
if !File.file?(File.join(site.dest, '/assets/css/hapi.css')) || \
(!FileUtils.compare_file(
File.join(site.dest, '/assets/css/hapi.css'),
File.join(site.source, '/_assets/css/hapi.css')
))
puts 'jekyll_hapi_hooks: cp _assets/css/hapi.css _site/assets/css/hapi.css'
FileUtils.cp(
File.join(site.source, '/_assets/css/hapi.css'),
File.join(site.dest, '/assets/css/hapi.css')
)
end

# if !File.file?(File.join(site.dest, '/assets/css/hapi.css'))
if !File.file?(File.join(site.dest, '/assets/js/hapi-api.mjs')) || \
(!FileUtils.compare_file(
File.join(site.dest, '/assets/js/hapi-api.mjs'),
File.join(site.source, '/_assets/js/hapi-api.mjs')
))
puts 'jekyll_hapi_hooks: cp _assets/js/hapi-api.mjs _site/assets/js/hapi-api.mjs'
FileUtils.cp(
File.join(site.source, '/_assets/js/hapi-api.mjs'),
File.join(site.dest, '/assets/js/hapi-api.mjs')
)
end

if !File.file?(File.join(site.dest, '/assets/js/hapi-globum.mjs')) || \
(!FileUtils.compare_file(
File.join(site.dest, '/assets/js/hapi-globum.mjs'),
File.join(site.source, '/_assets/js/hapi-globum.mjs')
))
puts 'jekyll_hapi_hooks: cp _assets/js/hapi-globum.mjs _site/assets/js/hapi-globum.mjs'
FileUtils.cp(
File.join(site.source, '/_assets/js/hapi-globum.mjs'),
File.join(site.dest, '/assets/js/hapi-globum.mjs')
)
end

# puts 'jekyll_hapi_hooks: cp _site/data/api.json _data/api.l10n.json'
# File.write(File.join(site.dest, 'deinsectum.json'), @content)
end
Expand Down
4 changes: 4 additions & 0 deletions documentum/arb-Arab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ translationem_modum: html
# translationem_modum: json
# translationem_modum: strict
translationem_debug: true

# TODO _[eng] Give a hello on https://github.com/mehdisadeghi/jekyll-hinduarabic
# (Emerson Rocha, 2021-06-12 07:46 UTC)
# [eng]_
---

{%- include index-corporeum.html -%}

0 comments on commit 2b7a157

Please sign in to comment.