Skip to content

Commit

Permalink
add icons
Browse files Browse the repository at this point in the history
  • Loading branch information
tcrapts-ictu committed Dec 6, 2022
1 parent d299f99 commit 3e10729
Show file tree
Hide file tree
Showing 108 changed files with 953 additions and 85 deletions.
67 changes: 67 additions & 0 deletions backend/misc/parse-css.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"import urllib.request\n",
"import ssl\n",
"\n",
"lines = []\n",
"with open('../../frontend/assets/styles/_koop_index.scss') as f:\n",
" lines = f.readlines()\n",
"\n",
"with open('../../frontend/assets/styles/_koop_main.scss') as f:\n",
" lines = lines + f.readlines() \n",
"\n",
"def get_path_from_string(x):\n",
" start_char = x.find('/icon-') + 1\n",
" end_char = x.find('.svg') + 4\n",
" return x[start_char:end_char]\n",
"\n",
"list = [l.split(\" \") for l in lines if 'icon-' in l]\n",
"flat_list = [item for sublist in list for item in sublist if '/theme-iconsicon-' in item]\n",
"parsed_icons = [get_path_from_string(x) for x in flat_list]\n",
"\n",
"parsed_icons\n",
"\n",
"base_url = \"http://componenten.overheid.nl/images\"\n",
"\n",
"ssl._create_default_https_context = ssl._create_unverified_context\n",
"\n",
"for icon in parsed_icons:\n",
" url = f\"{base_url}/{icon}\"\n",
" urllib.request.urlretrieve(url, f\"../../frontend/assets/images/icons/{icon}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.11.0 ('.venv': poetry)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "2c68b73ee4a8a00702303c18fd5a9e80181e768c01411da6970ac8482f024551"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
3 changes: 3 additions & 0 deletions frontend/assets/images/icons/icon-24-lock-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/assets/images/icons/icon-64-family.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/assets/images/icons/icon-64-finance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/assets/images/icons/icon-64-kids.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/assets/images/icons/icon-64-living.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3e10729

Please sign in to comment.