2019-08-18 02:43:44 +02:00
header.header
.flex.flex--centered.flex--start-bunched.flex--maybe-wrap
.flex.flex--centered
2023-11-23 17:07:49 +01:00
#js-burger-toggle.hidden--desktop
2020-02-06 23:32:35 +01:00
a.header__link href="#"
2019-08-18 02:43:44 +02:00
i.fa.fa-bars
2020-02-06 23:32:35 +01:00
a.header__link href="/"
2019-08-18 02:43:44 +02:00
i.fa.fw.favicon-home
2023-11-23 17:07:49 +01:00
span.fa__text.hidden--mobile
2019-12-20 05:09:47 +01:00
' Derpibooru
2023-11-23 17:07:49 +01:00
a.header__link.hidden--mobile href="/images/new" title="Upload"
2019-08-18 02:43:44 +02:00
i.fa.fa-upload
2020-01-02 04:09:53 +01:00
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search flex flex--no-wrap flex--centered", enforce_utf8: false], fn f ->
2023-11-23 17:07:49 +01:00
input.input.input--text.header__input.header__input--search#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"
2019-08-18 02:43:44 +02:00
2019-12-13 03:19:07 +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"]
2021-12-23 03:30:28 +01:00
= if present?(@conn.params["hidden"]) do
input type="hidden" name="hidden" value=@conn.params["hidden"]
2019-12-13 03:19:07 +01:00
2019-12-18 01:42:50 +01:00
= if hides_images?(@conn) do
2019-12-20 23:35:46 +01:00
= select f, :del, [{"-D", ""}, {"+D", 1}, {"*D", "deleted"}, {"DO", "only"}], name: "del", class: "input header__input js-staff-action", autocomplete: "off"
2019-12-18 01:42:50 +01:00
button.header__search__button type="submit" title="Search"
2022-04-02 14:41:15 +02:00
i.fas.fa-search
2019-08-18 02:43:44 +02:00
a.header__search__button href="/search/reverse" title="Search using an image"
2022-04-02 14:41:15 +02:00
i.fa-search-button.fas.fa-camera
2019-11-30 00:54:05 +01:00
a.header__search__button href="/pages/search_syntax" title="Search syntax help"
2022-04-02 14:41:15 +02:00
i.fa-search-button.fas.fa-question
2019-08-18 02:43:44 +02:00
.flex.flex--centered.flex--no-wrap.header__force-right
= if @current_user do
a.header__link href="/notifications" title="Notifications"
2022-04-02 14:41:15 +02:00
i.fas.fa-bell>
2019-11-17 23:51:14 +01:00
span.js-notification-ticker.fa__text.header__counter data-notification-count=@notification_count = @notification_count
2019-08-18 02:43:44 +02:00
a.header__link href="/conversations" title="Conversations"
2019-11-17 19:52:59 +01:00
= if @conversation_count > 0 do
2022-04-02 14:41:15 +02:00
i.fa-unread-icon.fas.fa-envelope-open>
span.header__counter
2019-11-17 19:52:59 +01:00
= @conversation_count
- else
2022-04-02 14:41:15 +02:00
i.fas.fa-envelope>
span.header__counter.hidden
2019-11-17 19:52:59 +01:00
| 0
2019-08-18 02:43:44 +02:00
2023-11-23 17:07:49 +01:00
a.header__link href="/conversations" title="Conversations"
= if @conversation_count > 0 do
i.fa.fa-envelope>
span.fa-embedded__text.header__counter
= @conversation_count
- else
i.fa.fa-envelope>
span.fa-embedded__text.header__counter.hidden
| 0
a.header__link.hidden--mobile href="/filters" title="Filters"
2019-08-18 02:43:44 +02:00
i.fa.fa-filter
2023-11-23 17:07:49 +01:00
span.hidden--tablet< Filters
2019-11-17 20:47:01 +01:00
2019-11-17 23:51:14 +01:00
= form_for @user_changeset, Routes.filter_current_path(@conn, :update), [class: "header__filter-form", id: "filter-quick-form"], fn f ->
= 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 17:07:49 +01:00
= form_for @user_changeset, Routes.filter_spoiler_type_path(@conn, :update), [class: "header__filter-form hidden--mobile", id: "spoiler-quick-form"], fn f ->
2019-11-17 23:51:14 +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-11-17 20:47:01 +01:00
2019-08-18 02:43:44 +02:00
.dropdown.header__dropdown
2019-11-30 03:36:16 +01:00
a.header__link.header__link-user href=Routes.profile_path(@conn, :show, @current_user)
2023-11-23 17:07:49 +01:00
= render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @current_user}, class: "avatar--navbar"
span.header__link-user__dropdown-arrow.hidden--mobile data-click-preventdefault="true"
nav.dropdown__content.dropdown__content--right.hidden--mobile.js-burger-links
a href=Routes.profile_path(@conn, :show, @current_user)
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-user
.dropdown__text
= @current_user.name
hr.dropdown__separator
a href="/search?q=my:watched"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-eye
.dropdown__text Watched
a href="/search?q=my:faves"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-star
.dropdown__text Faves
a href="/search?q=my:upvotes"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-arrow-up
.dropdown__text Upvotes
a href=Routes.gallery_path(@conn, :index, gallery: [creator: @current_user.name])
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-image
.dropdown__text Galleries
a href="/search?q=my:uploads"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-upload
.dropdown__text Uploads
a href="/comments?cq=my:comments"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-comments
.dropdown__text Comments
a href="/posts?pq=my:posts"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-pen-square
.dropdown__text Posts
a href=Routes.profile_artist_link_path(@conn, :index, @current_user)
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-link
.dropdown__text Links
a href="/conversations"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-envelope
.dropdown__text Messages
hr.dropdown__separator
a href="/settings/edit"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-cogs
.dropdown__text Settings
a href=Routes.registration_path(@conn, :edit)
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-user
.dropdown__text Account
hr.dropdown__separator
a href=Routes.session_path(@conn, :delete) data-method="delete"
.dropdown__item
.dropdown__icon
i.fa.fa-fw.fa-sign-out-alt
.dropdown__text Logout
2019-08-18 02:43:44 +02:00
- else
2023-11-23 17:07:49 +01:00
a.header__link.hidden--mobile href="/filters"
2019-10-09 02:45:04 +02:00
| Filters (
= @current_filter.name
| )
2023-11-23 17:07:49 +01:00
span.js-burger-links.hidden--mobile
2020-02-06 23:34:10 +01:00
a.header__link href="/settings/edit"
2023-11-23 17:07:49 +01:00
i.fa.fa-fw.fa-cogs.hidden--desktop>
2019-08-18 02:43:44 +02:00
| Settings
2020-07-28 22:56:26 +02:00
a.header__link href=Routes.registration_path(@conn, :new)
2019-08-18 02:43:44 +02:00
| Register
2020-07-28 22:56:26 +02:00
a.header__link href=Routes.session_path(@conn, :new)
2019-08-18 02:43:44 +02:00
| Login
nav.header.header--secondary
2023-11-23 17:07:49 +01:00
.flex.flex--row.flex--centered.flex--spaced-out.flex--wrap
2019-08-18 02:43:44 +02:00
= render PhilomenaWeb.LayoutView, "_header_navigation.html", assigns
2019-12-06 23:59:39 +01:00
= if !is_nil(@current_user) and @current_user.role != "user" do
2019-12-04 23:28:53 +01:00
= render PhilomenaWeb.LayoutView, "_header_staff_links.html", assigns