Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Does anybody know how to do this inside Maraschino? #150

Closed
mvanderberg opened this Issue Jun 14, 2012 · 5 comments

Comments

Projects
None yet
2 participants
Contributor

mvanderberg commented Jun 14, 2012

_First the pictures to show what I'm looking for:_
(Please scroll past the pictures for my question)

Alt Text

Alt Text

Alt Text

_And now the real question_

As I'm using Maraschino on tablets (IOS and Android), I made a small thingy so I can easily jump to and from Maraschino and other applications...

This is done in plain html, as I'm using Nginx as reverse proxy (Just download nginx from somewhere and put the nginx.conf at the bottom of the post in the conf directory... Also put the two html files in the html directory --!! Check the URLs and port numbers inside the conf file and menubar.html to see if they match your config)..

For this I'm using two simple html files (at the end of the post), but the problem is that the menu items have to be hardcoded in menubar.html, and you have to serve them through a webserver of some kind (which in my case is nginx)..

My question is if a menubar like this can be incorporated in Maraschino.

This would basically mean that the applications tab can also be added as a topframe..

Thanks in advance,

Best regards, Mark

_index.html_

<html>
   <title>Maraschino</title>
  <frameset rows="20px,*" frameborder="0" border="0" framespacing="0">
    <frame src="menubar.html" name="navigator" noresize scrolling="no">
    <frame src="http://192.168.0.100/#" name="main" noresize scrolling="auto">
  </frameset>
  </frameset>
  <noframes>
    <p>Your browser does not support frames</p>
  </noframes>
</html>

_menubar.html_

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Maraschino</title>
<style type="text/css">
#nav {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 11px;
    color: #B0B0B0;
    background-color: #262626;
    padding: 0px;
    margin-left: 0;
    margin-right: 0;
    height: 20px;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
}
#nav a {
    font-family: Verdana, Geneva, sans-serif;
    color: #B0B0B0;
    text-decoration: none;
    background-color: #262626;
    display: block;
    height: 20px;
    padding-right: 12px;
    padding-left: 12px;
    float: left;
    line-height: 18px;
    font-size: 10px;
    border-top-width: thin;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
}

#nav a:hover {
    color: #FFCE0D;
    background-color: #4D4D4D;
    font-size: 10px;
    text-shadow: rgba(255,255,255,1) 0px 1px 10px;
    font-weight: normal;
}



body {
}
</style>

<script type="text/javascript">
function navigator_Go(url) {
    parent.main.location=(url); // This technique is almost exactly the same as a full <a> page refresh, but it prevents Mobile Safari from jumping out of full-screen mode
}
</script>


<body>

<div id="nav" >
        <a href="javascript:navigator_Go('http://192.168.0.100/');">Maraschino</a>
        <a href="javascript:navigator_Go('http://192.168.0.100/sabnzbd/');">SABnzbd+</a>
        <a href="javascript:navigator_Go('http://192.168.0.100/sickbeardtv/');">Sickbeard</a>
        <a href="javascript:navigator_Go('http://192.168.0.100/couchpotato');">CouchPotato</a>
        <a href="javascript:navigator_Go('http://192.168.0.100/gui');">uTorrent</a>
        <a href="javascript:navigator_Go('http://192.168.0.100/headphones');">HeadPhones</a> 
</div>
</body>
</html>

_nginx.conf_

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    #tcp_nopush     on;
    keepalive_timeout  65;

    gzip  on;

    server {
        listen       80;
        server_name  hpstorage  hpstorage.local;

        location / {
            root   html;
            index  index.html;
        }

##################
#Maraschino
##################
    #location / {
    #include proxy.conf;
    #proxy_pass http://localhost:7000;
    #}

    location /mobile {
    include proxy.conf;
    proxy_pass http://localhost:7000/mobile;
    }
##################
# SABnzbd+
##################
    location /sabnzbd {
    include proxy.conf;
    proxy_pass http://localhost:8085;
    }

##################
# uTorrent
##################
    location /gui {
    include proxy.conf;
    proxy_pass http://localhost:8080/gui;
    }

##################
# SickBeard
##################     
    location /sickbeard {
    include proxy.conf;
    proxy_pass http://localhost:8081/sickbeard;
    }

##################
# HeadPhones
##################     
    location /headphones {
    include proxy.conf;
    proxy_pass http://localhost:8083/headphones;
    }

##################
# CouchPotatoServer
##################
    location /couchpotato {
    include proxy.conf;
    proxy_pass http://localhost:5050/couchpotato;
    # rewrite ^/couchpotato/?$ /couchpotato/movie/ permanent;
    }

##################

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

#        location / {
#            root   html;
#            index  index.html index.htm;
#        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;

    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_timeout  5m;

    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers   on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
Collaborator

gugahoi commented Jun 18, 2012

You can have a look at the branch "natecj-master" on this repository. I was playing around with @natecj's idea from way back. It is a very rough draft and based on a somewhat old version of Maraschino. I too would like a similar functionality but have other priorities at the moment and do not know when I'll be able to get around to this.

Contributor

mvanderberg commented Jun 18, 2012

Thanks for the help.
I'll look into it, but if anyone has a better idea....

Contributor

mvanderberg commented Jun 24, 2012

@gugahoi
Maybe this is a bit of a stupid question, but:

I changed the application redirect html so it shows the frame correctly, but I don't really know how to checkin my adjustments so you can check them out...

Can you help?

Thanks in advance,

best regards, Mark

Collaborator

gugahoi commented Jun 24, 2012

Since you already have a "fork" of maraschino, you can upload a new branch to it. Ideally you should pull your fork:

git pull https://github.com/mvanderberg/maraschino

This will download your maraschino repo to your computer. After that you should update it since your fork is quite old:

git remote add upstream https://github.com/mrkipling/maraschino
git pull upstream master

This will bring in the latest changes to your repo. However, since you seem have made a modification there might be conflicts. If that if the casem you will be told which file you should fix and commit your changes:

git commit -m 'your description goes here'

Following that you should create a branch for any modification you make.

git checkout -b branchname

This will create a branch called "branchname". Now you make all the modifications you want by editing your files on your favourite text editor and commit them.

git commit -m 'your description goes here'

NOTE: If you have new files, you will have to add them before you commit (this adds all new files -> git add *).
After that is done, just push your changes:

git push

or

git push branchname

And that should be it. This is a good website with some command line references -> http://gitref.org/

Contributor

mvanderberg commented Jun 24, 2012

@gugahoi Thanks for the help..
I'm going to try this...

best regards, Mark

@mvanderberg mvanderberg closed this Nov 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment