Skip to content

Commit b31edbc

Browse files
committed
Fix calling correct background function
1 parent c48633d commit b31edbc

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

apps/components_guide_web/lib/components_guide_web/controllers/web_standards_controller.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ defmodule ComponentsGuideWeb.WebStandardsView do
2323
alias ComponentsGuideWeb.ThemeView
2424

2525
def header_styles() do
26-
ThemeView.gradient(:green)
26+
ThemeView.banner_styles(:web_standards)
2727
end
2828
end

apps/components_guide_web/lib/components_guide_web/templates/web_standards/http-caching.html.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# HTTP Caching
22

3+
<live-render>
4+
ComponentsGuideWeb.WebStandards.Live.HttpCaching
5+
</live-render>
6+
7+
<div>
8+
<%= live_render(@conn, ComponentsGuideWeb.WebStandards.Live.HttpCaching, session: %{}) %>
9+
</div>
10+
311
## Resource that does not want to be cached
412

513
```http
@@ -120,3 +128,4 @@ Vary: Accept-Encoding
120128
- [MDN: HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching)
121129
- [MDN: If-None-Match](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match)
122130
- [MDN: 412 Precondition Failed](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412)
131+
- [Ryan Florence explains HTTP caching basics by building a Node.js server](https://www.youtube.com/watch?v=3XkU_DXcgl0)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
defmodule ComponentsGuideWeb.WebStandards.Live.HttpCaching do
2+
use ComponentsGuideWeb, :live_view
3+
alias ComponentsGuideWeb.StylingHelpers
4+
5+
def mount(_params, _session, socket) do
6+
{:ok, assign(socket, state: %{})}
7+
end
8+
9+
def render(assigns) do
10+
~L"""
11+
<p>Hello!</p>
12+
"""
13+
end
14+
end

0 commit comments

Comments
 (0)