diff --git a/lib/frenzy_web/templates/account/change_fever_password.html.eex b/lib/frenzy_web/templates/account/change_fever_password.html.eex index bec5474..9b4c361 100644 --- a/lib/frenzy_web/templates/account/change_fever_password.html.eex +++ b/lib/frenzy_web/templates/account/change_fever_password.html.eex @@ -1,11 +1,15 @@

Change Fever Password

<%= form_tag Routes.account_path(@conn, :do_change_fever_password), method: :post do %> -
- - +
+ +
+ +
-
- <%= submit "Change Fever Password" %> +
+
+ <%= submit "Change Fever Password", class: "btn btn-primary" %> +
<% end %> \ No newline at end of file diff --git a/lib/frenzy_web/templates/account/change_password.html.eex b/lib/frenzy_web/templates/account/change_password.html.eex index dfc8c23..e50b0c5 100644 --- a/lib/frenzy_web/templates/account/change_password.html.eex +++ b/lib/frenzy_web/templates/account/change_password.html.eex @@ -1,19 +1,27 @@

Change Password

<%= form_tag Routes.account_path(@conn, :do_change_password), method: :post do %> -
- - +
+ +
+ +
-
- - +
+ +
+ +
-
- - +
+ +
+ +
-
- <%= submit "Change Password" %> +
+
+ <%= submit "Change Password", class: "btn btn-primary" %> +
<% end %> \ No newline at end of file diff --git a/lib/frenzy_web/templates/account/show.html.eex b/lib/frenzy_web/templates/account/show.html.eex index d29553d..30babda 100644 --- a/lib/frenzy_web/templates/account/show.html.eex +++ b/lib/frenzy_web/templates/account/show.html.eex @@ -1,32 +1,36 @@

User Settings

-

<%= @user.username %>

+

<%= @user.username %>

-Change Password +Change Password -Change Fever Password +Change Fever Password -

Approved Clients

+

Approved Clients

- - - - - - <%= for {approved, fervor} <- @clients do %> +
ClientRevoke Access
+ - - + + - <% end %> + + + <%= for {approved, fervor} <- @clients do %> + + + + + <% end %> +
- <%= if fervor.website do %> - <%= fervor.client_name %> - <% else %> - <%= fervor.client_name %> - <% end %> - - <%= form_tag Routes.account_path(@conn, :remove_client), method: :post do %> - - <%= submit "Revoke" %> - <% end %> - ClientRevoke Access
+ <%= if fervor.website do %> + <%= fervor.client_name %> + <% else %> + <%= fervor.client_name %> + <% end %> + + <%= form_tag Routes.account_path(@conn, :remove_client), method: :post do %> + + <%= submit "Revoke", class: "btn btn-danger" %> + <% end %> +
\ No newline at end of file diff --git a/lib/frenzy_web/templates/feed/show.html.eex b/lib/frenzy_web/templates/feed/show.html.eex index cd5635f..da11943 100644 --- a/lib/frenzy_web/templates/feed/show.html.eex +++ b/lib/frenzy_web/templates/feed/show.html.eex @@ -1,37 +1,42 @@ -<%= form_tag Routes.feed_path(@conn, :refresh, @feed.id), method: :post do %> - <%= submit "Refresh Feed" %> -<% end %> +

<%= @feed.title %>

+<%= form_tag Routes.feed_path(@conn, :refresh, @feed.id), method: :post, class: "d-inline" do %> + <%= submit "Refresh Feed", class: "btn btn-primary" %> +<% end %> <%= if @feed.filter_enabled do %> - <%= form_tag Routes.feed_path(@conn, :disable_filter, @feed.id), method: :post do %> - <%= submit "Disable Filter" %> + <%= form_tag Routes.feed_path(@conn, :disable_filter, @feed.id), method: :post, class: "d-inline" do %> + <%= submit "Disable Filter", class: "btn btn-secondary" %> <% end %> - <%= form_tag Routes.filter_path(@conn, :edit, @feed.filter.id), method: :get do %> - <%= submit "Edit Filter" %> + <%= form_tag Routes.filter_path(@conn, :edit, @feed.filter.id), method: :get, class: "d-inline" do %> + <%= submit "Edit Filter", class: "btn btn-secondary" %> <% end %> <% else %> - <%= form_tag Routes.feed_path(@conn, :enable_filter, @feed.id), method: :post do %> - <%= submit "Enable Filter" %> + <%= form_tag Routes.feed_path(@conn, :enable_filter, @feed.id), method: :post, class: "d-inline" do %> + <%= submit "Enable Filter", class: "btn btn-secondary" %> <% end %> <% end %> -<%= form_tag Routes.feed_path(@conn, :delete, @feed.id), method: :delete do %> - <%= submit "Delete Feed" %> +<%= form_tag Routes.feed_path(@conn, :delete, @feed.id), method: :delete, class: "d-inline" do %> + <%= submit "Delete Feed", class: "btn btn-danger" %> <% end %> - - <%= for item <- @items do %> - class="item-read"<% end %>> - - - - <% end %> +

Items

+ +
- <%= item.title %> - - <% {:ok, date} = Timex.format(item.date, "{YYYY}-{M}-{D} {h12}:{m} {AM}") %> - <%= date %> -
+ + <%= for item <- @items do %> + class="item-read"<% end %>> + + + + <% end %> +
+ <%= item.title %> + + <% {:ok, date} = Timex.format(item.date, "{YYYY}-{M}-{D} {h12}:{m} {AM}") %> + <%= date %> +
\ No newline at end of file diff --git a/lib/frenzy_web/templates/oauth/authorize.html.eex b/lib/frenzy_web/templates/fervor/oauth/authorize.html.eex similarity index 60% rename from lib/frenzy_web/templates/oauth/authorize.html.eex rename to lib/frenzy_web/templates/fervor/oauth/authorize.html.eex index 936c296..ca10de1 100644 --- a/lib/frenzy_web/templates/oauth/authorize.html.eex +++ b/lib/frenzy_web/templates/fervor/oauth/authorize.html.eex @@ -1,4 +1,4 @@ -

<%= @client.client_name %> wants to access your account

+

<%= @client.client_name %> wants to access your account

<%= form_tag Routes.oauth_path(@conn, :authorize_post), method: :post do %> @@ -6,6 +6,7 @@ <% end %>
- <%= submit "Grant access" %> + <%= submit "Grant access", class: "btn btn-primary" %> +

To reject the request, close this page.

<% end %> \ No newline at end of file diff --git a/lib/frenzy_web/templates/oauth/successfully_authorized.html.eex b/lib/frenzy_web/templates/fervor/oauth/successfully_authorized.html.eex similarity index 100% rename from lib/frenzy_web/templates/oauth/successfully_authorized.html.eex rename to lib/frenzy_web/templates/fervor/oauth/successfully_authorized.html.eex diff --git a/lib/frenzy_web/templates/filter/edit.html.eex b/lib/frenzy_web/templates/filter/edit.html.eex index f8739c4..c6841ad 100644 --- a/lib/frenzy_web/templates/filter/edit.html.eex +++ b/lib/frenzy_web/templates/filter/edit.html.eex @@ -1,53 +1,75 @@

Filter

<%= form_for @changeset, Routes.filter_path(@conn, :update, @changeset.data.id), fn form -> %> -
- - <%= select form, :mode, [{"Accept", :accept}, {"Reject", :reject}] %> +
+ +
+ <%= select form, :mode, [{"Accept", :accept}, {"Reject", :reject}], class: "form-control" %> +
-
- - <%= number_input form, :score %> +
+ +
+ <%= number_input form, :score, class: "form-control" %> +
- - - - - - - - <%= inputs_for form, :rules, fn p -> %> - - - - - - +
PropertyModeParamWeight
- <%= select p, :property, [{"URL", :url}, {"Title", :title}, {"Author", :author}, {"Content", :content}] %> - - <%= select p, :mode, [{"contains", :contains_string}, {"matches regex", :matches_regex}] %> - - <%= text_input p, :param %> - - <%= number_input p, :weight %> - - <%# when nesting form tags, the first nested one seems to get removed %> - <%# not the first nested one in each row, but the first nested one overall %> - <%# so we include a dummy form with display: none that gets stripped from the first row %> - <%# but is present and invisible in subsequent rows %> -
- <%= form_tag Routes.filter_path(@conn, :remove_rule, @changeset.data.id, [rule_id: p.data.id]), method: :post do %> - <%= submit "Delete" %> +
+
+

Rules

+ + + + + + + + + + + + + <%= inputs_for form, :rules, fn p -> %> + + + + + + + <% end %> - - - <% end %> -
PropertyModeParamWeight
+ <%= select p, :property, [{"URL", :url}, {"Title", :title}, {"Author", :author}, {"Content", :content}], class: "form-control" %> + + <%= select p, :mode, [{"contains", :contains_string}, {"matches regex", :matches_regex}], class: "form-control" %> + + <%= text_input p, :param, class: "form-control" %> + + <%= number_input p, :weight, class: "form-control" %> + + <%# when nesting form tags, the first nested one seems to get removed %> + <%# not the first nested one in each row, but the first nested one overall %> + <%# so we include a dummy form with display: none that gets stripped from the first row %> + <%# but is present and invisible in subsequent rows %> +
+ <%= form_tag Routes.filter_path(@conn, :remove_rule, @changeset.data.id, [rule_id: p.data.id]), method: :post do %> + <%= submit "Delete", class: "btn btn-danger" %> + <% end %> +
+
-
- <%= submit "Update Filter" %> +
+
+ <%= form_tag Routes.filter_path(@conn, :add_rule, @changeset.data.id), method: :post do %> + <%= submit "Add Rule", class: "btn btn-secondary" %> + <% end %> +
+
+
+
+ +
+
+ <%= submit "Update Filter", class: "btn btn-primary" %> +
-<% end %> -<%= form_tag Routes.filter_path(@conn, :add_rule, @changeset.data.id), method: :post do %> - <%= submit "Add Rule" %> <% end %> \ No newline at end of file diff --git a/lib/frenzy_web/templates/group/index.html.eex b/lib/frenzy_web/templates/group/index.html.eex index 20da229..9f7f394 100644 --- a/lib/frenzy_web/templates/group/index.html.eex +++ b/lib/frenzy_web/templates/group/index.html.eex @@ -1,17 +1,25 @@ -Add Group +Add Group - - <%= for group <- @groups do %> +
+ - - + + - <% end %> + + + <%= for group <- @groups do %> + + + + + <% end %> +
- <%= group.title %> - - <%= case Enum.count(group.feeds) do - 1 -> "1 feed" - count -> "#{count} feeds" - end %> - Name
+ <%= group.title %> + + <%= case Enum.count(group.feeds) do + 1 -> "1 feed" + count -> "#{count} feeds" + end %> +
\ No newline at end of file diff --git a/lib/frenzy_web/templates/group/new.html.eex b/lib/frenzy_web/templates/group/new.html.eex index 3b24ccb..2ff505b 100644 --- a/lib/frenzy_web/templates/group/new.html.eex +++ b/lib/frenzy_web/templates/group/new.html.eex @@ -1,9 +1,13 @@ <%= form_for @changeset, Routes.group_path(@conn, :create), fn form -> %> -
- - <%= text_input form, :title %> +
+ +
+ <%= text_input form, :title, placeholder: "My New Group", class: "form-control" %> +
-
- <%= submit "Create Group" %> +
+
+ <%= submit "Create Group", class: "btn btn-primary" %> +
<% end %> \ No newline at end of file diff --git a/lib/frenzy_web/templates/group/show.html.eex b/lib/frenzy_web/templates/group/show.html.eex index 145970f..aaa3114 100644 --- a/lib/frenzy_web/templates/group/show.html.eex +++ b/lib/frenzy_web/templates/group/show.html.eex @@ -1,29 +1,37 @@

<%= @group.title %>

-<%= form_tag Routes.group_path(@conn, :delete, @group.id), method: :delete do %> - <%= submit "Delete Group" %> -<% end %> - <%= form_for @create_feed_changeset, Routes.feed_path(@conn, :create), fn form -> %> <%= hidden_input form, :group_id %> -
- <%= label form, :feed_url, "Feed URL" %> - <%= text_input form, :feed_url %> +
+ <%= label form, :feed_url, "Feed URL", class: "col-sm-2 col-form-label" %> +
+ <%= text_input form, :feed_url, placeholder: "https://example.com/feed.xml", class: "form-control" %> +
-
- <%= submit "Add Feed" %> +
+
+ <%= submit "Add Feed", class: "btn btn-primary" %> +
<% end %> - - <%= for feed <- @group.feeds do %> - - - - - <% end %> +<%= form_tag Routes.group_path(@conn, :delete, @group.id), method: :delete do %> + <%= submit "Delete Group", class: "btn btn-danger" %> +<% end %> + +

Feeds

+ +
- <%= feed.feed_url %> - - <%= feed.title %> -
+ + <%= for feed <- @group.feeds do %> + + + + + <% end %> +
+ <%= feed.feed_url %> + + <%= feed.title %> +
\ No newline at end of file diff --git a/lib/frenzy_web/templates/item/show.html.eex b/lib/frenzy_web/templates/item/show.html.eex index e1436d7..def88e8 100644 --- a/lib/frenzy_web/templates/item/show.html.eex +++ b/lib/frenzy_web/templates/item/show.html.eex @@ -1,17 +1,17 @@ -<%= if @item.read do %> - <%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %> - <%= submit "Mark as Unread" %> - <% end %> -<% else %> - <%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %> - <%= submit "Mark as Read" %> - <% end %> -<% end %> - -<%= @feed.title %>

<%= @item.title %>

-
+ +<%= if @item.read do %> + <%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %> + <%= submit "Mark as Unread", class: "btn btn-secondary" %> + <% end %> +<% else %> + <%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %> + <%= submit "Mark as Read", class: "btn btn-secondary" %> + <% end %> +<% end %> + +
<%= raw(@item.content) %>
\ No newline at end of file diff --git a/lib/frenzy_web/templates/layout/app.html.eex b/lib/frenzy_web/templates/layout/app.html.eex index afe6579..8e7b661 100644 --- a/lib/frenzy_web/templates/layout/app.html.eex +++ b/lib/frenzy_web/templates/layout/app.html.eex @@ -3,29 +3,47 @@ - - Frenzy ยท Phoenix Framework + + + Frenzy + + "/>
-
- -
+
-
- - - <%= render @view_module, @view_template, assigns %> +
+
+ <%= if get_flash(@conn, :info) do %> + + <% end %> + <%= if get_flash(@conn, :error) do %> + + <% end %> + + <%= render @view_module, @view_template, assigns %> +
+ + + diff --git a/lib/frenzy_web/templates/login/login.html.eex b/lib/frenzy_web/templates/login/login.html.eex index 9cfec7c..6b25b39 100644 --- a/lib/frenzy_web/templates/login/login.html.eex +++ b/lib/frenzy_web/templates/login/login.html.eex @@ -2,15 +2,21 @@ <%= if @continue do %> <% end %> -
- - +
+ +
+ +
-
- - +
+ +
+ +
-
- <%= submit "Log In" %> +
+
+ <%= submit "Log In", class: "btn btn-primary" %> +
<% end %> \ No newline at end of file diff --git a/lib/frenzy_web/views/fervor/oauth_view.ex b/lib/frenzy_web/views/fervor/oauth_view.ex new file mode 100644 index 0000000..228de03 --- /dev/null +++ b/lib/frenzy_web/views/fervor/oauth_view.ex @@ -0,0 +1,3 @@ +defmodule FrenzyWeb.Fervor.OauthView do + use FrenzyWeb, :view +end diff --git a/lib/frenzy_web/views/oauth_view.ex b/lib/frenzy_web/views/oauth_view.ex deleted file mode 100644 index af5ad0e..0000000 --- a/lib/frenzy_web/views/oauth_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule FrenzyWeb.OauthView do - use FrenzyWeb, :view -end diff --git a/priv/static/css/app.css b/priv/static/css/app.css index 651d784..bbf7c8d 100644 --- a/priv/static/css/app.css +++ b/priv/static/css/app.css @@ -1,7 +1,5 @@ /* This file is for your main application css. */ -@import "./phoenix.css"; - .item-read a { color: #606c76; } \ No newline at end of file