Skip to content

Commit

Permalink
test title bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Yesmunt committed May 31, 2019
1 parent a214f4c commit 3055503
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 53 deletions.
1 change: 1 addition & 0 deletions src/platforms/electron/createWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default appState => {
backgroundColor: '#2f9176',
minWidth: 950,
minHeight: 600,
titleBarStyle: 'hidden',
autoHideMenuBar: true,
show: false,
// Create the window using the state information.
Expand Down
27 changes: 7 additions & 20 deletions src/ui/component/header/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ const Header = (props: Props) => {

return (
<header className="header">
<div className="title-bar" />
<div className="header__contents">
<div className="header__navigation">
{/* <Button
className="header__navigation-item header__navigation-item--lbry"
label={__('LBRY')}
iconRight={ICONS.LBRY}
navigate="/"
/> */}
<Button
className="header__navigation-item header__navigation-item--lbry"
label={__('LBRY')}
icon={ICONS.LBRY}
navigate="/"
/>
{/* @if TARGET='app' */}
<div className="header__navigation-arrows">
<Button
Expand All @@ -67,13 +68,6 @@ const Header = (props: Props) => {
<WunderBar />

<div className="header__navigation">
<Button
className="header__navigation-item header__navigation-item--menu"
description={__('Menu')}
icon={ICONS.MENU}
iconSize={15}
/>

<Button
className="header__navigation-item header__navigation-item--right-action"
activeClass="header__navigation-item--active"
Expand Down Expand Up @@ -131,13 +125,6 @@ const Header = (props: Props) => {
iconSize={24}
navigate="/$/settings"
/>
<Button
className="header__navigation-item header__navigation-item--right-action"
activeClass="header__navigation-item--active"
icon={ICONS.HELP}
iconSize={24}
navigate="/$/help"
/>
</div>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/page/discover/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function DiscoverPage(props) {
if (personalSort === 'me') {
options.any_tags = myTags.map(tag => tag.name);
}
if (typeSort === 'best') {
if (typeSort === 'trending') {
options.order_by = ['trending_global', 'trending_mixed'];
} else if (typeSort === 'new') {
options.order_by = ['release_time'];
Expand Down
1 change: 0 additions & 1 deletion src/ui/scss/component/_file-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
}

.file-list__item-title {
font-size: 1.2em;
font-weight: 600;
}

Expand Down
31 changes: 5 additions & 26 deletions src/ui/scss/component/_header.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.header {
position: fixed;
top: 0;
width: 100%;
background-color: $lbry-white;
height: var(--header-height);
height: calc(var(--header-height) + 2rem);
z-index: 1;
border-bottom: 1px solid $lbry-gray-1;
}
Expand Down Expand Up @@ -34,7 +35,7 @@

.header__navigation-arrows {
display: flex;
margin-left: -1rem;
margin: 0 var(--spacing-vertical-small);

.button__content {
justify-content: center;
Expand Down Expand Up @@ -79,9 +80,8 @@
}

.header__navigation-item--back,
.header__navigation-item--forward,
.header__navigation-item--menu {
width: var(--header-height);
.header__navigation-item--forward {
width: 3rem;
}

.header__navigation-item--lbry {
Expand All @@ -107,15 +107,6 @@
margin-right: var(--spacing-vertical-large);
}

.header__navigation-item--right-action:not(:last-child),
.header__navigation-item--lbry {
// border-right: 1px solid $lbry-gray-1;

html[data-mode='dark'] & {
// border-right: 1px solid $lbry-gray-5;
}
}

.header__navigation-item--upgrade {
background-color: $lbry-teal-5;
color: $lbry-white;
Expand All @@ -128,22 +119,10 @@
}
}

.header__navigation-item--menu {
// Add this back once we have an actual menu for mobile
// @media (min-width: 601px) {
display: none;
// }
}

// Hide links that will live in the menu bar
@media (max-width: 600px) {
.header__navigation-item--back,
.header__navigation-item--forward,
.header__navigation-item--right-action {
display: none;
}

.header__navigation-item--lbry {
padding: var(--spacing-vertical-medium);
}
}
7 changes: 7 additions & 0 deletions src/ui/scss/component/_main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.title-bar {
-webkit-app-region: drag;
width: 100%;
height: 2rem;
-webkit-app-region: drag;
}

.main-wrapper {
position: absolute;
min-height: 100vh;
Expand Down
3 changes: 2 additions & 1 deletion src/ui/scss/component/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ $main: $lbry-teal-5;

.tag {
user-select: none;
display: inline-block;
display: flex;
align-items: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
20 changes: 17 additions & 3 deletions src/ui/scss/component/_wunderbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

cursor: text;
display: flex;
align-items: center;
flex: 1;
position: relative;
z-index: 1;
margin-right: var(--spacing-main-padding);

html[data-mode='dark'] & {
border-color: $lbry-gray-5;
Expand Down Expand Up @@ -38,14 +40,26 @@

.wunderbar__input {
width: 100%;
height: 100%;

height: var(--button-height);
border-radius: var(--button-radius);
background-color: $lbry-gray-1;
align-items: center;
border: none;
display: flex;
justify-content: center;
padding-left: var(--spacing-vertical-xlarge);
transition: background-color 0.2s;
padding-left: 2.5rem;
transition: all 0.2s;
color: $lbry-black;

&:focus {
border-radius: var(--input-border-radius);
}

&::placeholder {
color: $lbry-black;
opacity: 0.7;
}

html[data-mode='dark'] & {
color: $lbry-white;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/scss/init/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $large-breakpoint: 1921px;
--button-height: 2.6rem;

// Header
--header-height: 3.5rem;
--header-height: 4.5rem;

// Header -> search
--search-modal-input-height: 70px;
Expand Down

0 comments on commit 3055503

Please sign in to comment.