diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a8f6415..a7479ad 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -558,4 +558,9 @@ class Poche } return $version; } + + function convertURLToBase64($plainurl){ + $convertedURL = base64_encode($plainurl); + $this->action('add', new Url($convertedURL)) + } } \ No newline at end of file diff --git a/index.php b/index.php index 5f43b74..e81a924 100644 --- a/index.php +++ b/index.php @@ -44,6 +44,9 @@ elseif (isset($_GET['export'])) { $poche->export(); } +if (isset($_GET['plainurl'])){ + $poche->convertURLToBase64($_GET['plainurl']);} + # vars to send to templates $tpl_vars = array( 'referer' => $referer, diff --git a/tpl/_menu.twig b/tpl/_menu.twig index 699d6a0..8341c49 100644 --- a/tpl/_menu.twig +++ b/tpl/_menu.twig @@ -4,4 +4,13 @@
  • {% trans "archive" %}
  • {% trans "config" %}
  • {% trans "logout" %}
  • - \ No newline at end of file +
  • {% trans "addlink" %}
  • +
  • {% trans "logout" %}
  • + +
    +
    +
    + + +
    +
    \ No newline at end of file diff --git a/tpl/css/style.css b/tpl/css/style.css index 7633534..808e4b6 100644 --- a/tpl/css/style.css +++ b/tpl/css/style.css @@ -257,3 +257,16 @@ footer { .reading-time { font-size: 0.8em; } + +#inputform{ ++ display: none; ++ text-align:center; ++ max-width:300px; ++ margin-left:auto; ++ margin-right:auto; ++ margin-top:5px; ++ background-color: rgba(0, 0, 0, 0.9); ++ opacity:0.8; ++ color:white; ++ border-radius: 3px; ++} \ No newline at end of file diff --git a/tpl/js/poche.js b/tpl/js/poche.js new file mode 100644 index 0000000..c2e02f9 --- /dev/null +++ b/tpl/js/poche.js @@ -0,0 +1,2 @@ +function showinput(){ +$('#inputform').fadeIn('fast');} \ No newline at end of file diff --git a/tpl/layout.twig b/tpl/layout.twig index 07ca231..b248401 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig @@ -12,6 +12,7 @@ {% block title %}{% endblock %} - poche {% include '_head.twig' %} + {% include '_bookmarklet.twig' %}