From 731ab80ac2ea78f595730ecb8f4d62d7b468d084 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 15 Dec 2013 15:37:51 -0800 Subject: set system.projecthome to 1 if you want the project page for a home page. There was a bit of re-org of mod/home, which might alter the behaviour for some existing sites. Basically we're not showing a login box at all if you've got home.html - there should be a login link in th nav bar. If you haven't defined anything at all we'll fall back to the old behaviour but still allow the home contents to be set via plugin. --- assets/.htaccess | 4 + assets/diamondlattice.png | Bin 0 -> 534585 bytes assets/home.html | 204 ++++++++++++++++++++++++ assets/logo_antiprism.png | Bin 0 -> 62321 bytes assets/narrow.css | 218 +++++++++++++++++++++++++ assets/redmatrixlogo.png | Bin 0 -> 105403 bytes assets/wide.css | 395 ++++++++++++++++++++++++++++++++++++++++++++++ mod/home.php | 92 ++++++----- 8 files changed, 870 insertions(+), 43 deletions(-) create mode 100644 assets/.htaccess create mode 100644 assets/diamondlattice.png create mode 100644 assets/home.html create mode 100644 assets/logo_antiprism.png create mode 100644 assets/narrow.css create mode 100644 assets/redmatrixlogo.png create mode 100644 assets/wide.css diff --git a/assets/.htaccess b/assets/.htaccess new file mode 100644 index 000000000..ebba3d779 --- /dev/null +++ b/assets/.htaccess @@ -0,0 +1,4 @@ +Options -Indexes +Deny from all + + diff --git a/assets/diamondlattice.png b/assets/diamondlattice.png new file mode 100644 index 000000000..f1ed7dbd0 Binary files /dev/null and b/assets/diamondlattice.png differ diff --git a/assets/home.html b/assets/home.html new file mode 100644 index 000000000..978139893 --- /dev/null +++ b/assets/home.html @@ -0,0 +1,204 @@ + + + + + + + + + +
+
+
+
+ + +
+The internet is broken. We're fixing it.
+ +
+
+
+ma·trix: something within or from which something else originates, develops, or takes form +
+
+ +
+

Imagine an internet slightly different than what we have today. Imagine if you had an internet where the people using it could create new services and communicate freely and privately - and where you didn't need a different account on every website in the network in order to use each website. Where you had your own space and could share anything you wanted with anybody you wanted, any time you wanted. Where the things you share in private stay private instead of being under constant surveillance from advertising corporations and government intelligence agencies. +

+
+ +
+Decentralise +Identity +Freedom +Access Control +Privacy +Got Zot? +
+ +
+ + + + + +
+
+
+ +
+
+ +
+ + + +
+ +
Decentralise. Build a more robust network.
+
+

+Now open your eyes. We've done some amazing things with decentralisation technology over the last few years and have created a different kind of network. We call it the Red Matrix. Forget the old internet - it's hopelessly broken and increasingly being choked off in order to take your money and spy on you. +

+

+The Red Matrix is a decentralised network where people are in charge and the size of your server farm and wealth do not offer any comparable advantage. Anybody may participate on a level playing field. Cloud storage, file sharing, communications, content creation and management belong to everybody and can be shared with anybody (or somebody, or nobody). This is only a representative sample of the services we plan to offer. In an internet where creativity is allowed to flourish and corporate overlords have no power, the door is open to entirely new forms of expression and applications. The Red Matrix software is free and open source; created by volunteers and distributed under the MIT license. +

+

+And the Red Matrix has Got Zot. +

+

+So what the heck is Zot? I'm glad you asked... +

+
+ +
+
+ +
Your identity is your own. One identity across the network.
+
+ +

+Zot is a revolutionary protocol which provides decentralised communications and identity management across the matrix. The resulting platform can provide web services comparable to those offered by large corporate providers, but without the large corporate provider and their associated privacy issues. Communications and social networking are an integral part of the matrix. Any channel (and any services provided by that channel) can make full use of feature-rich social communications on a global scale. +

+

+We use the full power of the matrix to offer friend suggestions and directory services. You can also perform other things which would typically only be possibly on a centralised provider - such as "wall to wall" posts and private/multiple profiles and web content which can be tailored to the viewer. You won't find these features at all on other decentralised communication services. The difference is that Zot also provides decentralised identity services. This is what separates the men from the boys, and what makes life in the matrix so awesome. +

+
+ +
+

+Zot's identity layer is unique. It's like OpenID on steroids. It provides invisible single sign-on across all sites in the matrix; as well as nomadic identity so that your communications with friends, family, and business partners won't be affected by the loss of your primary communication node - either temporarily or permanently. The important bits of your identity and relationships can be backed up to a thumb drive and may appear at any node in the matrix at any time - with all your friends and preferences intact. These nomadic instances are kept in sync so any instance can take over if another one is compromised or damaged. This protects you against not only major system failure, but also temporary site overloads and governmental manipulation. You cannot be silenced. You cannot be removed from the matrix. +

+

+As you browse the matrix viewing channels and their unique content, you are seamlessly authenticated as you go, even across completely different server hubs. No password dialogues. Nothing to type. You're just greeted by name on every new site you visit. How does Zot do that? We call it "magic-auth" because it really is technology that is so advanced as to be indistinguishable from magic. You login only once on your home hub (or any nomadic backup hub you have chosen). This allows you to access any authenticated services provided anywhere in the matrix - such as shopping and access to private information. This is just like the services offered by large corporate providers with huge user databases; however you can be a member of this community and a server on this network using a "plug computer" like a Rasberry Pi. Your password isn't stored on a thousand different sites where it can be stolen and used to clean out your bank accounts. +

+
+
+
+ +
You control your data. Red Matrix enforces your permissions.
+
+ +

+Zot's identity layer allows you to provide fine-grained permissions to any content you wish to publish - and these permissions extend across the Red Matrix. This is like having one super huge website made up of an army of small individual websites - and where each channel in the matrix can completely control their privacy and sharing preferences for any web resources they create. +

+

+Example: you want a photo to be visible to your family and three select friends, but not your work colleagues. In the matrix this is easy. Even if your family members, work colleagues, and friends have accounts on different hubs. +

+

+Currently the matrix supports communications, photo albums, events, and files. This will be extended in the future to provide content management services (web pages) and cloud storage facilities such as WebDAV and multi-media libraries. Every object and how it is shared and with whom is completely under your control. +

+

+Again, this type of control is available on large corporate providers, because they own the user database. Within the matrix, there is no need for a huge user database on your machine - because the matrix is your user database and for all intents and purposes has infinite capacity and is spread amongst hundreds, and potentially millions of computers. Access can be granted or denied for any resource, to any channel or any group of channels; anywhere within the matrix. They do not need to have an account on your hub. +

+
+
+
+ +
+ +
Reclaim your privacy. Red Matrix is built for you, not governments and corporations.
+
+

+Your communications may be public or private - and we allow your private communications to be as private as you wish them to be. Private communications comprise not only fully encrypted transport, but also encrypted storage to help protect against accidental snooping and disclosure by rogue system administrators and internet service providers. +

+

+Want more? You can fully encrypt your messages "end to end" using your choice of encryption ciphers and using a passphrase that only you and the recipient(s) know - in addition to our standard multi-layer encryption. +

+

+Want more? Our end to end encryption is pluggable. You can define your own chain of multiple encryption steps with multiple keys, and include algorithms known only to you and the recipient. At some point even the US National Security Agency will have to throw up their hands. There won't be enough computational power available in the universe to decode your private message. +

+

+We also provide optional message expiration as a standard feature. When the expiration date/time passes, your message is removed from the network. +

+
+
+
+ + + +
+ +
+ +
+
+ + + + + + diff --git a/assets/logo_antiprism.png b/assets/logo_antiprism.png new file mode 100644 index 000000000..b72e2a211 Binary files /dev/null and b/assets/logo_antiprism.png differ diff --git a/assets/narrow.css b/assets/narrow.css new file mode 100644 index 000000000..a1c12dcc4 --- /dev/null +++ b/assets/narrow.css @@ -0,0 +1,218 @@ +body { + font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif; + color: #111111; + text-align: center; + padding:0 0 22px 0; +} + + div#header{ + position:absolute; + z-index: 100; + top:0; + left:0; + width:100%; + height: 55px; + background: rgba(100, 0, 0, 0.8); + background-size:3000px 55px; + color: #fff; + display:none; + } + + @media screen{ + body>div#header{ + position: fixed; + } + body>div#footer{ + position:fixed; + } + + } + + + div#footer{ + position:absolute; + bottom:0; + left:0; + width:100%; + height:22px; + background: #AD002C; + color: #fff; +} + +#intro-text { +color:#c60032;font-size:1.2em;width:70%;margin-right:auto;margin-left:auto;text-align:justify; +} +div.section-text { +color:#c60032;font-size:1em;width:80%;margin-right:auto;margin-left:auto;text-align:justify; +} + +#tagline { + color: #c60032; + width:80%; + margin-top:0px; + margin-bottom:20px; + margin-left: auto; + margin-right: auto; +} + +div.red-button { + width:150px; + margin-left: auto; + margin-right: auto; + font-weight: 500; + font-size: larger; + background-color: #c60032; + border: 2px solid lightgray; + border-radius: 5px; + padding: 12px; +} +div.red-button a { + text-decoration: none; + color:#FFFFFF; +} +div.red-button a:hover { + text-decoration: none; + font-weight:600; + +} + +#footer { + font-size: 12px; + color:#fff; + padding-top: 4px; +} + +#footer a { + text-decoration: none; + color:#fff; +} +.bg { + display:none; +} +.bg2 { + display:none; +} +.bg-mask { + display:none; +} + +#bg-narrow { + background: url('diamondlattice.png') center center no-repeat ; + opacity: 0.05; + position:absolute; + top:0; + left:0; + z-index: -1; + width:100%; + height:300%; + display:none; +} + +div.summary-nodes-container { + display:none; +} +div.summary-menu-container { + display:block; +} +a.summary-menu-item { + display: block; + width:70%; + margin-left:auto;margin-right:auto; + border-radius:10px; + color:#FFFFFF; + font-size:1.2em; + text-align:center; + background:#c60032; + margin-bottom:5px; +} +a.summary-menu-item:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} + + +div#menubutton1 { + position: fixed; + top:10px; + left:200px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#c60032; + display: none; + z-index:200; +} +div#menubutton1:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton2 { + position: fixed; + top:10px; + left:350px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#c60032; + display: none; + z-index:200; +} +div#menubutton2:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton3 { + position: fixed; + top:10px; + right:350px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#c60032; + display: none; + z-index:200; +} +div#menubutton3:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton4 { + position: fixed; + top:10px; + right:200px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#c60032; + display: none; + z-index:200; +} +div#menubutton4:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.section-heading { + font-size:2.0em; + color:#c60032; +} +div.section-subtitle { + font-size:1.5em; + color:#c60032; +} \ No newline at end of file diff --git a/assets/redmatrixlogo.png b/assets/redmatrixlogo.png new file mode 100644 index 000000000..6929ae14f Binary files /dev/null and b/assets/redmatrixlogo.png differ diff --git a/assets/wide.css b/assets/wide.css new file mode 100644 index 000000000..4574526b4 --- /dev/null +++ b/assets/wide.css @@ -0,0 +1,395 @@ +body { + font-family: 'Ubuntu',Tahoma,Helvetica,Arial,sans-serif; + color: #111111; + /*color: rgba(0,0,0,0.0); */ + text-align: center; + /* background-image: url("redmatrixbkgd.jpg"); */ + /*background: #ececec;*/ + padding:0 0 22px 0; + /* background: url(redmatrixbkgd.jpg) no-repeat center center scroll; */ + /* + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + */ +} + +#intro-text { +color:#C60032;font-size:1.2em;width:700px;margin-right:auto;margin-left:auto;text-align:justify; +} +div.section-text { +color:#C60032;font-size:1em;width:700px;margin-right:auto;margin-left:auto;text-align:justify; +} + + + div#header{ + display:none; + position:absolute; + z-index: 100; + top:0; + left:0; + width:100%; + height: 55px; + /* background-image: url("redmatrixbkgd.jpg"); */ + background: rgba(198, 0, 50, 0.8); + background-size:3000px 55px; + /* background: #afafaf;*/ + color: #fff; + } + @media screen{ + body>div#header{ + position: fixed; + } + body>div#footer{ + position:fixed; + } + + } + + div#footer{ + position:absolute; + bottom:0; + left:0; + width:100%; + height:22px; + background: #AD002C; + color: #fff; + } + + + +#tagline { + color: #880000; + width:600px; + margin-top:0px; + margin-bottom:20px; + margin-left: auto; + margin-right: auto; +} + + +.clear { + clear: both; +} + +div.red-button { + width:150px; + margin-left: auto; + margin-right: auto; + font-weight: 500; + font-size: larger; + background-color: #C60032; + border: 2px solid lightgray; + border-radius: 5px; + padding: 12px; +} +div.red-button a { + text-decoration: none; + color:#FFFFFF; +} +div.red-button a:hover { + text-decoration: none; + font-weight:600; +} + +#footer { + font-size: 12px; + color:#fff; + padding-top: 4px; +} + +#footer a { + text-decoration: none; + color:#fff; +} + +.bg { + background: url('diamondlattice.png') center center no-repeat ; + position: fixed; + width: 100%; + height: 1350px; + + top:0px; + left:0px; + opacity: 1.0; + z-index: -1; +} +.bg2 { + background: url('diamondlattice.png') center center no-repeat; + position: fixed; + + width: 100%; + height: 1350px; + top:0px; + left:0px; + opacity: 1.0; + z-index: -1; +} +.bg-mask { + background: rgba(255, 255, 255, 0.95) center center no-repeat; + position: fixed; + width: 100%; + height: 1350px; + top:0; + left:0px; + z-index: -1; + +} +.bg-narrow { + display:none; +} +div.summary-menu-container { + display:none; +} +div.summary-node { + position: fixed; + width: 50px; + text-align: center ; + font-size:1em; + + +} +div.summary-node-header { + font-size: 1.2em; + color:#FFFFFF; + font-weight:bold; +} +div.summary-node-1 { + position: absolute; + top:0px; + left:0px; + width:200px; + height:200px; + border-radius:100px; + color:#CCCCCC; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-1:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-1-text { + margin-top:25%; + width: 150px; + margin-left:auto; + margin-right:auto; +} +div.summary-node-2 { + position: absolute; + top:50px; + left:170px; + width:220px; + height:220px; + border-radius:200px; + color:#CCCCCC; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-2:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-2-text { + margin-top:30%; + width: 150px; + margin-left:auto; + margin-right:auto; +} +div.summary-node-3 { + position: absolute; + top:0px; + right:20px; + width:250px; + height:250px; + border-radius:200px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-3:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-3-text { + margin-top:25%; + width: 200px; + margin-left:auto; + margin-right:auto; +} + +div.summary-node-4 { + position: absolute; + top:200px; + right:180px; + width:200px; + height:200px; + border-radius:200px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-4:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-4-text { + margin-top:25%; + width: 150px; + margin-left:auto; + margin-right:auto; +} +div.summary-node-5 { + position: absolute; + top:250px; + left:120px; + width:150px; + height:150px; + border-radius:150px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-5:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-5-text { + margin-top:55px; + width: 150px; + margin-left:auto; + margin-right:auto; + font-size:2.0em; + +} +div.summary-node-6 { + position: absolute; + top:20px; + right:270px; + width:150px; + height:150px; + border-radius:150px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; +} +div.summary-node-6:hover{ + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.summary-node-6-text { + margin-top:30px; + width: 100px; + margin-left:auto; + margin-right:auto; +} +div.summary-nodes-container { + position: relative; + margin-left: auto ; + margin-right: auto ; + margin-top:30px; + margin-bottom:30px; + width: 800px; + height: 400px; + text-align: center ; +} +div#menubutton1 { + position: fixed; + top:10px; + left:200px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; + display: none; + z-index:200; +} +div#menubutton1:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton2 { + position: fixed; + top:10px; + left:350px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; + display: none; + z-index:200; +} +div#menubutton2:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton3 { + position: fixed; + top:10px; + right:350px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; + display: none; + z-index:200; +} +div#menubutton3:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div#menubutton4 { + position: fixed; + top:10px; + right:200px; + width:150px; + height:30px; + border-radius:10px; + color:#FFFFFF; + /* line-height:100px; */ + text-align:center; + background:#C60032; + display: none; + z-index:200; +} +div#menubutton4:hover { + color:#FFFFFF; + text-decoration:none; + background:#550000 +} +div.section-heading { + font-size:2.0em; + color:#C60032; + width:700px; + margin-left:auto; + margin-right:auto; +} +div.section-subtitle { + font-size:1.5em; + color:#BB0000; +} \ No newline at end of file diff --git a/mod/home.php b/mod/home.php index 2b8e83c30..05626dcb5 100644 --- a/mod/home.php +++ b/mod/home.php @@ -1,6 +1,9 @@ profile = array('profile_uid' => $u[0]['channel_id']); + $o .= prepare_page($r[0]); + return $o; } - $r = q("select item.* from item left join item_id on item.id = item_id.iid - where item.uid = %d and sid = '%s' and service = 'WEBPAGE' and - item_restrict = %d limit 1", - intval($u[0]['channel_id']), - dbesc($page_id), - intval(ITEM_WEBPAGE) - ); - - if(! $r) { - notice( t('Item not found.') . EOL); - return; + if(get_config('system','projecthome')) { + $o .= file_get_contents('assets/home.html'); + $a->page['template'] = 'full'; + return $o; } - xchan_query($r); - $r = fetch_post_tags($r,true); - $a->profile = array('profile_uid' => $u[0]['channel_id']); - $o .= prepare_page($r[0]); + if(file_exists('home.html')) { + $o .= file_get_contents('home.html'); + } + else { -} + // If there's no site channel or home contents configured, fallback to the old behaviour -// If there's no site channel specified, fallback to the old behaviour - else { $o .= '

' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '

'; - if(file_exists('home.html')) { - $o .= file_get_contents('home.html'); - $a->page['template'] = 'full'; - } + $sitename = get_config('system','sitename'); + if($sitename) + $o .= '

' . sprintf( t("Welcome to %s") ,$sitename) . '

'; + if (! $a->config['system']['no_login_on_homepage']) + $o .= login(($a->config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1); } - - if (!$a->config['system']['no_login_on_homepage']) - $o .= login(($a->config['system']['register_policy'] == REGISTER_CLOSED) ? 0 : 1); - - call_hooks("home_content",$o); - return $o; -} + call_hooks('home_content',$o); + return $o; } -- cgit v1.2.3