File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
apps/components_guide_web/lib/components_guide_web/templates/web_standards Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
- # URL
1
+ # Anatomy of a URL
2
2
3
- ## Anatomy of a URL
3
+ ## Change the parts of a URL
4
4
5
5
<live-render >
6
6
ComponentsGuideWeb.WebStandards.Live.URL
7
7
</live-render >
8
8
9
+ ----
10
+
9
11
## JavaScript’s ` URL `
10
12
11
13
``` js
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ defmodule ComponentsGuideWeb.WebStandards.Live.URL do
84
84
<form phx-change=change>
85
85
86
86
<pre class="p-4 my-2" style="color: #d6deeb;">
87
- <code><span class="text-green -400"><%= State.to_url(@state).scheme %></span>://<span class="text-yellow -400"><%= State.to_url(@state).host %></span><span class="text-orange-400"><%= State.to_url(@state).path %></span><span class="text-indigo -400"><%= @state |> State.read(:query) %></span></code>
87
+ <code><span class="text-yellow -400"><%= State.to_url(@state).scheme %></span>://<span class="text-green -400"><%= State.to_url(@state).host %></span><span class="text-orange-400"><%= State.to_url(@state).path %></span><span class="text-blue -400"><%= @state |> State.read(:query) %></span></code>
88
88
</pre>
89
89
90
90
<div class="flex flex-col space-y-4">
@@ -105,15 +105,15 @@ defmodule ComponentsGuideWeb.WebStandards.Live.URL do
105
105
</label>
106
106
107
107
<label>
108
- <span class="font-bold text-orange -400 mr-2">Query</span>
108
+ <span class="font-bold text-blue -400 mr-2">Query</span>
109
109
<button type=button phx-click=add-query class="px-2 bg-white text-black rounded">Add query</button>
110
110
<button type=button phx-click=clear-query class="px-2 bg-white text-black rounded">Clear query</button>
111
111
112
112
<div class="space-y-2 mt-2">
113
113
<%= for {key, value} <- State.get_query_vars(@state) do %>
114
114
<div>
115
- <input name=query-keys[] type=text value="<%= key %>" class="text-black text-indigo -900 bg-indigo -100 px-2">
116
- <input name=query-values[] type=text value="<%= value %>" class="text-black text-indigo -900 bg-indigo -100 px-2">
115
+ <input name=query-keys[] type=text value="<%= key %>" class="text-black text-blue -900 bg-blue -100 px-2">
116
+ <input name=query-values[] type=text value="<%= value %>" class="text-black text-blue -900 bg-blue -100 px-2">
117
117
</div>
118
118
<% end %>
119
119
</div>
You can’t perform that action at this time.
0 commit comments