diff --git a/README b/README index e69de29..95e6c63 100644 --- a/README +++ b/README @@ -0,0 +1 @@ +Collection of themes and addons to make Friendika work more like a blog \ No newline at end of file diff --git a/addon/profilehome/admin.tpl b/addon/profilehome/admin.tpl new file mode 100644 index 0000000..fe51311 --- /dev/null +++ b/addon/profilehome/admin.tpl @@ -0,0 +1,2 @@ +{{ inc field_select.tpl with $field=$user }}{{ endinc }} +
\ No newline at end of file diff --git a/addon/profilehome/profilehome.php b/addon/profilehome/profilehome.php new file mode 100644 index 0000000..927631d --- /dev/null +++ b/addon/profilehome/profilehome.php @@ -0,0 +1,50 @@ + + */ + + + +function profilehome_install() { + register_hook('home_content', 'addon/profilehome/profilehome.php', 'profilehome_home'); + logger("installed profilehome"); +} + +function profilehome_uninstall() { + unregister_hook('home_content', 'addon/profilehome/profilehome.php', 'profilehome_home'); + logger("removed profilehome"); +} + +function profilehome_home(&$a, &$o){ + $user = get_config("profilehome","user"); + if ($user!==false) goaway($a->get_baseurl()."/profile/".$user); +} + +function profilehome_plugin_admin(&$a, &$o){ + $r = q("SELECT nickname, username FROM user WHERE verified=1 AND account_removed=0 AND account_expired=0"); + $users = array("##no##"=>"No redirect (use default home)"); + foreach ($r as $u) { + $users[$u['nickname']] = $u['username']." (".$u['nickname'].")"; + } + + $user = get_config("profilehome","user"); + + $t = file_get_contents(dirname(__file__)."/admin.tpl"); + $o = ''; + $o .= replace_macros( $t, array( + '$submit' => t('Submit'), + '$user' => array('user', t('Profile to use as home page'), $user, "", $users), + )); +} + +function profilehome_plugin_admin_post(&$a){ + check_form_security_token('profilehomesave'); + + $user = ((x($_POST, 'user')) ? notags(trim($_POST['user'])) : false); + if ($user=='##no##') $user=false; + set_config('profilehome', 'user', $user); + info( t('Profile home settings updated.') .EOL); +} \ No newline at end of file diff --git a/view/theme/blog/conversation.tpl b/view/theme/blog/conversation.tpl new file mode 100644 index 0000000..980fb17 --- /dev/null +++ b/view/theme/blog/conversation.tpl @@ -0,0 +1,28 @@ +{{ for $threads as $thread }} +
+ {{if $mode == display}} + {{ for $thread.items as $item }} + {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl }}{{ endinc }} + {{ else }} + {{ inc $item.template }}{{ endinc }} + {{ endif }} + {{ endfor }} + {{ else}} + + + {{ inc $thread.items.0.template with $item=$thread.items.0 }}{{ endinc }} + Commenti: {{if $thread.num_comments}}$thread.num_comments{{ else }}0{{ endif }} +
+ {{ endif }} +
+{{ endfor }} + +
+ +{{ if $dropping }} + + $dropping + +{{ endif }} + diff --git a/view/theme/blog/default.php b/view/theme/blog/default.php new file mode 100644 index 0000000..44bd51b --- /dev/null +++ b/view/theme/blog/default.php @@ -0,0 +1,30 @@ + + + + <?php if(x($page,'title')) echo $page['title'] ?> + + + + +
+ get_baseurl()."/view/theme/blog/headers/willow.jpg"; + echo str_replace("~blog.header.image~", $img, + str_replace("~config.sitename~",get_config('config','sitename'), + str_replace("~system.banner~",get_config('system','banner'), + $page['nav'] + ))); + } + ?> + +
+ +
+ + +
+ + + diff --git a/view/theme/blog/headers/willow.jpg b/view/theme/blog/headers/willow.jpg new file mode 100644 index 0000000..61bd538 Binary files /dev/null and b/view/theme/blog/headers/willow.jpg differ diff --git a/view/theme/blog/images/dropdown.png b/view/theme/blog/images/dropdown.png new file mode 100644 index 0000000..830440f Binary files /dev/null and b/view/theme/blog/images/dropdown.png differ diff --git a/view/theme/blog/images/messages.png b/view/theme/blog/images/messages.png new file mode 100644 index 0000000..ab7b0f4 Binary files /dev/null and b/view/theme/blog/images/messages.png differ diff --git a/view/theme/blog/images/messages2.png b/view/theme/blog/images/messages2.png new file mode 100644 index 0000000..54b68e7 Binary files /dev/null and b/view/theme/blog/images/messages2.png differ diff --git a/view/theme/blog/images/notifications.png b/view/theme/blog/images/notifications.png new file mode 100644 index 0000000..347f151 Binary files /dev/null and b/view/theme/blog/images/notifications.png differ diff --git a/view/theme/blog/images/notifications3.png b/view/theme/blog/images/notifications3.png new file mode 100644 index 0000000..2c9c791 Binary files /dev/null and b/view/theme/blog/images/notifications3.png differ diff --git a/view/theme/blog/images/notify.png b/view/theme/blog/images/notify.png new file mode 100644 index 0000000..355abb1 Binary files /dev/null and b/view/theme/blog/images/notify.png differ diff --git a/view/theme/blog/images/notify2.png b/view/theme/blog/images/notify2.png new file mode 100644 index 0000000..407e2db Binary files /dev/null and b/view/theme/blog/images/notify2.png differ diff --git a/view/theme/blog/images/notify3.png b/view/theme/blog/images/notify3.png new file mode 100644 index 0000000..9b852d0 Binary files /dev/null and b/view/theme/blog/images/notify3.png differ diff --git a/view/theme/blog/images/search.png b/view/theme/blog/images/search.png new file mode 100644 index 0000000..1f9d828 Binary files /dev/null and b/view/theme/blog/images/search.png differ diff --git a/view/theme/blog/nav.tpl b/view/theme/blog/nav.tpl new file mode 100644 index 0000000..65ebb06 --- /dev/null +++ b/view/theme/blog/nav.tpl @@ -0,0 +1,107 @@ + + + diff --git a/view/theme/blog/style.css b/view/theme/blog/style.css new file mode 100644 index 0000000..bbdebf6 --- /dev/null +++ b/view/theme/blog/style.css @@ -0,0 +1,432 @@ +/* 'inspired' by http://wp-themes.com/twentyeleven/ */ + +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { + border: 0 none; + font-family: inherit; + font-size: 100%; + font-style: inherit; + font-weight: inherit; + margin: 0; + outline: 0 none; + padding: 0; + vertical-align: baseline; +} +:focus { + outline: 0 none; +} + +ol, ul { + list-style: none outside none; +} +table { + border-collapse: separate; + border-spacing: 0; +} +caption, th, td { + font-weight: normal; + text-align: left; +} +blockquote:before, blockquote:after, q:before, q:after { + content: ""; +} +blockquote, q { + quotes: "" ""; +} +a img { + border: 0 none; +} +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { + display: block; +} +body, input, textarea { + color: #373737; + font: 300 15px/1.625 "Helvetica Neue",Helvetica,Arial,sans-serif; +} +body { + padding: 0 2em; + line-height: 1; + background: none repeat scroll 0 0 #E2E2E2; +} +#page { + margin: 2em auto; + max-width: 1000px; + background: none repeat scroll 0 0 #FFFFFF; +} + +h1, h2, h3, h4, h5, h6 { + clear: both; +} +hr { + background-color: #CCCCCC; + border: 0 none; + height: 1px; + margin-bottom: 1.625em; +} +p { + margin-bottom: 1.625em; +} +ul, ol { + margin: 0 0 1.625em 2.5em; +} +ul { + list-style: square outside none; +} +ol { + list-style-type: decimal; +} +ol ol { + list-style: upper-alpha outside none; +} +ol ol ol { + list-style: lower-roman outside none; +} +ol ol ol ol { + list-style: lower-alpha outside none; +} +ul ul, ol ol, ul ol, ol ul { + margin-bottom: 0; +} +dl { + margin: 0 1.625em; +} +dt { + font-weight: bold; +} +dd { + margin-bottom: 1.625em; +} +strong { + font-weight: bold; +} +cite, em, i { + font-style: italic; +} +blockquote { + font-family: Georgia,"Bitstream Charter",serif; + font-style: italic; + font-weight: normal; + margin: 0 3em; +} +blockquote em, blockquote i, blockquote cite { + font-style: normal; +} +blockquote cite { + color: #666666; + font: 300 12px "Helvetica Neue",Helvetica,Arial,sans-serif; + letter-spacing: 0.05em; + text-transform: uppercase; +} +pre { + background: none repeat scroll 0 0 #F4F4F4; + font: 13px/1.5 "Courier 10 Pitch",Courier,monospace; + margin-bottom: 1.625em; + overflow: auto; + padding: 0.75em 1.625em; +} +code, kbd, samp, var { + font: 13px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace; +} +abbr, acronym, dfn { + border-bottom: 1px dotted #666666; + cursor: help; +} +address { + display: block; + margin: 0 0 1.625em; +} +ins { + background: none repeat scroll 0 0 #FFF9C0; + text-decoration: none; +} +sup, sub { + font-size: 10px; + height: 0; + line-height: 1; + position: relative; + vertical-align: baseline; +} +sup { + bottom: 1ex; +} +sub { + top: 0.5ex; +} +input[type="text"], input[type="password"], textarea { + background: none repeat scroll 0 0 #FAFAFA; + border: 1px solid #DDDDDD; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset; + color: #888888; +} +input[type="text"]:focus, textarea:focus { + color: #373737; +} +textarea { + padding-left: 3px; + width: 98%; +} +input[type="text"] { + padding: 3px; +} +input#search { + background: url("images/search.png") no-repeat scroll 5px 6px transparent; + border-radius: 2px 2px 2px 2px; + font-size: 14px; + height: 22px; + line-height: 1.2em; + padding: 4px 10px 4px 28px; +} +input#searchsubmit { + display: none; +} +a { + color: #1982D1; + text-decoration: none; +} +a:focus, a:active, a:hover { + text-decoration: underline; +} + +.assistive-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; +} + +/* header */ +#branding hgroup { + margin: 0 7.6%; +} +#branding { + border-top: 2px solid #BBBBBB; + padding-bottom: 10px; + position: relative; + z-index: 9999; +} +#site-title { + margin-right: 15%; + padding: 3.65625em 0 0; +} +#site-title a { + color: #111111; + font-size: 30px; + font-weight: bold; + line-height: 36px; + text-decoration: none; +} +#site-title a:hover, #site-title a:focus, #site-title a:active { + color: #1982D1; +} +#site-description { + color: #7A7A7A; + font-size: 14px; + margin: 0 15% 3.65625em 0; +} +#branding img { + height: auto; + margin-bottom: -7px; + width: 100%; +} +#access { + background: repeat scroll 0 0 #0A0A0A; + background: -moz-linear-gradient(#252525, #0A0A0A); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); + clear: both; + display: block; + float: left; + margin: 0 auto 6px; + width: 100%; +} +#access div { + margin: 0 7.6%; +} +#access ul { + font-size: 13px; + list-style: none outside none; + margin: 0 0 0 -0.8125em; + padding-left: 0; +} +#access li { + float: left; + position: relative; +} +#access a { + color: #EEEEEE; + display: block; + line-height: 3.333em; + padding: 0 1.2125em; + text-decoration: none; +} +#access ul ul { + box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); + display: none; + float: left; + left: 0; + margin: 0; + position: absolute; + top: 3.333em; + width: 188px; + z-index: 99999; +} +#access ul ul ul { + left: 100%; + top: 0; +} +#access ul ul a { + background: none repeat scroll 0 0 #F9F9F9; + border-bottom: 1px dotted #DDDDDD; + color: #444444; + font-size: 13px; + font-weight: normal; + height: auto; + line-height: 1.4em; + padding: 10px; + width: 168px; +} +#access li:hover > a, #access ul ul *:hover > a, #access a:focus { + background: none repeat scroll 0 0 #EFEFEF; +} +#access li:hover > a, #access a:focus { + background: none repeat scroll 0 0 #EFEFEF; + background: -moz-linear-gradient(#F9F9F9, #E5E5E5); + color: #373737; +} +#access ul li:hover > ul { + display: block; +} +.selected > a, #access .current-menu-item > a, #access .current-menu-ancestor > a, #access .current_page_item > a, #access .current_page_ancestor > a { + font-weight: bold; +} +#branding #searchform { + position: absolute; + right: 7.6%; + text-align: right; + top: 3.8em; +} +#branding #searchform div { + margin: 0; +} +#branding #search { + -moz-transition-duration: 400ms; + -moz-transition-property: width, background; + -moz-transition-timing-function: ease; + float: right; + width: 72px; +} +#branding #search:focus { + background-color: #F9F9F9; + width: 196px; +} +#branding #searchsubmit { + display: none; +} +#branding .only-search #searchform { + top: 5px; + z-index: 1; +} +#branding .only-search #search { + background-color: #666666; + border-color: #000000; + color: #222222; +} +#branding .only-search #s, #branding .only-search #s:focus { + width: 85%; +} +#branding .only-search #s:focus { + background-color: #BBBBBB; +} +#branding .with-image #searchform { + bottom: -27px; + max-width: 195px; + top: auto; +} +#branding .only-search + #access div { + padding-right: 205px; +} +#branding #site-location { + font-size: 0.7em; + color: #BBBBBB; + position: absolute; + right: 7.6%; + text-align: right; + top: 13.5em; +} + +/* user bar */ +#tools { + background: repeat scroll 0 0 #222222; + background: -moz-linear-gradient(#444444, #222222); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); + clear: both; + display: block; + position: fixed; + top: 0px; + left: auto; + margin: 0 auto 6px; + width: 1000px; +} +#tools div { + margin: 0 7.6%; +} +#tools ul { + font-size: 10px; + list-style: none outside none; + margin: 0 0 0 -0.8125em; + padding-left: 0; +} +#tools li { + float: left; + position: relative; +} +#tools a { + color: #EEEEEE; + display: block; + line-height: 3.333em; + padding: 0 1.2125em; + text-decoration: none; +} +#tools ul ul { + box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); + display: none; + float: left; + left: 0; + margin: 0; + position: absolute; + top: 3.333em; + width: 188px; + z-index: 99999; +} +#tools ul ul .sep { + border-top: 1px dotted #DDDDDD; +} +#tools ul ul ul { + left: 100%; + top: 0; +} +#tools ul ul a { + background: none repeat scroll 0 0 #F9F9F9; + border-bottom: 1px dotted #DDDDDD; + color: #444444; + font-size: 13px; + font-weight: normal; + height: auto; + line-height: 1.4em; + padding: 10px; + width: 168px; +} +#tools li:hover > a, #access ul ul *:hover > a, #access a:focus { + background: none repeat scroll 0 0 #EFEFEF; +} +#tools li:hover > a, #access a:focus { + background: none repeat scroll 0 0 #EFEFEF; + background: -moz-linear-gradient(#F9F9F9, #E5E5E5); + color: #373737; +} +#tools ul li:hover > ul { + display: block; +} +#tools img { + width: 16px; + margin-bottom: -5px; + margin-right: 5px; +} + +.dropmenu { background: url(images/dropdown.png) center right no-repeat; margin-right: 1em; } \ No newline at end of file diff --git a/view/theme/blog/theme.php b/view/theme/blog/theme.php new file mode 100644 index 0000000..77c44d2 --- /dev/null +++ b/view/theme/blog/theme.php @@ -0,0 +1,11 @@ + +**/ +$a->theme_info = array( +); + +function blog_init(&$a) { + +} \ No newline at end of file