diff options
Diffstat (limited to 'view/theme/dispy-dark')
-rw-r--r-- | view/theme/dispy-dark/communityhome.tpl | 4 | ||||
-rw-r--r-- | view/theme/dispy-dark/default.php | 34 | ||||
-rw-r--r-- | view/theme/dispy-dark/style.css | 53 | ||||
-rw-r--r-- | view/theme/dispy-dark/theme.php | 238 |
4 files changed, 176 insertions, 153 deletions
diff --git a/view/theme/dispy-dark/communityhome.tpl b/view/theme/dispy-dark/communityhome.tpl index 340b7216c..edabab611 100644 --- a/view/theme/dispy-dark/communityhome.tpl +++ b/view/theme/dispy-dark/communityhome.tpl @@ -37,10 +37,8 @@ </div> {{ endif }} -{{ if $lastusers_title }} -<h3 id="postit-header">PostIt to Friendica</h3> +<h3 id="postit-header">'PostIt' to Friendica</h3> <div id="postit"> <a href="$fostitJS" title="PostIt">Post to Friendica</a> from anywhere by bookmarking this link. </div> -{{ endif }} diff --git a/view/theme/dispy-dark/default.php b/view/theme/dispy-dark/default.php index e74ec1a4f..32393f08d 100644 --- a/view/theme/dispy-dark/default.php +++ b/view/theme/dispy-dark/default.php @@ -6,15 +6,31 @@ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?> </head> <body> - <?php if(x($page,'nav')) echo $page['nav']; ?> - <aside> - <?php if(x($page,'aside')) echo $page['aside']; ?> - <?php if(x($page,'aside_bottom')) echo $page['aside_bottom']; ?> - </aside> - <section><?php if(x($page,'content')) echo $page['content']; ?> - <div id="page-footer"></div> - </section> - <footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer> + <header> + <!-- header stuff will go here --> + </header> + <article id="articlemain"> + <?php if(x($page,'nav')) echo $page['nav']; ?> + <aside id="asideleft"> + <?php if(x($page,'aside_left')) echo $page['aside_left']; ?> + <?php if(x($page,'aside_left_bottom')) echo $page['aside_left_bottom']; ?> + </aside> + <section id="sectionmain"> + <?php if(x($page,'content')) echo $page['content']; ?> + <footer id="section-footer"></footer> + </section> + <aside id="asidemain"> + <?php if(x($page,'aside')) echo $page['aside']; ?> + <?php if(x($page,'aside_bottom')) echo $page['aside_bottom']; ?> + </aside> + <aside id="asideright"> + <?php if(x($page,'aside_right')) echo $page['aside_right']; ?> + <?php if(x($page,'aside_right_bottom')) echo $page['aside_right_bottom']; ?> + </aside> + </article> + <footer id="page-footer"> + <?php if(x($page,'footer')) echo $page['footer']; ?> + </footer> </body> </html> diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index a3248c13c..1f776eed7 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -1,7 +1,7 @@ /* * dispy-dark * - * modernised, sort of, by simon <http://simon.kisikew.org/> + * author, maintainer: simon <http://simon.kisikew.org/> * */ @@ -210,12 +210,17 @@ input[type=submit] { margin: 5px 0; list-style: none; } +#articlemain { + width: 100%; + height: 100%; + margin: 0 auto; +} /** * login */ -aside .field { +#asidemain .field { overflow: hidden; width: 200px; } @@ -247,7 +252,7 @@ aside .field { #login-submit-button { margin-left: 0px !important; } -aside #login_openid { +#asidemain #login_openid { position: relative !important; float: none !important; margin-left: 0px !important; @@ -268,13 +273,10 @@ aside #login_openid { */ nav { height: 60px; - display: block; background-color: #1d1f1d; color: #eeeeec; position: relative; padding: 20px 20px 10px 95px; - margin-left: auto; - margin-right: auto; } nav a { text-decoration: none; @@ -707,12 +709,16 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link /** * aside **/ -aside { - position: absolute; - right: 15px; - width: 245px; - padding-top: 15px; +#asidemain { + float: left; font-size: smaller; + margin: 20px 0 20px 35px; + width: 25%; + display: inline; +} +/* for now, disappear these */ +#asideright, #asideleft { + display: none; } .vcard .fn { font-size: 1.7em; @@ -742,10 +748,10 @@ aside { .vcard #profile-photo-wrapper img { box-shadow: 3px 3px 10px 0 #000; } -aside h4 { +#asidemain h4 { font-size: 1.2em; } -aside #viewcontacts { +#asidemain #viewcontacts { text-align: right; } .aprofile dt { @@ -1064,12 +1070,13 @@ aside #viewcontacts { /** * section */ -section { - margin: 20px 9% 0 4%; +#sectionmain { + margin: 20px; font-size: 0.8em; - padding-right: 230px; min-width: 475px; - width: 65%; + width: 67%; + float: left; + display: inline; } /** tabs **/ @@ -1333,19 +1340,19 @@ section { width: 100%; } #connect-services-header { - + margin: 5px 0 0 0; } #connect-services { margin: 5px 0 0 0; } #extra-help-header { - + margin: 5px 0 0 0; } #extra-help { margin: 5px 0 0 0; } #postit-header { - + margin: 5px 0 0 0; } #postit { margin: 5px 0 0 0; @@ -2603,8 +2610,8 @@ div[id$="wrapper"] br { } .icon.drop, .icon.drophide, .icon.delete { - float: right; - margin: 5px; + float: left; + /*margin: 5px;*/ } .icon.s22.delete { display: block; @@ -2776,7 +2783,7 @@ div[id$="wrapper"] br { } footer { display: block; - margin: 50px 20%; + /*margin: 50px 20%;*/ clear: both; } #profile-jot-text { diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index e1dc8ba0c..c9028b9a9 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -3,126 +3,135 @@ /* * Name: Dispy Dark * Description: Dispy Dark, Friendica theme - * Version: 1.0 + * Version: 1.1 * Author: Simon <http://simon.kisikew.org/> * Maintainer: Simon <http://simon.kisikew.org/> * Screenshot: <a href="screenshot.jpg">Screenshot</a> */ +$a = get_app(); $a->theme_info = array( - 'extends' => 'dispy-dark', + 'name' => 'dispy-dark', + 'version' => '1.1' ); -$a->page['htmlhead'] .= <<< EOT -<script> -$(document).ready(function() { - $('.group-edit-icon').hover( - function() { - $(this).addClass('icon'); - $(this).removeClass('iconspacer'); }, - - function() { - $(this).removeClass('icon'); - $(this).addClass('iconspacer'); } - ); - - $('.sidebar-group-element').hover( - function() { - id = $(this).attr('id'); - $('#edit-' + id).addClass('icon'); - $('#edit-' + id).removeClass('iconspacer'); }, - - function() { - id = $(this).attr('id'); - $('#edit-' + id).removeClass('icon'); - $('#edit-' + id).addClass('iconspacer'); } - ); - - $('.savedsearchdrop').hover( - function() { - $(this).addClass('drop'); - $(this).addClass('icon'); - $(this).removeClass('iconspacer'); }, - - function() { - $(this).removeClass('drop'); - $(this).removeClass('icon'); - $(this).addClass('iconspacer'); } - ); - - $('.savedsearchterm').hover( - function() { - id = $(this).attr('id'); - $('#drop-' + id).addClass('icon'); - $('#drop-' + id).addClass('drophide'); - $('#drop-' + id).removeClass('iconspacer'); }, - - function() { - id = $(this).attr('id'); - $('#drop-' + id).removeClass('icon'); - $('#drop-' + id).removeClass('drophide'); - $('#drop-' + id).addClass('iconspacer'); } - ); - - // click outside notifications menu closes it - $('html').click(function() { - $('#nav-notifications-linkmenu').removeClass('selected'); - document.getElementById("nav-notifications-menu").style.display = "none"; - }); - - $('#nav-notifications-linkmenu').click(function(event) { - event.stopPropagation(); - }); - // click outside profiles menu closes it - $('html').click(function() { - $('#profiles-menu-trigger').removeClass('selected'); - document.getElementById("profiles-menu").style.display = "none"; - }); - - $('#profiles-menu').click(function(event) { - event.stopPropagation(); - }); +function dispy_dark_init(&$a) { + + // aside on profile page + if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) { + dispy_dark_community_info(); + } + + $a->page['htmlhead'] .= <<<EOT + <script type="text/javascript"> + $(document).ready(function() { + $('.group-edit-icon').hover( + function() { + $(this).addClass('icon'); + $(this).removeClass('iconspacer'); }, + + function() { + $(this).removeClass('icon'); + $(this).addClass('iconspacer'); } + ); + + $('.sidebar-group-element').hover( + function() { + id = $(this).attr('id'); + $('#edit-' + id).addClass('icon'); + $('#edit-' + id).removeClass('iconspacer'); }, + + function() { + id = $(this).attr('id'); + $('#edit-' + id).removeClass('icon'); + $('#edit-' + id).addClass('iconspacer'); } + ); + + $('.savedsearchdrop').hover( + function() { + $(this).addClass('drop'); + $(this).addClass('icon'); + $(this).removeClass('iconspacer'); }, + + function() { + $(this).removeClass('drop'); + $(this).removeClass('icon'); + $(this).addClass('iconspacer'); } + ); + + $('.savedsearchterm').hover( + function() { + id = $(this).attr('id'); + $('#drop-' + id).addClass('icon'); + $('#drop-' + id).addClass('drophide'); + $('#drop-' + id).removeClass('iconspacer'); }, + + function() { + id = $(this).attr('id'); + $('#drop-' + id).removeClass('icon'); + $('#drop-' + id).removeClass('drophide'); + $('#drop-' + id).addClass('iconspacer'); } + ); + + // click outside notifications menu closes it + $('html').click(function() { + $('#nav-notifications-linkmenu').removeClass('selected'); + document.getElementById("nav-notifications-menu").style.display = "none"; + }); + + $('#nav-notifications-linkmenu').click(function(event) { + event.stopPropagation(); + }); + // click outside profiles menu closes it + $('html').click(function() { + $('#profiles-menu-trigger').removeClass('selected'); + document.getElementById("profiles-menu").style.display = "none"; + }); + + $('#profiles-menu').click(function(event) { + event.stopPropagation(); + }); + + // main function in toolbar functioning + function toggleToolbar() { + if ( $('#nav-floater').is(':visible') ) { + $('#nav-floater').slideUp('fast'); + $('.floaterflip').css({ + backgroundPosition: '-210px -60px' + }); + $('.search-box').slideUp('fast'); + } else { + $('#nav-floater').slideDown('fast'); + $('.floaterflip').css({ + backgroundPosition: '-190px -60px' + }); + $('.search-box').slideDown('fast'); + } + }; + // our trigger for the toolbar button + $('.floaterflip').click(function() { + toggleToolbar(); + return false; + }); + + // (attempt) to change the text colour in a top post + $('#profile-jot-text').focusin(function() { + $(this).css({color: '#eec'}); + }); - // main function in toolbar functioning - function toggleToolbar() { - if ( $('#nav-floater').is(':visible') ) { - $('#nav-floater').slideUp('fast'); - $('.floaterflip').css({ - backgroundPosition: '-210px -60px' - }); - $('.search-box').slideUp('fast'); - } else { - $('#nav-floater').slideDown('fast'); - $('.floaterflip').css({ - backgroundPosition: '-190px -60px' - }); - $('.search-box').slideDown('fast'); - } - }; - // our trigger for the toolbar button - $('.floaterflip').click(function() { - toggleToolbar(); - return false; - }); - - // (attempt) to change the text colour in a top post - $('#profile-jot-text').focusin(function() { - $(this).css({color: '#eec'}); }); - -}); -</script> + </script> EOT; +} -function dispydark_community_info() { +function dispy_dark_community_info() { $a = get_app(); + $url = $a->get_baseurl($ssl_state); + $aside['$url'] = $url; - $aside['$lastusers_title'] = t('Last users'); - $aside['$lastusers_items'] = array(); - $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); - - $fostitJS = "javascript: (function() { - the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' + + $fpostitJS = <<<FPI + javascript: (function() { + the_url = ' . $url . '/view/theme/' . $a->theme_info['name'] . '/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); @@ -135,18 +144,11 @@ function dispydark_community_info() { } else { a_funct(); } - })();"; + })(); +FPI; - $aside['$fostitJS'] = $fostitJS; - $url = $a->get_baseurl($ssl_state); - $aside['$url'] = $url; - - $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); - $a->page['aside_bottom'] = replace_macros($tpl, $aside); + $aside['$fpostitJS'] = $fpostitJS; + $tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl'); + return $a->page['aside_bottom'] = replace_macros($tpl, $aside); } -// aside on profile page -//if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) { - dispydark_community_info(); -//} - |