2023-11-23 22:20:02 +01:00
header
#js-burger-toggle.hidden--desktop
a.header__link href="#"
i.fa.fa-bars
a.header__logo.header__link href="/"
2024-05-20 22:30:41 +02:00
i.icon--padded--right.favicon-home>
2024-05-20 19:04:12 +02:00
span.hidden--mobile = site_name()
2023-11-23 22:20:02 +01:00
a.header__link.hidden--mobile href="/images/new" title="Upload"
i.fa.fa-upload
2024-06-06 22:28:35 +02:00
= form_for @conn, ~p"/search", [method: "get", class: "header__search", enforce_utf8: false], fn f ->
2024-06-06 22:55:50 +02:00
input.input.input--text.header__input.header__input--text#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=@conn.params["q"] placeholder="Search" autocapitalize="none" data-ac="true" data-ac-min-length="3" data-ac-mode="search"
2019-08-18 02:43:44 +02:00
2023-11-23 22:20:02 +01:00
= if present?(@conn.params["sf"]) do
input type="hidden" name="sf" value=@conn.params["sf"]
= if present?(@conn.params["sd"]) do
input type="hidden" name="sd" value=@conn.params["sd"]
= if present?(@conn.params["hidden"]) do
input type="hidden" name="hidden" value=@conn.params["hidden"]
2019-08-18 02:43:44 +02:00
2023-11-23 22:20:02 +01:00
= if hides_images?(@conn) do
= select f, :del, [{"-D", ""}, {"+D", 1}, {"*D", "deleted"}, {"DO", "only"}], name: "del", class: "input header__input js-staff-action", autocomplete: "off"
2019-12-13 03:19:07 +01:00
2023-11-23 22:20:02 +01:00
button.header__search__button type="submit" title="Search"
i.fas.fa-search
a.header__search__button href="/search/reverse" title="Search using an image"
i.fa-search-button.fas.fa-camera
a.header__search__button href="/pages/search_syntax" title="Search syntax help"
i.fa-search-button.fas.fa-question
.flex__grow
= if @current_user do
a.header__link href="/notifications" title="Notifications"
i.fas.fa-bell>
/span.js-notification-ticker.fa__text.header__counter data-notification-count=@notification_count = @notification_count
2019-12-18 01:42:50 +01:00
2023-11-23 22:20:02 +01:00
a.header__link href="/conversations" title="Conversations"
= if @conversation_count > 0 do
i.fa-unread-icon.fas.fa-envelope-open>
span.header__counter
= @conversation_count
- else
i.fas.fa-envelope
a.header__link.hidden--mobile href="/filters" title="Filters"
i.fa.fa-filter
span.hidden--tablet< Filters
2019-11-17 20:47:01 +01:00
2023-11-23 22:20:02 +01:00
.header__search
2024-06-06 22:28:35 +02:00
= form_for @user_changeset, ~p"/filters/current", [class: "header__filter-form", id: "filter-quick-form"], fn f ->
2023-11-23 22:20:02 +01:00
= select f, :current_filter_id, @available_filters, name: "id", id: "filter-quick-menu", class: "input header__input", data: [change_submit: "#filter-quick-form"], autocomplete: "off"
2019-11-17 20:47:01 +01:00
2023-11-23 22:20:02 +01:00
.header__search
2024-06-06 22:28:35 +02:00
= form_for @user_changeset, ~p"/filters/spoiler_type", [class: "header__filter-form hidden--mobile", id: "spoiler-quick-form"], fn f ->
2023-11-23 22:20:02 +01:00
= select f, :spoiler_type, @spoiler_types, id: "spoiler-quick-menu", class: "input header__input", data: [change_submit: "#spoiler-quick-form"], autocomplete: "off"
2019-08-18 02:43:44 +02:00
2023-11-23 22:20:02 +01:00
.dropdown
2024-06-06 22:28:35 +02:00
a.header__link.header__link--user href=~p"/profiles/#{@current_user}"
2023-11-23 22:20:02 +01:00
= render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @current_user}, class: "avatar--navbar"
i.fa.fa-chevron-down
nav.dropdown__content.dropdown__content--right.hidden--mobile.js-burger-links
2024-06-06 22:28:35 +02:00
a.dropdown__item href=~p"/profiles/#{@current_user}"
2024-05-20 23:57:10 +02:00
.dropdown__icon
i.fa.icon--fixed.fa-user
.dropdown__text
= @current_user.name
2023-11-23 22:20:02 +01:00
hr.dropdown__separator
2024-05-20 23:57:10 +02:00
a.dropdown__item href="/search?q=my:watched"
.dropdown__icon
i.fa.icon--fixed.fa-eye
.dropdown__text Watched
a.dropdown__item href="/search?q=my:faves"
.dropdown__icon
i.fa.icon--fixed.fa-star
.dropdown__text Faves
a.dropdown__item href="/search?q=my:upvotes"
.dropdown__icon
i.fa.icon--fixed.fa-arrow-up
.dropdown__text Upvotes
2024-06-06 22:28:35 +02:00
a.dropdown__item href=~p"/galleries?#{[gallery: [creator: @current_user.name]]}"
2024-05-20 23:57:10 +02:00
.dropdown__icon
i.fa.icon--fixed.fa-image
.dropdown__text Galleries
a.dropdown__item href="/search?q=my:uploads"
.dropdown__icon
i.fa.icon--fixed.fa-upload
.dropdown__text Uploads
a.dropdown__item href="/comments?cq=my:comments"
.dropdown__icon
i.fa.icon--fixed.fa-comments
.dropdown__text Comments
a.dropdown__item href="/posts?pq=my:posts"
.dropdown__icon
i.fa.icon--fixed.fa-pen-square
.dropdown__text Posts
2024-06-06 22:28:35 +02:00
a.dropdown__item href=~p"/profiles/#{@current_user}/artist_links"
2024-05-20 23:57:10 +02:00
.dropdown__icon
i.fa.icon--fixed.fa-link
.dropdown__text Links
a.dropdown__item href="/conversations"
.dropdown__icon
i.fa.icon--fixed.fa-envelope
.dropdown__text Messages
2023-11-23 22:20:02 +01:00
hr.dropdown__separator
2024-05-20 23:57:10 +02:00
a.dropdown__item href="/settings/edit"
.dropdown__icon
i.fa.icon--fixed.fa-cogs
.dropdown__text Settings
2024-06-06 22:28:35 +02:00
a.dropdown__item href=~p"/registrations/edit"
2024-05-20 23:57:10 +02:00
.dropdown__icon
i.fa.icon--fixed.fa-user
.dropdown__text Account
2023-11-23 22:20:02 +01:00
hr.dropdown__separator
2024-06-06 22:28:35 +02:00
a.dropdown__item href=~p"/sessions" data-method="delete"
2024-05-20 23:57:10 +02:00
.dropdown__icon
i.fa.icon--fixed.fa-sign-out-alt
.dropdown__text Logout
2023-11-23 22:20:02 +01:00
- else
a.header__link.hidden--mobile href="/filters"
| Filters (
= @current_filter.name
| )
span.js-burger-links.hidden--mobile
a.header__link href="/settings/edit"
2024-05-20 23:57:10 +02:00
i.fa.icon--fixed.fa-cogs.hidden--desktop>
2023-11-23 22:20:02 +01:00
| Settings
2024-06-06 22:28:35 +02:00
a.header__link href=~p"/registrations/new"
2023-11-23 22:20:02 +01:00
| Register
2024-06-06 22:28:35 +02:00
a.header__link href=~p"/sessions/new"
2023-11-23 22:20:02 +01:00
| Login
nav.header__secondary
= render PhilomenaWeb.LayoutView, "_header_navigation.html", assigns
= if !is_nil(@current_user) and @current_user.role != "user" do
/= render PhilomenaWeb.LayoutView, "_header_staff_links.html", assigns