From a7ec2e0dee741e139df5fe2db0280d4fb6988cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Sat, 23 Feb 2019 11:33:24 +0100 Subject: [PATCH 01/24] first try --- .../2015-06-19-gaussian-elimination.mmark | 4 + .../post/2015-06-23-complex-division.mmark | 9 +- ...15-06-24-binomial-coefficient-tricks.mmark | 2 + content/post/2015-06-29-fibonacci.mmark | 2 + content/post/2015-06-29-inverse-sum.mmark | 2 + ...7-31-probabilistic-primality-testing.mmark | 4 + content/post/2015-11-08-symbols.mmark | 2 + content/post/2016-01-15-polyhedral-sets.mmark | 2 + ...17-d-hyperplanes-intersection-bounds.mmark | 2 + content/post/2016-04-12-vc-dimension.mmark | 8 +- content/post/2016-04-14-log-log-log.mmark | 2 + ...6-04-27-equivalence-of-3sum-problems.mmark | 10 ++- ...olynomial-time-approximation-schemes.mmark | 2 + .../post/2017-04-21-converging-series.mmark | 2 + content/post/2017-04-22-recurrences.mmark | 4 + ...17-07-21-quantum-computer-algorithms.mmark | 2 + ...2017-07-22-infinite-number-of-primes.mmark | 4 + .../2017-07-23-sums-of-geometric-series.mmark | 2 + content/post/2018-10-17-drunkards-walk.mmark | 4 + themes/prove/layouts/index.html | 89 ++++++++++++++----- themes/prove/layouts/partials/bootstrap.html | 2 - themes/prove/layouts/partials/footer.html | 2 + .../layouts/partials/google-icon-font.html | 2 + themes/prove/layouts/partials/header.html | 5 +- .../layouts/partials/materialize-css.html | 2 + .../layouts/partials/materialize-js.html | 2 + themes/prove/layouts/partials/math.html | 3 - themes/prove/layouts/partials/pagination.html | 20 ++--- themes/prove/layouts/partials/viewport.html | 2 + 29 files changed, 153 insertions(+), 45 deletions(-) delete mode 100644 themes/prove/layouts/partials/bootstrap.html create mode 100644 themes/prove/layouts/partials/google-icon-font.html create mode 100644 themes/prove/layouts/partials/materialize-css.html create mode 100644 themes/prove/layouts/partials/materialize-js.html create mode 100644 themes/prove/layouts/partials/viewport.html diff --git a/content/post/2015-06-19-gaussian-elimination.mmark b/content/post/2015-06-19-gaussian-elimination.mmark index 4d078c3..5e64ad7 100644 --- a/content/post/2015-06-19-gaussian-elimination.mmark +++ b/content/post/2015-06-19-gaussian-elimination.mmark @@ -2,6 +2,10 @@ date: 2015-06-19T00:00:00Z title: Gaussian elimination url: /2015/06/19/gaussian-elimination/ +thumbnail: + src: https://ipfs.io/ipfs/QmYaWTZLBGucEgA1uftuUby1DTmBA4zsPo8jCSYSTqJ9Jk +tags: + - algorithms --- [Python implementation](https://cocalc.com/projects/1b2a688b-0ee8-41b1-be25-2f6a95c36c76/files/Gaussian%20elimination.sagews). diff --git a/content/post/2015-06-23-complex-division.mmark b/content/post/2015-06-23-complex-division.mmark index 0323ddf..7105474 100644 --- a/content/post/2015-06-23-complex-division.mmark +++ b/content/post/2015-06-23-complex-division.mmark @@ -2,9 +2,16 @@ date: 2015-06-23T00:00:00Z title: Complex numbers division url: /2015/06/23/complex-division/ +thumbnail: + src: https://ipfs.io/ipfs/Qmd7X75zoQ7fn7QDp6TYkQjRdjazvHDJa1mdgq2YiZY1qJ --- $$ -\frac{a+bi}{c+di} = \frac{a+bi}{c+di} \frac{c-di}{c-di} = \frac{ac+bd}{c^2+d^2}+\frac{bc-ad}{c^2+d^2}i +\frac{a+bi}{c+di} = \ldots $$ + + +$$ +\frac{a+bi}{c+di} = \frac{a+bi}{c+di} \frac{c-di}{c-di} = \frac{ac+bd}{c^2+d^2}+\frac{bc-ad}{c^2+d^2}i +$$ diff --git a/content/post/2015-06-24-binomial-coefficient-tricks.mmark b/content/post/2015-06-24-binomial-coefficient-tricks.mmark index 90f7524..8871323 100644 --- a/content/post/2015-06-24-binomial-coefficient-tricks.mmark +++ b/content/post/2015-06-24-binomial-coefficient-tricks.mmark @@ -2,6 +2,8 @@ date: 2015-06-24T00:00:00Z title: Binomial coefficient tricks url: /2015/06/24/binomial-coefficient-tricks/ +thumbnail: + src: https://ipfs.io/ipfs/QmQeJRjHamrvs9a7R1zrsJUTTDWsv6BBW79GQm2Yc6Z8gT --- $$ diff --git a/content/post/2015-06-29-fibonacci.mmark b/content/post/2015-06-29-fibonacci.mmark index 87d39a3..d366832 100644 --- a/content/post/2015-06-29-fibonacci.mmark +++ b/content/post/2015-06-29-fibonacci.mmark @@ -2,6 +2,8 @@ date: 2015-06-29T00:00:00Z title: Fibonacci numbers url: /2015/06/29/fibonacci/ +thumbnail: + src: https://ipfs.io/ipfs/QmZ45td48HxWKnBGLLMCLwyd7qUmLV6yNcU914nxLMZuTW --- The Fibonacci numbers are defined as $$f_0 = 0,\ f_1 = 1$$ and, for $$i \ge diff --git a/content/post/2015-06-29-inverse-sum.mmark b/content/post/2015-06-29-inverse-sum.mmark index 6c6ca56..ab02028 100644 --- a/content/post/2015-06-29-inverse-sum.mmark +++ b/content/post/2015-06-29-inverse-sum.mmark @@ -2,6 +2,8 @@ date: 2015-06-29T00:00:00Z title: Inverse sum equations url: /2015/06/29/inverse-sum/ +thumbnail: + src: https://ipfs.io/ipfs/QmNnXTqBHeNReAhAE9svPrr5bcXqerc71qb9LJYUhF99h9 --- We are given $$k > 0 \in \mathbb{R}$$ and $$a_1, a_2, \ldots, a_n \ge 1 \in \mathbb{N}$$ such that diff --git a/content/post/2015-07-31-probabilistic-primality-testing.mmark b/content/post/2015-07-31-probabilistic-primality-testing.mmark index 9e61049..f7382ee 100644 --- a/content/post/2015-07-31-probabilistic-primality-testing.mmark +++ b/content/post/2015-07-31-probabilistic-primality-testing.mmark @@ -2,6 +2,10 @@ date: 2015-07-31T00:00:00Z title: Probabilistic primality testing url: /2015/07/31/probabilistic-primality-testing/ +thumbnail: + src: https://ipfs.io/ipfs/QmPQSrNd3tqzbesJWXzkswVqY3G8NzEmFMoCq6nkBYjDbM +tags: + - algorithms --- [Sage implementation](https://cocalc.com/projects/49ff84e6-2108-4af7-8b75-1f17996aa5a0/files/PRIMALITY.sagews). diff --git a/content/post/2015-11-08-symbols.mmark b/content/post/2015-11-08-symbols.mmark index 9a4eb1f..d441be4 100644 --- a/content/post/2015-11-08-symbols.mmark +++ b/content/post/2015-11-08-symbols.mmark @@ -2,6 +2,8 @@ date: 2015-11-08T00:00:00Z title: Symbols url: /2015/11/08/symbols/ +thumbnail: + src: https://ipfs.io/ipfs/QmcuGk8P95Rom4bQgmSqXFswvQ8M2n1ETDaBEsGbTdS1kx --- $$ diff --git a/content/post/2016-01-15-polyhedral-sets.mmark b/content/post/2016-01-15-polyhedral-sets.mmark index ca539f3..708bb01 100644 --- a/content/post/2016-01-15-polyhedral-sets.mmark +++ b/content/post/2016-01-15-polyhedral-sets.mmark @@ -2,6 +2,8 @@ date: 2016-01-15T00:00:00Z title: Polyhedral sets url: /2016/01/15/polyhedral-sets/ +thumbnail: + src: https://ipfs.io/ipfs/QmSu4S43YGRZr16TrnNtZA3UxEoEpvSpYLEZiBjkiCn7Gg --- A *polyhedral set* in $$\mathbb{R}^d$$ is the intersection of a finite diff --git a/content/post/2016-01-17-d-hyperplanes-intersection-bounds.mmark b/content/post/2016-01-17-d-hyperplanes-intersection-bounds.mmark index 5a98108..2ed17cd 100644 --- a/content/post/2016-01-17-d-hyperplanes-intersection-bounds.mmark +++ b/content/post/2016-01-17-d-hyperplanes-intersection-bounds.mmark @@ -2,6 +2,8 @@ date: 2016-01-17T00:00:00Z title: \(d\) hyperplanes intersection bounds url: /2016/01/17/d-hyperplanes-intersection-bounds/ +thumbnail: + src: https://ipfs.io/ipfs/QmPAdhtD5ojLZP69nVe9EbHgAhon7BDnQbxic9nGSBk5cv --- We bound the position of the $$0$$-cells of an arrangement of hyperplanes in diff --git a/content/post/2016-04-12-vc-dimension.mmark b/content/post/2016-04-12-vc-dimension.mmark index 254c6f5..b10ddcd 100644 --- a/content/post/2016-04-12-vc-dimension.mmark +++ b/content/post/2016-04-12-vc-dimension.mmark @@ -2,8 +2,13 @@ date: 2016-04-12T00:00:00Z title: VC-dimension url: /2016/04/12/vc-dimension/ +thumbnail: + src: https://ipfs.io/ipfs/QmZpYeMXHBqCC1m8NtDJh82DQS8Q5YDLMPAsW3e4ZJtXTz --- +Definitions of VC-dimesion and $$\varepsilon$$-nets. + + ## Definition 1 (Espilon net) Let $$X$$ be a set, let $$\mu$$ be a probability measure on $$X$$, let $$\mathcal{F}$$ be a system of $$\mu$$-measurable subsets of $$X$$, and let @@ -12,7 +17,6 @@ called an $$\varepsilon$$-net for $$(X,\mathcal{F})$$ with respect to $$\mu$$ if $$N \cap S \neq \emptyset$$ for all $$S \in \mathcal{F}$$ with $$\mu(S) \ge \varepsilon$$. - ## Definition 2 (Trace of $$\mathcal{F}$$ on $$Y$$) Let $$\mathcal{F}$$ be a set system on $$X$$ and let $$Y \subseteq X$$. We define the restriction of $$\mathcal{F}$$ on $$Y$$ (also called the *trace* of @@ -25,7 +29,7 @@ $$ ## Definition 3 (VC-dimension) Let $$\mathcal{F}$$ be a set system on a set $$X$$. Let us say that a subset $$A -\subseteq X$$ is shttered by $$\mathcal{F}$$ if each of the subsets of $$A$$ can +\subseteq X$$ is shattered by $$\mathcal{F}$$ if each of the subsets of $$A$$ can be obtained as the intersection of some $$S \in \mathcal{F}$$ with $$A$$, i.e., if $$\mathcal{F}|_A = 2^{A}$$. We define the VC-dimension of $$\mathcal{F}$$, denoted diff --git a/content/post/2016-04-14-log-log-log.mmark b/content/post/2016-04-14-log-log-log.mmark index 670c778..f46a300 100644 --- a/content/post/2016-04-14-log-log-log.mmark +++ b/content/post/2016-04-14-log-log-log.mmark @@ -2,6 +2,8 @@ date: 2016-04-14T00:00:00Z title: Log Log Log url: /2016/04/14/log-log-log/ +thumbnail: + src: https://ipfs.io/ipfs/QmRqy5uiX5KXLUe52bF5ADozyxHPuNAgdWiVbZ8vqZUnYi --- ## Theorem diff --git a/content/post/2016-04-27-equivalence-of-3sum-problems.mmark b/content/post/2016-04-27-equivalence-of-3sum-problems.mmark index 4e0ebbd..ee3b3ff 100644 --- a/content/post/2016-04-27-equivalence-of-3sum-problems.mmark +++ b/content/post/2016-04-27-equivalence-of-3sum-problems.mmark @@ -2,8 +2,16 @@ date: 2016-04-27T00:00:00Z title: Equivalence of 3SUM problems url: /2016/04/27/equivalence-of-3sum-problems/ +thumbnail: + src: https://ipfs.io/ipfs/QmeHrVkaqogCPYKw3Gu29PWgkYCBWc4YEio16iNVjzcUzg +tags: + - algorithms --- +Are different versions of the 3SUM problem equivalent? + + + ## Reducing 3SUMx1 to 3SUMx3 ??? @@ -11,5 +19,3 @@ url: /2016/04/27/equivalence-of-3sum-problems/ ## Reducing 3SUMx3 to 3SUMx1 $$ (a, 3), (b, 4), (c, -7) $$ - - diff --git a/content/post/2016-05-04-polynomial-time-approximation-schemes.mmark b/content/post/2016-05-04-polynomial-time-approximation-schemes.mmark index edbcfe6..b9c32e4 100644 --- a/content/post/2016-05-04-polynomial-time-approximation-schemes.mmark +++ b/content/post/2016-05-04-polynomial-time-approximation-schemes.mmark @@ -2,6 +2,8 @@ date: 2016-05-04T00:00:00Z title: Polynomial-time approximation schemes url: /2016/05/04/polynomial-time-approximation-schemes/ +thumbnail: + src: https://ipfs.io/ipfs/QmZBeHAHCWne2HVihGvCqcVK1meLfRyctk8WVH8qP2szN1 --- ## PTAS diff --git a/content/post/2017-04-21-converging-series.mmark b/content/post/2017-04-21-converging-series.mmark index 841f7e9..aa695d8 100644 --- a/content/post/2017-04-21-converging-series.mmark +++ b/content/post/2017-04-21-converging-series.mmark @@ -2,6 +2,8 @@ date: 2017-04-21T00:00:00Z title: Converging series url: /2017/04/21/converging-series/ +thumbnail: + src: https://ipfs.io/ipfs/QmWiF78w2jN5QXdo4a3zcZ9cKvdPoHUj4pTLpxg3xP3KBP --- Let $$-1 < x < 1$$, diff --git a/content/post/2017-04-22-recurrences.mmark b/content/post/2017-04-22-recurrences.mmark index 89bf8ff..82a06e3 100644 --- a/content/post/2017-04-22-recurrences.mmark +++ b/content/post/2017-04-22-recurrences.mmark @@ -2,6 +2,10 @@ date: 2017-04-22T00:00:00Z title: Recurrences url: /2017/04/22/recurrences/ +thumbnail: + src: https://ipfs.io/ipfs/QmT9GxdAYNzHF4rZUADZ7BX81UMUFypmJJK88RJfs6BcfK +tags: + - recurrences --- ## Theorem diff --git a/content/post/2017-07-21-quantum-computer-algorithms.mmark b/content/post/2017-07-21-quantum-computer-algorithms.mmark index d071fac..bb15aec 100644 --- a/content/post/2017-07-21-quantum-computer-algorithms.mmark +++ b/content/post/2017-07-21-quantum-computer-algorithms.mmark @@ -2,6 +2,8 @@ date: 2017-07-21T00:00:00Z title: Quantum Computer Algorithms url: /2017/07/21/quantum-computer-algorithms/ +thumbnail: + src: https://ipfs.io/ipfs/Qma4SHRZJHV16PBNPu6kypZJwPDuA4TNvzTFeVBaWJDymR --- [Notes](https://ipfs.io/ipfs/QmctoycyfhWTrDy4c4jZeyLcRmmutFii5H5RLGk7pMbDoS) diff --git a/content/post/2017-07-22-infinite-number-of-primes.mmark b/content/post/2017-07-22-infinite-number-of-primes.mmark index e71580d..181ed87 100644 --- a/content/post/2017-07-22-infinite-number-of-primes.mmark +++ b/content/post/2017-07-22-infinite-number-of-primes.mmark @@ -2,6 +2,10 @@ date: 2017-07-22T00:00:00Z title: Infinite Number of Primes url: /2017/07/22/infinite-number-of-primes/ +thumbnail: + src: https://ipfs.io/ipfs/QmeKDgrff9eE9gZFGBvoVA95QFnP8fNGcsDfMQhun7pApa +tags: + - number-theory --- The erroneous proof I hear most often is: Suppose $$P$$ is a diff --git a/content/post/2017-07-23-sums-of-geometric-series.mmark b/content/post/2017-07-23-sums-of-geometric-series.mmark index 13442eb..389da07 100644 --- a/content/post/2017-07-23-sums-of-geometric-series.mmark +++ b/content/post/2017-07-23-sums-of-geometric-series.mmark @@ -2,6 +2,8 @@ date: 2017-07-23T00:00:00Z title: Sums of geometric series url: /2017/07/23/sums-of-geometric-series/ +thumbnail: + src: https://ipfs.io/ipfs/QmScXVCgnEHUoZF3Mu14A8aneUnRRt1bqQuUtN5bJWpbhx --- Among the identities that are useful in the analysis of algorithms, diff --git a/content/post/2018-10-17-drunkards-walk.mmark b/content/post/2018-10-17-drunkards-walk.mmark index 685f55e..e276333 100644 --- a/content/post/2018-10-17-drunkards-walk.mmark +++ b/content/post/2018-10-17-drunkards-walk.mmark @@ -2,6 +2,10 @@ date: 2018-10-17T00:00:00Z title: The Drunkard's Walk url: /2018/10/17/drunkards-walk/ +thumbnail: + src: https://ipfs.io/ipfs/QmSAXMJTDSRbyNyJZWhXUrdXuKiCxD6p6H9ths64L32dQm +tags: + - recurrences --- A drunkard is zigzagging home. At every steps forward (or backward) he is diff --git a/themes/prove/layouts/index.html b/themes/prove/layouts/index.html index c4e21c1..76fa61b 100644 --- a/themes/prove/layouts/index.html +++ b/themes/prove/layouts/index.html @@ -1,35 +1,78 @@ {{ partial "header.html" . }} - -
- {{ range .Paginator.Pages }}
-
-
-
{{ .Date.Format "Mon, Jan 2, 2006" }}
- {{ with .Param "thumbnail" }}{{ .caption }}{{ end }} -
-

{{ .Title | safeHTML }}

-

{{ .Summary }}

- Read more about {{ .Title | safeHTML }} -
- {{ range .Params.tags }} - {{ . }} +
+
+
+ + {{ range .Paginator.Pages }} +
+
+
+
+ {{ with .Param "thumbnail" }}{{ .caption }}{{ end }} +
+
+ {{ .Title | safeHTML }} + {{ .Date.Format "Mon, Jan 2, 2006" }} +

{{ .Summary }}

+
+
+ Read more +
+
+
+
+ {{ end }} + {{ partial "pagination.html" . }} +
+
+
+
Recent
+ {{ range first 3 (where .Pages "Section" "post") }} +
+
+
+ {{ with .Param "thumbnail" }}{{ .caption }}{{ end }} +
+
+ {{ .Title | safeHTML }} + {{ .Date.Format "Mon, Jan 2, 2006" }} +
+
+ Read more +
+
+
+ {{ end }} +
+
+
+
    +
  • Tags

  • + {{ range $name, $taxonomy := .Site.Taxonomies.tags }} + {{ with $.Site.GetPage (printf "/tags/%s" $name) }} +
  • +
    + {{ $name }} + {{ $taxonomy.Count }} +
    +
  • + {{ end }} + {{ end }} +
+
- {{ end }} -
- - {{ partial "pagination.html" . }} {{ partial "footer.html" . }} diff --git a/themes/prove/layouts/partials/bootstrap.html b/themes/prove/layouts/partials/bootstrap.html deleted file mode 100644 index 58152e8..0000000 --- a/themes/prove/layouts/partials/bootstrap.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/themes/prove/layouts/partials/footer.html b/themes/prove/layouts/partials/footer.html index 308b1d0..501263e 100644 --- a/themes/prove/layouts/partials/footer.html +++ b/themes/prove/layouts/partials/footer.html @@ -1,2 +1,4 @@ + {{ partial "math.html" . }} + {{ partial "materialize-js.html" . }} diff --git a/themes/prove/layouts/partials/google-icon-font.html b/themes/prove/layouts/partials/google-icon-font.html new file mode 100644 index 0000000..09bd9fb --- /dev/null +++ b/themes/prove/layouts/partials/google-icon-font.html @@ -0,0 +1,2 @@ + + diff --git a/themes/prove/layouts/partials/header.html b/themes/prove/layouts/partials/header.html index 56c2bcf..b71dfaa 100644 --- a/themes/prove/layouts/partials/header.html +++ b/themes/prove/layouts/partials/header.html @@ -2,7 +2,8 @@ {{ .Title }} - {{ partial "bootstrap.html" . }} - {{ partial "math.html" . }} + {{ partial "google-icon-font.html" . }} + {{ partial "materialize-css.html" . }} + {{ partial "viewport.html" . }} diff --git a/themes/prove/layouts/partials/materialize-css.html b/themes/prove/layouts/partials/materialize-css.html new file mode 100644 index 0000000..1d280e6 --- /dev/null +++ b/themes/prove/layouts/partials/materialize-css.html @@ -0,0 +1,2 @@ + + diff --git a/themes/prove/layouts/partials/materialize-js.html b/themes/prove/layouts/partials/materialize-js.html new file mode 100644 index 0000000..ed51ca6 --- /dev/null +++ b/themes/prove/layouts/partials/materialize-js.html @@ -0,0 +1,2 @@ + + diff --git a/themes/prove/layouts/partials/math.html b/themes/prove/layouts/partials/math.html index 05da62a..f1fc3d9 100644 --- a/themes/prove/layouts/partials/math.html +++ b/themes/prove/layouts/partials/math.html @@ -1,6 +1,3 @@ - - - diff --git a/themes/prove/layouts/partials/pagination.html b/themes/prove/layouts/partials/pagination.html index ff06466..734e920 100644 --- a/themes/prove/layouts/partials/pagination.html +++ b/themes/prove/layouts/partials/pagination.html @@ -1,25 +1,25 @@ {{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}
-

Recent

-
- {{ partial "posts-recent-list.html" . }} -
+ {{ partial "all-sections-previews.html" . }}
From 0a2fe887ecb38a70accabeb64826b93a1548572b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Fri, 31 May 2019 22:19:06 +0200 Subject: [PATCH 15/24] Add 404 page. --- themes/prove/layouts/404.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/themes/prove/layouts/404.html b/themes/prove/layouts/404.html index e69de29..86e4c69 100644 --- a/themes/prove/layouts/404.html +++ b/themes/prove/layouts/404.html @@ -0,0 +1,20 @@ +{{ partial "header.html" . }} +{{ partial "navbar.html" . }} +{{ partial "breadcrumbs-page.html" . }} + +
+
+
+ {{ partial "taxonomies.html" . }} +
+
+

404

+

Page not found.

+
+
+ {{ partial "all-sections-previews.html" . }} +
+
+
+ +{{ partial "footer.html" . }} From 967e1d10c410c3e2d2f0c4f4bd9a347eb3e60e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Fri, 31 May 2019 22:19:48 +0200 Subject: [PATCH 16/24] Make all style customization happen in an asset file. --- Makefile | 50 ++++++++++++++++++- assets/sass/main.scss | 45 +++++++++++++++++ config.yml | 32 +++++------- .../2017-07-23-sums-of-geometric-series.mmark | 2 +- themes/prove/assets/sass/main.scss | 22 -------- themes/prove/layouts/_default/list.html | 2 +- themes/prove/layouts/index.html | 2 +- .../partials/all-sections-previews.html | 6 +-- .../partials/content-page-small-card.html | 2 +- .../layouts/partials/content-pages-list.html | 2 +- themes/prove/layouts/partials/footer.html | 2 +- .../layouts/partials/google-icon-font.html | 2 - themes/prove/layouts/partials/header.html | 6 +-- .../layouts/partials/material-icons.html | 5 ++ .../layouts/partials/materialize-css.html | 5 +- .../layouts/partials/materialize-js.html | 5 +- themes/prove/layouts/partials/math.html | 10 ++++ themes/prove/layouts/partials/navbar.html | 6 ++- themes/prove/layouts/partials/searchbar.html | 11 ++++ themes/prove/layouts/partials/taxonomies.html | 4 +- .../layouts/partials/taxonomy-collection.html | 8 +-- themes/prove/layouts/taxonomy/list.html | 4 +- 22 files changed, 161 insertions(+), 72 deletions(-) create mode 100644 assets/sass/main.scss delete mode 100644 themes/prove/assets/sass/main.scss delete mode 100644 themes/prove/layouts/partials/google-icon-font.html create mode 100644 themes/prove/layouts/partials/material-icons.html create mode 100644 themes/prove/layouts/partials/searchbar.html diff --git a/Makefile b/Makefile index d6f6aeb..78fe70b 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,54 @@ -.PHONY: serv clean +.PHONY: all build assets upload serv clean nuke .SECONDARY: -serv: clean +#KATEX_VERSION := 0.10.2 +URL_MATERIALIZE_ZIP := https://github.com/Dogfalo/materialize/releases/download/1.0.0/materialize-src-v1.0.0.zip +URL_MATERIALICONS_CSS := https://fonts.googleapis.com/icon?family=Material+Icons +#URL_KATEX := https://cdn.jsdelivr.net/npm/katex@$(KATEX_VERSION) +#URL_KATEX_CSS := $(URL_KATEX)/dist/katex.min.css +#URL_KATEX_JS := $(URL_KATEX)/dist/katex.min.js +#URL_KATEX_AUTO_RENDER_JS := $(URL_KATEX)/dist/contrib/auto-render.min.js +ASSETS := assets/materialize-src assets/material-icons.css +#assets/katex.min.css assets/katex.min.js assets/katex-auto-render.min.js + +all: clean build upload + +build: assets + hugo + +assets: $(ASSETS) + +upload: + echo "Upload not implemented" + +assets/materialize-src: assets/materialize.zip + unzip $< -d assets + +assets/materialize.zip: + mkdir -p $(dir $@) + wget -O $@ $(URL_MATERIALIZE_ZIP) + +assets/material-icons.css: + mkdir -p $(dir $@) + wget -O $@ $(URL_MATERIALICONS_CSS) + +#assets/katex.min.css: + #mkdir -p $(dir $@) + #wget -O $@ $(URL_KATEX_CSS) + +#assets/katex.min.js: + #mkdir -p $(dir $@) + #wget -O $@ $(URL_KATEX_JS) + +#assets/katex-auto-render.min.js: + #mkdir -p $(dir $@) + #wget -O $@ $(URL_KATEX_AUTO_RENDER_JS) + +serv: clean assets hugo server clean: rm -rf resources public + +nuke: clean + rm -rf $(ASSETS) diff --git a/assets/sass/main.scss b/assets/sass/main.scss new file mode 100644 index 0000000..edea444 --- /dev/null +++ b/assets/sass/main.scss @@ -0,0 +1,45 @@ +$primary-color: #1d4e9e; +$secondary-color: #a6b8e4; + +@import "assets/materialize-src/sass/components/color-variables"; +@import "assets/materialize-src/sass/components/color-classes"; + +$button-color: color("orange", "lighten-3"); +$button-background-focus: lighten($button-color, 4%); +$button-raised-background: $button-color; +$button-floating-background: $button-color; + +@import "assets/materialize-src/sass/materialize.scss"; + +h4, span.card-subtitle { + color: color("grey", "base"); +} + +nav.breadcrumbs { + background: $secondary-color; +} + +ul.pagination > li.active { + background: $secondary-color; +} + +ul.collection > li.collection-item > div > a { + display: inline-block; + max-width: 90%; +} + +div.navbar-fixed > nav .input-field { + position: absolute; +} + +#search { + + //position: absolute; + transition: width 0.5s ease, color 0.5s ease, background-color 0.5s ease; + + &:focus:not([readonly]) { + width: 100%; + } + +} + diff --git a/config.yml b/config.yml index cc6fe65..837f8d3 100644 --- a/config.yml +++ b/config.yml @@ -12,19 +12,19 @@ outputs: - HTML - RSS - Calendar - taxonomy: + section: - HTML - RSS - Calendar - section: + page: + - HTML + - Calendar + taxonomy: - HTML - RSS - Calendar taxonomyTerm: - HTML - page: - - HTML - - Calendar params: logo: @@ -33,17 +33,11 @@ params: organizer: '"Aurélien Ooms":mailto:info@math.blog.aurelienooms.be' hostname: math.blog.aurelienooms.be editURL: https://github.com/aureooms/math - stylesheet: - searchbar: - background: '#1d4e9e' - breadcrumbs: - background: '#a6b8e4' - pagenumbers: - background: '#a6b8e4' - sections: - - today - - upcoming - - past - taxonomies: - - tags - - authors + nav: + sections: + - today + - upcoming + - past + taxonomies: + - tags + - authors diff --git a/content/past/2017-07-23-sums-of-geometric-series.mmark b/content/past/2017-07-23-sums-of-geometric-series.mmark index 0b76992..21f7e80 100644 --- a/content/past/2017-07-23-sums-of-geometric-series.mmark +++ b/content/past/2017-07-23-sums-of-geometric-series.mmark @@ -24,7 +24,7 @@ $$ That's nice. There are many ways to prove it, a cool one is to first -[prove](/math/2017/04/21/converging-series) that +[prove]({{< ref "2017-04-21-converging-series" >}}) that $$ \sum_{i=0}^{\infty} x^i = \frac{1}{ {(1-x)} }, diff --git a/themes/prove/assets/sass/main.scss b/themes/prove/assets/sass/main.scss deleted file mode 100644 index daa9948..0000000 --- a/themes/prove/assets/sass/main.scss +++ /dev/null @@ -1,22 +0,0 @@ -{{ with .Site.Params.stylesheet }} -$var1: {{ .searchbar.background | default "#333" }} !default; -$var2: {{ .breadcrumbs.background | default "#444" }} !default; -$var3: {{ .pagenumbers.background | default "#444" }} !default; -{{ end }} - -div.navbar-fixed > nav { - background: $var1; -} - -nav.breadcrumbs { - background: $var2; -} - -ul.pagination > li.active { - background: $var3; -} - -ul.collection > li.collection-item > div > a { - display: inline-block; - max-width: 90%; -} diff --git a/themes/prove/layouts/_default/list.html b/themes/prove/layouts/_default/list.html index 64c8211..9f18aa6 100644 --- a/themes/prove/layouts/_default/list.html +++ b/themes/prove/layouts/_default/list.html @@ -8,7 +8,7 @@ {{ partial "taxonomies.html" . }}
-

{{ .Section | title }}

+

{{ .Section | title }}

{{ partial "content-pages-pager.html" . }}
diff --git a/themes/prove/layouts/index.html b/themes/prove/layouts/index.html index ab27933..ddce6c4 100644 --- a/themes/prove/layouts/index.html +++ b/themes/prove/layouts/index.html @@ -8,7 +8,7 @@ {{ partial "taxonomies.html" . }}
-

All

+

All

{{ partial "content-pages-pager.html" . }}
diff --git a/themes/prove/layouts/partials/all-sections-previews.html b/themes/prove/layouts/partials/all-sections-previews.html index 6a6ec34..c1b8054 100644 --- a/themes/prove/layouts/partials/all-sections-previews.html +++ b/themes/prove/layouts/partials/all-sections-previews.html @@ -1,15 +1,15 @@ -{{ range .Site.Params.sections }} +{{ range .Site.Params.nav.sections }} {{ $all := where $.Site.RegularPages "Section" ( . | anchorize ) }} {{ $n := len $all}} {{ $ordered := $all }} {{ $preview := first 3 $ordered }} {{ if gt $n 0 }} -

{{ . | title }}

+

{{ . | title }}

{{ range $preview }} {{ partial "content-page-small-card.html" . }} {{ end }} - Browse {{$n}} + Browse {{$n}}
{{ end }} {{ end }} diff --git a/themes/prove/layouts/partials/content-page-small-card.html b/themes/prove/layouts/partials/content-page-small-card.html index 4a9f6c7..286c9fe 100644 --- a/themes/prove/layouts/partials/content-page-small-card.html +++ b/themes/prove/layouts/partials/content-page-small-card.html @@ -5,7 +5,7 @@
{{ .Title | safeHTML }} - {{ .Date.Format "Mon, Jan 2, 2006" }} + {{ .Date.Format "Mon, Jan 2, 2006" }}
Read more diff --git a/themes/prove/layouts/partials/content-pages-list.html b/themes/prove/layouts/partials/content-pages-list.html index e0d1665..60fcae9 100644 --- a/themes/prove/layouts/partials/content-pages-list.html +++ b/themes/prove/layouts/partials/content-pages-list.html @@ -7,7 +7,7 @@
{{ .Title | safeHTML }} - {{ .Date.Format "Mon, Jan 2, 2006" }} + {{ .Date.Format "Mon, Jan 2, 2006" }}

{{ .Summary }}

diff --git a/themes/prove/layouts/partials/footer.html b/themes/prove/layouts/partials/footer.html index 501263e..1b905d4 100644 --- a/themes/prove/layouts/partials/footer.html +++ b/themes/prove/layouts/partials/footer.html @@ -1,4 +1,4 @@ - {{ partial "math.html" . }} {{ partial "materialize-js.html" . }} + {{ partial "math.html" . }} diff --git a/themes/prove/layouts/partials/google-icon-font.html b/themes/prove/layouts/partials/google-icon-font.html deleted file mode 100644 index 09bd9fb..0000000 --- a/themes/prove/layouts/partials/google-icon-font.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/themes/prove/layouts/partials/header.html b/themes/prove/layouts/partials/header.html index ab0753e..35fff41 100644 --- a/themes/prove/layouts/partials/header.html +++ b/themes/prove/layouts/partials/header.html @@ -8,11 +8,11 @@ {{ end -}} - {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | toCSS | minify | fingerprint }} + {{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }} + - {{ partial "google-icon-font.html" . }} - {{ partial "materialize-css.html" . }} + {{ partial "material-icons.html" . }} {{ partial "viewport.html" . }} diff --git a/themes/prove/layouts/partials/material-icons.html b/themes/prove/layouts/partials/material-icons.html new file mode 100644 index 0000000..ad7e141 --- /dev/null +++ b/themes/prove/layouts/partials/material-icons.html @@ -0,0 +1,5 @@ + + + +{{ $style := resources.Get "material-icons.css" | minify | fingerprint }} + diff --git a/themes/prove/layouts/partials/materialize-css.html b/themes/prove/layouts/partials/materialize-css.html index 1d280e6..9a4d4a3 100644 --- a/themes/prove/layouts/partials/materialize-css.html +++ b/themes/prove/layouts/partials/materialize-css.html @@ -1,2 +1,5 @@ - + + +{{ $style := resources.Get "materialize-src/sass/materialize.scss" | toCSS | minify | fingerprint }} + diff --git a/themes/prove/layouts/partials/materialize-js.html b/themes/prove/layouts/partials/materialize-js.html index ed51ca6..a21f57d 100644 --- a/themes/prove/layouts/partials/materialize-js.html +++ b/themes/prove/layouts/partials/materialize-js.html @@ -1,2 +1,5 @@ - + + +{{ $code := resources.Get "materialize-src/js/bin/materialize.js" | minify | fingerprint }} + diff --git a/themes/prove/layouts/partials/math.html b/themes/prove/layouts/partials/math.html index f1fc3d9..4dd9d61 100644 --- a/themes/prove/layouts/partials/math.html +++ b/themes/prove/layouts/partials/math.html @@ -2,6 +2,16 @@ + + + + + + + + + + - - +{{/* +{{ $katexcss := resources.Get "katex.min.css" | fingerprint }} + - - +{{ $katexjs := resources.Get "katex.min.js" | fingerprint }} + - - +{{ $katexautorenderjs := resources.Get "katex-auto-render.min.js" | fingerprint }} + +*/}} diff --git a/themes/prove/layouts/partials/math.html b/themes/prove/layouts/partials/math.html index 5f5690f..b358c1b 100644 --- a/themes/prove/layouts/partials/math.html +++ b/themes/prove/layouts/partials/math.html @@ -4,13 +4,13 @@ {{/* -{{ $katexcss := resources.Get "katex.min.css" | fingerprint }} +{{ $katexcss := resources.Get "vendor/katex.min.css" | fingerprint }} -{{ $katexjs := resources.Get "katex.min.js" | fingerprint }} +{{ $katexjs := resources.Get "vendor/katex.min.js" | fingerprint }} -{{ $katexautorenderjs := resources.Get "katex-auto-render.min.js" | fingerprint }} +{{ $katexautorenderjs := resources.Get "vendor/katex-auto-render.min.js" | fingerprint }} */}} diff --git a/themes/prove/layouts/partials/search.html b/themes/prove/layouts/partials/search.html new file mode 100644 index 0000000..7b93c9d --- /dev/null +++ b/themes/prove/layouts/partials/search.html @@ -0,0 +1,2 @@ +{{ $searchjs := resources.Get "search.js" | minify | fingerprint }} + diff --git a/themes/prove/layouts/partials/searchbar.html b/themes/prove/layouts/partials/searchbar.html index 8a50017..003fd60 100644 --- a/themes/prove/layouts/partials/searchbar.html +++ b/themes/prove/layouts/partials/searchbar.html @@ -1,11 +1,19 @@ -