This commit is contained in:
Tom Slominski
2013-02-27 21:48:15 +00:00
parent e650be6974
commit e63be55b8a
10 changed files with 75 additions and 208 deletions

View File

@@ -47,16 +47,16 @@ if ( $message = $url. "added to database") {
<html> <html>
<head> <head>
<?php if (!empty(ISQ::$general['mobile'])) { echo "<script type='text/javascript'>if (screen.width <= 720) { document.location = 'mobile.php'; }</script>"; } ?> <?php if (!empty(ISQ::$general['mobile'])) { echo "<script type='text/javascript'>if (screen.width <= 720) { document.location = 'mobile.php'; }</script>"; } ?> <!-- Redirect to mobile if screen narrower than 720px -->
<title><?php echo $ISQtitle; ?></title> <title><?php echo $ISQtitle; ?></title> <!-- Site title defined in theme settings -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<script src="<?php echo YOURLS_SITE; ?>/js/jquery-1.4.3.min.js" type="text/javascript"></script> <script src="<?php echo YOURLS_SITE; ?>/js/jquery-1.9.1.min.js" type="text/javascript"></script> <!-- jQuery -->
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/formalize.css" /> <link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/formalize.css" /> <!-- Formalize CSS -->
<script src="<?php echo YOURLS_SITE; ?>/public/js/jquery.formalize.min.js" type="text/javascript"></script> <script src="<?php echo YOURLS_SITE; ?>/public/js/jquery.formalize.min.js" type="text/javascript"></script><!-- Formalize JS -->
<link href="http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"><!-- Ubuntu from Google Web Fonts -->
<script src="<?php echo YOURLS_SITE; ?>/public/js/jquery.qtip.min.js" type="text/javascript"></script> <link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/jquery.qtip.min.css" /><!-- qTip CSS -->
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/jquery.qtip.min.css" /> <script src="<?php echo YOURLS_SITE; ?>/public/js/jquery.qtip.min.js" type="text/javascript"></script><!-- qTip JS -->
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/normal.css" type="text/css" /> <link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/normal.css" type="text/css" /><!-- Theme CSS -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"> <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: "en-GB"} {lang: "en-GB"}
</script> </script>
@@ -65,6 +65,8 @@ $(document).ready(function()
{ {
// Match all labels with a title tag and use it as the content // Match all labels with a title tag and use it as the content
$('label[title]').qtip(); $('label[title]').qtip();
// Match all bookmarklet links and use their title as content
$('a.bookmarklet[title]').qtip();
}); });
</script> </script>
</head> </head>
@@ -148,8 +150,11 @@ HTML;
<div class="paragraph"> <div class="paragraph">
<h2>The bookmarklets</h2> <h2>The bookmarklets</h2>
<p>To use the bookmarklets drag them to your bookmark bar or simply right click on them and select the appropriate option. The instant bookmarklet shortens the URL of the current tab and then opens a kwl.me page in the current tab.</p> <p>To use the bookmarklets drag them to your bookmark bar or simply right click on them and select the appropriate option. </p>
<p><a href="javascript:void(location.href='<?php echo YOURLS_SITE; ?>/index.php?format=simple&action=shorturl&url='+escape(location.href))" class="bookmarklet">Instant Shorten</a></p> <a href="javascript:(function()%7Bvar%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:enc(s)),f='<?php echo $page; ?>',l=d.location,p='?url='+enc(l.href)+'&title='+enc(d.title)+'&text='+s2,u=f+p;try%7Bthrow('ozhismygod');%7Dcatch(z)%7Ba=function()%7Bif(!w.open(u))l.href=u;%7D;if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();%7Dvoid(0);%7D)()" class="bookmarklet" title="Shortens the URL of the current site and opens a new tab with the details of the shortened URL.">Simple Shorten</a>
<a href="javascript:(function()%7Bvar%20d=document,s=d.createElement('script');window.yourls_callback=function(r)%7Bif(r.short_url)%7Bprompt(r.message,r.short_url);%7Delse%7Balert('An%20error%20occured:%20'+r.message);%7D%7D;s.src='<?php echo $page; ?>?url='+encodeURIComponent(d.location.href)+'&jsonp=yourls';void(d.body.appendChild(s));%7D)();" class="bookmarklet">Instant Shorten</a>
<a href="javascript:(function()%7Bvar%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:enc(s)),f='<?php echo $page; ?>',l=d.location,k=prompt(%22Custom%20URL%22),k2=(k?'&keyword='+k:%22%22),p='?url='+enc(l.href)+'&title='+enc(d.title)+'&text='+s2+k2,u=f+p;if(k!=null)%7Btry%7Bthrow('ozhismygod');%7Dcatch(z)%7Ba=function()%7Bif(!w.open(u))l.href=u;%7D;if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();%7Dvoid(0)%7D%7D)()" class="bookmarklet" title="Opens a popup which asks for the URL you want to shorten and opens a new tab with the details of the shortened URL.">Custom Shorten</a>
<a href="javascript:(function()%7Bvar%20d=document,k=prompt('Custom%20URL'),s=d.createElement('script');if(k!=null){window.yourls_callback=function(r)%7Bif(r.short_url)%7Bprompt(r.message,r.short_url);%7Delse%7Balert('An%20error%20occured:%20'+r.message);%7D%7D;s.src='<?php echo $page; ?>?url='+encodeURIComponent(d.location.href)+'&keyword='+k+'&jsonp=yourls';void(d.body.appendChild(s));%7D%7D)();" class="bookmarklet">Instant Custom Shorten</a>
</div> </div>
<div class="footer"> <div class="footer">

View File

@@ -1,6 +0,0 @@
----------------- 1.3 ----------------
- Added a mobile version of the theme which can be disabled in the config file
- Discreet gradient in the menu
- New Google+ sharer
- Bookmarklet code updated with code with YOURLS 1.5
- Usual assortment of bug fixes, cleaned up code etc.

20
public/CHANGELOG.md Normal file
View File

@@ -0,0 +1,20 @@
Infinity-Squared CHANGELOG
==========================
1.4 (February 2013)
-------------------
* Bookmarklets updated to the code relevant to YOURLS 1.6
* Added CSS animation to the main menu
* Updated jQuery to 1.9.1 (included with YOURLS 1.6)
* Updated qTip² and Formalize.me so they're compatible with the new version of jQuery
* Added a few more comments to the code so it's easier to modify it
* Improved the readability of the documentation by moving over to Markdown
* Usual assortment of bug fixed, cleaned up code etc.
1.3 (August 2012)
-----------------
* Added a mobile version of the theme which can be disabled in the config file
* Discreet gradient in the menu
* New Google+ sharer
* Bookmarklet code updated with code with YOURLS 1.5
* Usual assortment of bug fixes, cleaned up code etc.

View File

@@ -1,12 +0,0 @@
Infinity Squared, a beautiful theme for YOURLS, by Tom Slominski (http://tomslominski.net/infinity-squared/)
See the project's Wiki pages at GitHub for the latest installation instructions
https://github.com/tomslominski/infinity-squared
qTip 2 is dual licensed under MIT or GPLv2 licenses
http://en.wikipedia.org/wiki/MIT_License
http://en.wikipedia.org/wiki/GNU_General_Public_License
Formalize and the theme itself are also licenced on GPLv2.
To update the theme from a previous version, backup your public/config.php and merge changes from new config.php file into your old one, keeping your old config the same. Next, delete public/, upload new files (replacing the old ones if there's any left) and restore your modified config.php.

11
public/README.md Normal file
View File

@@ -0,0 +1,11 @@
*DO NOT update to Infinity Squared 1.4 without upgrading your YOURLS installation to 1.6*
Infinity Squared
================
A beautiful theme for YOURLS, carefully crafted by [Tom Slominski](http://tomslominski.net/).
See the project's [Wiki pages](https://github.com/tomslominski/infinity-squared) at GitHub for the latest installation and upgrade instructions.
qTip 2 is dual licensed under [MIT](http://en.wikipedia.org/wiki/MIT_License) or [GPLv2](http://en.wikipedia.org/wiki/GNU_General_Public_License) licenses.
Formalize, jQuery and the Infinity Squared itself are also licenced on GPLv2.

View File

@@ -4,16 +4,16 @@
ISQ::$general = array( ISQ::$general = array(
'name' => 'kwl.me', // The name of your URL shortener 'name' => 'kwl.me', // The name of your URL shortener
'qr' => 1, // Do you want to display a QR code? 'qr' => 1, // Do you want to display a QR code?
'mobile' => 1 // Do you want to display a QR code? 'mobile' => 1 // Do you want to enable the mobile version?
); );
// Menu- The width of ∞² menu allows you to have about 10 links // Menu- The width of ∞² menu allows you to have about 10 links
// Leave empty to disable // Leave empty to disable
ISQ::$links = array( ISQ::$links = array(
'name_1' => 'Blog', 'name_1' => 'Tom Slominski',
'url_1' => 'http://tomslominski.net/', 'url_1' => 'http://tomslominski.net/',
'name_2' => 'Get ∞²!', 'name_2' => 'Get ∞²!',
'url_2' => 'http://tomslominski.net/infinity-squared/', 'url_2' => 'https://github.com/tomslominski/infinity-squared/',
'name_3' => '', 'name_3' => '',
'url_3' => '', 'url_3' => '',
'name_4' => '', 'name_4' => '',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -78,8 +78,17 @@ h1 a:visited {
line-height:38px; line-height:38px;
display: block; display: block;
padding: 0 10px; padding: 0 10px;
background:none;
transition: background 800ms;
-moz-transition: background 800ms; /* Firefox 4 */
-webkit-transition: background 800ms; /* Safari and Chrome */
-o-transition: background 800ms; /* Opera */
} }
.menu a:hover { .menu a:hover {
transition: background 800ms;
-moz-transition: background 800ms; /* Firefox 4 */
-webkit-transition: background 800ms; /* Safari and Chrome */
-o-transition: background 800ms; /* Opera */
background:#292929; background:#292929;
} }
.menu li { .menu li {
@@ -91,6 +100,7 @@ h1 a:visited {
/* Container */ /* Container */
#container { #container {
width: 60%; width: 60%;
min-width:720px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background-color: #FFF; background-color: #FFF;
@@ -103,7 +113,10 @@ h1 a:visited {
width: 60%; width: 60%;
float: right; float: right;
} }
.bookmarklet { div.bookmarklet {
width:20%;
}
a.bookmarklet {
border-radius: 11px; border-radius: 11px;
background: #ddd url(../img/button.png) repeat-x; background: #ddd url(../img/button.png) repeat-x;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #ddd)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #ddd));
@@ -117,10 +130,15 @@ h1 a:visited {
overflow: visible; overflow: visible;
padding: 3px 10px 4px; padding: 3px 10px 4px;
text-shadow: #fff 0 1px 1px; text-shadow: #fff 0 1px 1px;
width: auto;
text-decoration:none; text-decoration:none;
margin-right:2%;
} }
/* Tooltips */ /* Tooltips */
.qtip-default, .qtip-default:after {
border-color: #013F6D;
background-color: #013F6D;
color: #FFF;
}
.ui-tooltip-titlebar, .ui-tooltip-titlebar,
.ui-tooltip-content{ .ui-tooltip-content{
border-color: #013F6D; border-color: #013F6D;
@@ -155,7 +173,8 @@ h1 a:visited {
margin-top:30px; margin-top:30px;
} }
.footer p { .footer p {
padding:20px 0 20px 0; padding:20px 2% 20px 2%;
padding:20px 2% 20px 2%;
margin:0 auto; margin:0 auto;
} }
.footer a { .footer a {

View File

@@ -1,159 +0,0 @@
/* Main */
body {
background:#F1F1F1;
color:#000;
font-family:'Ubuntu', sans-serif, Helvetica, Arial;
font-size: 12px;
}
h2 {
color:#000;
margin-bottom:-8px;
}
a {
color:#013F6D;
text-decoration:none;
}
a:visited {
color:#013F6D;
text-decoration:none;
}
/* Header */
h1 {
background: url(img/noise.png) #013F6D;
width:100%;
text-align:center;
color:#FFFFFF;
font-size:60px;
border-top:4px #000 solid;
margin-top:0;
margin-bottom:-6px;
}
h1 a {
color:#FFF;
text-decoration:none;
}
h1 a:hover {
border-bottom: #FFF 1px dashed;
}
h1 a:visited {
color:#FFF;
text-decoration:none;
}
.menu {
background: #000;
display: block;
float: left;
margin: 0 auto;
width: 750px;
color:#FFF;
padding: 0 15px 0 15px;
margin-bottom:30px;
}
.menu a {
color: #FFF;
text-decoration: none;
line-height:38px;
display: block;
padding: 0 10px;
}
.menu a:hover {
background:#292929;
}
.menu li {
list-style: none;
float: left;
line-height:38px;
background:#000;
width:auto;
}
/* Container */
#container {
width: 780px;
margin-left: auto;
margin-right: auto;
background-color: #FFF;
padding: 20px;
margin-top: 20px;
}
.right {
width: 400px;
float: right;
}
.bookmarklet {
border-radius: 11px;
background: #ddd url(../img/button.png) repeat-x;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #ddd));
background: -moz-linear-gradient(top center, #fff 0%, #ddd 100%);
border: 1px solid;
border-color: #ddd #bbb #999;
cursor: pointer;
color: #333;
font: bold 12px/1.2 Arial, sans-serif;
outline: 0;
overflow: visible;
padding: 3px 10px 4px;
text-shadow: #fff 0 1px 1px;
width: auto;
text-decoration:none;
}
/* Tooltips */
.ui-tooltip-titlebar,
.ui-tooltip-content{
border-color: #013F6D;
background-color: #013F6D;
color: #FFF;
}
/* Output */
.output {
border: 3px #013F6D solid;
padding: 4px;
background: url(img/noise.png);
border-radius: 10px;
width:600px;
}
.output p {
margin:2px;
}
.output a, .output a:visited {
color:#013F6D;
text-decoration:none;
}
.output a:hover {
border-bottom: #013F6D 1px dashed;
}
.share-button, .twitter-share-button {
padding-right:3px;
}
/* Footer */
.footer {
text-align:center;
border-top:3px solid #000;
margin-top:30px;
}
.footer p {
padding-top:20px;
margin:0 auto;
}
.footer a {
color:#013F6D;
}
.footer a:hover {
text-decoration:none;
border-bottom:dashed 1px #013F6D;
}
.footer a:visited {
color:#013F6D;
}
/* Other */
div#copybox {
width:600px;
height:auto;
}
div#sharebox {
height:auto;
width:600px;
margin-top: 20px
}
.error {
color:red;
}