Skip to content

Commit

Permalink
layout WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed May 7, 2024
1 parent 9a6f1ec commit fabb9fe
Show file tree
Hide file tree
Showing 15 changed files with 596 additions and 807 deletions.
700 changes: 366 additions & 334 deletions scss/styles.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cone/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
cfg.main_template = 'cone.app.browser:templates/main.pt'

# default node icon
cfg.default_node_icon = 'glyphicon glyphicon-asterisk'
cfg.default_node_icon = 'bi-asterisk'


class layout_config(object):
Expand Down
3 changes: 3 additions & 0 deletions src/cone/app/browser/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def navtreeitem(self, title, url, target, path, icon, css=''):
item['path'] = path
item['icon'] = icon
item['css'] = css
item['leaf'] = False
item['showchildren'] = False
item['children'] = list()
return item
Expand Down Expand Up @@ -385,6 +386,7 @@ def fillchildren(self, model, path, tree):
title = safe_decode(title)
url = make_url(self.request, node=node)
query = make_query(contenttile=node.properties.default_content_tile)
# XXX: if open children inside, use parent as target
target = make_url(self.request, node=node, query=query)
curnode = curpath == safe_decode(key)
icon = node_icon(node)
Expand All @@ -394,6 +396,7 @@ def fillchildren(self, model, path, tree):
child = self.navtreeitem(
title, url, target, node_path(node), icon, css)
child['showchildren'] = curnode
child['leaf'] = INavigationLeaf.providedBy(node)
if curnode:
child['selected'] = True
if default_child:
Expand Down
319 changes: 18 additions & 301 deletions src/cone/app/browser/static/cone/cone.app.css
Original file line number Diff line number Diff line change
@@ -1,310 +1,27 @@
/* layout */
#layout > div.container-fluid {
margin-bottom: 60px;
body {
height: 100vh;
}

/* main nav bar */
.navbar-top {
border-radius: 0;
border-width: 0 0 1px;
#content {
height: calc(100% - 40px);
}

/* search field */
#search {
padding-left: 10px;
padding-right: 10px;
}
#search #search-text, #search input.form-control.tt-hint {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

/* dropdown */
.dropdown-menu > li > a.selected {
background-color: #e8e8e8;
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
}
.dropdown-menu > li > a.disabled {
cursor: not-allowed;
color: #aaa;
}
.dropdown-menu > li > button {
display: block;
background: none;
border: none;
cursor: pointer;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
width: 100%;
text-align: left;
}
.dropdown-menu > li > button:hover {
background-color: #e8e8e8;
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
}

/* navtree */
#navtree li {
padding-left: 8px;
}
#navtree li > a {
padding: 6px 10px 6px 0px;
}
#navtree li > a:hover {
color: #333;
background-color: transparent;
}
#navtree li.active > a {
font-weight: bold;
}
#navtree li.navtreelevel_1 {
padding-left: 0px;
}
#navtree li.navtreelevel_2 {
margin-left: 6px;
border-left: #cdcdcd 3px solid;
}
#navtree li.navtreelevel_2 > a {
padding: 5px 10px 5px 0px;
}
#navtree li.navtreelevel_3 {
margin-left: 5px;
border-left: #dddddd 3px solid;
}
#navtree li.navtreelevel_3 > a {
padding: 4px 10px 4px 0px;
}
#navtree li.navtreelevel_4 {
margin-left: 4px;
border-left: #dedede 3px solid;
}
#navtree li.navtreelevel_4 > a {
padding: 3px 10px 3px 0px;
}
#navtree li.navtreelevel_5 {
margin-left: 4px;
border-left: #eeeeee 3px solid;
}
#navtree li.navtreelevel_5 > a {
padding: 2px 10px 2px 0px;
}
#navtree li.navtreelevel_6 {
margin-left: 4px;
border-left: #efefef 3px solid;
}
#navtree li.navtreelevel_6 > a {
padding: 2px 10px 2px 0px;
#navtree a.nav-link {
z-index: 2000;
}

/* workflow */
span.no-transitions {
position: relative;
display: block;
padding: 15px 15px;
line-height: 20px;
@media (min-width: 992px) {
#personaltools {
order: 1;
}
}

/* content panel heading */
.content-heading h4 {
padding-left: 0;
}

/* batched items */
.batched_items_slice_size {
margin-top: 2px;
}

.batched_items_filter {
margin-right: 8px;
margin-top: 2px;
}

.batched_items_footer .pagination {
margin-top: 0;
margin-bottom: 0;
}

.batched_items_info {
margin-top: 4px;
margin-bottom: 4px;
}

input.empty_filter {
color: #ccc !important;
@media (min-width: 992px) and (max-width: 1400px) {
#navbar-content {
margin-left: 200px;
}
}

/* table */
.table_length {
margin-top: 2px;
}

.table_filter {
margin-right: 8px;
margin-top: 2px;
}

.table_sort {
font-size: 80%;
color: #428BCA;
}

table.table tr th:first-child,
table.table tr td:first-child {
padding-left: 20px;
}

td.actions a {
margin-right: 4px;
}

.table-footer .pagination {
margin-top: 0;
margin-bottom: 0;
}

.table_info {
margin-top: 4px;
margin-bottom: 4px;
}

/* copysupport */
tr.selectable td {
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}

tr.selectable.selected td {
background-color: #dfeefb;
}

.table-striped > tbody > tr.selectable.selected:nth-child(2n+1) > td {
background-color: #cfdce7;
}

/* referencebrowser */
.referencebrowser_trigger {
padding: 10px 15px 10px 5px;
cursor: pointer;
display: block;
text-decoration: underline;
}
.referencebrowser_trigger i {
margin-right: 0.6em;
}

#referencebrowser_table td.actions {
width: 100px;
}

.modal-body div.referencebrowser {
margin: -15px;
}

div#referencebrowser_pathbar ol.breadcrumb {
border-radius: 0px;
}

div#referencebrowser {
margin-bottom: 0px;
border-radius: 0px;
border-left: none;
border-right: none;
border-bottom: none;
}
div#referencebrowser .panel-heading,
div#referencebrowser .panel-footer {
border-radius: 0px;
}

a.addreference.disabled,
a.removereference.disabled {
color: #ddd;
}

/* translation */
.translation-nav > li > a {
padding: 5px 10px;
}
.translation-nav > li.error > a,
.translation-nav > li.error > a:hover,
.translation-nav > li.error > a:focus {
color: #a94442;
background-color: #fff;
}
.translation-nav > li.active.error > a,
.translation-nav > li.active.error > a:hover,
.translation-nav > li.active.error > a:focus {
color: #fff;
background-color: #a94442;
}

.translation-fields {
display: none;
margin-top: 3px;
}

/* settings */
#settings_sidebar > ul {
padding: 0;
}
#settings_sidebar > ul .settings_header {
background-image: linear-gradient(to bottom, #bbdbf7 0%, #a4cced 100%);
}
#settings_sidebar > ul > li.selected {
font-weight: bold;
}

#settings-grid-container h3 {
margin-top: 0;
margin-bottom: 0;
border-bottom: #ccc 1px solid;
}
#settings-grid-container .settings-grid {
display: flex;
flex-wrap: wrap;
padding: 1rem;
}
#settings-grid-container .settings-grid .settings-grid-item {
display: flex;
justify-content: center;
align-items: center;
flex-flow: column;
gap: 8px;
width: 11rem;
height: 11rem;
margin-right: 1rem;
margin-bottom: 1rem;
background: #f5f5f5;
border: 1px solid rgba(0, 0, 0, 0.1215686275);
color: #000;
border-radius: 14px;
text-decoration: none;
}
#settings-grid-container .settings-grid .settings-grid-item > i {
font-size: 50px;
}
#settings-grid-container .settings-grid .settings-grid-item > span {
text-align: center;
line-height: normal;
}
#settings-grid-container .settings-grid .settings-grid-item:hover {
background: rgb(233, 233, 233);
}

.settings-form h1 {
margin-top: 0;
margin-bottom: 14px;
font-size: 28px;
border-bottom: #ccc 1px solid;
}

/* footer */
footer p {
margin: 12px;
@media (min-width: 1400px) {
#header-logo {
color: #fff;
}
}
2 changes: 1 addition & 1 deletion src/cone/app/browser/static/cone/cone.app.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cone/app/browser/templates/contextmenu.pt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div id="contextmenu"
role="contextmenu"
class="navbar navbar-default"
class="navbar contextsensitiv position-relative px-3 py-2 shadow-sm"
ajax:bind="contextactionschanged"
ajax:action="contextmenu:#contextmenu:replace">

Expand Down
10 changes: 4 additions & 6 deletions src/cone/app/browser/templates/footer.pt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
omit-tag="True">

<footer class="navbar-default navbar-fixed-bottom">
<footer class="navbar bg-light fixed-bottom">

<div class="container">
<p>
Copyright (c) 2009-2024
<a href="http://conestack.org/">Cone Contributors</a>.
</p>
<div class="container align-items-center justify-content-center">
<span id="copyright">Copyright (c) 2009-2024</span>
<a href="http://conestack.org/" class="ms-2">Cone Contributors</a>.
</div>

</footer>
Expand Down
Loading

0 comments on commit fabb9fe

Please sign in to comment.