Current section

37 Versions

Jump to

Compare versions

13 files changed
+57 additions
-37 deletions
  @@ -31,7 +31,7 @@ _If you are having problems, view `README_INSTALL.md` for manual instructions._
31 31
32 32 ```elixir
33 33 def deps do
34 - [{:thesis, "~> 0.0.21"}]
34 + [{:thesis, "~> 0.0.22"}]
35 35 end
36 36
37 37 def application do
  @@ -6,7 +6,7 @@ For automatic setup, see `README.md`.
6 6
7 7 ```elixir
8 8 def deps do
9 - [{:thesis, "~> 0.0.21"}]
9 + [{:thesis, "~> 0.0.22"}]
10 10 end
11 11
12 12 def application do
  @@ -133,7 +133,7 @@
133 133 <<"README_INSTALL.md">>,<<"LICENSE.md">>,<<"package.json">>]}.
134 134 {<<"licenses">>,[<<"MIT">>]}.
135 135 {<<"links">>,
136 - [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.21/api-reference.html">>},
136 + [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.22/api-reference.html">>},
137 137 {<<"GitHub">>,<<"https://github.com/infinite_red/thesis">>}]}.
138 138 {<<"maintainers">>,
139 139 [<<"Jamon Holmgren">>,<<"Ken Miller">>,<<"Daniel Berkompas">>]}.
  @@ -163,4 +163,4 @@
163 163 {<<"name">>,<<"html_sanitize_ex">>},
164 164 {<<"optional">>,false},
165 165 {<<"requirement">>,<<">= 1.0.1">>}]]}.
166 - {<<"version">>,<<"0.0.21">>}.
166 + {<<"version">>,<<"0.0.22">>}.
  @@ -66,7 +66,7 @@ defmodule Thesis.Render do
66 66 data_content_type = "data-thesis-content-type=\"#{content_type}\""
67 67 data_content_id = "data-thesis-content-id=\"#{escape_entities(page_content.name)}\""
68 68 data_content_meta = "data-thesis-content-meta=\"#{escape_entities(page_content.meta)}\""
69 - data_global = (page_content.page_id == nil) && "data-thesis-content-global=\"true\"" || ""
69 + data_global = (opts[:global]) && "data-thesis-content-global=\"true\"" || ""
70 70 styles = "style=\"#{opts[:styles]}\"" # add the following when required: box-shadow: none; outline: none;
71 71 [ id, classes, data_content_type, data_content_id, data_global, data_content_meta, styles ]
72 72 |> Enum.reject(fn s -> String.strip(s) == "" end)
  @@ -60,6 +60,7 @@ defmodule Thesis.View do
60 60 """
61 61 @spec global_content(Plug.Conn.t, String.t, String.t, list) :: String.t | {:safe, String.t}
62 62 def global_content(conn, name, type, opts \\ []) do
63 + opts = Keyword.put(opts, :global, true)
63 64 render_content(conn, nil, name, type, opts)
64 65 end
Loading more files…