From dd593d31140a9459c9f2b5a5edaefd72e4dbe130 Mon Sep 17 00:00:00 2001 From: goodboychan Date: Wed, 9 Sep 2020 11:50:57 +0000 Subject: [PATCH] upgrade fastpages --- .github/workflows/ci.yaml | 2 +- .github/workflows/setup.yaml | 2 +- .github/workflows/upgrade.yaml | 4 +-- _action_files/settings.ini | 2 +- _fastpages_docs/version.txt | 2 +- _includes/custom-head.html | 5 ---- _includes/head.html | 2 +- _includes/notebook_binder_link.html | 2 +- _includes/notebook_colab_link.html | 4 +-- _includes/notebook_github_link.html | 4 +-- _sass/minima/fastpages-dracula-highlight.scss | 17 +++++++++--- _sass/minima/fastpages-styles.scss | 26 ++++++++----------- docker-compose.yml | 6 +++++ 13 files changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c013275bb..e9bd68876 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,7 @@ name: CI on: push: branches: - - main # need to filter here so we only deploy when there is a push to master + - master # need to filter here so we only deploy when there is a push to master # no filters on pull requests, so intentionally left blank pull_request: diff --git a/.github/workflows/setup.yaml b/.github/workflows/setup.yaml index 84d5aa484..45a765333 100755 --- a/.github/workflows/setup.yaml +++ b/.github/workflows/setup.yaml @@ -94,6 +94,6 @@ jobs: repo: context.repo.repo, title: 'Initial Setup', head: 'fastpages-automated-setup', - base: 'main', + base: 'master', body: `${contents}` }) diff --git a/.github/workflows/upgrade.yaml b/.github/workflows/upgrade.yaml index 4586bd123..62b57e318 100644 --- a/.github/workflows/upgrade.yaml +++ b/.github/workflows/upgrade.yaml @@ -190,7 +190,7 @@ jobs: git checkout -b fastpages-automated-upgrade git add -A git commit -m'upgrade fastpages' - git push -f --set-upstream origin fastpages-automated-upgrade main + git push -f --set-upstream origin fastpages-automated-upgrade master env: GH_USERNAME: ${{ github.event.issue.user.login }} @@ -208,7 +208,7 @@ jobs: repo: context.repo.repo, title: '[fastpages] Update repo with changes from fastpages', head: 'fastpages-automated-upgrade', - base: 'main', + base: 'master', body: `${contents}` }) .then(result => console.log(`::set-output name=pr_num::${result.data.number}`)) diff --git a/_action_files/settings.ini b/_action_files/settings.ini index 2af36335a..c7f2b0af1 100644 --- a/_action_files/settings.ini +++ b/_action_files/settings.ini @@ -1,7 +1,7 @@ [DEFAULT] lib_name = nbdev user = fastai -branch = main +branch = master version = 0.2.10 description = Writing a library entirely in notebooks keywords = jupyter notebook diff --git a/_fastpages_docs/version.txt b/_fastpages_docs/version.txt index 96981b783..b2581af34 100644 --- a/_fastpages_docs/version.txt +++ b/_fastpages_docs/version.txt @@ -1 +1 @@ -2.1.40 +2.1.41 diff --git a/_includes/custom-head.html b/_includes/custom-head.html index bd9b29c28..776256040 100644 --- a/_includes/custom-head.html +++ b/_includes/custom-head.html @@ -7,13 +7,8 @@ {%- include favicons.html -%} -{% seo %} -{%- feed_meta -%} -{%- if jekyll.environment == 'production' and site.google_analytics -%} - {%- include google-analytics.html -%} -{%- endif -%} {%- if site.annotations -%} diff --git a/_includes/head.html b/_includes/head.html index 655c1052c..e43c22eb3 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,7 +2,7 @@ - + {%- seo -%} {%- feed_meta -%} diff --git a/_includes/notebook_binder_link.html b/_includes/notebook_binder_link.html index b73e55844..e46038f51 100644 --- a/_includes/notebook_binder_link.html +++ b/_includes/notebook_binder_link.html @@ -1,5 +1,5 @@
- + Open In Binder
diff --git a/_includes/notebook_colab_link.html b/_includes/notebook_colab_link.html index 1c8592d73..93f226826 100644 --- a/_includes/notebook_colab_link.html +++ b/_includes/notebook_colab_link.html @@ -1,5 +1,5 @@
- + Open In Colab -
+ \ No newline at end of file diff --git a/_includes/notebook_github_link.html b/_includes/notebook_github_link.html index 113786048..3236f27ae 100644 --- a/_includes/notebook_github_link.html +++ b/_includes/notebook_github_link.html @@ -1,8 +1,8 @@
{% if page.layout == 'notebook' %} - + {% elsif page.layout == 'post' %} - + {% endif -%} View On GitHub diff --git a/_sass/minima/fastpages-dracula-highlight.scss b/_sass/minima/fastpages-dracula-highlight.scss index cadd407d9..d2da11974 100644 --- a/_sass/minima/fastpages-dracula-highlight.scss +++ b/_sass/minima/fastpages-dracula-highlight.scss @@ -33,7 +33,7 @@ $dt-green-light: rgb(172, 229, 145); // for Jupyter Notebook HTML Code Cells modified from https://www.fast.ai/public/css/hyde.css .input_area pre, .input_area div { - margin-bottom:2rem !important; + margin-bottom:1.0rem !important; margin-top:1.5rem !important; padding-bottom:0 !important; padding-top:0 !important; @@ -42,11 +42,11 @@ $dt-green-light: rgb(172, 229, 145); text-rendering: optimizeLegibility; font-family: Menlo, Monaco, Consolas, "Lucida Console", Roboto, Ubuntu, monospace; border-radius: 5px; - font-size: 100%; + font-size: 105%; } .output_area pre, .output_area div { margin-bottom:1rem !important; - margin-top:1rem !important; + margin-top:0rem !important; padding-bottom:0 !important; padding-top:0 !important; } @@ -56,6 +56,7 @@ $dt-green-light: rgb(172, 229, 145); .output_area pre { border-left: 1px solid grey; margin-left: 1rem !important; + font-size: 16px; } .code_cell table { width: auto; } @@ -76,6 +77,7 @@ $dt-green-light: rgb(172, 229, 145); pre, code { background: $dt-code-cell-background; color: $dt-gray-light; + font-size: 110%; } .hll, @@ -145,10 +147,13 @@ $dt-green-light: rgb(172, 229, 145); .ch, .cm, .cpf, - .c1, .cs { color: $dt-blue; } + + .c1 { + color: gray; + } .kd, .kt, @@ -211,3 +216,7 @@ $dt-green-light: rgb(172, 229, 145); color: $dt-red; } } + +p code{ + font-size: 19px; +} diff --git a/_sass/minima/fastpages-styles.scss b/_sass/minima/fastpages-styles.scss index 39ee0743a..7258c47bd 100644 --- a/_sass/minima/fastpages-styles.scss +++ b/_sass/minima/fastpages-styles.scss @@ -196,22 +196,14 @@ h6:hover .anchor-link { font-weight:bold; } -// Handle Overflow With Table Output - table { - display: block !important; - overflow-x: auto; - white-space: nowrap; - font-size: 75%; + white-space: normal; + max-width: 100%; + font-size: 100%; border:none; th{ text-align: center! important; } - td{ - text-overflow:ellipsis; - overflow:hidden; - max-width: 15em; - } } // customize scrollbars @@ -252,11 +244,15 @@ table { // } // } -.output_wrapper{ - overflow: scroll; -} - .svg-icon.orange{ width: 30px; height: 23px; } + +.code_cell { + margin: 1.5rem 0px !important; +} + +pre code { + font-size: 15px !important; +} diff --git a/docker-compose.yml b/docker-compose.yml index 4beeef3f9..1f3877c2e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,12 @@ services: <<: *fastpages command: /fastpages/action_entrypoint.sh + notebook: + <<: *fastpages + command: jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password='' + ports: + - "8080:8080" + watcher: <<: *fastpages command: watchmedo shell-command --command /fastpages/action_entrypoint.sh --pattern *.ipynb --recursive --drop