mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 23:08:00 +01:00
144 lines
6.2 KiB
Text
144 lines
6.2 KiB
Text
header
|
|
#js-burger-toggle.hidden--desktop
|
|
a.header__link href="#"
|
|
i.fa.fa-bars
|
|
a.header__logo.header__link href="/"
|
|
i.fab.fa-phoenix-framework>
|
|
span.hidden--mobile Philomena
|
|
a.header__link.hidden--mobile href="/images/new" title="Upload"
|
|
i.fa.fa-upload
|
|
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search", enforce_utf8: false], fn f ->
|
|
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"
|
|
|
|
= 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"]
|
|
|
|
= 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"
|
|
|
|
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
|
|
|
|
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
|
|
|
|
.header__search
|
|
= 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"
|
|
|
|
.header__search
|
|
= form_for @user_changeset, Routes.filter_spoiler_type_path(@conn, :update), [class: "header__filter-form hidden--mobile", id: "spoiler-quick-form"], fn f ->
|
|
= select f, :spoiler_type, @spoiler_types, id: "spoiler-quick-menu", class: "input header__input", data: [change_submit: "#spoiler-quick-form"], autocomplete: "off"
|
|
|
|
.dropdown
|
|
a.header__link.header__link--user href=Routes.profile_path(@conn, :show, @current_user)
|
|
= 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
|
|
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
|
|
- else
|
|
a.header__link.hidden--mobile href="/filters"
|
|
| Filters (
|
|
= @current_filter.name
|
|
| )
|
|
span.js-burger-links.hidden--mobile
|
|
a.header__link href="/settings/edit"
|
|
i.fa.fa-fw.fa-cogs.hidden--desktop>
|
|
| Settings
|
|
a.header__link href=Routes.registration_path(@conn, :new)
|
|
| Register
|
|
a.header__link href=Routes.session_path(@conn, :new)
|
|
| 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
|