Skip to content

Commit

Permalink
feat: manage jpg format in logos
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Nov 9, 2023
1 parent 2312cee commit 60bb0f1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions generate_readme.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,13 @@
"active_branch = Repo('.').active_branch.name\n",
"\n",
"def create_logo_cell(tool, logos, active_branch):\n",
" logo_url = \"\"\n",
" tool_logo = tool + '.png'\n",
" if tool_logo in logos:\n",
" logo_url = f\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/{active_branch}/.github/assets/logos/{tool_logo}\"\n",
" logo_src = f'<img width=\"8%\" alt=\"{tool}\" src=\"{logo_url}\" style=\"border-radius: 15%\">'\n",
" else:\n",
" logo_url = f\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/{active_branch}/.github/assets/logos/Naas%20Auth.png\"\n",
" logo_src = f'<img width=\"8%\" alt=\"Naas\" src=\"{logo_url}\" style=\"border-radius: 15%\">'\n",
" logo_url = f\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/{active_branch}/.github/assets/logos/Naas%20Auth.png\"\n",
" logo_src = f'<img width=\"8%\" alt=\"Naas\" src=\"{logo_url}\" style=\"border-radius: 15%\">'\n",
" for x in ['.png', \".jpg\"]:\n",
" tool_logo = tool + x\n",
" if tool_logo in logos:\n",
" logo_url = f\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/{active_branch}/.github/assets/logos/{tool_logo}\"\n",
" logo_src = f'<img width=\"8%\" alt=\"{tool}\" src=\"{logo_url}\" style=\"border-radius: 15%\">' \n",
" return logo_src, logo_url"
]
},
Expand Down Expand Up @@ -756,7 +755,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.9.6"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 60bb0f1

Please sign in to comment.