diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..9d8d516 --- /dev/null +++ b/.babelrc @@ -0,0 +1 @@ +{ "presets": ["es2015"] } diff --git a/.gitignore b/.gitignore index 5c91b60..f200cea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ -_site/ -.sass-cache/ +_site +.sass-cache .jekyll-metadata +_config.dev.yml +node_modules +*.map diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8b98567 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: ruby +rvm: + - 2.1 + +script: bundle exec jekyll build --destination _site/jkan && bundle exec htmlproof ./_site --disable-external --allow-hash-href + +branches: + only: + - gh-pages + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c7fad03 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +Please see the [Architecture](https://github.com/timwis/jkan/wiki/Architecture) page in the wiki. diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..d8777ee --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "jekyll" +gem "html-proofer" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..eae32db --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,92 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.2.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + colorator (1.1.0) + colorize (0.8.1) + concurrent-ruby (1.0.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + ethon (0.11.0) + ffi (>= 1.3.0) + eventmachine (1.2.6) + ffi (1.9.23) + forwardable-extended (2.6.0) + html-proofer (3.8.0) + activesupport (>= 4.2, < 6.0) + addressable (~> 2.3) + colorize (~> 0.8) + mercenary (~> 0.3.2) + nokogiri (~> 1.8.1) + parallel (~> 1.3) + typhoeus (~> 1.3) + yell (~> 2.0) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.8.1) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-watch (2.0.0) + listen (~> 3.0) + kramdown (1.16.2) + liquid (4.0.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + mercenary (0.3.6) + mini_portile2 (2.3.0) + minitest (5.11.3) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) + parallel (1.12.1) + pathutil (0.16.1) + forwardable-extended (~> 2.6) + public_suffix (3.0.2) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rouge (3.1.1) + ruby_dep (1.5.0) + safe_yaml (1.0.4) + sass (3.5.6) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + thread_safe (0.3.6) + typhoeus (1.3.0) + ethon (>= 0.9.0) + tzinfo (1.2.5) + thread_safe (~> 0.1) + yell (2.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + html-proofer + jekyll + +BUNDLED WITH + 1.16.1 diff --git a/LICENSE b/LICENSE index 94a9ed0..d109cda 100644 --- a/LICENSE +++ b/LICENSE @@ -79,7 +79,7 @@ works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. +"recipients" may be individuals or periods. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an @@ -451,8 +451,8 @@ propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered +period, or substantially all assets of one, or subdividing an +period, or merging periods. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could diff --git a/_config.yml b/_config.yml index 2f7efbe..8b0d252 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1,88 @@ -theme: jekyll-theme-minimal \ No newline at end of file +title: CASI +greeting: Welcome to JKAN +description: Centro Acadêmico de Sistemas de Informação +baseurl: /jkan +logo: /img/jkan.png + +# Site theme +jkan_theme: Default + +# Authentication +github_client_id: +gatekeeper_host: + +# Subject schema +schema: default + +# Nav bar +navigation: + - title: Subjects + url: /subjects/ + - title: Periods + url: /periods/ + +# Collections +collections: + subjects: + output: true + permalink: /subjects/:path/ + periods: + output: true + permalink: /periods/:path/ + +# Collections (cont'd) +defaults: + - scope: + path: "" + type: subjects + values: + layout: subject + category: Uncategorized + period: N/A + - scope: + path: "" + type: periods + values: + layout: period + +# Markdown settings +markdown: kramdown +kramdown: + input: GFM + +# Google Analytics +google_analytics: + enabled: false + code: "UA-XXXXXX-1" + +# US Digital Analytics Program - https://analytics.usa.gov +digital_analytics_program: + enabled: false + agency: "" + subagency: "" + +# Hypothesis.io - Annotator +hypothesis: + enabled: false + +# Twitter +twittercard: + enabled: false + username: "@" + +# Open Graph +opengraph: + enabled: true + +# Exclude these files from the build +exclude: + - Gemfile + - Gemfile.lock + - vendor + - .travis.yml + - node_modules + - scripts/src + - package.json + - webpack.config.js + - README.md + - LICENSE diff --git a/_data/categories.yml b/_data/categories.yml new file mode 100644 index 0000000..912f2c1 --- /dev/null +++ b/_data/categories.yml @@ -0,0 +1,52 @@ +- name: Programação + logo: /img/categories/arts-culture-history.svg + featured: true +- name: Budget / Finance + logo: /img/categories/budget-finance.svg + logo_credit: Renan Ferreira Santos from the Noun Project + featured: true +- name: Economy + logo: /img/categories/economy.svg + logo_credit: Vectors Market from the Noun Project + featured: true +- name: Education + logo: /img/categories/education.svg + logo_credit: Sergey Patutin from the Noun Project + featured: true +- name: Elections / Politics + logo: /img/categories/elections-politics.svg + logo_credit: Jean Soo from the Noun Project + featured: true +- name: Environment + logo: /img/categories/environment.svg + featured: true +- name: Food + logo: /img/categories/food.svg + logo_credit: Creative Stall from the Noun Project + featured: true +- name: Health / Human Services + logo: /img/categories/health-human-services.svg + logo_credit: Timothy Miller from the Noun Project + featured: true +- name: Parks / Recreation + logo: /img/categories/parks-recreation.svg + logo_credit: Pipe Rosas Licht from the Noun Project + featured: true +- name: Planning / Zoning + logo: /img/categories/planning-zoning.svg + featured: true +- name: Public Safety + logo: /img/categories/public-safety.svg + logo_credit: Rohith M S from the Noun Project + featured: true +- name: Real Estate / Land Records + logo: /img/categories/real-estate-land-records.svg + featured: true +- name: Transportation + logo: /img/categories/transportation.svg + logo_credit: Dmitry Baranovskiy from the Noun Project + featured: true +- name: Uncategorized + logo: /img/categories/uncategorized.svg + logo_credit: Edward Boatman from the Noun Project + featured: true diff --git a/_data/licenses.yml b/_data/licenses.yml new file mode 100644 index 0000000..e2b89b3 --- /dev/null +++ b/_data/licenses.yml @@ -0,0 +1,8 @@ +'https://creativecommons.org/licenses/by/4.0/': Creative Commons Attribution +'https://creativecommons.org/licenses/by-sa/4.0/': Creative Commons Attribution Share-Alike +'https://creativecommons.org/publicdomain/zero/1.0/': Creative Commons CCZero +'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/': UK Open Government Licence +'http://www.opendefinition.org/licenses/odc-by': Open Data Commons Attribution License +'http://www.opendefinition.org/licenses/odc-odbl': Open Data Commons Open Database License (ODbL) +'http://www.opendefinition.org/licenses/odc-pddl': Open Data Commons Public Domain Dedication and Licence (PDDL) +'': Not Applicable diff --git a/_data/schemas/default.yml b/_data/schemas/default.yml new file mode 100644 index 0000000..ac859cb --- /dev/null +++ b/_data/schemas/default.yml @@ -0,0 +1,81 @@ +# To add fields, make a new schema file in this directory +# and change the schema setting in _config.yml to its name +subject_fields: + - field_name: title + label: Nome da Disciplina + datajson: title + - field_name: code + label: Código da Disciplina + datajson: publisher.name + - field_name: notes + label: Ementa + form_template: form/textarea.html + datajson: description + - field_name: category + label: Category + form_template: form/category.html + display_template: display/category.html + +resource_fields: + - field_name: name + label: Nome do Material Complementar + datajson: distribution.title + - field_name: code + label: Código da Disciplina + - field_name: format + label: Formato + datajson: distribution.format + form_template: form/dropdown.html + values: + - Documento + - Slides + - Exercícios + - Imagem + - Tabela + - Infografico + - Dataset + + +period_fields: + - field_name: title + label: Title + - field_name: description + label: Description + - field_name: logo + label: Logo + + +associated_field: + - field_name: name + label: Nome do Associado + - field_name: enrollment + label: Número de Matrícula (com ER/EF/EV) + - field_name: facebook + label: Link do Facebook + + +challenges_field: + - field_name: name + label: Nome do Desafio + - field_name: sponsor + label: Patrcínador + - field_name: awards + label: Premiação + - field_name: difficulty + label: Dificuldade + - field_name: description + label: Descrição + - field_name: url + label: URL + + +category_fields: + - field_name: name + label: Nome da Categoria + - field_name: logo + label: Logo + - field_name: logo_credit + label: Logo Credit + - field_name: featured + label: Destaque na Home + form_template: form/checkbox.html diff --git a/_data/themes.yml b/_data/themes.yml new file mode 100644 index 0000000..ec9f494 --- /dev/null +++ b/_data/themes.yml @@ -0,0 +1,45 @@ +- name: Default + logo: /img/themes/default.png + src: '' +- name: Cerulean + logo: /img/themes/cerulean.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/cerulean/bootstrap.min.css +- name: Cosmo + logo: /img/themes/cosmo.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/cosmo/bootstrap.min.css +- name: Cyborg + logo: /img/themes/cyborg.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/cyborg/bootstrap.min.css +- name: Darkly + logo: /img/themes/darkly.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/darkly/bootstrap.min.css +- name: Flatly + logo: /img/themes/flatly.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css +- name: Journal + logo: /img/themes/journal.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/journal/bootstrap.min.css +- name: Lumen + logo: /img/themes/lumen.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/lumen/bootstrap.min.css +- name: Paper + logo: /img/themes/paper.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/paper/bootstrap.min.css +- name: Readable + logo: /img/themes/readable.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/readable/bootstrap.min.css +- name: Sandstone + logo: /img/themes/sandstone.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/sandstone/bootstrap.min.css +- name: Simplex + logo: /img/themes/simplex.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/simplex/bootstrap.min.css +- name: Slate + logo: /img/themes/slate.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/slate/bootstrap.min.css +- name: Spacelab + logo: /img/themes/spacelab.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/spacelab/bootstrap.min.css +- name: Superhero + logo: /img/themes/superhero.png + src: https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/superhero/bootstrap.min.css diff --git a/_includes/addons/google-analytics.html b/_includes/addons/google-analytics.html new file mode 100644 index 0000000..3a7d40a --- /dev/null +++ b/_includes/addons/google-analytics.html @@ -0,0 +1,9 @@ + diff --git a/_includes/addons/opengraph.html b/_includes/addons/opengraph.html new file mode 100644 index 0000000..67a30cb --- /dev/null +++ b/_includes/addons/opengraph.html @@ -0,0 +1,7 @@ + + +{% assign description = page.notes | default: site.description %} + + + + diff --git a/_includes/addons/twittercard.html b/_includes/addons/twittercard.html new file mode 100644 index 0000000..d44a196 --- /dev/null +++ b/_includes/addons/twittercard.html @@ -0,0 +1,9 @@ + + + +{% capture title %}{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}{% endcapture %} + + +{% assign description = page.notes | default: site.description %} + + diff --git a/_includes/admin-form-category.html b/_includes/admin-form-category.html new file mode 100644 index 0000000..3b96d6f --- /dev/null +++ b/_includes/admin-form-category.html @@ -0,0 +1,11 @@ +
{{ page.notes }}
+ +{{ field.label }} | +{{ value }} | +
---|
License | ++ + {{ site.data.licenses[page.license] }} + + | +
---|---|
{{ field.label }} | +{{ value }} | +
-1}function fn(t,e){var n=this.__data__,r=Bn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e h))return!1;var d=l.get(t);if(d&&l.get(e))return d==e;var v=-1,g=!0,y=n&u?new i:void 0;for(l.set(t,e),l.set(e,t);++v 0&&c--,40==n.which&&c'+t.title+"
\n "+(t.notes||"")+"\n