Skip to content

Commit

Permalink
Merge pull request #425 from smth/2019-update
Browse files Browse the repository at this point in the history
2019 update
  • Loading branch information
roll committed Dec 3, 2019
2 parents 0b369e9 + ce83791 commit 628ecaa
Show file tree
Hide file tree
Showing 188 changed files with 7,170 additions and 13,038 deletions.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ node_modules
media
staticfiles

# Packages installed by bower
static/vendor/

# Extra
logfile
.projectile
Expand Down
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ install:
- npm install
- pip install -r requirements.dev.txt
- pip install coveralls
before_script:
- npm install -g bower
- bower install
script:
- coverage run manage.py test
- flake8 .
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ COPY sendemail ./sendemail
COPY static ./static
COPY templates ./templates
COPY tools ./tools
COPY .bowerrc .
COPY bower.json .
COPY manage.py .
COPY package-lock.json .
COPY package.json .
Expand All @@ -24,14 +22,12 @@ COPY requirements.txt .
RUN pip install -r requirements.txt
RUN . /root/.nvm/nvm.sh && nvm install 10
RUN . /root/.nvm/nvm.sh && nvm use 10
RUN . /root/.nvm/nvm.sh && npm install -g bower
RUN . /root/.nvm/nvm.sh && bower install --allow-root

ENV PORT 80
EXPOSE $PORT

CMD python manage.py migrate && \
python manage.py update_index && \
gunicorn foundation.wsgi:application \
--access-logfile '-' \
gunicorn foundation.wsgi:application \
--access-logfile '-' \
--error-logfile '-'
44 changes: 42 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
module.exports = function(grunt) {

const sass = require('node-sass');

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

sass: {
options: {
implementation: sass,
sourceMap: true
},
dist: {
files: [{
expand: true,
cwd: 'static/scss',
cwd: 'src/scss',
src: ['*.scss'],
dest: 'static/css',
ext: '.css'
Expand All @@ -23,18 +26,53 @@ module.exports = function(grunt) {
options: {
map: true,
processors: [
require('autoprefixer')
require('autoprefixer'),
require('cssnano')
]
},
dist: {
src: 'static/css/*.css'
}
},

shell: {
tokens: {
command: 'npx style-dictionary build',
options: {
execOptions: {
cwd: 'design-tokens'
}
}
}
},

uglify: {
scripts: {
files: {
'static/js/scripts.js': [
'node_modules/jquery/dist/jquery.js',
'node_modules/bootstrap/dist/js/bootstrap.bundle.js',
'node_modules/jquery.mmenu/dist/jquery.mmenu.all.js',
'src/js/dom.js'
]
}
}
},

watch: {
css: {
files: '**/*.scss',
tasks: ['sass', 'postcss:dist']
},

tokens: {
files: 'design-tokens/properties/**/*.json',
tasks: ['shell:tokens']
},

js: {
files: 'src/js/*.js',
tasks: ['uglify']
}
}
});
Expand All @@ -43,6 +81,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.registerTask('default',['watch']);
};
18 changes: 10 additions & 8 deletions article_list_item/templates/article_list_item_plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
<img src="{{ instance.image.url }}" alt="" />
</a>
{% endif %}
<h1>{{ instance.title }}</h1>
{% if instance.description %}
<div class="description">
{{ instance.description|markdown }}
<div class="text">
<h1 class="title">{% if instance.call_to_action_url %}<a class="title_link" href="{{ instance.call_to_action_url }}">{% endif %}{{ instance.title }}{% if instance.call_to_action_url %}</a>{% endif %}</h1>
{% if instance.description %}
<div class="description">
{{ instance.description|markdown }}
</div>
{% endif %}
{% if instance.call_to_action_text %}
<a class="more"{% if instance.call_to_action_url %} href="{{ instance.call_to_action_url }}"{% endif %}>{{ instance.call_to_action_text }}</a>
{% endif %}
</div>
{% endif %}
{% if instance.call_to_action_text %}
<a class="more btn"{% if instance.call_to_action_url %} href="{{ instance.call_to_action_url }}"{% endif %}>{{ instance.call_to_action_text }}</a>
{% endif %}
</div>
</article>
30 changes: 0 additions & 30 deletions bower.json

This file was deleted.

1 change: 1 addition & 0 deletions design-tokens/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions design-tokens/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OKF Design Tokens

Variables for OKF sites, generated with [style-dictionary](https://github.com/amzn/style-dictionary).

```bash
npx style-dictionary build
```
Binary file added design-tokens/assets/fonts/icomoon.eot
Binary file not shown.
18 changes: 18 additions & 0 deletions design-tokens/assets/fonts/icomoon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design-tokens/assets/fonts/icomoon.ttf
Binary file not shown.
Binary file added design-tokens/assets/fonts/icomoon.woff
Binary file not shown.
1 change: 1 addition & 0 deletions design-tokens/assets/fonts/selection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M128 337.963l359.552 251.691c14.507 10.027 33.92 10.496 48.939 0l359.509-251.691v430.037c0 11.605-4.693 22.229-12.587 30.080s-18.475 12.587-30.080 12.587h-682.667c-11.605 0-22.229-4.693-30.080-12.587s-12.587-18.475-12.587-30.080zM42.667 256.512v511.488c0 35.328 14.507 67.371 37.547 90.453s55.125 37.547 90.453 37.547h682.667c35.328 0 67.371-14.507 90.453-37.547s37.547-55.125 37.547-90.453v-511.488c0-0.427 0-0.853 0-1.28-0.213-35.029-14.635-66.773-37.547-89.685-23.083-23.040-55.125-37.547-90.453-37.547h-682.667c-35.328 0-67.371 14.507-90.453 37.547-22.912 22.912-37.333 54.656-37.547 89.728 0 0.213 0 0.469 0 0.725zM891.477 236.971l-379.477 265.6-379.477-265.6c2.048-4.096 4.779-7.808 8.021-11.051 7.893-7.893 18.517-12.587 30.123-12.587h682.667c11.605 0 22.229 4.693 30.080 12.587 3.243 3.243 5.973 6.997 8.021 11.051z"],"attrs":[],"isMulticolor":false,"isMulticolor2":false,"tags":["mail"],"grid":24},"attrs":[],"properties":{"id":147,"order":7,"prevSize":24,"code":59650,"name":"mail"},"setIdx":0,"setId":3,"iconIdx":146},{"icon":{"paths":["M938.667 426.667c0-117.803-47.787-224.555-124.971-301.696s-183.893-124.971-301.696-124.971-224.555 47.787-301.696 124.971-124.971 183.893-124.971 301.696c0 24.277 2.261 48.128 6.4 71.509 11.691 66.048 38.357 128.171 71.765 184.32 116.565 195.883 324.821 334.336 324.821 334.336 14.123 9.259 32.64 9.771 47.317 0 0 0 208.299-138.453 324.821-334.336 33.408-56.149 60.075-118.272 71.765-184.32 4.181-23.381 6.443-47.232 6.443-71.509zM853.333 426.667c0 18.944-1.749 37.845-5.077 56.661-9.429 53.333-31.445 105.728-61.099 155.563-83.285 139.947-220.416 249.643-275.157 290.091-54.784-40.448-191.872-150.144-275.157-290.091-29.653-49.835-51.669-102.229-61.099-155.563-3.328-18.816-5.077-37.717-5.077-56.661 0-94.251 38.144-179.541 99.968-241.365s147.115-99.968 241.365-99.968 179.541 38.144 241.365 99.968 99.968 147.115 99.968 241.365zM682.667 426.667c0-47.104-19.157-89.856-50.005-120.661s-73.557-50.005-120.661-50.005-89.856 19.157-120.661 50.005-50.005 73.557-50.005 120.661 19.157 89.856 50.005 120.661 73.557 50.005 120.661 50.005 89.856-19.157 120.661-50.005 50.005-73.557 50.005-120.661zM597.333 426.667c0 23.595-9.515 44.843-25.003 60.331s-36.736 25.003-60.331 25.003-44.843-9.515-60.331-25.003-25.003-36.736-25.003-60.331 9.515-44.843 25.003-60.331 36.736-25.003 60.331-25.003 44.843 9.515 60.331 25.003 25.003 36.736 25.003 60.331z"],"attrs":[],"isMulticolor":false,"isMulticolor2":false,"tags":["map-pin"],"grid":24},"attrs":[],"properties":{"id":148,"order":8,"prevSize":24,"code":59651,"name":"map-pin"},"setIdx":0,"setId":3,"iconIdx":147},{"icon":{"paths":["M128 554.667h768c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667h-768c-23.552 0-42.667 19.115-42.667 42.667s19.115 42.667 42.667 42.667zM128 298.667h768c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667h-768c-23.552 0-42.667 19.115-42.667 42.667s19.115 42.667 42.667 42.667zM128 810.667h768c23.552 0 42.667-19.115 42.667-42.667s-19.115-42.667-42.667-42.667h-768c-23.552 0-42.667 19.115-42.667 42.667s19.115 42.667 42.667 42.667z"],"attrs":[],"isMulticolor":false,"isMulticolor2":false,"tags":["menu"],"grid":24},"attrs":[],"properties":{"id":153,"order":5,"prevSize":24,"code":59652,"name":"menu"},"setIdx":0,"setId":3,"iconIdx":152},{"icon":{"paths":["M888.875 224.512c-7.936 10.325-16.683 20.267-26.283 29.696-9.941 9.899-14.805 24.192-11.861 38.741 1.579 7.765 2.56 17.237 2.603 27.051 0 224.256-103.637 382.763-247.893 464.981-112.939 64.384-253.355 83.413-393.472 47.787 53.12-15.403 104.96-39.296 153.301-72.107 6.272-4.224 11.648-10.368 15.019-17.963 9.557-21.547-0.128-46.763-21.675-56.32-118.357-52.608-176.213-125.056-203.477-195.968-17.792-46.251-23.296-93.781-22.187-137.685 0.896-34.603 5.888-66.56 11.861-93.099 16.853 14.592 34.304 30.080 52.736 44.245 87.509 67.285 197.291 105.813 315.563 102.741 23.083-0.64 41.557-19.499 41.557-42.667v-43.136c-0.085-7.637 0.384-15.232 1.451-22.784 4.821-34.389 21.504-66.944 49.579-91.349 30.933-26.923 69.803-38.741 107.776-36.096s74.795 19.755 101.717 50.688c10.752 12.203 27.691 17.749 44.075 12.971 9.856-2.859 19.755-6.101 29.653-9.728zM956.757 93.141c-31.573 22.272-64.981 39.509-97.579 51.413-39.723-35.669-89.216-55.552-139.776-59.093-59.648-4.139-121.003 14.464-169.685 56.832-44.203 38.443-70.485 89.899-78.080 143.872-1.579 11.307-2.347 22.741-2.304 34.133-82.005-6.059-157.611-36.267-219.776-84.096-33.067-25.429-62.336-55.851-86.784-90.24-13.653-19.2-40.277-23.765-59.477-10.112-6.571 4.651-11.392 10.795-14.293 17.451 0 0-5.632 12.757-12.16 32.427-4.779 14.379-10.283 33.067-15.232 55.040-6.955 30.805-12.885 68.352-13.909 109.696-1.323 52.352 5.12 111.445 27.819 170.496 29.141 75.733 83.883 148.395 176.939 205.781-66.944 30.976-138.453 44.331-207.915 41.259-23.552-1.024-43.477 17.195-44.501 40.747-0.725 16.597 8.107 31.403 21.888 39.168 209.28 116.267 444.843 114.261 625.749 11.136 172.416-98.176 290.987-285.867 290.987-539.051-0.043-7.125-0.341-14.080-0.981-20.864 42.923-47.573 71.509-103.637 85.163-161.323 5.419-22.912-8.789-45.909-31.701-51.328-12.373-2.944-24.747-0.128-34.432 6.656z"],"attrs":[],"isMulticolor":false,"isMulticolor2":false,"tags":["twitter"],"grid":24},"attrs":[],"properties":{"id":248,"order":6,"prevSize":24,"code":59653,"name":"twitter"},"setIdx":0,"setId":3,"iconIdx":247},{"icon":{"paths":["M199.68 85.333l738.987 426.667-738.987 426.667zM363.947 369.92v284.16l246.187-142.080z"],"attrs":[{}],"tags":["arrow-right"],"grid":24,"isMulticolor":false,"isMulticolor2":false},"attrs":[{}],"properties":{"order":12,"id":1,"name":"arrow-right","prevSize":24,"code":59673},"setIdx":1,"setId":1,"iconIdx":0},{"icon":{"paths":["M824.32 938.667l-738.987-426.667 738.987-426.667zM413.867 512l246.187 142.080v-284.16z"],"attrs":[{}],"tags":["arrow-left"],"grid":24,"isMulticolor":false,"isMulticolor2":false},"attrs":[{}],"properties":{"order":13,"id":0,"name":"arrow-left","prevSize":24,"code":59674},"setIdx":1,"setId":1,"iconIdx":1},{"icon":{"paths":["M810 274l-238 238 238 238-60 60-238-238-238 238-60-60 238-238-238-238 60-60 238 238 238-238z"],"attrs":[],"isMulticolor":false,"tags":["close"],"grid":24},"attrs":[],"properties":{"order":1,"id":0,"prevSize":24,"code":59648,"name":"close"},"setIdx":1,"setId":1,"iconIdx":2},{"icon":{"paths":["M398.878 170.667c124.75 0 226.251 102.084 226.251 227.556 0 47.25-14.5 92.736-41.945 131.527l-22.277 31.46-31.278 22.375c-38.555 27.611-83.778 42.194-130.75 42.194-124.779 0-226.251-102.084-226.251-227.556s101.474-227.556 226.251-227.556zM398.878 56.889c-187.444 0-339.388 152.82-339.388 341.333s151.945 341.333 339.388 341.333c73.25 0 140.889-23.57 196.334-63.264l272.555 274.124c11.083 11.14 25.584 16.695 40.084 16.695s28.999-5.556 40.055-16.695c22.139-22.254 22.139-58.332 0-80.583l-272.555-274.124c39.472-55.778 62.889-123.819 62.889-197.486 0-188.514-151.945-341.333-339.362-341.333v0z"],"attrs":[],"isMulticolor":false,"tags":["search"],"grid":18},"attrs":[],"properties":{"order":1,"id":0,"prevSize":18,"code":59649,"name":"search"},"setIdx":1,"setId":1,"iconIdx":13}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showCodes":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon"},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"embed":false},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":0,"bgColor":16777215,"name":"icomoon","classSelector":".icon"},"historySize":100,"gridSize":16}}

0 comments on commit 628ecaa

Please sign in to comment.