Start reworking the Header. Move the menu toggler to the left.
Fix the font-size in the Header's menu entries.
This commit is contained in:
parent
fa51b7d7eb
commit
6542acc378
File diff suppressed because one or more lines are too long
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
:root.burichan .entry {
|
:root.burichan .entry {
|
||||||
border-bottom: 1px solid #B7C5D9;
|
border-bottom: 1px solid #B7C5D9;
|
||||||
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
:root.burichan .focused.entry {
|
:root.burichan .focused.entry {
|
||||||
background: rgba(255, 255, 255, .33);
|
background: rgba(255, 255, 255, .33);
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
:root.futaba .entry {
|
:root.futaba .entry {
|
||||||
border-bottom: 1px solid #D9BFB7;
|
border-bottom: 1px solid #D9BFB7;
|
||||||
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
:root.futaba .focused.entry {
|
:root.futaba .focused.entry {
|
||||||
background: rgba(255, 255, 255, .33);
|
background: rgba(255, 255, 255, .33);
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
:root.photon .entry {
|
:root.photon .entry {
|
||||||
border-bottom: 1px solid #CCC;
|
border-bottom: 1px solid #CCC;
|
||||||
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
:root.photon .focused.entry {
|
:root.photon .focused.entry {
|
||||||
background: rgba(255, 255, 255, .33);
|
background: rgba(255, 255, 255, .33);
|
||||||
|
|||||||
@ -137,9 +137,11 @@ a[href="javascript:;"] {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
#header-bar > .menu-button {
|
.brackets-wrap::before {
|
||||||
float: right;
|
content: " [";
|
||||||
padding: 0;
|
}
|
||||||
|
.brackets-wrap::after {
|
||||||
|
content: "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
|
|||||||
@ -51,6 +51,7 @@
|
|||||||
}
|
}
|
||||||
:root.tomorrow .entry {
|
:root.tomorrow .entry {
|
||||||
border-bottom: 1px solid #111;
|
border-bottom: 1px solid #111;
|
||||||
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
:root.tomorrow .focused.entry {
|
:root.tomorrow .focused.entry {
|
||||||
background: rgba(0, 0, 0, .33);
|
background: rgba(0, 0, 0, .33);
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
:root.yotsuba-b .entry {
|
:root.yotsuba-b .entry {
|
||||||
border-bottom: 1px solid #B7C5D9;
|
border-bottom: 1px solid #B7C5D9;
|
||||||
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
:root.yotsuba-b .focused.entry {
|
:root.yotsuba-b .focused.entry {
|
||||||
background: rgba(255, 255, 255, .33);
|
background: rgba(255, 255, 255, .33);
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
}
|
}
|
||||||
:root.yotsuba .entry {
|
:root.yotsuba .entry {
|
||||||
border-bottom: 1px solid #D9BFB7;
|
border-bottom: 1px solid #D9BFB7;
|
||||||
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
:root.yotsuba .focused.entry {
|
:root.yotsuba .focused.entry {
|
||||||
background: rgba(255, 255, 255, .33);
|
background: rgba(255, 255, 255, .33);
|
||||||
|
|||||||
@ -1,41 +1,30 @@
|
|||||||
Header =
|
Header =
|
||||||
init: ->
|
init: ->
|
||||||
@menu = new UI.Menu 'header'
|
|
||||||
|
|
||||||
@headerEl = $.el 'div',
|
@headerEl = $.el 'div',
|
||||||
id: 'header'
|
id: 'header'
|
||||||
innerHTML: '<div id=header-bar class=dialog></div><div id=notifications></div>'
|
innerHTML: """
|
||||||
|
<div id=header-bar class=dialog>
|
||||||
|
<span class=brackets-wrap><a class=menu-button href=javascript:;><span></span></a></span>
|
||||||
|
<span class=brackets-wrap hidden>top secret</span>
|
||||||
|
<span class=brackets-wrap id=board-list hidden>next-gen board-list</span>
|
||||||
|
<span class='show-board-list-button brackets-wrap' title="Toggle the board list."><a href=javascript:;>+</a></span>
|
||||||
|
<a class=board-name href="/#{g.BOARD}/#{if g.VIEW is 'catalog' then 'catalog' else ''}">
|
||||||
|
<span class=board-path>/#{g.BOARD}/</span> - <span class=board-title>...</span>
|
||||||
|
</a>
|
||||||
|
<span class=board-list hidden></span>
|
||||||
|
<div id=toggle-header-bar title="Toggle the header auto-hiding."></div>
|
||||||
|
</div>
|
||||||
|
<div id=notifications></div>
|
||||||
|
""".replace />\s+</g, '><' # get rid of spaces between elements
|
||||||
|
|
||||||
headerBar = $('#header-bar', @headerEl)
|
headerBar = $ '#header-bar', @headerEl
|
||||||
if $.get 'autohideHeaderBar', false
|
if $.get 'autohideHeaderBar', false
|
||||||
$.addClass headerBar, 'autohide'
|
$.addClass headerBar, 'autohide'
|
||||||
|
|
||||||
menuButton = $.el 'a',
|
@menu = new UI.Menu 'header'
|
||||||
className: 'menu-button'
|
$.on $('.menu-button', headerBar), 'click', @menuToggle
|
||||||
innerHTML: '[<span></span>]'
|
$.on $('.show-board-list-button', headerBar), 'click', @toggleBoardList
|
||||||
href: 'javascript:;'
|
$.on $('#toggle-header-bar', headerBar), 'click', @toggleBar
|
||||||
$.on menuButton, 'click', @menuToggle
|
|
||||||
|
|
||||||
boardListButton = $.el 'span',
|
|
||||||
className: 'show-board-list-button'
|
|
||||||
innerHTML: '[<a href=javascript:;>+</a>]'
|
|
||||||
title: 'Toggle the board list.'
|
|
||||||
$.on boardListButton, 'click', @toggleBoardList
|
|
||||||
|
|
||||||
boardTitle = $.el 'a',
|
|
||||||
className: 'board-name'
|
|
||||||
innerHTML: "<span class=board-path>/#{g.BOARD}/</span> - <span class=board-title>...</span>"
|
|
||||||
href: "/#{g.BOARD}/#{if g.VIEW is 'catalog' then 'catalog' else ''}"
|
|
||||||
boardList = $.el 'span',
|
|
||||||
className: 'board-list'
|
|
||||||
hidden: true
|
|
||||||
|
|
||||||
toggleBar = $.el 'div',
|
|
||||||
id: 'toggle-header-bar'
|
|
||||||
title: 'Toggle the header auto-hiding.'
|
|
||||||
$.on toggleBar, 'click', @toggleBar
|
|
||||||
|
|
||||||
$.prepend headerBar, [menuButton, boardListButton, $.tn(' '), boardTitle, boardList, toggleBar]
|
|
||||||
|
|
||||||
catalogToggler = $.el 'label',
|
catalogToggler = $.el 'label',
|
||||||
innerHTML: "<input type=checkbox #{if g.VIEW is 'catalog' then 'checked' else ''}> Use catalog board links"
|
innerHTML: "<input type=checkbox #{if g.VIEW is 'catalog' then 'checked' else ''}> Use catalog board links"
|
||||||
@ -60,10 +49,12 @@ Header =
|
|||||||
toggleBoardList: ->
|
toggleBoardList: ->
|
||||||
node = @firstElementChild.firstChild
|
node = @firstElementChild.firstChild
|
||||||
if showBoardList = $.hasClass @, 'show-board-list-button'
|
if showBoardList = $.hasClass @, 'show-board-list-button'
|
||||||
@className = 'hide-board-list-button'
|
$.rmClass @, 'show-board-list-button'
|
||||||
|
$.addClass @, 'hide-board-list-button'
|
||||||
node.data = node.data.replace '+', '-'
|
node.data = node.data.replace '+', '-'
|
||||||
else
|
else
|
||||||
@className = 'show-board-list-button'
|
$.rmClass @, 'hide-board-list-button'
|
||||||
|
$.addClass @, 'show-board-list-button'
|
||||||
node.data = node.data.replace '-', '+'
|
node.data = node.data.replace '-', '+'
|
||||||
{headerEl} = Header
|
{headerEl} = Header
|
||||||
$('.board-name', headerEl).hidden = showBoardList
|
$('.board-name', headerEl).hidden = showBoardList
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user