Another change of style
This commit is contained in:
parent
b35ce9146b
commit
b41dd8e13c
|
@ -1,18 +1,5 @@
|
||||||
name: Build and Deploy
|
name: Build and Deploy
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
# NOTE:
|
|
||||||
# For a **project** site (username.github.io/project/), push things
|
|
||||||
# to the **master** branch and make sure to set the line below to
|
|
||||||
# ` - master`; also, at the end of the file, change to `BRANCH: gh-pages`
|
|
||||||
#
|
|
||||||
# For a **personal** site (username.github.io/), push things to a **dev**
|
|
||||||
# branch and make sure to set the line below to `- dev` this is
|
|
||||||
# because for user pages GitHub pages **requires** the deployment to be
|
|
||||||
# on the master branch; also, at the end of the file, change to
|
|
||||||
# `BRANCH: master`
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -21,44 +8,10 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install SSH Client
|
|
||||||
continue-on-error: true
|
|
||||||
uses: webfactory/ssh-agent@v0.2.0
|
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ secrets.FRANKLIN_PRIV }}
|
|
||||||
# NOTE
|
|
||||||
# Python is necessary for pre-rendering steps as well as to install
|
|
||||||
# matplotlib which is necessary if you intend to use PyPlot. If you do
|
|
||||||
# not, then you can remove the `run: pip install matplotlib` line.
|
|
||||||
- name: Install python
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
- run: pip install matplotlib # if you use PyPlot this is needed
|
|
||||||
- name: Install Julia
|
|
||||||
uses: julia-actions/setup-julia@v1
|
|
||||||
with:
|
|
||||||
version: 1.4.1
|
|
||||||
# NOTE
|
|
||||||
# The steps below ensure that NodeJS and Franklin are loaded then it
|
|
||||||
# installs highlight.js which is needed for the prerendering step.
|
|
||||||
# Then the environment is activated and instantiated to install all
|
|
||||||
# Julia packages which may be required to successfully build your site.
|
|
||||||
#
|
|
||||||
# The last line should be `optimize()` though you may want to give it
|
|
||||||
# specific arguments, see the documentation or ?optimize in the REPL.
|
|
||||||
- run: julia -e '
|
|
||||||
using Pkg; Pkg.add(["NodeJS", "Franklin"]);
|
|
||||||
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
|
|
||||||
using Franklin;
|
|
||||||
Pkg.activate("."); Pkg.instantiate();
|
|
||||||
optimize()'
|
|
||||||
- name: Build and Deploy
|
- name: Build and Deploy
|
||||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||||
with:
|
with:
|
||||||
SSH: true
|
ACCESS_TOKEN: ${{ secrets.FRANKLIN }}
|
||||||
# NOTE
|
|
||||||
# Set this to `BRANCH: gh-pages` for a **project** page and to
|
|
||||||
# `BRANCH: master` for a **personal** page
|
|
||||||
BRANCH: gh-pages
|
BRANCH: gh-pages
|
||||||
FOLDER: __site
|
FOLDER: __site
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Manifest.toml
|
||||||
__site/
|
__site/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
franklin
|
franklin
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
pages:
|
|
||||||
stage: deploy
|
|
||||||
script:
|
|
||||||
- mv __site public
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
only:
|
|
||||||
- master
|
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 768 B |
|
@ -1 +0,0 @@
|
||||||
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
|
|
Before Width: | Height: | Size: 605 B |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
|
@ -1,27 +0,0 @@
|
||||||
# Parent file to run all scripts which may generate
|
|
||||||
# some output that you want to display on the website.
|
|
||||||
# this can be used as a tester to check that all the code
|
|
||||||
# on your website runs properly.
|
|
||||||
|
|
||||||
dir = @__DIR__
|
|
||||||
|
|
||||||
"""
|
|
||||||
genplain(s)
|
|
||||||
|
|
||||||
Small helper function to run some code and redirect the output (stdout) to a file.
|
|
||||||
"""
|
|
||||||
function genplain(s::String)
|
|
||||||
open(joinpath(dir, "output", "$(splitext(s)[1]).txt"), "w") do outf
|
|
||||||
redirect_stdout(outf) do
|
|
||||||
include(joinpath(dir, s))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# output
|
|
||||||
|
|
||||||
genplain("script1.jl")
|
|
||||||
|
|
||||||
# plots
|
|
||||||
|
|
||||||
include("script2.jl")
|
|
|
@ -1,5 +0,0 @@
|
||||||
*---------1.3
|
|
||||||
**--------1.3
|
|
||||||
***-------1.3
|
|
||||||
****------1.3
|
|
||||||
*****-----1.3
|
|
|
@ -1,581 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Created with matplotlib (https://matplotlib.org/) -->
|
|
||||||
<svg height="345.6pt" version="1.1" viewBox="0 0 460.8 345.6" width="460.8pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<defs>
|
|
||||||
<style type="text/css">
|
|
||||||
*{stroke-linecap:butt;stroke-linejoin:round;}
|
|
||||||
</style>
|
|
||||||
</defs>
|
|
||||||
<g id="figure_1">
|
|
||||||
<g id="patch_1">
|
|
||||||
<path d="M 0 345.6
|
|
||||||
L 460.8 345.6
|
|
||||||
L 460.8 0
|
|
||||||
L 0 0
|
|
||||||
z
|
|
||||||
" style="fill:#ffffff;"/>
|
|
||||||
</g>
|
|
||||||
<g id="axes_1">
|
|
||||||
<g id="patch_2">
|
|
||||||
<path d="M 57.6 307.584
|
|
||||||
L 414.72 307.584
|
|
||||||
L 414.72 41.472
|
|
||||||
L 57.6 41.472
|
|
||||||
z
|
|
||||||
" style="fill:#ffffff;"/>
|
|
||||||
</g>
|
|
||||||
<g id="matplotlib.axis_1">
|
|
||||||
<g id="xtick_1">
|
|
||||||
<g id="line2d_1">
|
|
||||||
<defs>
|
|
||||||
<path d="M 0 0
|
|
||||||
L 0 3.5
|
|
||||||
" id="m8c4b5b8030" style="stroke:#000000;stroke-width:0.8;"/>
|
|
||||||
</defs>
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="73.832727" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_1">
|
|
||||||
<!-- 0.0 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 31.78125 66.40625
|
|
||||||
Q 24.171875 66.40625 20.328125 58.90625
|
|
||||||
Q 16.5 51.421875 16.5 36.375
|
|
||||||
Q 16.5 21.390625 20.328125 13.890625
|
|
||||||
Q 24.171875 6.390625 31.78125 6.390625
|
|
||||||
Q 39.453125 6.390625 43.28125 13.890625
|
|
||||||
Q 47.125 21.390625 47.125 36.375
|
|
||||||
Q 47.125 51.421875 43.28125 58.90625
|
|
||||||
Q 39.453125 66.40625 31.78125 66.40625
|
|
||||||
z
|
|
||||||
M 31.78125 74.21875
|
|
||||||
Q 44.046875 74.21875 50.515625 64.515625
|
|
||||||
Q 56.984375 54.828125 56.984375 36.375
|
|
||||||
Q 56.984375 17.96875 50.515625 8.265625
|
|
||||||
Q 44.046875 -1.421875 31.78125 -1.421875
|
|
||||||
Q 19.53125 -1.421875 13.0625 8.265625
|
|
||||||
Q 6.59375 17.96875 6.59375 36.375
|
|
||||||
Q 6.59375 54.828125 13.0625 64.515625
|
|
||||||
Q 19.53125 74.21875 31.78125 74.21875
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-48"/>
|
|
||||||
<path d="M 10.6875 12.40625
|
|
||||||
L 21 12.40625
|
|
||||||
L 21 0
|
|
||||||
L 10.6875 0
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-46"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(65.881165 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="xtick_2">
|
|
||||||
<g id="line2d_2">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="138.763636" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_2">
|
|
||||||
<!-- 0.2 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 19.1875 8.296875
|
|
||||||
L 53.609375 8.296875
|
|
||||||
L 53.609375 0
|
|
||||||
L 7.328125 0
|
|
||||||
L 7.328125 8.296875
|
|
||||||
Q 12.9375 14.109375 22.625 23.890625
|
|
||||||
Q 32.328125 33.6875 34.8125 36.53125
|
|
||||||
Q 39.546875 41.84375 41.421875 45.53125
|
|
||||||
Q 43.3125 49.21875 43.3125 52.78125
|
|
||||||
Q 43.3125 58.59375 39.234375 62.25
|
|
||||||
Q 35.15625 65.921875 28.609375 65.921875
|
|
||||||
Q 23.96875 65.921875 18.8125 64.3125
|
|
||||||
Q 13.671875 62.703125 7.8125 59.421875
|
|
||||||
L 7.8125 69.390625
|
|
||||||
Q 13.765625 71.78125 18.9375 73
|
|
||||||
Q 24.125 74.21875 28.421875 74.21875
|
|
||||||
Q 39.75 74.21875 46.484375 68.546875
|
|
||||||
Q 53.21875 62.890625 53.21875 53.421875
|
|
||||||
Q 53.21875 48.921875 51.53125 44.890625
|
|
||||||
Q 49.859375 40.875 45.40625 35.40625
|
|
||||||
Q 44.1875 33.984375 37.640625 27.21875
|
|
||||||
Q 31.109375 20.453125 19.1875 8.296875
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-50"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(130.812074 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-50"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="xtick_3">
|
|
||||||
<g id="line2d_3">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="203.694545" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_3">
|
|
||||||
<!-- 0.4 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 37.796875 64.3125
|
|
||||||
L 12.890625 25.390625
|
|
||||||
L 37.796875 25.390625
|
|
||||||
z
|
|
||||||
M 35.203125 72.90625
|
|
||||||
L 47.609375 72.90625
|
|
||||||
L 47.609375 25.390625
|
|
||||||
L 58.015625 25.390625
|
|
||||||
L 58.015625 17.1875
|
|
||||||
L 47.609375 17.1875
|
|
||||||
L 47.609375 0
|
|
||||||
L 37.796875 0
|
|
||||||
L 37.796875 17.1875
|
|
||||||
L 4.890625 17.1875
|
|
||||||
L 4.890625 26.703125
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-52"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(195.742983 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-52"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="xtick_4">
|
|
||||||
<g id="line2d_4">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="268.625455" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_4">
|
|
||||||
<!-- 0.6 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 33.015625 40.375
|
|
||||||
Q 26.375 40.375 22.484375 35.828125
|
|
||||||
Q 18.609375 31.296875 18.609375 23.390625
|
|
||||||
Q 18.609375 15.53125 22.484375 10.953125
|
|
||||||
Q 26.375 6.390625 33.015625 6.390625
|
|
||||||
Q 39.65625 6.390625 43.53125 10.953125
|
|
||||||
Q 47.40625 15.53125 47.40625 23.390625
|
|
||||||
Q 47.40625 31.296875 43.53125 35.828125
|
|
||||||
Q 39.65625 40.375 33.015625 40.375
|
|
||||||
z
|
|
||||||
M 52.59375 71.296875
|
|
||||||
L 52.59375 62.3125
|
|
||||||
Q 48.875 64.0625 45.09375 64.984375
|
|
||||||
Q 41.3125 65.921875 37.59375 65.921875
|
|
||||||
Q 27.828125 65.921875 22.671875 59.328125
|
|
||||||
Q 17.53125 52.734375 16.796875 39.40625
|
|
||||||
Q 19.671875 43.65625 24.015625 45.921875
|
|
||||||
Q 28.375 48.1875 33.59375 48.1875
|
|
||||||
Q 44.578125 48.1875 50.953125 41.515625
|
|
||||||
Q 57.328125 34.859375 57.328125 23.390625
|
|
||||||
Q 57.328125 12.15625 50.6875 5.359375
|
|
||||||
Q 44.046875 -1.421875 33.015625 -1.421875
|
|
||||||
Q 20.359375 -1.421875 13.671875 8.265625
|
|
||||||
Q 6.984375 17.96875 6.984375 36.375
|
|
||||||
Q 6.984375 53.65625 15.1875 63.9375
|
|
||||||
Q 23.390625 74.21875 37.203125 74.21875
|
|
||||||
Q 40.921875 74.21875 44.703125 73.484375
|
|
||||||
Q 48.484375 72.75 52.59375 71.296875
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-54"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(260.673892 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-54"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="xtick_5">
|
|
||||||
<g id="line2d_5">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="333.556364" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_5">
|
|
||||||
<!-- 0.8 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 31.78125 34.625
|
|
||||||
Q 24.75 34.625 20.71875 30.859375
|
|
||||||
Q 16.703125 27.09375 16.703125 20.515625
|
|
||||||
Q 16.703125 13.921875 20.71875 10.15625
|
|
||||||
Q 24.75 6.390625 31.78125 6.390625
|
|
||||||
Q 38.8125 6.390625 42.859375 10.171875
|
|
||||||
Q 46.921875 13.96875 46.921875 20.515625
|
|
||||||
Q 46.921875 27.09375 42.890625 30.859375
|
|
||||||
Q 38.875 34.625 31.78125 34.625
|
|
||||||
z
|
|
||||||
M 21.921875 38.8125
|
|
||||||
Q 15.578125 40.375 12.03125 44.71875
|
|
||||||
Q 8.5 49.078125 8.5 55.328125
|
|
||||||
Q 8.5 64.0625 14.71875 69.140625
|
|
||||||
Q 20.953125 74.21875 31.78125 74.21875
|
|
||||||
Q 42.671875 74.21875 48.875 69.140625
|
|
||||||
Q 55.078125 64.0625 55.078125 55.328125
|
|
||||||
Q 55.078125 49.078125 51.53125 44.71875
|
|
||||||
Q 48 40.375 41.703125 38.8125
|
|
||||||
Q 48.828125 37.15625 52.796875 32.3125
|
|
||||||
Q 56.78125 27.484375 56.78125 20.515625
|
|
||||||
Q 56.78125 9.90625 50.3125 4.234375
|
|
||||||
Q 43.84375 -1.421875 31.78125 -1.421875
|
|
||||||
Q 19.734375 -1.421875 13.25 4.234375
|
|
||||||
Q 6.78125 9.90625 6.78125 20.515625
|
|
||||||
Q 6.78125 27.484375 10.78125 32.3125
|
|
||||||
Q 14.796875 37.15625 21.921875 38.8125
|
|
||||||
z
|
|
||||||
M 18.3125 54.390625
|
|
||||||
Q 18.3125 48.734375 21.84375 45.5625
|
|
||||||
Q 25.390625 42.390625 31.78125 42.390625
|
|
||||||
Q 38.140625 42.390625 41.71875 45.5625
|
|
||||||
Q 45.3125 48.734375 45.3125 54.390625
|
|
||||||
Q 45.3125 60.0625 41.71875 63.234375
|
|
||||||
Q 38.140625 66.40625 31.78125 66.40625
|
|
||||||
Q 25.390625 66.40625 21.84375 63.234375
|
|
||||||
Q 18.3125 60.0625 18.3125 54.390625
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-56"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(325.604801 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-56"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="xtick_6">
|
|
||||||
<g id="line2d_6">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="398.487273" xlink:href="#m8c4b5b8030" y="307.584"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_6">
|
|
||||||
<!-- 1.0 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 12.40625 8.296875
|
|
||||||
L 28.515625 8.296875
|
|
||||||
L 28.515625 63.921875
|
|
||||||
L 10.984375 60.40625
|
|
||||||
L 10.984375 69.390625
|
|
||||||
L 28.421875 72.90625
|
|
||||||
L 38.28125 72.90625
|
|
||||||
L 38.28125 8.296875
|
|
||||||
L 54.390625 8.296875
|
|
||||||
L 54.390625 0
|
|
||||||
L 12.40625 0
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-49"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(390.53571 322.182437)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-49"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="matplotlib.axis_2">
|
|
||||||
<g id="ytick_1">
|
|
||||||
<g id="line2d_7">
|
|
||||||
<defs>
|
|
||||||
<path d="M 0 0
|
|
||||||
L -3.5 0
|
|
||||||
" id="m96f9a0cdd1" style="stroke:#000000;stroke-width:0.8;"/>
|
|
||||||
</defs>
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="295.488"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_7">
|
|
||||||
<!-- 0.0 -->
|
|
||||||
<g transform="translate(34.696875 299.287219)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_2">
|
|
||||||
<g id="line2d_8">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="264.482613"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_8">
|
|
||||||
<!-- 0.1 -->
|
|
||||||
<g transform="translate(34.696875 268.281832)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-49"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_3">
|
|
||||||
<g id="line2d_9">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="233.477227"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_9">
|
|
||||||
<!-- 0.2 -->
|
|
||||||
<g transform="translate(34.696875 237.276446)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-50"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_4">
|
|
||||||
<g id="line2d_10">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="202.47184"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_10">
|
|
||||||
<!-- 0.3 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 40.578125 39.3125
|
|
||||||
Q 47.65625 37.796875 51.625 33
|
|
||||||
Q 55.609375 28.21875 55.609375 21.1875
|
|
||||||
Q 55.609375 10.40625 48.1875 4.484375
|
|
||||||
Q 40.765625 -1.421875 27.09375 -1.421875
|
|
||||||
Q 22.515625 -1.421875 17.65625 -0.515625
|
|
||||||
Q 12.796875 0.390625 7.625 2.203125
|
|
||||||
L 7.625 11.71875
|
|
||||||
Q 11.71875 9.328125 16.59375 8.109375
|
|
||||||
Q 21.484375 6.890625 26.8125 6.890625
|
|
||||||
Q 36.078125 6.890625 40.9375 10.546875
|
|
||||||
Q 45.796875 14.203125 45.796875 21.1875
|
|
||||||
Q 45.796875 27.640625 41.28125 31.265625
|
|
||||||
Q 36.765625 34.90625 28.71875 34.90625
|
|
||||||
L 20.21875 34.90625
|
|
||||||
L 20.21875 43.015625
|
|
||||||
L 29.109375 43.015625
|
|
||||||
Q 36.375 43.015625 40.234375 45.921875
|
|
||||||
Q 44.09375 48.828125 44.09375 54.296875
|
|
||||||
Q 44.09375 59.90625 40.109375 62.90625
|
|
||||||
Q 36.140625 65.921875 28.71875 65.921875
|
|
||||||
Q 24.65625 65.921875 20.015625 65.03125
|
|
||||||
Q 15.375 64.15625 9.8125 62.3125
|
|
||||||
L 9.8125 71.09375
|
|
||||||
Q 15.4375 72.65625 20.34375 73.4375
|
|
||||||
Q 25.25 74.21875 29.59375 74.21875
|
|
||||||
Q 40.828125 74.21875 47.359375 69.109375
|
|
||||||
Q 53.90625 64.015625 53.90625 55.328125
|
|
||||||
Q 53.90625 49.265625 50.4375 45.09375
|
|
||||||
Q 46.96875 40.921875 40.578125 39.3125
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-51"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(34.696875 206.271059)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-51"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_5">
|
|
||||||
<g id="line2d_11">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="171.466454"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_11">
|
|
||||||
<!-- 0.4 -->
|
|
||||||
<g transform="translate(34.696875 175.265672)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-52"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_6">
|
|
||||||
<g id="line2d_12">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="140.461067"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_12">
|
|
||||||
<!-- 0.5 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 10.796875 72.90625
|
|
||||||
L 49.515625 72.90625
|
|
||||||
L 49.515625 64.59375
|
|
||||||
L 19.828125 64.59375
|
|
||||||
L 19.828125 46.734375
|
|
||||||
Q 21.96875 47.46875 24.109375 47.828125
|
|
||||||
Q 26.265625 48.1875 28.421875 48.1875
|
|
||||||
Q 40.625 48.1875 47.75 41.5
|
|
||||||
Q 54.890625 34.8125 54.890625 23.390625
|
|
||||||
Q 54.890625 11.625 47.5625 5.09375
|
|
||||||
Q 40.234375 -1.421875 26.90625 -1.421875
|
|
||||||
Q 22.3125 -1.421875 17.546875 -0.640625
|
|
||||||
Q 12.796875 0.140625 7.71875 1.703125
|
|
||||||
L 7.71875 11.625
|
|
||||||
Q 12.109375 9.234375 16.796875 8.0625
|
|
||||||
Q 21.484375 6.890625 26.703125 6.890625
|
|
||||||
Q 35.15625 6.890625 40.078125 11.328125
|
|
||||||
Q 45.015625 15.765625 45.015625 23.390625
|
|
||||||
Q 45.015625 31 40.078125 35.4375
|
|
||||||
Q 35.15625 39.890625 26.703125 39.890625
|
|
||||||
Q 22.75 39.890625 18.8125 39.015625
|
|
||||||
Q 14.890625 38.140625 10.796875 36.28125
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-53"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(34.696875 144.260286)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-53"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_7">
|
|
||||||
<g id="line2d_13">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="109.455681"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_13">
|
|
||||||
<!-- 0.6 -->
|
|
||||||
<g transform="translate(34.696875 113.254899)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-54"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_8">
|
|
||||||
<g id="line2d_14">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="78.450294"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_14">
|
|
||||||
<!-- 0.7 -->
|
|
||||||
<defs>
|
|
||||||
<path d="M 8.203125 72.90625
|
|
||||||
L 55.078125 72.90625
|
|
||||||
L 55.078125 68.703125
|
|
||||||
L 28.609375 0
|
|
||||||
L 18.3125 0
|
|
||||||
L 43.21875 64.59375
|
|
||||||
L 8.203125 64.59375
|
|
||||||
z
|
|
||||||
" id="DejaVuSans-55"/>
|
|
||||||
</defs>
|
|
||||||
<g transform="translate(34.696875 82.249513)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-55"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="ytick_9">
|
|
||||||
<g id="line2d_15">
|
|
||||||
<g>
|
|
||||||
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m96f9a0cdd1" y="47.444907"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="text_15">
|
|
||||||
<!-- 0.8 -->
|
|
||||||
<g transform="translate(34.696875 51.244126)scale(0.1 -0.1)">
|
|
||||||
<use xlink:href="#DejaVuSans-48"/>
|
|
||||||
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
|
|
||||||
<use x="95.410156" xlink:href="#DejaVuSans-56"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="line2d_16">
|
|
||||||
<path clip-path="url(#p38be59daca)" d="M 73.832727 295.488
|
|
||||||
L 80.45833 282.922028
|
|
||||||
L 87.083933 270.547231
|
|
||||||
L 93.709536 258.382068
|
|
||||||
L 100.335139 246.444392
|
|
||||||
L 106.960742 234.751428
|
|
||||||
L 113.586345 223.319752
|
|
||||||
L 120.211948 212.165271
|
|
||||||
L 126.837551 201.303207
|
|
||||||
L 133.463154 190.748078
|
|
||||||
L 140.088757 180.513685
|
|
||||||
L 146.71436 170.613096
|
|
||||||
L 153.339963 161.058636
|
|
||||||
L 159.965566 151.861873
|
|
||||||
L 166.591169 143.033612
|
|
||||||
L 173.216772 134.583886
|
|
||||||
L 179.842375 126.521946
|
|
||||||
L 186.467978 118.856262
|
|
||||||
L 193.093581 111.594513
|
|
||||||
L 199.719184 104.743589
|
|
||||||
L 206.344787 98.309588
|
|
||||||
L 212.97039 92.297815
|
|
||||||
L 219.595993 86.712789
|
|
||||||
L 226.221596 81.558238
|
|
||||||
L 232.847199 76.837112
|
|
||||||
L 239.472801 72.551579
|
|
||||||
L 246.098404 68.703042
|
|
||||||
L 252.724007 65.29214
|
|
||||||
L 259.34961 62.318757
|
|
||||||
L 265.975213 59.782039
|
|
||||||
L 272.600816 57.680397
|
|
||||||
L 279.226419 56.011526
|
|
||||||
L 285.852022 54.772416
|
|
||||||
L 292.477625 53.959365
|
|
||||||
L 299.103228 53.568
|
|
||||||
L 305.728831 53.593287
|
|
||||||
L 312.354434 54.029553
|
|
||||||
L 318.980037 54.870502
|
|
||||||
L 325.60564 56.109236
|
|
||||||
L 332.231243 57.738273
|
|
||||||
L 338.856846 59.749568
|
|
||||||
L 345.482449 62.134537
|
|
||||||
L 352.108052 64.884074
|
|
||||||
L 358.733655 67.988577
|
|
||||||
L 365.359258 71.437971
|
|
||||||
L 371.984861 75.221729
|
|
||||||
L 378.610464 79.328899
|
|
||||||
L 385.236067 83.748128
|
|
||||||
L 391.86167 88.467683
|
|
||||||
L 398.487273 93.47548
|
|
||||||
" style="fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;"/>
|
|
||||||
</g>
|
|
||||||
<g id="patch_3">
|
|
||||||
<path d="M 57.6 307.584
|
|
||||||
L 57.6 41.472
|
|
||||||
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
|
|
||||||
</g>
|
|
||||||
<g id="patch_4">
|
|
||||||
<path d="M 414.72 307.584
|
|
||||||
L 414.72 41.472
|
|
||||||
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
|
|
||||||
</g>
|
|
||||||
<g id="patch_5">
|
|
||||||
<path d="M 57.6 307.584
|
|
||||||
L 414.72 307.584
|
|
||||||
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
|
|
||||||
</g>
|
|
||||||
<g id="patch_6">
|
|
||||||
<path d="M 57.6 41.472
|
|
||||||
L 414.72 41.472
|
|
||||||
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<clipPath id="p38be59daca">
|
|
||||||
<rect height="266.112" width="357.12" x="57.6" y="41.472"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 17 KiB |
|
@ -1,10 +0,0 @@
|
||||||
using LinearAlgebra # HIDE
|
|
||||||
using Random:seed! # HIDE
|
|
||||||
seed!(0) # HIDE
|
|
||||||
# HIDE
|
|
||||||
x = randn(5)
|
|
||||||
y = randn(5)
|
|
||||||
|
|
||||||
for i in 1:5
|
|
||||||
println(rpad("*"^i, 10, '-'), round(dot(x, y), digits=1))
|
|
||||||
end
|
|
|
@ -1,4 +0,0 @@
|
||||||
using PyPlot
|
|
||||||
x = range(0, stop=1, length=50)
|
|
||||||
plot(x, sin.(2x).*exp.(-x/3))
|
|
||||||
savefig(joinpath(@__DIR__, "output", "script2.svg"))
|
|
|
@ -1,256 +0,0 @@
|
||||||
/* ==================================================================
|
|
||||||
DEFAULT FONT AND LAYOUT
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: Helvetica, Arial, sans-serif;
|
|
||||||
font-size : 17px;
|
|
||||||
color: #1c1c1c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
BASIC GRID FOR PROFILE PIC
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content .row {
|
|
||||||
display: block; }
|
|
||||||
|
|
||||||
.franklin-content .left {
|
|
||||||
float: left;
|
|
||||||
margin-right: 15px; }
|
|
||||||
|
|
||||||
.franklin-content .right {
|
|
||||||
float: right; }
|
|
||||||
|
|
||||||
.franklin-content .container img {
|
|
||||||
width: auto;
|
|
||||||
padding-left: 0;
|
|
||||||
border-radius: 10px; }
|
|
||||||
|
|
||||||
.franklin-content .footnote {
|
|
||||||
position: relative;
|
|
||||||
top: -0.5em;
|
|
||||||
font-size: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
FOOT / COPYRIGHT
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content .page-foot a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #a6a2a0;
|
|
||||||
text-decoration: underline; }
|
|
||||||
|
|
||||||
.page-foot {
|
|
||||||
font-size: 80%;
|
|
||||||
font-family: Arial, serif;
|
|
||||||
color: #a6a2a0;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 6em;
|
|
||||||
border-top: 1px solid lightgrey;
|
|
||||||
padding-top: 2em;
|
|
||||||
margin-bottom: 4em; }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
TEXT GEOMETRY
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content {
|
|
||||||
position: relative;
|
|
||||||
padding-left: 12.5%;
|
|
||||||
padding-right: 12.5%;
|
|
||||||
line-height: 1.35em; }
|
|
||||||
|
|
||||||
/* on wide screens, fix content width to a max value */
|
|
||||||
@media (min-width: 940px) {
|
|
||||||
.franklin-content {
|
|
||||||
width: 705px;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* on narrow device, reduce margins */
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.franklin-content {
|
|
||||||
padding-left: 6%;
|
|
||||||
padding-right: 6%; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
TITLES
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content h1 { font-size: 24px; }
|
|
||||||
.franklin-content h2 { font-size: 22px; }
|
|
||||||
.franklin-content h3 { font-size: 20px; }
|
|
||||||
|
|
||||||
.franklin-content h1, h2, h3, h4, h5, h6 {
|
|
||||||
text-align: left; }
|
|
||||||
|
|
||||||
.franklin-content h1 {
|
|
||||||
padding-bottom: 0.5em;
|
|
||||||
border-bottom: 3px double lightgrey;
|
|
||||||
margin-top: 1.5em;
|
|
||||||
margin-bottom: 1em; }
|
|
||||||
|
|
||||||
.franklin-content h2 {
|
|
||||||
padding-bottom: 0.3em;
|
|
||||||
border-bottom: 1px solid lightgrey;
|
|
||||||
margin-top: 2em;
|
|
||||||
margin-bottom: 1em; }
|
|
||||||
|
|
||||||
.franklin-content h1 a { color: inherit; }
|
|
||||||
.franklin-content h1 a:hover {text-decoration: none;}
|
|
||||||
.franklin-content h2 a { color: inherit; }
|
|
||||||
.franklin-content h2 a:hover {text-decoration: none;}
|
|
||||||
.franklin-content h3 a { color: inherit; }
|
|
||||||
.franklin-content h3 a:hover {text-decoration: none;}
|
|
||||||
.franklin-content h4 a { color: inherit; }
|
|
||||||
.franklin-content h4 a:hover {text-decoration: none;}
|
|
||||||
.franklin-content h5 a { color: inherit; }
|
|
||||||
.franklin-content h5 a:hover {text-decoration: none;}
|
|
||||||
.franklin-content h6 a { color: inherit; }
|
|
||||||
.franklin-content h6 a:hover {text-decoration: none;}
|
|
||||||
|
|
||||||
.franklin-content table {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
border-collapse: collapse;
|
|
||||||
text-align: center;}
|
|
||||||
.franklin-content th, td{
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid black;}
|
|
||||||
|
|
||||||
.franklin-content blockquote {
|
|
||||||
background: #eeeeee;
|
|
||||||
border-left: 7px solid #a8a8a8;
|
|
||||||
margin: 1.5em 10px;
|
|
||||||
padding: 0.5em 10px;
|
|
||||||
font-style: italic;}
|
|
||||||
|
|
||||||
.franklin-content blockquote p {
|
|
||||||
display: inline; }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
GENERAL FORMATTING
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
/* spacing between bullet points */
|
|
||||||
.franklin-content li p {
|
|
||||||
margin: 10px 0; }
|
|
||||||
|
|
||||||
.franklin-content a {
|
|
||||||
color: #004de6;
|
|
||||||
text-decoration: none; }
|
|
||||||
|
|
||||||
.franklin-content a:hover {
|
|
||||||
text-decoration: underline; }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
HYPERREFS AND FOOTNOTES
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content .eqref a { color: green; }
|
|
||||||
.franklin-content .bibref a { color: green; }
|
|
||||||
|
|
||||||
.franklin-content sup {
|
|
||||||
font-size: 70%;
|
|
||||||
vertical-align: super;
|
|
||||||
line-height: 0; }
|
|
||||||
|
|
||||||
.franklin-content table.fndef {
|
|
||||||
margin: 0;
|
|
||||||
margin-bottom: 10px;}
|
|
||||||
.franklin-content .fndef tr, td {
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
text-align: left;}
|
|
||||||
.franklin-content .fndef tr {
|
|
||||||
border-left: 2px solid lightgray;
|
|
||||||
}
|
|
||||||
.franklin-content .fndef td.fndef-backref {
|
|
||||||
vertical-align: top;
|
|
||||||
font-size: 70%;
|
|
||||||
padding-left: 5px;}
|
|
||||||
.franklin-content .fndef td.fndef-content {
|
|
||||||
font-size: 80%;
|
|
||||||
padding-left: 10px;}
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
IMAGES in CONTENT
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content img {
|
|
||||||
width: 70%;
|
|
||||||
text-align: center;
|
|
||||||
padding-left: 10%; }
|
|
||||||
|
|
||||||
.franklin-content .img-small img {
|
|
||||||
width: 50%;
|
|
||||||
text-align: center;
|
|
||||||
padding-left: 20%; }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
KATEX
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
body { counter-reset: eqnum; }
|
|
||||||
|
|
||||||
.katex { font-size: 1em !important; }
|
|
||||||
|
|
||||||
.katex-display .katex {
|
|
||||||
display: inline-block; } /* overwrite katex settings */
|
|
||||||
|
|
||||||
.katex-display::after {
|
|
||||||
counter-increment: eqnum;
|
|
||||||
content: "(" counter(eqnum) ")";
|
|
||||||
position: relative;
|
|
||||||
float: right;
|
|
||||||
padding-right: 5px; }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
CODE & HIGHLIGHT.JS
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: rgba(27,31,35,0.05);
|
|
||||||
padding: 0.1em 0.2em;
|
|
||||||
border-radius: 2px;
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .franklin-content code { */
|
|
||||||
/* background-color: rgba(27,31,35,0.05); */
|
|
||||||
/* padding: 0.1em 0.2em; */
|
|
||||||
/* border-radius: 2px; */
|
|
||||||
/* font-size: 90%; } */
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
font-size: 90%;
|
|
||||||
line-height: 1.35em;
|
|
||||||
border-radius: 10px; }
|
|
||||||
|
|
||||||
.hljs-meta, .hljs-metas, .hljs-metap { font-weight: bold; }
|
|
||||||
|
|
||||||
.hljs-meta { color: rgb(25, 179, 51); }
|
|
||||||
|
|
||||||
.hljs-metas { color: red; }
|
|
||||||
|
|
||||||
.hljs-metap { color: rgb(51, 131, 231); }
|
|
||||||
|
|
||||||
/* ==================================================================
|
|
||||||
BOXES
|
|
||||||
================================================================== */
|
|
||||||
|
|
||||||
.franklin-content .colbox-blue {
|
|
||||||
background-color: #EEF3F5;
|
|
||||||
padding-top: 5px;
|
|
||||||
padding-right: 10px;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
border-radius: 0 10px 10px 0;
|
|
||||||
border-left: 5px solid #4C9CF1; }
|
|
2623
_css/vela.css
2623
_css/vela.css
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,12 @@
|
||||||
<!-- CONTENT ENDS HERE -->
|
<!-- CONTENT ENDS HERE -->
|
||||||
</main> <!-- end of id=main -->
|
</div> <!-- end of class main-content -->
|
||||||
<script src="/libs/vela/metisMenu.min.js"></script>
|
</div> <!-- end of class main-content-wrap -->
|
||||||
<script src="/libs/vela/slideout.min.js"></script>
|
</div> <!-- end of class page-wrap-->
|
||||||
{{ if hasmath }}
|
{{ if hasmath }}
|
||||||
{{ insert foot_katex.html }}
|
{{ insert foot_katex.html }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if hascode }}
|
{{ if hascode }}
|
||||||
{{ insert foot_highlight.html }}
|
{{ insert foot_highlight.html }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,14 +3,111 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
{{if hasmath}} {{insert head_katex.html }} {{end}}
|
{{if hasmath}} {{insert head_katex.html }} {{end}}
|
||||||
{{if hascode}} {{insert head_highlight.html }} {{end}}
|
{{if hascode}} {{insert head_highlight.html }} {{end}}
|
||||||
|
<link rel="stylesheet" href="/css/jtd.css">
|
||||||
|
<link rel="icon" href="/assets/infra/logoF_square.gif">
|
||||||
|
{{isdef title}} <title>{{fill title}}</title> {{end}}
|
||||||
|
|
||||||
|
<!-- LUNR -->
|
||||||
|
<script src="/libs/lunr/lunr.min.js"></script>
|
||||||
|
<script src="/libs/lunr/lunr_index.js"></script>
|
||||||
|
<script src="/libs/lunr/lunrclient.min.js"></script>
|
||||||
|
|
||||||
|
<!-- PLOTLY -->
|
||||||
|
{{if hasplotly}} <script src="/libs/plotly/plotly.min.js"></script> {{end}}
|
||||||
|
|
||||||
{{insert style.html}}
|
|
||||||
<title>Eddie's Blog</title>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body> <!-- closed in foot.html -->
|
||||||
{{insert nav.html}}
|
<div class="page-wrap"> <!-- closed in foot.html -->
|
||||||
|
<!-- SIDE BAR -->
|
||||||
|
<div class="side-bar">
|
||||||
|
<div class="header">
|
||||||
|
<a href="/" class="title">
|
||||||
|
<!-- <img style="height:60px;" src="/assets/infra/franklin.svg" alt="franklin" /> -->
|
||||||
|
<style>
|
||||||
|
@media (max-width: 31.25rem){
|
||||||
|
.side-bar .show-menu {height:30px;}
|
||||||
|
}
|
||||||
|
@media (max-width: 50rem) {
|
||||||
|
.side-bar .header .title {padding-top:0; padding-bottom: 0;}
|
||||||
|
.header .title img {height:60px; max-width: 100px !important;}
|
||||||
|
}
|
||||||
|
@media (min-width: 66.5rem){
|
||||||
|
.header .title img {max-width: 140px !important;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<label for="show-menu" class="show-menu">MENU</label>
|
||||||
|
<input type="checkbox" id="show-menu" role="button">
|
||||||
|
<div class="menu" id="side-menu">
|
||||||
|
<ul class="menu-list">
|
||||||
|
<!-- HOME -->
|
||||||
|
<li class="menu-list-item {{ispage index}}active{{end}}"><a href="/" class="menu-list-link">• Home</a>
|
||||||
|
<!-- WORKFLOW -->
|
||||||
|
<li class="menu-list-parent {{ispage workflow/*}}active{{end}}"><a href="/workflow/" class="menu-list-link">• Workflow</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage workflow/index.html}}active{{end}}"><a href="/workflow/" class="menu-list-link">Create and edit</a>
|
||||||
|
<li class="menu-list-item {{ispage workflow/structure}}active{{end}}"><a href="/workflow/structure/" class="menu-list-link">Page structure</a>
|
||||||
|
<li class="menu-list-item {{ispage workflow/deploy}}active{{end}}"><a href="/workflow/deploy/" class="menu-list-link">Deploy</a>
|
||||||
|
</ul>
|
||||||
|
<!-- SYNTAX -->
|
||||||
|
<!-- NOTE: if adding a menu item, add ref to first item! -->
|
||||||
|
<li class="menu-list-parent {{ispage syntax/*}}active{{end}}"><a href="/syntax/markdown/" class="menu-list-link">• Syntax</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage syntax/markdown}}active{{end}}"><a href="/syntax/markdown/" class="menu-list-link">Markdown</a>
|
||||||
|
<li class="menu-list-item {{ispage syntax/divs-commands}}active{{end}}"><a href="/syntax/divs-commands/" class="menu-list-link">Divs and Commands</a>
|
||||||
|
<li class="menu-list-item {{ispage syntax/page-variables}}active{{end}}"><a href="/syntax/page-variables/" class="menu-list-link">Page Variables</a>
|
||||||
|
<li class="menu-list-item {{ispage syntax/utils}}active{{end}}"><a href="/syntax/utils/" class="menu-list-link">Utils</a>
|
||||||
|
</ul>
|
||||||
|
<!-- STYLING -->
|
||||||
|
<li class="menu-list-parent {{ispage styling/*}}active{{end}}"><a href="/styling/templates/" class="menu-list-link">• Styling</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage styling/templates}}active{{end}}"><a href="/styling/templates/" class="menu-list-link">Templates</a>
|
||||||
|
<li class="menu-list-item {{ispage styling/classes}}active{{end}}"><a href="/styling/classes/" class="menu-list-link">Classes</a>
|
||||||
|
</ul>
|
||||||
|
<!-- CODE -->
|
||||||
|
<li class="menu-list-parent {{ispage code/*}}active{{end}}"><a href="/code/" class="menu-list-link">• Code</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage code/index.html}}active{{end}}"><a href="/code/" class="menu-list-link">Inserting code</a>
|
||||||
|
<li class="menu-list-item {{ispage code/eval-tricks}}active{{end}}"><a href="/code/eval-tricks/" class="menu-list-link">Code tricks</a>
|
||||||
|
<li class="menu-list-item {{ispage code/literate}}active{{end}}"><a href="/code/literate/" class="menu-list-link">Literate.jl</a>
|
||||||
|
</ul>
|
||||||
|
<!-- EXTRAs -->
|
||||||
|
<li class="menu-list-parent {{ispage extras/*}}active{{end}}"><a href="/extras/" class="menu-list-link">• Extras</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage extras/index.html}}active{{end}}"><a href="/extras/" class="menu-list-link">Overview</a>
|
||||||
|
<li class="menu-list-item {{ispage extras/lunr}}active{{end}}"><a href="/extras/lunr/" class="menu-list-link">Lunr search</a>
|
||||||
|
<li class="menu-list-item {{ispage extras/literate}}active{{end}}"><a href="/extras/literate/" class="menu-list-link">Literate</a>
|
||||||
|
<li class="menu-list-item {{ispage extras/plotly}}active{{end}}"><a href="/extras/plotly/" class="menu-list-link">Plotly</a>
|
||||||
|
</ul>
|
||||||
|
<!-- FAQ -->
|
||||||
|
<li class="menu-list-parent {{ispage faq/*}}active{{end}}"><a href="/faq/technical/" class="menu-list-link">• FAQ</a>
|
||||||
|
<ul class="menu-list-child-list ">
|
||||||
|
<li class="menu-list-item {{ispage faq/technical}}active{{end}}"><a href="/faq/technical/" class="menu-list-link">Technical</a>
|
||||||
|
<li class="menu-list-item {{ispage faq/troubleshooting}}active{{end}}"><a href="/faq/troubleshooting/" class="menu-list-link">Troubleshooting</a>
|
||||||
|
<li class="menu-list-item {{ispage faq/why-o-why}}active{{end}}"><a href="/faq/why-o-why/" class="menu-list-link">Meta</a>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
<form id="lunrSearchForm" name="lunrSearchForm">
|
||||||
|
<input class="search-input" name="q" placeholder="Enter search term" type="text"> <input type="submit" value="Search" formaction="/search/index.html">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<a href="/faq/why-o-why/"><img style="width:40%;padding-left:10px;margin-bottom:15px;" src="/assets/infra/logoF2.svg" alt="Franklin Logo" /></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- CONTENT -->
|
||||||
|
<div class="main-content-wrap"> <!-- closed in foot.html -->
|
||||||
|
<div class="main-content" id="focus" tabindex="-1" style="outline:0;"> <!-- closed in foot.html -->
|
||||||
|
<div class="main-header">
|
||||||
|
<a name="pagetop"></a>
|
||||||
|
|
||||||
|
<!-- <a id="github" href="https://github.com/tlienart/franklindocs/blob/master/{{fd_rpath}}">Page source</a> -->
|
||||||
|
<a id="github"><h1>A Neural Network Developer</h1></a>
|
||||||
|
<span style="width:30px; text-align: center;color:lightgray;">|</span>
|
||||||
|
<a id="github" href="https://github.com/EddieCueto/">GitHub Repository</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Content appended here -->
|
<!-- Content appended here (in class franklin-content) -->
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
<!-- Syntax highlighting via Prism, note: restricted langs -->
|
||||||
<link rel="stylesheet" href="/libs/highlight/github.min.css">
|
<link rel="stylesheet" href="/libs/highlight/github.min.css">
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
<!-- Un-minified script so that can play a bit -->
|
||||||
<link rel="stylesheet" href="/libs/katex/katex.min.css">
|
<link rel="stylesheet" href="/libs/katex/katex.min.css">
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
<div class="main-nav" id="menu">
|
|
||||||
<div class="flex-container">
|
|
||||||
<span class="sidebar-brand">
|
|
||||||
<h3 style='font-size: 25px'>Vela Template</h3>
|
|
||||||
</span>
|
|
||||||
</div> <!-- class="flex-container" -->
|
|
||||||
|
|
||||||
<nav class="sidebar-nav">
|
|
||||||
<ul class="metismenu" id="metismenu" >
|
|
||||||
<li><a href="/index.html">Home</a></li>
|
|
||||||
<li><a href="/menu1/">Code blocks</a></li>
|
|
||||||
<li><a href="" class="has-arrow">Topic</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="/menu2/">More goodies</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="/menu3/">Tags</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div> <!-- main nav menu -->
|
|
||||||
|
|
||||||
<main id="panel">
|
|
||||||
<div class="toggle-button hamburger hamburger--spin">
|
|
||||||
<div class="hamburger-box">
|
|
||||||
<div class="hamburger-inner"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h1 class="page title"><img src="/assets/cv_photo.jpg" class="start-img"> {{isdef title}}{{fill title}}{{end}}</h1>
|
|
||||||
|
|
||||||
<hr>
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="page-foot">
|
<div class="page-foot">
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
© {{ fill author }}. {{isnotpage /tag/*}}Last modified: {{ fill fd_mtime }}.{{end}} Website built with <a href="https://github.com/tlienart/Franklin.jl">Franklin.jl</a>.
|
© {{ fill author }}. Last modified: {{ fill fd_mtime }}. Website built with <a href="https://github.com/tlienart/Franklin.jl">Franklin.jl</a>.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<link href="/css/franklin.css" rel="stylesheet">
|
|
||||||
<link href="/css/vela.css" rel="stylesheet">
|
|
||||||
<script src="/libs/vela/jquery.min.js"></script>
|
|
||||||
|
|
||||||
<link rel="icon" href="/assets/favicon.png">
|
|
|
@ -1,21 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
{{insert style.html}}
|
|
||||||
<title>Tag: {{fill fd_tag}}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{{insert nav.html}}
|
|
||||||
<div class="{{div_content}}">
|
|
||||||
<h1>Tag: {{fill fd_tag}}</h1>
|
|
||||||
{{taglist}}
|
|
||||||
{{insert page_foot.html}}
|
|
||||||
</div>
|
|
||||||
<!-- close what is opened in nav.html -->
|
|
||||||
</main> <!-- end of id=main -->
|
|
||||||
<script src="/libs/vela/metisMenu.min.js"></script>
|
|
||||||
<script src="/libs/vela/slideout.min.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,34 +0,0 @@
|
||||||
//initialize metismenu
|
|
||||||
$("#metismenu").metisMenu();
|
|
||||||
//initialize slideout
|
|
||||||
var slideout = new Slideout({
|
|
||||||
'panel': document.getElementById('panel'),
|
|
||||||
'menu': document.getElementById('menu'),
|
|
||||||
'padding': 300,
|
|
||||||
'tolerance': 70
|
|
||||||
});
|
|
||||||
//for closing menu on page click
|
|
||||||
function close(eve) {
|
|
||||||
eve.preventDefault();
|
|
||||||
slideout.close();
|
|
||||||
}
|
|
||||||
//make the hamburger animation correct when using touch events
|
|
||||||
slideout
|
|
||||||
.on('beforeopen', function() {
|
|
||||||
this.panel.classList.add('panel-open');
|
|
||||||
$(".hamburger").toggleClass("is-active");
|
|
||||||
$(".header-hamburger").toggleClass("fixed-open");
|
|
||||||
})
|
|
||||||
.on('open', function() {
|
|
||||||
this.panel.addEventListener('click', close);
|
|
||||||
})
|
|
||||||
.on('beforeclose', function() {
|
|
||||||
this.panel.classList.remove('panel-open');
|
|
||||||
this.panel.removeEventListener('click', close);
|
|
||||||
$(".hamburger").removeClass("is-active");
|
|
||||||
$(".header-hamburger").removeClass("fixed-open");
|
|
||||||
});
|
|
||||||
// Toggle button
|
|
||||||
$('.toggle-button').on('click', function() {
|
|
||||||
slideout.toggle();
|
|
||||||
});
|
|
File diff suppressed because one or more lines are too long
|
@ -1,9 +0,0 @@
|
||||||
/*!
|
|
||||||
* metismenu - v2.7.9
|
|
||||||
* A jQuery menu plugin
|
|
||||||
* https://github.com/onokumus/metismenu#readme
|
|
||||||
*
|
|
||||||
* Made by Osman Nuri Okumus <onokumus@gmail.com> (https://github.com/onokumus)
|
|
||||||
* Under MIT License
|
|
||||||
*/
|
|
||||||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):n.metisMenu=e(n.jQuery)}(this,function(n){"use strict";function a(s){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{},e=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(a).filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable}))),e.forEach(function(n){var e,i,t;e=s,t=a[i=n],i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t})}return s}var o,e,r,i,t,l,c,s,g=function(t){var e="transitionend",s={TRANSITION_END:"mmTransitionEnd",triggerTransitionEnd:function(n){t(n).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)}};function n(n){var e=this,i=!1;return t(this).one(s.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||s.triggerTransitionEnd(e)},n),this}return t.fn.mmEmulateTransitionEnd=n,t.event.special[s.TRANSITION_END]={bindType:e,delegateType:e,handle:function(n){if(t(n.target).is(this))return n.handleObj.handler.apply(this,arguments)}},s}(n=n&&n.hasOwnProperty("default")?n.default:n);return i="."+(r=e="metisMenu"),t=(o=n).fn[e],l={toggle:!0,preventDefault:!0,activeClass:"active",collapseClass:"collapse",collapseInClass:"in",collapsingClass:"collapsing",triggerElement:"a",parentTrigger:"li",subMenu:"ul"},c={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},s=function(){function s(n,e){this.element=n,this.config=a({},l,e),this.transitioning=null,this.init()}var n=s.prototype;return n.init=function(){var a=this,r=this.config;o(this.element).find(r.parentTrigger+"."+r.activeClass).has(r.subMenu).children(r.subMenu).addClass(r.collapseClass+" "+r.collapseInClass),o(this.element).find(r.parentTrigger).not("."+r.activeClass).has(r.subMenu).children(r.subMenu).addClass(r.collapseClass),o(this.element).find(r.parentTrigger).has(r.subMenu).children(r.triggerElement).on(c.CLICK_DATA_API,function(n){var e=o(this),i=e.parent(r.parentTrigger),t=i.siblings(r.parentTrigger).children(r.triggerElement),s=i.children(r.subMenu);r.preventDefault&&n.preventDefault(),"true"!==e.attr("aria-disabled")&&(i.hasClass(r.activeClass)?(e.attr("aria-expanded",!1),a.hide(s)):(a.show(s),e.attr("aria-expanded",!0),r.toggle&&t.attr("aria-expanded",!1)),r.onTransitionStart&&r.onTransitionStart(n))})},n.show=function(n){var e=this;if(!this.transitioning&&!o(n).hasClass(this.config.collapsingClass)){var i=o(n),t=o.Event(c.SHOW);if(i.trigger(t),!t.isDefaultPrevented()){i.parent(this.config.parentTrigger).addClass(this.config.activeClass),this.config.toggle&&this.hide(i.parent(this.config.parentTrigger).siblings().children(this.config.subMenu+"."+this.config.collapseInClass)),i.removeClass(this.config.collapseClass).addClass(this.config.collapsingClass).height(0),this.setTransitioning(!0);i.height(n[0].scrollHeight).one(g.TRANSITION_END,function(){e.config&&e.element&&(i.removeClass(e.config.collapsingClass).addClass(e.config.collapseClass+" "+e.config.collapseInClass).height(""),e.setTransitioning(!1),i.trigger(c.SHOWN))}).mmEmulateTransitionEnd(350)}}},n.hide=function(n){var e=this;if(!this.transitioning&&o(n).hasClass(this.config.collapseInClass)){var i=o(n),t=o.Event(c.HIDE);if(i.trigger(t),!t.isDefaultPrevented()){i.parent(this.config.parentTrigger).removeClass(this.config.activeClass),i.height(i.height())[0].offsetHeight,i.addClass(this.config.collapsingClass).removeClass(this.config.collapseClass).removeClass(this.config.collapseInClass),this.setTransitioning(!0);var s=function(){e.config&&e.element&&(e.transitioning&&e.config.onTransitionEnd&&e.config.onTransitionEnd(),e.setTransitioning(!1),i.trigger(c.HIDDEN),i.removeClass(e.config.collapsingClass).addClass(e.config.collapseClass))};0===i.height()||"none"===i.css("display")?s():i.height(0).one(g.TRANSITION_END,s).mmEmulateTransitionEnd(350)}}},n.setTransitioning=function(n){this.transitioning=n},n.dispose=function(){o.removeData(this.element,r),o(this.element).find(this.config.parentTrigger).has(this.config.subMenu).children(this.config.triggerElement).off("click"),this.transitioning=null,this.config=null,this.element=null},s.jQueryInterface=function(t){return this.each(function(){var n=o(this),e=n.data(r),i=a({},l,n.data(),"object"==typeof t&&t?t:{});if(!e&&/dispose/.test(t)&&this.dispose(),e||(e=new s(this,i),n.data(r,e)),"string"==typeof t){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},s}(),o.fn[e]=s.jQueryInterface,o.fn[e].Constructor=s,o.fn[e].noConflict=function(){return o.fn[e]=t,s.jQueryInterface},s});
|
|
File diff suppressed because one or more lines are too long
71
config.md
71
config.md
|
@ -1,28 +1,55 @@
|
||||||
<!--
|
@def author = "Eduardo Cueto Mendoza"
|
||||||
Add here global page variables to use throughout your
|
@def hasmath = false <!-- mostly there's no maths on pages -->
|
||||||
website.
|
@def generate_rss = false
|
||||||
The website_* must be defined for the RSS to work
|
|
||||||
-->
|
|
||||||
@def website_title = "Franklin Template"
|
|
||||||
@def website_descr = "Example website using Franklin"
|
|
||||||
@def website_url = "https://tlienart.github.io/FranklinTemplates.jl/"
|
|
||||||
|
|
||||||
@def author = "Septimia Zenobia"
|
@def mintoclevel = 2 <!-- TOCS only for level h2 and higher -->
|
||||||
|
@def maxtoclevel = 3 <!-- TOCS only up to level 3 included -->
|
||||||
|
|
||||||
@def mintoclevel = 2
|
@def hasplotly = false
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Add here files or directories that should be ignored by Franklin, otherwise
|
Useful HTML snippets
|
||||||
these files might be copied and, if markdown, processed by Franklin which
|
* \blurb{...} for a blurb at the top of a page
|
||||||
you might not want. Indicate directories by ending the name with a `/`.
|
* \refblank{...} for a link with target blank
|
||||||
|
* \lineskip forces skipping of a line somewhere
|
||||||
-->
|
-->
|
||||||
@def ignore = ["node_modules/", "franklin", "franklin.pub"]
|
|
||||||
|
|
||||||
<!--
|
\newcommand{\blurb}[1]{
|
||||||
Add here global latex commands to use throughout your
|
~~~
|
||||||
pages. It can be math commands but does not need to be.
|
<span style="font-size:24px;font-weight:300;">!#1</span>
|
||||||
For instance:
|
~~~
|
||||||
* \newcommand{\phrase}{This is a long phrase to copy.}
|
}
|
||||||
-->
|
\newcommand{\refblank}[2]{
|
||||||
\newcommand{\R}{\mathbb R}
|
~~~
|
||||||
\newcommand{\scal}[1]{\langle #1 \rangle}
|
<a href="!#2" target="_blank" rel="noopener noreferrer">#1</a>
|
||||||
|
~~~
|
||||||
|
}
|
||||||
|
\newcommand{\lineskip}{@@blank@@}
|
||||||
|
\newcommand{\skipline}{\lineskip}
|
||||||
|
\newcommand{\note}[1]{@@note @@title ⚠ Note@@ @@content #1 @@ @@}
|
||||||
|
|
||||||
|
\newcommand{\esc}[2]{
|
||||||
|
```julia:esc__!#1
|
||||||
|
#hideall
|
||||||
|
using Markdown
|
||||||
|
println("\`\`\`\`\`plaintext $(Markdown.htmlesc(raw"""#2""")) \`\`\`\`\`")
|
||||||
|
```
|
||||||
|
\textoutput{esc__!#1}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\esch}[2]{
|
||||||
|
```julia:esc__!#1
|
||||||
|
#hideall
|
||||||
|
using Markdown
|
||||||
|
println("\`\`\`\`\`html $(Markdown.htmlesc(raw"""#2""")) \`\`\`\`\`")
|
||||||
|
```
|
||||||
|
\textoutput{esc__!#1}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\span}[2]{~~~<span style="display:inline-block;!#1">~~~!#2~~~</span>~~~}
|
||||||
|
|
||||||
|
\newcommand{\goto}[1]{~~~<a href="!#1" id="goto"><span id="check">✓</span><span id="arrow"><b>→</b></span></a>~~~}
|
||||||
|
|
||||||
|
|
||||||
|
\newcommand{\smindent}[1]{\span{width:45px;text-align:right;color:slategray;}{#1}}
|
||||||
|
\newcommand{\smnote}[1]{\style{font-size:85%;line-height:0em;}{#1}}
|
||||||
|
|
226
index.md
226
index.md
|
@ -1,5 +1,3 @@
|
||||||
@def title = "A Neural Network Developer"
|
|
||||||
@def tags = ["syntax", "code"]
|
|
||||||
@def hascode = true
|
@def hascode = true
|
||||||
|
|
||||||
# Welcome to my blog
|
# Welcome to my blog
|
||||||
|
@ -30,194 +28,66 @@ function len(p::T) where T<:Point
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
## A bit about myself
|
|
||||||
|
|
||||||
My interest in science started from a very early age I was in love with physics because a teacher in elementary school had a copy of the book `COSMOS` which he lend me and I was marveled by the words of [Carl Sagan](https://en.wikipedia.org/wiki/Carl_Sagan)
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
# How to use Franklin
|
# Building static websites in Julia
|
||||||
|
|
||||||
\tableofcontents (comment here) you can use \toc as well (comment here)
|
\blurb{Franklin is a simple, customisable static site generator oriented towards technical blogging and light, fast-loading pages.}
|
||||||
|
|
||||||
This section is meant as a refresher if you're new to Franklin.
|
## Key features
|
||||||
Have a look at both how the website renders and the corresponding markdown (`index.md`).
|
|
||||||
Modify at will to get a feeling for how things work!
|
|
||||||
|
|
||||||
Ps: if you want to modify the header or footer or the general look of the website, adjust the files in
|
@@flist
|
||||||
* `src/_css/` and
|
* \goto{/syntax/markdown/} Augmented markdown allowing definition of LaTeX-like commands,
|
||||||
* `src/_html_parts/`.
|
* \goto{/syntax/divs-commands/} Easy inclusion of user-defined div-blocks,
|
||||||
|
* \goto{/syntax/divs-commands/} Maths rendered via [KaTeX](https://katex.org/), code via [highlight.js](https://highlightjs.org) both can be pre-rendered,
|
||||||
|
* \goto{/code/} Can live-evaluate Julia code blocks,
|
||||||
|
* \goto{/workflow/#creating_your_website} Live preview of modifications,
|
||||||
|
* \goto{/workflow/#optimisation_step} Simple optimisation step to compress and pre-render the website,
|
||||||
|
* \goto{/workflow/#publication_step} Simple publication step to deploy the website,
|
||||||
|
* \goto{/code/literate/} Straightforward integration with [Literate.jl](https://github.com/fredrikekre/Literate.jl).
|
||||||
|
@@
|
||||||
|
|
||||||
## The base with Markdown
|
## Quick start
|
||||||
|
|
||||||
The [standard markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) can be used such as titles using `#`, lists:
|
To install Franklin with Julia **≥ 1.3**,
|
||||||
|
|
||||||
* element with **bold**
|
```julia-repl
|
||||||
* element with _emph_
|
(v1.4) pkg> add Franklin
|
||||||
|
|
||||||
or code-blocks `inline` or with highlighting (note the `@def hascode = true` in the source to allow [highlight.js](https://highlightjs.org/) to do its job):
|
|
||||||
|
|
||||||
```julia
|
|
||||||
abstract type Point end
|
|
||||||
struct PointR2{T<:Real} <: Point
|
|
||||||
x::T
|
|
||||||
y::T
|
|
||||||
end
|
|
||||||
struct PointR3{T<:Real} <: Point
|
|
||||||
x::T
|
|
||||||
y::T
|
|
||||||
z::T
|
|
||||||
end
|
|
||||||
function len(p::T) where T<:Point
|
|
||||||
sqrt(sum(getfield(p, η)^2 for η ∈ fieldnames(T)))
|
|
||||||
end
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also quote stuff
|
You can then just try it out:
|
||||||
|
|
||||||
> You must have chaos within you to ...
|
```julia-repl
|
||||||
|
julia> using Franklin
|
||||||
|
julia> newsite("mySite", template="pure-sm")
|
||||||
|
✓ Website folder generated at "mySite" (now the current directory).
|
||||||
|
→ Use serve() from Franklin to see the website in your browser.
|
||||||
|
|
||||||
or have tables:
|
julia> serve()
|
||||||
|
→ Initial full pass...
|
||||||
| English | Mandarin |
|
→ Starting the server...
|
||||||
| --------------- | ---------- |
|
✓ LiveServer listening on http://localhost:8000/ ...
|
||||||
| winnie the pooh | 维尼熊 |
|
(use CTRL+C to shut down)
|
||||||
|
|
||||||
Note that you may have to do a bit of CSS-styling to get these elements to look the way you want them (the same holds for the whole page in fact).
|
|
||||||
|
|
||||||
### Symbols and html entities
|
|
||||||
|
|
||||||
If you want a dollar sign you have to escape it like so: \$, you can also use html entities like so: → or π or, if you're using Juno for instance, you can use `\pi[TAB]` to insert the symbol as is: π (it will be converted to a html entity).[^1]
|
|
||||||
|
|
||||||
If you want to show a backslash, just use it like so: \ ; if you want to force a line break, use a ` \\ ` like \\ so (this is on a new line).[^blah]
|
|
||||||
|
|
||||||
If you want to show a backtick, escape it like so: \` and if you want to show a tick in inline code use double backticks like ``so ` ...``.
|
|
||||||
|
|
||||||
Footnotes are nice too:
|
|
||||||
|
|
||||||
[^1]: this is the text for the first footnote, you can style all this looking at `.fndef` elements; note that the whole footnote definition is _expected to be on the same line_.
|
|
||||||
[^blah]: and this is a longer footnote with some blah from veggie ipsum: turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko.
|
|
||||||
|
|
||||||
## Basic Franklin extensions
|
|
||||||
|
|
||||||
### Divs
|
|
||||||
|
|
||||||
It is sometimes useful to have a short way to make a part of the page belong to a div so that it can be styled separately.
|
|
||||||
You can do this easily with Franklin by using `@@divname ... @@`.
|
|
||||||
For instance, you could want a blue background behind some text.
|
|
||||||
|
|
||||||
@@colbox-blue
|
|
||||||
Here we go! (this is styled in the css sheet with name "colbox-blue").
|
|
||||||
@@
|
|
||||||
|
|
||||||
Since it's just a `<div>` block, you can put this construction wherever you like and locally style your text.
|
|
||||||
|
|
||||||
### LaTeX and Maths
|
|
||||||
|
|
||||||
Essentially three things are imitated from LaTeX
|
|
||||||
|
|
||||||
1. you can introduce definitions using `\newcommand`
|
|
||||||
1. you can use hyper-references with `\eqref`, `\cite`, ...
|
|
||||||
1. you can show nice maths (via KaTeX)
|
|
||||||
|
|
||||||
The definitions can be introduced in the page or in the `config.md` (in which case they're available everywhere as opposed to just in that page).
|
|
||||||
For instance, the commands `\scal` and `\R` are defined in the config file (see `src/config.md`) and can directly be used whereas the command `\E` is defined below (and therefore only available on this page):
|
|
||||||
|
|
||||||
\newcommand{\E}[1]{\mathbb E\left[#1\right]}
|
|
||||||
|
|
||||||
Now we can write something like
|
|
||||||
|
|
||||||
$$ \varphi(\E{X}) \le \E{\varphi(X)}. \label{equation blah} $$
|
|
||||||
|
|
||||||
since we've given it the label `\label{equation blah}`, we can refer it like so: \eqref{equation blah} which can be convenient for pages that are math-heavy.
|
|
||||||
|
|
||||||
In a similar vein you can cite references that would be at the bottom of the page: \citep{noether15, bezanson17}.
|
|
||||||
|
|
||||||
**Note**: the LaTeX commands you define can also incorporate standard markdown (though not in a math environment) so for instance let's define a silly `\bolditalic` command.
|
|
||||||
|
|
||||||
\newcommand{\bolditalic}[1]{_**!#1**_} (comment here)_ ignore this comment, it helps atom to not get confused by the trailing underscore when highlighting the code but is not necessary.(comment here)
|
|
||||||
|
|
||||||
and use it \bolditalic{here for example}.
|
|
||||||
|
|
||||||
Here's another quick one, a command to change the color:
|
|
||||||
|
|
||||||
\newcommand{\col}[2]{~~~<span style="color:#1">#2</span>~~~}
|
|
||||||
|
|
||||||
This is \col{blue}{in blue} or \col{#bf37bc}{in #bf37bc}.
|
|
||||||
|
|
||||||
### A quick note on whitespaces
|
|
||||||
|
|
||||||
For most commands you will use `#k` to refer to the $k$-th argument as in LaTeX.
|
|
||||||
In order to reduce headaches, this forcibly introduces a whitespace on the left of whatever is inserted which, usually, changes nothing visible (e.g. in a math settings).
|
|
||||||
However there _may be_ situations where you do not want this to happen and you know that the insertion will not clash with anything else.
|
|
||||||
In that case, you should simply use `!#k` which will not introduce that whitespace.
|
|
||||||
It's probably easier to see this in action:
|
|
||||||
|
|
||||||
\newcommand{\pathwith}[1]{`/usr/local/bin/#1`}
|
|
||||||
\newcommand{\pathwithout}[1]{`/usr/local/bin/!#1`}
|
|
||||||
|
|
||||||
* with: \pathwith{script.jl}, there's a whitespace you don't want 🚫
|
|
||||||
* without: \pathwithout{script.jl} here there isn't ✅
|
|
||||||
|
|
||||||
### Raw HTML
|
|
||||||
|
|
||||||
You can include raw HTML by just surrounding a block with `~~~`.
|
|
||||||
Not much more to add.
|
|
||||||
This may be useful for local custom layouts like having a photo next to a text in a specific way.
|
|
||||||
|
|
||||||
~~~
|
|
||||||
<div class="row">
|
|
||||||
<div class="container">
|
|
||||||
<img class="left" src="/assets/rndimg.jpg">
|
|
||||||
<p>
|
|
||||||
Marine iguanas are truly splendid creatures. They're found on the Gálapagos islands, have skin that basically acts as a solar panel, can swim and may have the ability to adapt their body size depending on whether there's food or not.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Evolution is cool.
|
|
||||||
</p>
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
~~~
|
|
||||||
|
|
||||||
**Note 1**: again, entire such blocks can be made into latex-like commands via `\newcommand{\mynewblock}[1]{...}`.
|
|
||||||
|
|
||||||
**Note 2**: whatever is in a raw HTML block is *not* further processed (so you can't have LaTeX in there for instance). A partial way around this is to use `@@...` blocks which *will* be recursively parsed. The following code gives the same result as above with the small difference that there is LaTeX being processed in the inner div.
|
|
||||||
|
|
||||||
@@row
|
|
||||||
@@container
|
|
||||||
@@left  @@
|
|
||||||
@@
|
|
||||||
Marine iguanas are **truly splendid** creatures. They're not found in equations like $\exp(-i\pi)+1$. But they're still quite cool.
|
|
||||||
~~~
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
~~~
|
|
||||||
@@
|
|
||||||
|
|
||||||
## Pages and structure
|
|
||||||
|
|
||||||
Here are a few empty pages connecting to the menu links to show where files can go and the resulting paths. (It's probably best if you look at the source folder for this).
|
|
||||||
|
|
||||||
* [menu 1](/menu1/)
|
|
||||||
* [menu 2](/menu2/)
|
|
||||||
* [menu 3](/menu3/)
|
|
||||||
|
|
||||||
## References (not really)
|
|
||||||
|
|
||||||
* \biblabel{noether15}{Noether (1915)} **Noether**, Körper und Systeme rationaler Funktionen, 1915.
|
|
||||||
* \biblabel{bezanson17}{Bezanson et al. (2017)} **Bezanson**, **Edelman**, **Karpinski** and **Shah**, [Julia: a fresh approach to numerical computing](https://julialang.org/research/julia-fresh-approach-BEKS.pdf), SIAM review 2017.
|
|
||||||
|
|
||||||
## Header and Footer
|
|
||||||
|
|
||||||
As you can see here at the bottom of the page, there is a footer which you may want on all pages but for instance you may want the date of last modification to be displayed.
|
|
||||||
In a fashion heavily inspired by [Hugo](https://gohugo.io), you can write things like
|
|
||||||
|
|
||||||
```html
|
|
||||||
Last modified: {{ fill fd_mtime }}.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
(cf. `src/_html_parts/page_foot.html`) which will then replace these braces with the content of a dictionary of variables at the key `fd_mtime`.
|
If you navigate to that URL in your browser, you will see the website. If you then open `index.md` in an editor and modify it at will, the changes will be live rendered in your browser.
|
||||||
This dictionary of variables is accessed locally by pages through `@def varname = value` and globally through the `config.md` page via the same syntax.
|
You can also inspect the file `menu1.md` which offers more examples of what Franklin can do.
|
||||||
|
|
||||||
There's a few other such functions of the form `{{fname p₁ p₂}}` as well as support for conditional blocks. If you wander through the `src/_html_parts/` folder and its content, you should be able to see those in action.
|
## Installing optional extras
|
||||||
|
|
||||||
|
Franklin allows a post-processing step to compress HTML and CSS and pre-render code blocks and math environments.
|
||||||
|
This requires a couple of dependencies:
|
||||||
|
@@tlist
|
||||||
|
* [`python3`](https://www.python.org/downloads/) for the minification of the site,
|
||||||
|
* [`node.js`](https://nodejs.org/en/) for the pre-rendering of KaTeX and code highlighting.
|
||||||
|
@@
|
||||||
|
You will then need to install `highlight.js`, which you should do from Julia using the [NodeJS.jl](https://github.com/davidanthoff/NodeJS.jl) package:
|
||||||
|
|
||||||
|
```julia-repl
|
||||||
|
julia> using NodeJS
|
||||||
|
julia> run(`sudo $(npm_cmd()) install highlight.js`)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: a key advantage of using `NodeJS` for this instead of using `npm` yourself is that it puts the libraries in the "right place" for Julia to find them.
|
||||||
|
|
||||||
|
Assuming you have `python3`, Franklin will try to install the python package [`css_html_js_minify`](https://github.com/juancarlospaco/css-html-js-minify) if via `pip3`.
|
||||||
-->
|
-->
|
83
menu1.md
83
menu1.md
|
@ -1,83 +0,0 @@
|
||||||
@def title = "Code blocks"
|
|
||||||
@def hascode = true
|
|
||||||
@def date = Date(2019, 3, 22)
|
|
||||||
@def rss = "A short description of the page which would serve as **blurb** in a `RSS` feed; you can use basic markdown here but the whole description string must be a single line (not a multiline string). Like this one for instance. Keep in mind that styling is minimal in RSS so for instance don't expect maths or fancy styling to work; images should be ok though: "
|
|
||||||
|
|
||||||
@def tags = ["syntax", "code"]
|
|
||||||
|
|
||||||
# Working with code blocks
|
|
||||||
|
|
||||||
\toc
|
|
||||||
|
|
||||||
## Live evaluation of code blocks
|
|
||||||
|
|
||||||
If you would like to show code as well as what the code outputs, you only need to specify where the script corresponding to the code block will be saved.
|
|
||||||
|
|
||||||
Indeed, what happens is that the code block gets saved as a script which then gets executed.
|
|
||||||
This also allows for that block to not be re-executed every time you change something _else_ on the page.
|
|
||||||
|
|
||||||
Here's a simple example (change values in `a` to see the results being live updated):
|
|
||||||
|
|
||||||
```julia:./exdot.jl
|
|
||||||
using LinearAlgebra
|
|
||||||
a = [1, 2, 3, 3, 4, 5, 2, 2]
|
|
||||||
@show dot(a, a)
|
|
||||||
println(dot(a, a))
|
|
||||||
```
|
|
||||||
|
|
||||||
You can now show what this would look like:
|
|
||||||
|
|
||||||
\output{./exdot.jl}
|
|
||||||
|
|
||||||
**Notes**:
|
|
||||||
* you don't have to specify the `.jl` (see below),
|
|
||||||
* you do need to explicitly use print statements or `@show` for things to show, so just leaving a variable at the end like you would in the REPL will show nothing,
|
|
||||||
* only Julia code blocks are supported at the moment, there may be a support for scripting languages like `R` or `python` in the future,
|
|
||||||
* the way you specify the path is important; see [the docs](https://tlienart.github.io/franklindocs/code/index.html#more_on_paths) for more info. If you don't care about how things are structured in your `/assets/` folder, just use `./scriptname.jl`. If you want things to be grouped, use `./group/scriptname.jl`. For more involved uses, see the docs.
|
|
||||||
|
|
||||||
Lastly, it's important to realise that if you don't change the content of the code, then that code will only be executed _once_ even if you make multiple changes to the text around it.
|
|
||||||
|
|
||||||
Here's another example,
|
|
||||||
|
|
||||||
```julia:./code/ex2
|
|
||||||
for i ∈ 1:5, j ∈ 1:5
|
|
||||||
print(" ", rpad("*"^i,5), lpad("*"^(6-i),5), j==5 ? "\n" : " "^4)
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
which gives the (utterly useless):
|
|
||||||
|
|
||||||
\output{./code/ex2}
|
|
||||||
|
|
||||||
note the absence of `.jl`, it's inferred.
|
|
||||||
|
|
||||||
You can also hide lines (that will be executed nonetheless):
|
|
||||||
|
|
||||||
```julia:./code/ex3
|
|
||||||
using Random
|
|
||||||
Random.seed!(1) # hide
|
|
||||||
@show randn(2)
|
|
||||||
```
|
|
||||||
|
|
||||||
\output{./code/ex3}
|
|
||||||
|
|
||||||
|
|
||||||
## Including scripts
|
|
||||||
|
|
||||||
Another approach is to include the content of a script that has already been executed.
|
|
||||||
This can be an alternative to the description above if you'd like to only run the code once because it's particularly slow or because it's not Julia code.
|
|
||||||
For this you can use the `\input` command specifying which language it should be tagged as:
|
|
||||||
|
|
||||||
|
|
||||||
\input{julia}{/_assets/scripts/script1.jl} <!--_-->
|
|
||||||
|
|
||||||
|
|
||||||
these scripts can be run in such a way that their output is also saved to file, see `scripts/generate_results.jl` for instance, and you can then also input the results:
|
|
||||||
|
|
||||||
\output{/_assets/scripts/script1.jl} <!--_-->
|
|
||||||
|
|
||||||
which is convenient if you're presenting code.
|
|
||||||
|
|
||||||
**Note**: paths specification matters, see [the docs](https://tlienart.github.io/franklindocs/code/index.html#more_on_paths) for details.
|
|
||||||
|
|
||||||
Using this approach with the `generate_results.jl` file also makes sure that all the code on your website works and that all results match the code which makes maintenance easier.
|
|
132
menu2.md
132
menu2.md
|
@ -1,132 +0,0 @@
|
||||||
@def title = "More goodies"
|
|
||||||
@def hascode = true
|
|
||||||
@def rss = "A short description of the page which would serve as **blurb** in a `RSS` feed; you can use basic markdown here but the whole description string must be a single line (not a multiline string). Like this one for instance. Keep in mind that styling is minimal in RSS so for instance don't expect maths or fancy styling to work; images should be ok though: "
|
|
||||||
@def rss_title = "More goodies"
|
|
||||||
@def rss_pubdate = Date(2019, 5, 1)
|
|
||||||
|
|
||||||
@def tags = ["syntax", "code", "image"]
|
|
||||||
|
|
||||||
# More goodies
|
|
||||||
|
|
||||||
\toc
|
|
||||||
|
|
||||||
## More markdown support
|
|
||||||
|
|
||||||
The Julia Markdown parser in Julia's stdlib is not exactly complete and Franklin strives to bring useful extensions that are either defined in standard specs such as Common Mark or that just seem like useful extensions.
|
|
||||||
|
|
||||||
* indirect references for instance [like so]
|
|
||||||
|
|
||||||
[like so]: http://existentialcomics.com/
|
|
||||||
|
|
||||||
or also for images
|
|
||||||
|
|
||||||
![][some image]
|
|
||||||
|
|
||||||
some people find that useful as it allows referring multiple times to the same link for instance.
|
|
||||||
|
|
||||||
[some image]: https://upload.wikimedia.org/wikipedia/commons/9/90/Krul.svg
|
|
||||||
|
|
||||||
* un-qualified code blocks and indented code blocks are allowed and are julia by default
|
|
||||||
|
|
||||||
a = 1
|
|
||||||
b = a+1
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
a = 1
|
|
||||||
b = a+1
|
|
||||||
```
|
|
||||||
|
|
||||||
you can specify the default language with `@def lang = "julia"`.
|
|
||||||
If you actually want a "plain" code block, qualify it as `plaintext` like
|
|
||||||
|
|
||||||
```plaintext
|
|
||||||
so this is plain-text stuff.
|
|
||||||
```
|
|
||||||
|
|
||||||
## A bit more highlighting
|
|
||||||
|
|
||||||
Extension of highlighting for `pkg` an `shell` mode in Julia:
|
|
||||||
|
|
||||||
```julia-repl
|
|
||||||
(v1.4) pkg> add Franklin
|
|
||||||
shell> blah
|
|
||||||
julia> 1+1
|
|
||||||
(Sandbox) pkg> resolve
|
|
||||||
```
|
|
||||||
|
|
||||||
you can tune the colouring in the CSS etc via the following classes:
|
|
||||||
|
|
||||||
* `.hljs-meta` (for `julia>`)
|
|
||||||
* `.hljs-metas` (for `shell>`)
|
|
||||||
* `.hljs-metap` (for `...pkg>`)
|
|
||||||
|
|
||||||
## More customisation
|
|
||||||
|
|
||||||
Franklin, by design, gives you a lot of flexibility to define how you want stuff be done, this includes doing your own parsing/processing and your own HTML generation using Julia code.
|
|
||||||
|
|
||||||
In order to do this, you can define two types of functions in a `utils.jl` file which will complement your `config.md` file:
|
|
||||||
|
|
||||||
* `hfun_*` allow you to plug custom-generated HTML somewhere
|
|
||||||
* `lx_*` allow you to do custom parsing of markdown and generation of HTML
|
|
||||||
|
|
||||||
The former (`hfun_*`) is most likely to be useful.
|
|
||||||
|
|
||||||
### Custom "hfun"
|
|
||||||
|
|
||||||
If you define a function `hfun_bar` in the `utils.jl` then you have access to a new template function `{{bar ...}}`. The parameters are passed as a list of strings, for instance variable names but it could just be strings as well.
|
|
||||||
|
|
||||||
For instance:
|
|
||||||
|
|
||||||
```julia
|
|
||||||
function hfun_bar(vname)
|
|
||||||
val = Meta.parse(vname[1])
|
|
||||||
return round(sqrt(val), digits=2)
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
~~~
|
|
||||||
.hf {background-color:black;color:white;font-weight:bold;}
|
|
||||||
~~~
|
|
||||||
|
|
||||||
Can be called with `{{bar 4}}`: **{{bar 4}}**.
|
|
||||||
|
|
||||||
Usually you will want to pass variable name (either local or global) and collect their value via one of `locvar`, `globvar` or `pagevar` depending on your use case.
|
|
||||||
Let's have another toy example:
|
|
||||||
|
|
||||||
```julia
|
|
||||||
function hfun_m1fill(vname)
|
|
||||||
var = vname[1]
|
|
||||||
return pagevar("menu1", var)
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
Which you can use like this `{{m1fill title}}`: **{{m1fill title}}**. Of course in this specific case you could also have used `{{fill title menu1}}`: **{{fill title menu1}}**.
|
|
||||||
|
|
||||||
Of course these examples are not very useful, in practice you might want to use it to generate actual HTML in a specific way using Julia code.
|
|
||||||
For instance you can use it to customise how [tag pages look like](/menu3/#customising_tag_pages).
|
|
||||||
|
|
||||||
A nice example of what you can do is in the [SymbolicUtils.jl manual](https://juliasymbolics.github.io/SymbolicUtils.jl/api/) where they use a `hfun_` to generate HTML encapsulating the content of code docstrings, in a way doing something similar to what Documenter does. See [how they defined it](https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/website/utils.jl).
|
|
||||||
|
|
||||||
**Note**: the output **will not** be reprocessed by Franklin, if you want to generate markdown which should be processed by Franklin, then use `return fd2html(markdown, internal=true)` at the end.
|
|
||||||
|
|
||||||
### Custom "lx"
|
|
||||||
|
|
||||||
These commands will look the same as latex commands but what they do with their content is now entirely controlled by your code.
|
|
||||||
You can use this to do your own parsing of specific chunks of your content if you so desire.
|
|
||||||
|
|
||||||
The definition of `lx_*` commands **must** look like this:
|
|
||||||
|
|
||||||
```julia
|
|
||||||
function lx_baz(com, _)
|
|
||||||
# keep this first line
|
|
||||||
brace_content = Franklin.content(com.braces[1]) # input string
|
|
||||||
# do whatever you want here
|
|
||||||
return uppercase(brace_content)
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
You can call the above with `\baz{some string}`: \baz{some string}.
|
|
||||||
|
|
||||||
**Note**: the output **will be** reprocessed by Franklin, if you want to avoid this, then escape the output by using `return "~~~" * s * "~~~"` and it will be plugged in as is in the HTML.
|
|
99
menu3.md
99
menu3.md
|
@ -1,99 +0,0 @@
|
||||||
@def title = "Menu 3"
|
|
||||||
|
|
||||||
# Working with tags
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
|
|
||||||
* page with tag [`syntax`](/tag/syntax/)
|
|
||||||
* page with tag [`image`](/tag/image/)
|
|
||||||
* page with tag [`code`](/tag/code/)
|
|
||||||
|
|
||||||
\toc
|
|
||||||
|
|
||||||
## Indicating tags
|
|
||||||
|
|
||||||
To mark a page with tags, add:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
@def tags = ["tag1", "tag2"]
|
|
||||||
```
|
|
||||||
|
|
||||||
then that page, along with all others that have the tag `tag1` will be listed at `/tag/tag1/`.
|
|
||||||
|
|
||||||
## Customising tag pages
|
|
||||||
|
|
||||||
You can change how a `/tag/...` page looks like by modifying the `_layout/tag.html`. An important note is that you can **only** use **global** page variables (defined in `config.md`).
|
|
||||||
|
|
||||||
There are three "exceptions":
|
|
||||||
|
|
||||||
1. you can still use `{{ispage /tag/tagname/}} ... {{end}}` (or `{{isnotpage ...}}`) to have a different layout depending on the tag,
|
|
||||||
1. you can use the `fd_tag` variable which contains the name of the tag so `{{fill fd_tag}}` will input the tag string as is,
|
|
||||||
1. you can use `{{fill varname path/to/page}}` to exploit a page variable defined in a specific page.
|
|
||||||
|
|
||||||
## Customising tag lists
|
|
||||||
|
|
||||||
By default the tag list is very simple: it just collects all pages that match the tags and it shows them in a simple list by anti-chronological order (more recent at the top).
|
|
||||||
|
|
||||||
You can customise this by defining your own `hfun_custom_taglist` function in the `utils.jl` file. The commented blueprint for the simple default setting is below and should give you an idea of how to write your own generator.
|
|
||||||
|
|
||||||
Assuming you've defined such a function, don't forget to use `{{custom_taglist}}` in the `_layout/tag.html` instead of the default `{{taglist}}`.
|
|
||||||
|
|
||||||
```julia
|
|
||||||
function hfun_custom_taglist()::String
|
|
||||||
# -----------------------------------------
|
|
||||||
# Part1: Retrieve all pages associated with
|
|
||||||
# the tag & sort them
|
|
||||||
# -----------------------------------------
|
|
||||||
# retrieve the tag string
|
|
||||||
tag = locvar(:fd_tag)
|
|
||||||
# recover the relative paths to all pages that have that
|
|
||||||
# tag, these are paths like /blog/page1
|
|
||||||
rpaths = globvar("fd_tag_pages")[tag]
|
|
||||||
# you might want to sort these pages by chronological order
|
|
||||||
# you could also only show the most recent 5 etc...
|
|
||||||
sorter(p) = begin
|
|
||||||
# retrieve the "date" field of the page if defined, otherwise
|
|
||||||
# use the date of creation of the file
|
|
||||||
pvd = pagevar(p, :date)
|
|
||||||
if isnothing(pvd)
|
|
||||||
return Date(Dates.unix2datetime(stat(p * ".md").ctime))
|
|
||||||
end
|
|
||||||
return pvd
|
|
||||||
end
|
|
||||||
sort!(rpaths, by=sorter, rev=true)
|
|
||||||
|
|
||||||
# --------------------------------
|
|
||||||
# Part2: Write the HTML to plug in
|
|
||||||
# --------------------------------
|
|
||||||
# instantiate a buffer in which we will write the HTML
|
|
||||||
# to plug in the tag page
|
|
||||||
c = IOBuffer()
|
|
||||||
write(c, "...1...")
|
|
||||||
# go over all paths
|
|
||||||
for rpath in rpaths
|
|
||||||
# recover the url corresponding to the rpath
|
|
||||||
url = get_url(rpath)
|
|
||||||
# recover the title of the page if there is one defined,
|
|
||||||
# if there isn't, fallback on the path to the page
|
|
||||||
title = pagevar(rpath, "title")
|
|
||||||
if isnothing(title)
|
|
||||||
title = "/$rpath/"
|
|
||||||
end
|
|
||||||
# write some appropriate HTML
|
|
||||||
write(c, "...2...")
|
|
||||||
end
|
|
||||||
# finish the HTML
|
|
||||||
write(c, "...3...")
|
|
||||||
# return the HTML string
|
|
||||||
return String(take!(c))
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
For instance the default uses:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!-- 1, 3: simple list-->
|
|
||||||
<ul>...</ul>
|
|
||||||
<!-- 2: simple list item plugging in path + title -->
|
|
||||||
<li><a href="/$rpath/">$title</a></li>
|
|
||||||
```
|
|
26
utils.jl
26
utils.jl
|
@ -1,16 +1,14 @@
|
||||||
function hfun_bar(vname)
|
using Markdown
|
||||||
val = Meta.parse(vname[1])
|
|
||||||
return round(sqrt(val), digits=2)
|
|
||||||
end
|
|
||||||
|
|
||||||
function hfun_m1fill(vname)
|
function lx_escape(com, _)
|
||||||
var = vname[1]
|
# keep this first line
|
||||||
return pagevar("index", var)
|
content = Franklin.content(com.braces[1]) # input string
|
||||||
end
|
lang, code = split(content, "::")
|
||||||
|
scode = strip(code)
|
||||||
function lx_baz(com, _)
|
esc_code = Markdown.htmlesc(scode)
|
||||||
# keep this first line
|
io = IOBuffer()
|
||||||
brace_content = Franklin.content(com.braces[1]) # input string
|
println(io, "```$lang")
|
||||||
# do whatever you want here
|
println(io, esc_code)
|
||||||
return uppercase(brace_content)
|
println(io, "```")
|
||||||
|
return String(take!(io))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue