background: linear-gradient(#dedede, #ffffff);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
padding: 5px;
- border-radius: 5px 5px 5px 5px;
+ border-radius: 3px 3px 3px 3px;
border: none;
color: #000;
}
.linkeditbuttons {
position: absolute;
- left: -1px;
+ left: 2px;
padding: 4px 2px 2px 2px;
- background-color: #f0f0f0;
-webkit-border-radius: 0px 6px 6px 0px;
-moz-border-radius: 0px 6px 6px 0px;
-o-border-radius: 0px 6px 6px 0px;
-ms-border-radius: 0px 6px 6px 0px;
border-radius: 0px 6px 6px 0px;
-
- -webkit-box-shadow: 0px 0px 3px 0px #333333;
- -moz-box-shadow: 0px 0px 3px 0px #333333;
- -o-box-shadow: 0px 0px 3px 0px #333333;
- -ms-box-shadow: 0px 0px 3px 0px #333333;
- box-shadow: 0px 0px 3px 0px #333333;
}
#pageheader #logo {
cursor: pointer;
}
+#pageheader #menu {
+ width: 100%;
+}
+
+#pageheader #menu ul {
+ margin: auto;
+ padding: 7px 0px 0px 0px;
+ float: none;
+}
+
+#pageheader #menu ul li {
+ list-style: none;
+ display: inline;
+ position: relative;
+ box-sizing: border-box;
+}
+
+#pageheader a {
+ background-color: #333333;
+ background: -webkit-gradient(linear, 0 0, 0 bottom, from(#333333), to(#000000));
+ background: -webkit-linear-gradient(#333333, #000000);
+ background: -moz-linear-gradient(#333333, #000000);
+ background: -ms-linear-gradient(#333333, #000000);
+ background: -o-linear-gradient(#333333, #000000);
+ background: linear-gradient(#333333, #000000);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
+ padding: 5px;
+ border-radius: 3px 3px 3px 3px;
+ margin: 10px 3px 3px 3px;
+ color: #A2DD42;
+ text-decoration: none;
+ line-height: 2.5;
+ white-space: nowrap;
+}
+
#pageheader #linkcount {
float: right;
font-style: italic;
color: #bbb;
text-align: right;
padding-right: 5px;
+ margin: 3px 3px 0px 0px;
}
#pageheader {
margin: auto;
}
-#pageheader a {
- background-color: #333333;
- background: -webkit-gradient(linear, 0 0, 0 bottom, from(#333333), to(#000000));
- background: -webkit-linear-gradient(#333333, #000000);
- background: -moz-linear-gradient(#333333, #000000);
- background: -ms-linear-gradient(#333333, #000000);
- background: -o-linear-gradient(#333333, #000000);
- background: linear-gradient(#333333, #000000);
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
- padding: 5px;
- border-radius: 5px 5px 5px 5px;
- margin: 10px 3px 3px 3px;
- color: #A2DD42;
- float: left;
- text-decoration: none;
-}
-
#pageheader .search {
width: 100%;
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
padding: 5px;
border: none;
- border-radius: 5px 5px 5px 5px;
+ border-radius: 3px 3px 3px 3px;
margin: 10px 3px 3px 3px;
color: #cecece;
}
padding: 0 5px 0 5px;
margin: 5px 0 5px 0;
height: 20px;
- border-radius: 5px 5px 5px 5px;
+ border-radius: 3px 3px 3px 3px;
cursor: pointer;
}
.paging_linksperpage {
float: right;
padding-right: 5px;
+ margin: 0px 10px 2px 0px;
}
.paging_linksperpage form.linksperpage {
#editlinkform {
height: 100%;
- color: #ffffff;
padding: 5px 5px 5px 15px;
width: 80%;
clear: left;
}
+ #editlinkform label {
+ color: #ffffff;
+ }
+
#editlinkform textarea, #editlinkform .lf_input {
width: 100%;
}
}
#linklist li.private {
- background: url('../images/private.png') no-repeat 10px center;
- padding-left: 60px;
+ background: url('../images/private.png') no-repeat 4px center;
+ padding-left: 30px;
}
#linklist li {
- padding-left: 26px;
+ padding-left: 30px;
}
.private .linktitle a {
background: -o-linear-gradient(#F2F2F2, #ffffff);
background: linear-gradient(#F2F2F2, #ffffff);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
- padding: 3px 3px 3px 20px;
+ padding: 3px 5px 3px 20px;
height: 20px;
- border-radius: 3px 3px 3px 3px;
+ border-radius: 3px;
cursor: pointer;
background-image: url('../images/tag_blue.png');
background-repeat: no-repeat;
#footer {
font-size: 8pt;
text-align: center;
- border-top: 1px solid #ddd;
color: #888;
clear: both;
+ max-width: 30em;
+ margin: 15px auto 15px auto;
}
#footer a {
margin-left: 40px;
}
+ #changetag div {
+ float:left;
+ }
+
+ #changetag label {
+ padding: 5px;
+ }
+
+ #changetag li {
+ color: #000;
+ }
#configform td {
color: #ccc;
font-size: 10pt;
.thumbnail {
float: right;
- margin-left: 10px;
+ margin: 0px 10px 0px 10px;
+}
+
+.thumbnail img {
+ border-radius: 3px;
+ box-shadow: 0.5px 0.5px 0.5px 1px #dde4e6;
}
/* If you want thumbnails on the left:
text-shadow: 2px 2px 1px #000000;
}
- /* Minimal customisation for jQuery widgets */
- .ui-autocomplete {
- background-color: #fff;
- padding-left: 5px;
- }
-
- .ui-state-hover {
- background-color: #604dff;
- color: #fff;
- }
-
#linklist li.publicLinkHightLight {
background: #ffffff;
}
text-align: right;
}
+ .white {
+ color: white;
+ }
+
/* For lazy images loading in picture wall.
Using http://www.appelsiini.net/projects/lazyload
*/
display: none;
}
- #pageheader a {
+ #pageheader #menu ul {
+ text-align: center;
+ }
+
+ #pageheader #menu a {
padding: 5px;
- border-radius: 5px 5px 5px 5px;
+ border-radius: 3px 3px 3px 3px;
margin: 3px;
}
.searchform, .tagfilter {
display: block !important;
- margin: 0px !important;
+ margin: 0px 3px 7px 0px !important;
padding: 0px !important;
- width: 100% !important;
+ width: 97% !important;
}
.searchform input, .tagfilter input {
padding: 3px 5px 3px 5px;
background-color: #666;
color: #fff;
- border-radius: 5px 5px 5px 5px;
+ border-radius: 3px 3px 3px 3px;
}
.thumbnail {
$PAGE = new pageBuilder;
$PAGE->assign('linkcount',count($LINKSDB));
$PAGE->assign('token',getToken());
+ $PAGE->assign('tags', $LINKSDB->allTags());
$PAGE->renderPage('changetag');
exit;
}
$tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces.
$linkdate=$_POST['lf_linkdate'];
$url = trim($_POST['lf_url']);
- if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
+ if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:'))
$url = 'http://'.$url;
$link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),
'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
$PAGE->assign('link_is_new',false);
$PAGE->assign('token',getToken()); // XSRF protection.
$PAGE->assign('http_referer',(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''));
+ $PAGE->assign('tags', $LINKSDB->allTags());
$PAGE->renderPage('editlink');
exit;
}
$PAGE->assign('link_is_new',$link_is_new);
$PAGE->assign('token',getToken()); // XSRF protection.
$PAGE->assign('http_referer',(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''));
+ $PAGE->assign('tags', $LINKSDB->allTags());
$PAGE->renderPage('editlink');
exit;
}
}
}
- // Webservices (for use with jQuery/jQueryUI)
- // e.g. index.php?ws=tags&term=minecr
- function processWS()
- {
- if (empty($_GET['ws']) || empty($_GET['term'])) return;
- $term = $_GET['term'];
- $LINKSDB=new linkdb(isLoggedIn() || $GLOBALS['config']['OPEN_SHAARLI']); // Read links from database (and filter private links if used it not logged in).
- header('Content-Type: application/json; charset=utf-8');
-
- // Search in tags (case insensitive, cumulative search)
- if ($_GET['ws']=='tags')
- {
- $tags=explode(' ',str_replace(',',' ',$term)); $last = array_pop($tags); // Get the last term ("a b c d" ==> "a b c", "d")
- $addtags=''; if ($tags) $addtags=implode(' ',$tags).' '; // We will pre-pend previous tags
- $suggested=array();
- /* To speed up things, we store list of tags in session */
- if (empty($_SESSION['tags'])) $_SESSION['tags'] = $LINKSDB->allTags();
- foreach($_SESSION['tags'] as $key=>$value)
- {
- if (startsWith($key,$last,$case=false) && !in_array($key,$tags)) $suggested[$addtags.$key.' ']=0;
- }
- echo json_encode(array_keys($suggested));
- exit;
- }
-
- // Search a single tag (case sensitive, single tag search)
- if ($_GET['ws']=='singletag')
- {
- /* To speed up things, we store list of tags in session */
- if (empty($_SESSION['tags'])) $_SESSION['tags'] = $LINKSDB->allTags();
- foreach($_SESSION['tags'] as $key=>$value)
- {
- if (startsWith($key,$term,$case=true)) $suggested[$key]=0;
- }
- echo json_encode(array_keys($suggested));
- exit;
- }
- }
-
// Re-write configuration file according to globals.
// Requires some $GLOBALS to be set (login,hash,salt,title).
// If the config file cannot be saved, an error message is displayed and the user is redirected to "Tools" menu.
if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=atom')) { showATOM(); exit; }
if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=dailyrss')) { showDailyRSS(); exit; }
if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=daily')) { showDaily(); exit; }
- if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI)
if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE'];
renderPage();
?>