Fancy new image buttons for "take a tour" and "try it out".
Also updated initdb.py to handle links containing more than just text.
This commit is contained in:
parent
13c63fd400
commit
3be8f891b4
|
@ -49,3 +49,35 @@ ul li {
|
||||||
ol li {
|
ol li {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#take_a_tour {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
border: 0;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
background-image: url(/static/images/take_a_tour.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#take_a_tour:hover {
|
||||||
|
background-image: url(/static/images/take_a_tour_hover.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
#try_it_out {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
border: 0;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
background-image: url(/static/images/try_it_out.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#try_it_out:hover {
|
||||||
|
background-image: url(/static/images/try_it_out_hover.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.display_none {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
|
@ -34,5 +34,10 @@ your wiki.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Sound interesting? Then <a href="/static/images/tour.png" target="_new">take a tour</a> or <a href="/notebooks/%s?note_id=new" target="_top">try it out</a> for yourself!
|
Sound interesting? Then take a tour or try it out for yourself!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a href="/static/images/tour.png" target="_new"><span id="take_a_tour" title="take a tour"><span class="display_none">take a tour</span></span></a>
|
||||||
|
<a href="/notebooks/%s?note_id=new" target="_top"><span id="try_it_out" title="try it out"><span class="display_none">try it out</span></span></a>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
|
|
@ -18,6 +18,6 @@ No account yet? Want to make a wiki? You can <a href="/notebooks/%s?note_id=new"
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Forgot? Need your <a href="/notebooks/%s?note_id=new">password reset</a>?
|
Forgot? Need a <a href="/notebooks/%s?title=password%20reset¬e_id=new">username reminder or password reset</a>?
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<h3>password reset</h3>
|
<h3>password reset</h3>
|
||||||
|
|
||||||
<p>If you need a password reset, please email <a
|
<p>
|
||||||
href="mailto:support@luminotes.com" target="_top">support@luminotes.com</a>
|
If you can't remember your username or password, just enter your email
|
||||||
with your Luminotes username. Note that you may receive an automated email
|
address and you'll receive a link to reset your password. You'll also get a
|
||||||
asking you to confirm your message.</p>
|
username reminder.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>tip:</b> If you've got a spam filter in place, you may need to add
|
||||||
|
support@luminotes.com to your whitelist.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form id="send_reset_form">
|
||||||
|
<p>
|
||||||
|
<b>email address</b><br />
|
||||||
|
<input type="text" name="email_address" id="email_address" class="text_field" size="30" maxlength="60" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<input type="submit" name="send_reset_button" id="send_reset_button"
|
||||||
|
class="button" value="email me" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p>If the password reset isn't working for you, please let me know. See my <a
|
||||||
|
href="/notebooks/%s?note_id=new">contact info</a> for details.</p>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
|
@ -0,0 +1,145 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="383.79999"
|
||||||
|
height="270.86063"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.44.1"
|
||||||
|
sodipodi:docbase="/home/witten/luminotes"
|
||||||
|
sodipodi:docname="take a tour.svg"
|
||||||
|
version="1.0"
|
||||||
|
inkscape:export-filename="/home/witten/luminotes/try it out.png"
|
||||||
|
inkscape:export-xdpi="109.74448"
|
||||||
|
inkscape:export-ydpi="109.74448">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2"
|
||||||
|
inkscape:cx="258.47147"
|
||||||
|
inkscape:cy="125.96129"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:window-width="1400"
|
||||||
|
inkscape:window-height="1026"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0" />
|
||||||
|
<defs
|
||||||
|
id="defs4">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient7363">
|
||||||
|
<stop
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:white;stop-opacity:1;"
|
||||||
|
id="stop7365" />
|
||||||
|
<stop
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0;"
|
||||||
|
id="stop7367" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3172">
|
||||||
|
<stop
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#000000;stop-opacity:0.50479233;"
|
||||||
|
id="stop3174" />
|
||||||
|
<stop
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
id="stop3176" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient7363"
|
||||||
|
id="linearGradient3068"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(198.4623,-365.0038)"
|
||||||
|
x1="91"
|
||||||
|
y1="370.32941"
|
||||||
|
x2="91"
|
||||||
|
y2="431.43588" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3172"
|
||||||
|
id="linearGradient3076"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(7.462231,-295.0038)"
|
||||||
|
x1="294"
|
||||||
|
y1="290.36218"
|
||||||
|
x2="294"
|
||||||
|
y2="380.36218" />
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
transform="translate(-15.462231,-15.358361)">
|
||||||
|
<rect
|
||||||
|
style="fill:blue;fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12546"
|
||||||
|
width="178"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="24.35836"
|
||||||
|
x="212.46223"
|
||||||
|
height="56" />
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient3076);fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12548"
|
||||||
|
width="178"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="24.35836"
|
||||||
|
x="212.46223"
|
||||||
|
height="56" />
|
||||||
|
<g
|
||||||
|
transform="translate(-168.24303,516.8406)"
|
||||||
|
id="g18696" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:white;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Verdana"
|
||||||
|
id="text12558"
|
||||||
|
y="62.7463"
|
||||||
|
x="224.6123"
|
||||||
|
sodipodi:linespacing="100%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4022"
|
||||||
|
x="224.6123"
|
||||||
|
y="62.7463">take a tour</tspan></text>
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient3068);fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12554"
|
||||||
|
width="161"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="28.35836"
|
||||||
|
x="221.46223"
|
||||||
|
height="25" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1,145 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="383.79999"
|
||||||
|
height="270.86063"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.44.1"
|
||||||
|
sodipodi:docbase="/home/witten/luminotes"
|
||||||
|
sodipodi:docname="try it out.svg"
|
||||||
|
version="1.0"
|
||||||
|
inkscape:export-filename="/home/witten/luminotes/try it out.png"
|
||||||
|
inkscape:export-xdpi="109.74448"
|
||||||
|
inkscape:export-ydpi="109.74448">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
gridtolerance="10000"
|
||||||
|
guidetolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2"
|
||||||
|
inkscape:cx="258.47147"
|
||||||
|
inkscape:cy="125.96129"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:window-width="1400"
|
||||||
|
inkscape:window-height="1026"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0" />
|
||||||
|
<defs
|
||||||
|
id="defs4">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient7363">
|
||||||
|
<stop
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:white;stop-opacity:1;"
|
||||||
|
id="stop7365" />
|
||||||
|
<stop
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0;"
|
||||||
|
id="stop7367" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3172">
|
||||||
|
<stop
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#000000;stop-opacity:0.50479233;"
|
||||||
|
id="stop3174" />
|
||||||
|
<stop
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
id="stop3176" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient7363"
|
||||||
|
id="linearGradient3068"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(198.4623,-365.0038)"
|
||||||
|
x1="91"
|
||||||
|
y1="370.32941"
|
||||||
|
x2="91"
|
||||||
|
y2="431.43588" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3172"
|
||||||
|
id="linearGradient3076"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(7.462231,-295.0038)"
|
||||||
|
x1="294"
|
||||||
|
y1="290.36218"
|
||||||
|
x2="294"
|
||||||
|
y2="380.36218" />
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
transform="translate(-15.462231,-15.358361)">
|
||||||
|
<rect
|
||||||
|
style="fill:blue;fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12546"
|
||||||
|
width="178"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="24.35836"
|
||||||
|
x="212.46223"
|
||||||
|
height="56" />
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient3076);fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12548"
|
||||||
|
width="178"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="24.35836"
|
||||||
|
x="212.46223"
|
||||||
|
height="56" />
|
||||||
|
<g
|
||||||
|
transform="translate(-168.24303,516.8406)"
|
||||||
|
id="g18696" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:32.67960358px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:white;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Verdana"
|
||||||
|
id="text12558"
|
||||||
|
y="63.7463"
|
||||||
|
x="229.6123"
|
||||||
|
sodipodi:linespacing="100%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan4022"
|
||||||
|
x="229.6123"
|
||||||
|
y="63.7463">try it out</tspan></text>
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient3068);fill-opacity:1;stroke:none;stroke-width:6;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12554"
|
||||||
|
width="161"
|
||||||
|
rx="24"
|
||||||
|
ry="24"
|
||||||
|
y="28.35836"
|
||||||
|
x="221.46223"
|
||||||
|
height="25" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
@ -97,7 +97,8 @@ def fix_note_contents( contents, notebook_id, note_ids ):
|
||||||
import re
|
import re
|
||||||
from config.Common import settings
|
from config.Common import settings
|
||||||
|
|
||||||
LINK_PATTERN = re.compile( '(<a\s+href=")([^"]+?note_id=)([^"]*)("[^>]*>)([^<]*)(</a>)' )
|
LINK_PATTERN = re.compile( '(<a\s+href=")([^"]+note_id=)([^"]*)("[^>]*>)(.*?)(</a>)' )
|
||||||
|
TITLE_PATTERN = re.compile( ' title="(.*?)"' )
|
||||||
|
|
||||||
# plug in the notebook id and support email address where appropriate
|
# plug in the notebook id and support email address where appropriate
|
||||||
contents = contents.replace( "%s", notebook_id )
|
contents = contents.replace( "%s", notebook_id )
|
||||||
|
@ -107,6 +108,10 @@ def fix_note_contents( contents, notebook_id, note_ids ):
|
||||||
# also, use the https URL for certain links if one is configured
|
# also, use the https URL for certain links if one is configured
|
||||||
def fix_link( match ):
|
def fix_link( match ):
|
||||||
title = match.group( 5 )
|
title = match.group( 5 )
|
||||||
|
title_match = TITLE_PATTERN.search( title )
|
||||||
|
if title_match:
|
||||||
|
title = title_match.group( 1 )
|
||||||
|
|
||||||
https_url = u""
|
https_url = u""
|
||||||
|
|
||||||
if title in ( u"try it out", u"login" ):
|
if title in ( u"try it out", u"login" ):
|
||||||
|
|
Reference in New Issue