mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-20 04:14:23 +01:00
header and footer
This commit is contained in:
parent
b872cb8db8
commit
b527db8dfd
11 changed files with 306 additions and 300 deletions
|
@ -43,6 +43,7 @@ $fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
|
||||||
@import "~views/admin";
|
@import "~views/admin";
|
||||||
@import "~views/burger";
|
@import "~views/burger";
|
||||||
@import "~views/communication";
|
@import "~views/communication";
|
||||||
|
@import "~views/footer";
|
||||||
@import "~views/header";
|
@import "~views/header";
|
||||||
@import "~views/markdown";
|
@import "~views/markdown";
|
||||||
@import "~views/metabar";
|
@import "~views/metabar";
|
||||||
|
|
|
@ -14,10 +14,12 @@ $font-family-monospace: "Droid Sans Mono", monospace;
|
||||||
|
|
||||||
--block-header-height: 2rem;
|
--block-header-height: 2rem;
|
||||||
|
|
||||||
--navbar-size: 40px;
|
--navbar-size: 4rem;
|
||||||
--navbar-secondary-size: 36px;
|
--navbar-secondary-size: 2.5rem;
|
||||||
--navbar-avatar-size: 36px;
|
--navbar-avatar-size: 2.5rem;
|
||||||
--navbar-input-size: 32px;
|
--navbar-input-size: 2rem;
|
||||||
|
--navbar-input-width: 18vw;
|
||||||
|
--navbar-input-max-width: 22rem;
|
||||||
|
|
||||||
--button-group-height: 2rem;
|
--button-group-height: 2rem;
|
||||||
--button-group-tall-height: 2.5rem;
|
--button-group-tall-height: 2.5rem;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
.avatar--navbar {
|
.avatar--navbar {
|
||||||
width: var(--navbar-avatar-size);
|
width: var(--navbar-avatar-size);
|
||||||
height: var(--navbar-avatar-size);
|
height: var(--navbar-avatar-size);
|
||||||
|
border-radius: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ body {
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: var(--padding-normal);
|
padding: var(--padding-normal);
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include if-mobile {
|
@include if-mobile {
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
|
|
||||||
.block--fixed {
|
.block--fixed {
|
||||||
padding: var(--padding-normal);
|
padding: var(--padding-normal);
|
||||||
|
border-radius: var(--border-radius-inner);
|
||||||
}
|
}
|
||||||
|
|
||||||
.block__tab {
|
.block__tab {
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
@mixin flash-type($type) {
|
@mixin flash-type($type) {
|
||||||
.flash--#{$type} {
|
.flash--#{$type} {
|
||||||
border: 1px solid var(--#{$type}-border-color);
|
border: 1px solid var(--#{$type}-border-color);
|
||||||
box-shadow: 0 -1px var(--#{$type}-dark-color) inset;
|
|
||||||
background: var(--#{$type}-color);
|
background: var(--#{$type}-color);
|
||||||
|
|
||||||
.flash__icon {
|
|
||||||
border-right: 1px solid var(--#{$type}-dark-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.flash__message {
|
.flash__message {
|
||||||
border-left: 1px solid var(--#{$type}-border-color);
|
border-left: 1px solid var(--#{$type}-border-color);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +22,7 @@
|
||||||
grid-template-columns: auto 1fr;
|
grid-template-columns: auto 1fr;
|
||||||
margin: var(--padding-normal);
|
margin: var(--padding-normal);
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
border-radius: var(--border-radius-inner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include if-phone {
|
@include if-phone {
|
||||||
|
|
14
assets/css/views/_footer.scss
Normal file
14
assets/css/views/_footer.scss
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
footer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--padding-large);
|
||||||
|
padding: var(--padding-normal);
|
||||||
|
background: var(--primary-dark-color);
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer > span {
|
||||||
|
order: 1;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
|
@ -1,95 +1,105 @@
|
||||||
.header {
|
header {
|
||||||
background: var(--primary-color);
|
display: flex;
|
||||||
line-height: var(--navbar-size);
|
line-height: var(--navbar-size);
|
||||||
padding: 0 var(--padding-normal);
|
padding: 0 var(--padding-normal);
|
||||||
border-bottom: 1px solid var(--primary-border-color);
|
|
||||||
box-shadow: 0 1px var(--primary-muted-color) inset, 0 -1px var(--primary-dark-color) inset;
|
|
||||||
font-size: var(--font-header-size);
|
font-size: var(--font-header-size);
|
||||||
}
|
gap: var(--padding-large);
|
||||||
|
align-items: center;
|
||||||
.header--secondary {
|
|
||||||
background: var(--secondary-dark-color);
|
|
||||||
border-color: var(--secondary-color);
|
|
||||||
line-height: var(--navbar-secondary-size);
|
|
||||||
|
|
||||||
.header__link {
|
|
||||||
border-right-color: var(--secondary-color);
|
|
||||||
border-left-color: var(--secondary-dark-color);
|
|
||||||
|
|
||||||
& > .fa {
|
|
||||||
margin-right: var(--padding-small);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: var(--secondary-muted-color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header__spacer {
|
|
||||||
flex: 1 0 auto;
|
|
||||||
height: var(--navbar-size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__link {
|
.header__link {
|
||||||
color: var(--text-color) !important;
|
color: var(--text-color) !important;
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding: 0 var(--padding-small);
|
|
||||||
border-right: 1px solid var(--primary-border-color);
|
|
||||||
border-left: 1px solid var(--primary-dark-color);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: var(--primary-dark-color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__link--no-hover:hover {
|
.header__link--user {
|
||||||
background: 0 !important;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--padding-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header__logo {
|
||||||
|
font-size: var(--font-h1-size)
|
||||||
|
}
|
||||||
|
|
||||||
|
.header__search {
|
||||||
|
@extend .flex;
|
||||||
|
@extend .flex--no-wrap;
|
||||||
|
@extend .flex--centered;
|
||||||
|
|
||||||
|
border: 0;
|
||||||
|
border-radius: var(--border-radius-inner);
|
||||||
|
background: var(--primary-muted-color);
|
||||||
|
height: var(--navbar-input-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header__search > button {
|
||||||
|
background: 0;
|
||||||
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__input {
|
.header__input {
|
||||||
@include animated-transition;
|
@include animated-transition;
|
||||||
height: var(--navbar-input-size);
|
height: var(--navbar-input-size);
|
||||||
background: var(--primary-muted-color);
|
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
|
background: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
box-shadow: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
select.header__input {
|
.header__input--text {
|
||||||
cursor: pointer;
|
width: var(--navbar-input-width);
|
||||||
}
|
max-width: var(--navbar-input-max-width);
|
||||||
|
|
||||||
select.header__input:hover {
|
|
||||||
@include animated-transition;
|
|
||||||
background: var(--primary-dark-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header__search {
|
|
||||||
@extend .flex__row;
|
|
||||||
height: var(--navbar-size);
|
|
||||||
padding: 0 var(--padding-small);
|
|
||||||
border-right: 1px solid var(--primary-border-color);
|
|
||||||
border-left: 1px solid var(--primary-dark-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header__buttons {
|
|
||||||
border: 0;
|
|
||||||
border-radius: 0;
|
|
||||||
border-left: 1px solid var(--primary-dark-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__search__button {
|
.header__search__button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
height: var(--navbar-input-size);
|
height: var(--navbar-input-size);
|
||||||
background: var(--primary-muted-color);
|
color: var(--text-color) !important;
|
||||||
box-shadow: 0 -1px var(--secondary-dark-color) inset;
|
padding: 0 var(--padding-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__search__button:hover {
|
.header__search__button:hover {
|
||||||
background: var(--primary-dark-color) !important;
|
background: var(--primary-color);
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__filter-form {
|
.header__filter-form {
|
||||||
padding: 0 var(--padding-small);
|
padding: 0 var(--padding-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.header__secondary {
|
||||||
|
display: flex;
|
||||||
|
line-height: var(--navbar-secondary-size);
|
||||||
|
padding: 0 var(--padding-normal);
|
||||||
|
font-size: var(--font-header-size);
|
||||||
|
gap: var(--padding-large);
|
||||||
|
align-items: center;
|
||||||
|
background: var(--primary-muted-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.dropdown__content {
|
||||||
|
line-height: var(--navbar-secondary-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include if-mobile {
|
||||||
|
header {
|
||||||
|
gap: var(--padding-normal);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: var(--padding-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.header__secondary {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.header__search {
|
||||||
|
width: 100%;
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header__input--text {
|
||||||
|
width: 100% !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
footer#footer
|
footer
|
||||||
#footer_content
|
- footer_data = footer_data()
|
||||||
- footer_data = footer_data()
|
|
||||||
|
|
||||||
= for column <- footer_data["cols"] do
|
= for column <- footer_data["cols"] do
|
||||||
.footercol
|
.footercol
|
||||||
h5 = column
|
h5 = column
|
||||||
|
|
||||||
= for row <- footer_data[column] do
|
= for row <- footer_data[column] do
|
||||||
= if row["bold"] do
|
= if row["bold"] do
|
||||||
strong
|
strong
|
||||||
a href=row["url"] target=row["target"]||"_self" = row["title"]
|
|
||||||
- else
|
|
||||||
a href=row["url"] target=row["target"]||"_self" = row["title"]
|
a href=row["url"] target=row["target"]||"_self" = row["title"]
|
||||||
br
|
- else
|
||||||
|
a href=row["url"] target=row["target"]||"_self" = row["title"]
|
||||||
#serving_info
|
br
|
||||||
|
span
|
||||||
' Powered by
|
' Powered by
|
||||||
a> href="https://github.com/philomena-dev/philomena" philomena
|
a> href="https://github.com/philomena-dev/philomena" philomena
|
||||||
| (
|
| (
|
||||||
|
|
|
@ -1,162 +1,144 @@
|
||||||
header.header
|
header
|
||||||
.flex.flex--centered.flex--start-bunched.flex--maybe-wrap
|
#js-burger-toggle.hidden--desktop
|
||||||
.flex.flex--centered
|
a.header__link href="#"
|
||||||
#js-burger-toggle.hidden--desktop
|
i.fa.fa-bars
|
||||||
a.header__link href="#"
|
a.header__logo.header__link href="/"
|
||||||
i.fa.fa-bars
|
i.fab.fa-phoenix-framework>
|
||||||
a.header__link href="/"
|
span.hidden--mobile Philomena
|
||||||
i.fa.fw.favicon-home
|
a.header__link.hidden--mobile href="/images/new" title="Upload"
|
||||||
span.fa__text.hidden--mobile
|
i.fa.fa-upload
|
||||||
' Derpibooru
|
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search", enforce_utf8: false], fn f ->
|
||||||
a.header__link.hidden--mobile href="/images/new" title="Upload"
|
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"
|
||||||
i.fa.fa-upload
|
|
||||||
|
|
||||||
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search flex flex--no-wrap flex--centered", enforce_utf8: false], fn f ->
|
= if present?(@conn.params["sf"]) do
|
||||||
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"
|
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 present?(@conn.params["sf"]) do
|
= if hides_images?(@conn) do
|
||||||
input type="hidden" name="sf" value=@conn.params["sf"]
|
= select f, :del, [{"-D", ""}, {"+D", 1}, {"*D", "deleted"}, {"DO", "only"}], name: "del", class: "input header__input js-staff-action", autocomplete: "off"
|
||||||
= 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
|
button.header__search__button type="submit" title="Search"
|
||||||
= select f, :del, [{"-D", ""}, {"+D", 1}, {"*D", "deleted"}, {"DO", "only"}], name: "del", class: "input header__input js-staff-action", autocomplete: "off"
|
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
|
||||||
|
|
||||||
button.header__search__button type="submit" title="Search"
|
a.header__link href="/conversations" title="Conversations"
|
||||||
i.fas.fa-search
|
= if @conversation_count > 0 do
|
||||||
a.header__search__button href="/search/reverse" title="Search using an image"
|
i.fa-unread-icon.fas.fa-envelope-open>
|
||||||
i.fa-search-button.fas.fa-camera
|
span.header__counter
|
||||||
a.header__search__button href="/pages/search_syntax" title="Search syntax help"
|
= @conversation_count
|
||||||
i.fa-search-button.fas.fa-question
|
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap.header__force-right
|
|
||||||
= 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>
|
|
||||||
span.header__counter.hidden
|
|
||||||
| 0
|
|
||||||
|
|
||||||
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"
|
|
||||||
i.fa.fa-filter
|
|
||||||
span.hidden--tablet< Filters
|
|
||||||
|
|
||||||
= 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"
|
|
||||||
|
|
||||||
= 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.header__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"
|
|
||||||
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
|
|
||||||
- else
|
- else
|
||||||
a.header__link.hidden--mobile href="/filters"
|
i.fas.fa-envelope
|
||||||
| Filters (
|
a.header__link.hidden--mobile href="/filters" title="Filters"
|
||||||
= @current_filter.name
|
i.fa.fa-filter
|
||||||
| )
|
span.hidden--tablet< Filters
|
||||||
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.header--secondary
|
.header__search
|
||||||
.flex.flex--row.flex--centered.flex--spaced-out.flex--wrap
|
= form_for @user_changeset, Routes.filter_current_path(@conn, :update), [class: "header__filter-form", id: "filter-quick-form"], fn f ->
|
||||||
= render PhilomenaWeb.LayoutView, "_header_navigation.html", assigns
|
= 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"
|
||||||
= if !is_nil(@current_user) and @current_user.role != "user" do
|
|
||||||
= render PhilomenaWeb.LayoutView, "_header_staff_links.html", assigns
|
.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
|
||||||
|
|
|
@ -1,57 +1,56 @@
|
||||||
.flex.flex--row.hidden--mobile
|
.dropdown.header__dropdown
|
||||||
.dropdown.header__dropdown
|
a.header__link href="/images"
|
||||||
a.header__link href="/images"
|
i.fa.fa-image>
|
||||||
i.fa.fa-image
|
| Images
|
||||||
| Images
|
span data-click-preventdefault="true"
|
||||||
span data-click-preventdefault="true"
|
i.fa.fa-caret-down<
|
||||||
i.fa.fa-caret-down<
|
nav.dropdown__content
|
||||||
.dropdown__content
|
a href="/images/random"
|
||||||
a href="/images/random"
|
.dropdown__item
|
||||||
.dropdown__item
|
.dropdown__icon
|
||||||
.dropdown__icon
|
i.fa.fa-fw.fa-random>
|
||||||
i.fa.fa-fw.fa-random
|
.dropdown__text Random
|
||||||
.dropdown__text Random
|
.dropdown.header__dropdown
|
||||||
.dropdown.header__dropdown
|
a.header__link href="/activity"
|
||||||
a.header__link href="/activity"
|
i.fa.fa-bullhorn>
|
||||||
i.fa.fa-bullhorn
|
| Activity
|
||||||
| Activity
|
span data-click-preventdefault="true"
|
||||||
span data-click-preventdefault="true"
|
i.fa.fa-caret-down<
|
||||||
i.fa.fa-caret-down<
|
nav.dropdown__content
|
||||||
.dropdown__content
|
a href="/comments"
|
||||||
a href="/comments"
|
.dropdown__item
|
||||||
.dropdown__item
|
.dropdown__icon
|
||||||
.dropdown__icon
|
i.fa.fa-fw.fa-comments>
|
||||||
i.fa.fa-fw.fa-comments
|
.dropdown__text Comments
|
||||||
.dropdown__text Comments
|
.dropdown.header__dropdown
|
||||||
.dropdown.header__dropdown
|
a.header__link href="/forums"
|
||||||
a.header__link href="/forums"
|
i.fa.fa-comments>
|
||||||
i.fa.fa-comments
|
| Forums
|
||||||
| Forums
|
span data-click-preventdefault="true"
|
||||||
span data-click-preventdefault="true"
|
i.fa.fa-caret-down<
|
||||||
i.fa.fa-caret-down<
|
nav.dropdown__content
|
||||||
.dropdown__content
|
= for forum <- @conn.assigns.forums do
|
||||||
= for forum <- @conn.assigns.forums do
|
a.dropdown__link href=Routes.forum_path(@conn, :show, forum)
|
||||||
a.dropdown__link href=Routes.forum_path(@conn, :show, forum)
|
= forum.name
|
||||||
= forum.name
|
|
||||||
|
|
||||||
hr.dropdown__separator
|
hr.dropdown__separator
|
||||||
a href="/posts"
|
a href="/posts"
|
||||||
.dropdown__item
|
.dropdown__item
|
||||||
.dropdown__icon
|
.dropdown__icon
|
||||||
i.fa.fa-fw.fa-search
|
i.fa.fa-fw.fa-search>
|
||||||
.dropdown__text Post Search
|
.dropdown__text Post Search
|
||||||
a.header__link href="/tags"
|
a.header__link href="/tags"
|
||||||
i.fa.fa-tag
|
i.fa.fa-tag>
|
||||||
| Tags
|
| Tags
|
||||||
a.header__link href="/channels"
|
a.header__link href="/channels"
|
||||||
i.fa.fa-stream
|
i.fa.fa-stream>
|
||||||
' Live
|
' Live
|
||||||
span.header__counter
|
span.header__counter
|
||||||
= @conn.assigns.live_channels
|
= @conn.assigns.live_channels
|
||||||
|
|
||||||
a.header__link href="/galleries"
|
a.header__link href="/galleries"
|
||||||
i.fa.fa-images
|
i.fa.fa-images>
|
||||||
| Galleries
|
| Galleries
|
||||||
a.header__link href="/commissions"
|
a.header__link href="/commissions"
|
||||||
i.fa.fa-briefcase
|
i.fa.fa-briefcase>
|
||||||
| Commissions
|
| Commissions
|
||||||
|
|
Loading…
Reference in a new issue