🚧 WIP: add new theme
Basic changes matching old theme. TODO footer : * Add pages * Add last commit hash/link * Bottom line TODO plugin: * post_stats * tipue_search * neighbors * https://github.com/pelican-plugins/seo Source : https://gitlab.com/axil/pelican-uberspot/-/blob/master/README.md
3
Makefile
|
@ -1,6 +1,5 @@
|
|||
PY?=python3
|
||||
PELICAN?=pelican
|
||||
PELICANOPTS=
|
||||
|
||||
BASEDIR=$(CURDIR)
|
||||
INPUTDIR=$(BASEDIR)/content
|
||||
|
@ -72,4 +71,4 @@ publish:
|
|||
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
|
||||
|
||||
|
||||
.PHONY: html help clean regenerate serve serve-global devserver stopserver publish
|
||||
.PHONY: html help clean regenerate serve serve-global devserver stopserver publish
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*- #
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
AUTHOR = 'Fred'
|
||||
|
@ -8,8 +8,9 @@ DEFAULT_PAGINATION = False
|
|||
PATH = 'content'
|
||||
SITEURL = 'http://127.0.0.1:8000'
|
||||
RELATIVE_URLS = False
|
||||
SITENAME = 'pro[zind]'
|
||||
SITESUBTITLE = ''
|
||||
SITENAME = 'pro.zind'
|
||||
SITE_SOURCE = "https://gitlab.com/free_zed/free_zed.gitlab.io"
|
||||
SITESUBTITLE = "Histoires d'un <foobar> perfectioniste sous pression…"
|
||||
TIMEZONE = 'Europe/Paris'
|
||||
|
||||
# Feed generation is usually not desired when developing
|
||||
|
@ -26,8 +27,9 @@ LINKS = (('Archives', '/articles/'),
|
|||
|
||||
# Social widget
|
||||
SOCIAL = (('gitlab', 'https://gitlab.com/free_zed'),
|
||||
('stackoverflow', 'https://stackoverflow.com/users/6709630/freezed'),
|
||||
('github', 'https://github.com/freezed/'),)
|
||||
('stack-overflow', 'https://stackoverflow.com/users/6709630/freezed'),
|
||||
('github', 'https://github.com/freezed/'),
|
||||
('RSS', 'feeds/all.atom.xml'),)
|
||||
|
||||
# my configuration
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
@ -42,7 +44,7 @@ EXTRA_PATH_METADATA = {
|
|||
}
|
||||
FAVICO = EXTRA_PATH_METADATA['extra/favico.ico']['path']
|
||||
DISPLAY_CATEGORIES_ON_MENU = True
|
||||
THEME = 'mytheme/'
|
||||
THEME = 'theme-uberspot/'
|
||||
DEFAULT_METADATA = {
|
||||
'Status': 'draft',
|
||||
'Category': 'Bloc-notes',
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
*.swp
|
||||
.DS_Store
|
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Achilleas Pipinellis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
pelican-uberspot is a [pelican](https://blog.getpelican.com) theme inspired by <http://uberspot.github.io/>.
|
||||
Many stylistic changes are taken from <http://vincent.bernat.im/>.
|
||||
|
||||
## Variables
|
||||
|
||||
## Plugins
|
||||
|
||||
## License
|
||||
|
||||
Everything is licensed under MIT, except otherwise stated.
|
||||
|
||||
## Screenshots
|
||||
|
||||
**Index page**
|
||||
|
||||
![Index page](uberspot_index.png)
|
||||
|
||||
**Single article**
|
||||
|
||||
![Single article](uberspot_article.png)
|
||||
|
||||
**Archives**
|
||||
|
||||
![Archives](uberspot_archives.png)
|
||||
|
||||
**Search**
|
||||
|
||||
![Archives](uberspot_search.png)
|
|
@ -0,0 +1,62 @@
|
|||
.codehilite .hll { background-color: #ffffcc }
|
||||
.codehilite { background: transparent; }
|
||||
.codehilite .c { color: #60a0b0; font-style: italic } /* Comment */
|
||||
/*.codehilite .err { border: 1px solid #FF0000 } Error */
|
||||
.codehilite .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
.codehilite .o { color: #666666 } /* Operator */
|
||||
.codehilite .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
|
||||
.codehilite .cp { color: #007020 } /* Comment.Preproc */
|
||||
.codehilite .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
|
||||
.codehilite .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
|
||||
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.codehilite .ge { font-style: italic } /* Generic.Emph */
|
||||
.codehilite .gr { color: #FF0000 } /* Generic.Error */
|
||||
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.codehilite .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.codehilite .go { color: #888888 } /* Generic.Output */
|
||||
.codehilite .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.codehilite .gs { font-weight: bold } /* Generic.Strong */
|
||||
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.codehilite .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.codehilite .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.codehilite .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||
.codehilite .kp { color: #007020 } /* Keyword.Pseudo */
|
||||
.codehilite .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
||||
.codehilite .kt { color: #902000 } /* Keyword.Type */
|
||||
.codehilite .m { color: #40a070 } /* Literal.Number */
|
||||
.codehilite .s { color: #4070a0 } /* Literal.String */
|
||||
.codehilite .na { color: #4070a0 } /* Name.Attribute */
|
||||
.codehilite .nb { color: #007020 } /* Name.Builtin */
|
||||
.codehilite .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||
.codehilite .no { color: #60add5 } /* Name.Constant */
|
||||
.codehilite .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||
.codehilite .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||
.codehilite .ne { color: #007020 } /* Name.Exception */
|
||||
.codehilite .nf { color: #06287e } /* Name.Function */
|
||||
.codehilite .nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||
.codehilite .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
.codehilite .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||
.codehilite .nv { color: #bb60d5 } /* Name.Variable */
|
||||
.codehilite .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.codehilite .mf { color: #40a070 } /* Literal.Number.Float */
|
||||
.codehilite .mh { color: #40a070 } /* Literal.Number.Hex */
|
||||
.codehilite .mi { color: #40a070 } /* Literal.Number.Integer */
|
||||
.codehilite .mo { color: #40a070 } /* Literal.Number.Oct */
|
||||
.codehilite .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||
.codehilite .sc { color: #4070a0 } /* Literal.String.Char */
|
||||
.codehilite .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||
.codehilite .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||
.codehilite .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||
.codehilite .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
||||
.codehilite .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||
.codehilite .sx { color: #c65d09 } /* Literal.String.Other */
|
||||
.codehilite .sr { color: #235388 } /* Literal.String.Regex */
|
||||
.codehilite .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.codehilite .ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.codehilite .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.codehilite .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.codehilite .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.codehilite .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.codehilite .il { color: #40a070 } /* Literal.Number.Integer.Long */
|
|
@ -0,0 +1,730 @@
|
|||
@charset "UTF-8";
|
||||
|
||||
@font-face{font-family:Merriweather;src:url(../fonts/Merriweather-Regular.ttf)}
|
||||
@font-face{font-family:Open Sans;src:url(../fonts/OpenSans-Regular.ttf)}
|
||||
@font-face{font-family:Sigmar One;src:url(../fonts/SigmarOne-Regular.ttf)}
|
||||
|
||||
/* =Structure
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body > * {
|
||||
clear: both;
|
||||
margin: 0 auto;
|
||||
width: 800px;
|
||||
}
|
||||
#main {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
body > header {
|
||||
border-bottom: 4px solid #ddd;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 0 20px 0;
|
||||
position: relative;
|
||||
}
|
||||
body > footer {
|
||||
border-top: 4px solid #ddd;
|
||||
margin-top: 20px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
/* =Global Elements
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body {
|
||||
background-image: url(../images/bg_paper_fibers.png);
|
||||
color: #333;
|
||||
font: 100% Merriweather, 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
margin: 20px;
|
||||
overflow-y: scroll !important;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
header, footer, nav, section, article {
|
||||
display: block;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: rgb(33, 81, 156);
|
||||
font-family: "Source Sans Pro","Droid Sans",sans-serif,"Lucida Grande","Lucida Sans Unicode","Arial Unicode MS";
|
||||
font-weight: bold;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
padding: 0 0 20px 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.625em;
|
||||
line-height: 1;
|
||||
}
|
||||
h3 {
|
||||
font-size: 20px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
h4, h5, h6 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
a {
|
||||
color: #26a;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: rgb(74, 130, 217);
|
||||
border-bottom: 1px solid rgb(74, 130, 217);
|
||||
}
|
||||
a img {
|
||||
border: 0;
|
||||
}
|
||||
ul {
|
||||
margin: 0 0 20px 0;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
code {
|
||||
background: none repeat scroll 0% 0% rgba(188, 218, 230, 0.64);
|
||||
padding: 0px 2px;
|
||||
}
|
||||
|
||||
.codehilite {
|
||||
background: none repeat scroll 0% 0% transparent;
|
||||
}
|
||||
|
||||
pre {
|
||||
font: 13px/18px Menlo, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', monospace;
|
||||
white-space: pre-wrap;
|
||||
background-color: rgb(245, 245, 245);
|
||||
font-size: 90%;
|
||||
padding: 8.5px;
|
||||
display: block;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
line-height: 18px;
|
||||
word-break: break-all;
|
||||
overflow-x: auto;
|
||||
background: url("../images/blueprint-dark.png") repeat scroll center top rgb(250, 251, 252);
|
||||
border-left: 6px solid rgb(85, 138, 187);
|
||||
-moz-tab-size: 4;
|
||||
-moz-hyphens: none;
|
||||
}
|
||||
|
||||
pre code {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* =Header
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body > header > h1 {
|
||||
font-family: "Sigmar One";
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body > header > h1 a {
|
||||
color: #666;
|
||||
}
|
||||
body > header > h1 a:hover {
|
||||
color: rgb(74, 130, 217);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
body > header > p {
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
margin: 0 0 0 15px;
|
||||
}
|
||||
body > header > nav {
|
||||
bottom: 20px;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
body > header > nav > a {
|
||||
display: inline-block;
|
||||
margin: 0 6px;
|
||||
border-bottom: none;
|
||||
}
|
||||
body > header > nav > a:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
#subscribe-link {
|
||||
background: url('../images/rss.png') no-repeat left 2px;
|
||||
color: #c60;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
img#quote { margin: 5px 100px; width:500px; height:200px; cursor:pointer; }
|
||||
|
||||
/* =Content
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
#breadcrumbs {
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
/* Blog posts */
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
margin: 0px 0px 20px;
|
||||
padding: 20px 30px 10px 10px;
|
||||
border-width: 0px;
|
||||
border-style: solid;
|
||||
border-image: none;
|
||||
border-left: 6px solid rgba(255, 203, 0, 0.5);
|
||||
background-color: rgba(255, 203, 0, 0.1);
|
||||
border-color: rgb(243, 182, 114);
|
||||
clear: left;
|
||||
-moz-border-top-colors: none;
|
||||
-moz-border-right-colors: none;
|
||||
-moz-border-bottom-colors: none;
|
||||
-moz-border-left-colors: none;
|
||||
}
|
||||
|
||||
article address {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-style:italic;
|
||||
font-weight:normal;
|
||||
color:#B80F28;
|
||||
}
|
||||
|
||||
abbr {
|
||||
cursor:help;
|
||||
border-bottom:1px dashed #b3cbef;
|
||||
}
|
||||
|
||||
table {
|
||||
overflow:auto;
|
||||
width:92%;
|
||||
margin:1.625em auto;
|
||||
border-spacing:2px;
|
||||
border-color:gray;
|
||||
border-collapse:separate;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
table th {
|
||||
padding:0.5em;
|
||||
text-align:left;
|
||||
background-color:#21519c;
|
||||
color:white;
|
||||
background-image:-webkit-gradient(linear, center bottom, left bottom, from(#21519c), to(#255cb1));
|
||||
}
|
||||
|
||||
table th a {
|
||||
color:#9ebceb;
|
||||
}
|
||||
|
||||
table th:first-child {
|
||||
border-radius:4px 0 0 0;
|
||||
}
|
||||
|
||||
table th:last-child {
|
||||
border-radius:0 4px 0 0;
|
||||
}
|
||||
|
||||
table tbody td {
|
||||
padding:0.2em 0.5em;
|
||||
}
|
||||
|
||||
table tbody tr {
|
||||
background:#ffffff;
|
||||
background:rgba(255, 255, 255, 0.6);
|
||||
color:#444;
|
||||
}
|
||||
|
||||
table tbody tr:nth-child(odd) {
|
||||
background:#dee8f8;
|
||||
background:rgba(221, 232, 248, 0.6);
|
||||
}
|
||||
|
||||
table tbody tr:hover{
|
||||
color:black;
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin:1.625em 0 1.625em;
|
||||
max-width:25em;
|
||||
border-left:1px dashed #749fe2;
|
||||
background:#dee8f8;
|
||||
background:rgba(221, 232, 248, 0.6);
|
||||
}
|
||||
|
||||
.toc ul {
|
||||
margin-left:0;
|
||||
font-size:0.875em;
|
||||
line-height:1.85714;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.toc ul ul li {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.toc ul ul{
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
.toc ul li ul{
|
||||
padding-left:1em;
|
||||
margin: 0px;
|
||||
background:none;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
.toc ul li{
|
||||
background:none;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
article .body ul {
|
||||
display: block;
|
||||
list-style: square inside;
|
||||
}
|
||||
|
||||
article .body-padding {
|
||||
padding-top: 58px;
|
||||
}
|
||||
|
||||
article ol {
|
||||
list-style-type:decimal;
|
||||
padding-left:40px;
|
||||
padding-top:20px;
|
||||
}
|
||||
|
||||
article .tags {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
article .tags li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
article .tags li:after {
|
||||
content: ", ";
|
||||
}
|
||||
|
||||
article .tags li:last-child:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.footnote {
|
||||
font-size:0.85em;
|
||||
line-height:2.1666666666666665;
|
||||
border-top: 1px solid #ddd;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 0px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.footnote p {
|
||||
margin:1.1666666666666665em 0 0 0;
|
||||
}
|
||||
|
||||
.footnote a {
|
||||
color: #888;
|
||||
}
|
||||
article {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
article > header {
|
||||
border-bottom: 1px solid #ddd;
|
||||
color: rgb(75, 70, 70);
|
||||
font-size: 13px;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
article > header > h2 {
|
||||
color: #333;
|
||||
margin: 0 0 5px 0;
|
||||
padding: 0;
|
||||
}
|
||||
article > header > h2 > a {
|
||||
color: #333 !important;
|
||||
}
|
||||
article img {
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
}
|
||||
article > footer {
|
||||
margin-top: 20px;
|
||||
}
|
||||
article > footer > p, article > footer > span {
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
}
|
||||
article > header #stats {
|
||||
color: rgba(197, 83, 0, 0.83);
|
||||
}
|
||||
|
||||
#like-and-subscribe {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-top: 4px;
|
||||
}
|
||||
#author-blurb {
|
||||
background-color: #eee;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 20px;
|
||||
min-height: 100px;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
#author-blurb > img {
|
||||
float: left;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
#author-blurb > strong {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
nav.older {
|
||||
float: left;
|
||||
}
|
||||
|
||||
nav.older a:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
nav.newer {
|
||||
float: right;
|
||||
}
|
||||
|
||||
nav.newer a:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
span.lpin {
|
||||
background: url(../images/left_pin.png) no-repeat scroll center;
|
||||
background-size: 50px 16px;
|
||||
padding: 0px 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
span.rpin {
|
||||
background: url(../images/right_pin.png) no-repeat scroll center;
|
||||
background-size: 50px 16px;
|
||||
padding: 0px 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.neighbors {
|
||||
background: url(../images/bowling.png) no-repeat scroll center;
|
||||
background-size: 100px 100px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
/* Search plugin */
|
||||
#searchform {
|
||||
float: right;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
#searchbox {
|
||||
background-color: rgb(237, 238, 243);
|
||||
border: 1px solid rgb(182, 178, 161);
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
-moz-border-radius: 4px 4px 4px 4px;
|
||||
-webkit-border-radius: 4px 4px 4px 4px;
|
||||
padding: 4px;
|
||||
margin: 0px 15px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#tipue_search_input {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
#tipue_search_button {
|
||||
background-color: rgb(241, 241, 241);
|
||||
border: 1px solid rgb(220, 220, 220);
|
||||
color: rgb(51, 51, 51);
|
||||
margin-right: 7px;
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Better styles for embedded GitHub Gists */
|
||||
|
||||
div.gist {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
div.gist div.gist-file div.gist-data {
|
||||
background-color: #f9f9f9 !important;
|
||||
}
|
||||
div.gist pre {
|
||||
font-family: Menlo, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', monospace !important;
|
||||
}
|
||||
div.gist-meta {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 13px !important;
|
||||
}
|
||||
div.gist-meta a {
|
||||
color: #26a !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.gist-meta a:hover {
|
||||
color: #0e4071 !important;
|
||||
}
|
||||
|
||||
/* Share buttons at the bottom of each blog post */
|
||||
|
||||
#share-buttons {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
#share-buttons-label {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
vertical-align: 4px;
|
||||
}
|
||||
iframe.twitter-share-button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
iframe.facebook-like-button {
|
||||
border: 0;
|
||||
height: 20px;
|
||||
margin-right: 9px;
|
||||
overflow: hidden;
|
||||
width: 50px;
|
||||
}
|
||||
span.IN-widget {
|
||||
margin-right: 10px;
|
||||
}
|
||||
iframe.twitter-follow-button {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Disqus comments */
|
||||
|
||||
#disqus_thread {
|
||||
border-top: 4px solid #ddd;
|
||||
margin-top: 50px;
|
||||
}
|
||||
#dsq-content {
|
||||
font-size: 13px !important;
|
||||
}
|
||||
#dsq-content #dsq-global-toolbar, #dsq-content ul.dsq-login-buttons, #dsq-content div.dsq-options,
|
||||
#dsq-content #dsq-comments, #dsq-content #dsq-pagination {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
div.dsq-tooltip-small {
|
||||
width: auto;
|
||||
}
|
||||
#dsq-content ul.dsq-login-buttons {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
#dsq-comment-count {
|
||||
background: url('/resources/comment.png') no-repeat left top;
|
||||
padding-left: 20px;
|
||||
text-transform: lowercase;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#dsq-footer a > em {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
a.dsq-brlink {
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
/* Post and project lists */
|
||||
|
||||
#related-posts {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
#related-posts h3 {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#related-posts ul {
|
||||
padding-left: 40px;
|
||||
}
|
||||
#related-posts li > time {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
margin-left: .4em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
ul.post-list {
|
||||
font-size: 16px;
|
||||
list-style: none;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
}
|
||||
ul.post-list > li {
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 0 0 5px 0;
|
||||
padding: 0 0 5px 0;
|
||||
}
|
||||
ul.post-list > li > time {
|
||||
color: #999;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-family: Menlo, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', monospace;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#blog-archive > h3 {
|
||||
color: #999;
|
||||
float: left;
|
||||
}
|
||||
#blog-archive > ul.post-list {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#blog-archive > ul.post-list > li {
|
||||
margin-left: 60px;
|
||||
}
|
||||
div.project-list li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
div.project-list h4 {
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-weight: normal;
|
||||
margin-bottom: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
/* About Me page */
|
||||
|
||||
img.gravatar {
|
||||
border: 4px solid #ddd;
|
||||
display: block;
|
||||
float: right;
|
||||
margin: 0 0 20px 20px;
|
||||
}
|
||||
|
||||
.social-network-icons {
|
||||
color: #333;
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
line-height: 1em;
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* =Footer
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
body > footer {
|
||||
color: #999;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
#cc-logo {
|
||||
background: url('../images/cc.png') no-repeat left;
|
||||
display: inline-block;
|
||||
height: 31px;
|
||||
margin: 2px 10px 0 0;
|
||||
width: 88px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* =Mobile Devices
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
@media only screen and (max-device-width: 960px) {
|
||||
|
||||
body > * {
|
||||
width: 100%;
|
||||
}
|
||||
body {
|
||||
-webkit-text-size-adjust: none;
|
||||
margin: 10px;
|
||||
}
|
||||
blockquote {
|
||||
margin: 0 20px;
|
||||
}
|
||||
body > header > nav {
|
||||
margin: 20px 0 0 -4px;
|
||||
position: static;
|
||||
}
|
||||
body > header > nav > a {
|
||||
margin: 0 4px;
|
||||
}
|
||||
article img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
#like-and-subscribe {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
#dsq-comment-count {
|
||||
background-position: left 1px;
|
||||
}
|
||||
ul.post-list > li {
|
||||
color: #26a;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
ul.post-list > li > time {
|
||||
margin-left: 1em;
|
||||
}
|
||||
#blog-archive > h3 {
|
||||
float: none;
|
||||
padding: 20px 0;
|
||||
}
|
||||
#blog-archive > h3:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
#blog-archive > ul.post-list > li {
|
||||
margin-left: 0;
|
||||
}
|
||||
img.gravatar {
|
||||
height: 100px !important;
|
||||
width: 100px !important;
|
||||
}
|
||||
body > footer br {
|
||||
display: none;
|
||||
}
|
||||
img#quote { display: none; }
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
body {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: none;
|
||||
}
|
After Width: | Height: | Size: 453 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 368 B |
|
@ -0,0 +1,203 @@
|
|||
|
||||
/*
|
||||
Tipue Search 5.0
|
||||
Copyright (c) 2015 Tipue
|
||||
Tipue Search is released under the MIT License
|
||||
http://www.tipue.com/search
|
||||
*/
|
||||
|
||||
|
||||
#tipue_search_input
|
||||
{
|
||||
font: 13px/1.6 'open sans', sans-serif;
|
||||
color: #333;
|
||||
padding: 12px 12px 12px 40px;
|
||||
width: 170px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 0;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
box-shadow: none;
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
background: #fff url('img/search.png') no-repeat 15px 15px;
|
||||
}
|
||||
|
||||
#tipue_search_content
|
||||
{
|
||||
max-width: 650px;
|
||||
padding-top: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
#tipue_search_warning
|
||||
{
|
||||
font: 300 15px/1.6 'Open Sans', sans-serif;
|
||||
color: #555;
|
||||
margin: 7px 0;
|
||||
}
|
||||
#tipue_search_warning a
|
||||
{
|
||||
color: #396;
|
||||
text-decoration: none;
|
||||
}
|
||||
#tipue_search_warning a:hover
|
||||
{
|
||||
color: #555;
|
||||
}
|
||||
#tipue_search_results_count
|
||||
{
|
||||
font: 300 15px/1.7 'Open Sans', sans-serif;
|
||||
color: #555;
|
||||
}
|
||||
.tipue_search_content_title
|
||||
{
|
||||
font: 300 21px/1.7 'Open Sans', sans-serif;
|
||||
margin-top: 23px;
|
||||
}
|
||||
.tipue_search_content_title a
|
||||
{
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
.tipue_search_content_title a:hover
|
||||
{
|
||||
color: #555;
|
||||
}
|
||||
.tipue_search_content_url
|
||||
{
|
||||
font: 300 14px/1.9 'Open Sans', sans-serif;
|
||||
word-wrap: break-word;
|
||||
hyphens: auto;
|
||||
}
|
||||
.tipue_search_content_url a
|
||||
{
|
||||
color: #396;
|
||||
text-decoration: none;
|
||||
}
|
||||
.tipue_search_content_url a:hover
|
||||
{
|
||||
color: #555;
|
||||
}
|
||||
.tipue_search_content_text
|
||||
{
|
||||
font: 300 15px/1.6 'Open Sans', sans-serif;
|
||||
color: #555;
|
||||
word-wrap: break-word;
|
||||
hyphens: auto;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.tipue_search_content_debug
|
||||
{
|
||||
font: 300 13px/1.6 'Open Sans', sans-serif;
|
||||
color: #555;
|
||||
margin: 5px 0;
|
||||
}
|
||||
.h01
|
||||
{
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#tipue_search_foot
|
||||
{
|
||||
margin: 51px 0 21px 0;
|
||||
}
|
||||
#tipue_search_foot_boxes
|
||||
{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font: 12px 'Open Sans', sans-serif;
|
||||
}
|
||||
#tipue_search_foot_boxes li
|
||||
{
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline;
|
||||
}
|
||||
#tipue_search_foot_boxes li a
|
||||
{
|
||||
padding: 10px 17px 11px 17px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 1px;
|
||||
color: #333;
|
||||
margin-right: 7px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
#tipue_search_foot_boxes li.current
|
||||
{
|
||||
padding: 10px 17px 11px 17px;
|
||||
background: #f6f6f6;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 1px;
|
||||
color: #333;
|
||||
margin-right: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
#tipue_search_foot_boxes li a:hover
|
||||
{
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
|
||||
/* spinner */
|
||||
|
||||
|
||||
.tipue_search_spinner
|
||||
{
|
||||
padding: 31px 0;
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
}
|
||||
.tipue_search_spinner > div
|
||||
{
|
||||
background-color: #777;
|
||||
height: 100%;
|
||||
width: 3px;
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
-webkit-animation: stretchdelay 1.2s infinite ease-in-out;
|
||||
animation: stretchdelay 1.2s infinite ease-in-out;
|
||||
}
|
||||
.tipue_search_spinner .tipue_search_rect2
|
||||
{
|
||||
-webkit-animation-delay: -1.1s;
|
||||
animation-delay: -1.1s;
|
||||
}
|
||||
.tipue_search_spinner .tipue_search_rect3
|
||||
{
|
||||
-webkit-animation-delay: -1.0s;
|
||||
animation-delay: -1.0s;
|
||||
}
|
||||
@-webkit-keyframes stretchdelay
|
||||
{
|
||||
0%, 40%, 100%
|
||||
{
|
||||
-webkit-transform: scaleY(0.4)
|
||||
}
|
||||
20%
|
||||
{
|
||||
-webkit-transform: scaleY(1.0)
|
||||
}
|
||||
}
|
||||
@keyframes stretchdelay
|
||||
{
|
||||
0%, 40%, 100%
|
||||
{
|
||||
transform: scaleY(0.4);
|
||||
-webkit-transform: scaleY(0.4);
|
||||
}
|
||||
20%
|
||||
{
|
||||
transform: scaleY(1.0);
|
||||
-webkit-transform: scaleY(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,520 @@
|
|||
|
||||
/*
|
||||
Tipue Search 5.0
|
||||
Copyright (c) 2015 Tipue
|
||||
Tipue Search is released under the MIT License
|
||||
http://www.tipue.com/search
|
||||
*/
|
||||
|
||||
|
||||
(function($) {
|
||||
|
||||
$.fn.tipuesearch = function(options) {
|
||||
|
||||
var set = $.extend( {
|
||||
|
||||
'show' : 7,
|
||||
'newWindow' : false,
|
||||
'showURL' : true,
|
||||
'showTitleCount' : true,
|
||||
'minimumLength' : 3,
|
||||
'descriptiveWords' : 25,
|
||||
'highlightTerms' : true,
|
||||
'highlightEveryTerm' : false,
|
||||
'mode' : 'static',
|
||||
'liveDescription' : '*',
|
||||
'liveContent' : '*',
|
||||
'contentLocation' : 'tipuesearch/tipuesearch_content.json',
|
||||
'debug' : false
|
||||
|
||||
}, options);
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
var tipuesearch_in = {
|
||||
pages: []
|
||||
};
|
||||
$.ajaxSetup({
|
||||
async: false
|
||||
});
|
||||
var tipuesearch_t_c = 0;
|
||||
|
||||
if (set.mode == 'live')
|
||||
{
|
||||
for (var i = 0; i < tipuesearch_pages.length; i++)
|
||||
{
|
||||
$.get(tipuesearch_pages[i])
|
||||
.done(function(html)
|
||||
{
|
||||
var cont = $(set.liveContent, html).text();
|
||||
cont = cont.replace(/\s+/g, ' ');
|
||||
var desc = $(set.liveDescription, html).text();
|
||||
desc = desc.replace(/\s+/g, ' ');
|
||||
|
||||
var t_1 = html.toLowerCase().indexOf('<title>');
|
||||
var t_2 = html.toLowerCase().indexOf('</title>', t_1 + 7);
|
||||
if (t_1 != -1 && t_2 != -1)
|
||||
{
|
||||
var tit = html.slice(t_1 + 7, t_2);
|
||||
}
|
||||
else
|
||||
{
|
||||
var tit = tipuesearch_string_1;
|
||||
}
|
||||
|
||||
tipuesearch_in.pages.push(
|
||||
{
|
||||
"title": tit,
|
||||
"text": desc,
|
||||
"tags": cont,
|
||||
"url": tipuesearch_pages[i]
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (set.mode == 'json')
|
||||
{
|
||||
$.getJSON(set.contentLocation)
|
||||
.done(function(json)
|
||||
{
|
||||
tipuesearch_in = $.extend({}, json);
|
||||
});
|
||||
}
|
||||
|
||||
if (set.mode == 'static')
|
||||
{
|
||||
tipuesearch_in = $.extend({}, tipuesearch);
|
||||
}
|
||||
|
||||
var tipue_search_w = '';
|
||||
if (set.newWindow)
|
||||
{
|
||||
tipue_search_w = ' target="_blank"';
|
||||
}
|
||||
|
||||
function getURLP(name)
|
||||
{
|
||||
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20')) || null;
|
||||
}
|
||||
if (getURLP('q'))
|
||||
{
|
||||
$('#tipue_search_input').val(getURLP('q'));
|
||||
getTipueSearch(0, true);
|
||||
}
|
||||
|
||||
$(this).keyup(function(event)
|
||||
{
|
||||
if(event.keyCode == '13')
|
||||
{
|
||||
getTipueSearch(0, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getTipueSearch(start, replace)
|
||||
{
|
||||
$('#tipue_search_content').hide();
|
||||
$('#tipue_search_content').html('<div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div>');
|
||||
$('#tipue_search_content').show();
|
||||
|
||||
var out = '';
|
||||
var results = '';
|
||||
var show_replace = false;
|
||||
var show_stop = false;
|
||||
var standard = true;
|
||||
var c = 0;
|
||||
found = [];
|
||||
|
||||
var d = $('#tipue_search_input').val().toLowerCase();
|
||||
d = $.trim(d);
|
||||
|
||||
if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$")))
|
||||
{
|
||||
standard = false;
|
||||
}
|
||||
|
||||
if (standard)
|
||||
{
|
||||
var d_w = d.split(' ');
|
||||
d = '';
|
||||
for (var i = 0; i < d_w.length; i++)
|
||||
{
|
||||
var a_w = true;
|
||||
for (var f = 0; f < tipuesearch_stop_words.length; f++)
|
||||
{
|
||||
if (d_w[i] == tipuesearch_stop_words[f])
|
||||
{
|
||||
a_w = false;
|
||||
show_stop = true;
|
||||
}
|
||||
}
|
||||
if (a_w)
|
||||
{
|
||||
d = d + ' ' + d_w[i];
|
||||
}
|
||||
}
|
||||
d = $.trim(d);
|
||||
d_w = d.split(' ');
|
||||
}
|
||||
else
|
||||
{
|
||||
d = d.substring(1, d.length - 1);
|
||||
}
|
||||
|
||||
if (d.length >= set.minimumLength)
|
||||
{
|
||||
if (standard)
|
||||
{
|
||||
if (replace)
|
||||
{
|
||||
var d_r = d;
|
||||
for (var i = 0; i < d_w.length; i++)
|
||||
{
|
||||
for (var f = 0; f < tipuesearch_replace.words.length; f++)
|
||||
{
|
||||
if (d_w[i] == tipuesearch_replace.words[f].word)
|
||||
{
|
||||
d = d.replace(d_w[i], tipuesearch_replace.words[f].replace_with);
|
||||
show_replace = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
d_w = d.split(' ');
|
||||
}
|
||||
|
||||
var d_t = d;
|
||||
for (var i = 0; i < d_w.length; i++)
|
||||
{
|
||||
for (var f = 0; f < tipuesearch_stem.words.length; f++)
|
||||
{
|
||||
if (d_w[i] == tipuesearch_stem.words[f].word)
|
||||
{
|
||||
d_t = d_t + ' ' + tipuesearch_stem.words[f].stem;
|
||||
}
|
||||
}
|
||||
}
|
||||
d_w = d_t.split(' ');
|
||||
|
||||
for (var i = 0; i < tipuesearch_in.pages.length; i++)
|
||||
{
|
||||
var score = 0;
|
||||
var s_t = tipuesearch_in.pages[i].text;
|
||||
for (var f = 0; f < d_w.length; f++)
|
||||
{
|
||||
var pat = new RegExp(d_w[f], 'gi');
|
||||
if (tipuesearch_in.pages[i].title.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].title.match(pat).length;
|
||||
score += (20 * m_c);
|
||||
}
|
||||
if (tipuesearch_in.pages[i].text.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].text.match(pat).length;
|
||||
score += (20 * m_c);
|
||||
}
|
||||
|
||||
if (set.highlightTerms)
|
||||
{
|
||||
if (set.highlightEveryTerm)
|
||||
{
|
||||
var patr = new RegExp('(' + d_w[f] + ')', 'gi');
|
||||
}
|
||||
else
|
||||
{
|
||||
var patr = new RegExp('(' + d_w[f] + ')', 'i');
|
||||
}
|
||||
s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>");
|
||||
}
|
||||
|
||||
if (tipuesearch_in.pages[i].tags.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].tags.match(pat).length;
|
||||
score += (10 * m_c);
|
||||
}
|
||||
|
||||
if (tipuesearch_in.pages[i].url.search(pat) != -1)
|
||||
{
|
||||
score += 20;
|
||||
}
|
||||
|
||||
if (score != 0)
|
||||
{
|
||||
for (var e = 0; e < tipuesearch_weight.weight.length; e++)
|
||||
{
|
||||
if (tipuesearch_in.pages[i].url == tipuesearch_weight.weight[e].url)
|
||||
{
|
||||
score += tipuesearch_weight.weight[e].score;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (d_w[f].match('^-'))
|
||||
{
|
||||
pat = new RegExp(d_w[f].substring(1), 'i');
|
||||
if (tipuesearch_in.pages[i].title.search(pat) != -1 || tipuesearch_in.pages[i].text.search(pat) != -1 || tipuesearch_in.pages[i].tags.search(pat) != -1)
|
||||
{
|
||||
score = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (score != 0)
|
||||
{
|
||||
found.push(
|
||||
{
|
||||
"score": score,
|
||||
"title": tipuesearch_in.pages[i].title,
|
||||
"desc": s_t,
|
||||
"url": tipuesearch_in.pages[i].url
|
||||
});
|
||||
c++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i = 0; i < tipuesearch_in.pages.length; i++)
|
||||
{
|
||||
var score = 0;
|
||||
var s_t = tipuesearch_in.pages[i].text;
|
||||
var pat = new RegExp(d, 'gi');
|
||||
if (tipuesearch_in.pages[i].title.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].title.match(pat).length;
|
||||
score += (20 * m_c);
|
||||
}
|
||||
if (tipuesearch_in.pages[i].text.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].text.match(pat).length;
|
||||
score += (20 * m_c);
|
||||
}
|
||||
|
||||
if (set.highlightTerms)
|
||||
{
|
||||
if (set.highlightEveryTerm)
|
||||
{
|
||||
var patr = new RegExp('(' + d + ')', 'gi');
|
||||
}
|
||||
else
|
||||
{
|
||||
var patr = new RegExp('(' + d + ')', 'i');
|
||||
}
|
||||
s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>");
|
||||
}
|
||||
|
||||
if (tipuesearch_in.pages[i].tags.search(pat) != -1)
|
||||
{
|
||||
var m_c = tipuesearch_in.pages[i].tags.match(pat).length;
|
||||
score += (10 * m_c);
|
||||
}
|
||||
|
||||
if (tipuesearch_in.pages[i].url.search(pat) != -1)
|
||||
{
|
||||
score += 20;
|
||||
}
|
||||
|
||||
if (score != 0)
|
||||
{
|
||||
for (var e = 0; e < tipuesearch_weight.weight.length; e++)
|
||||
{
|
||||
if (tipuesearch_in.pages[i].url == tipuesearch_weight.weight[e].url)
|
||||
{
|
||||
score += tipuesearch_weight.weight[e].score;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (score != 0)
|
||||
{
|
||||
found.push(
|
||||
{
|
||||
"score": score,
|
||||
"title": tipuesearch_in.pages[i].title,
|
||||
"desc": s_t,
|
||||
"url": tipuesearch_in.pages[i].url
|
||||
});
|
||||
c++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (c != 0)
|
||||
{
|
||||
if (set.showTitleCount && tipuesearch_t_c == 0)
|
||||
{
|
||||
var title = document.title;
|
||||
document.title = '(' + c + ') ' + title;
|
||||
tipuesearch_t_c++;
|
||||
}
|
||||
|
||||
if (show_replace == 1)
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_2 + ' ' + d + '. ' + tipuesearch_string_3 + ' <a id="tipue_search_replaced">' + d_r + '</a></div>';
|
||||
}
|
||||
if (c == 1)
|
||||
{
|
||||
out += '<div id="tipue_search_results_count">' + tipuesearch_string_4 + '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
c_c = c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
out += '<div id="tipue_search_results_count">' + c_c + ' ' + tipuesearch_string_5 + '</div>';
|
||||
}
|
||||
|
||||
found.sort(function(a, b) { return b.score - a.score } );
|
||||
|
||||
var l_o = 0;
|
||||
for (var i = 0; i < found.length; i++)
|
||||
{
|
||||
if (l_o >= start && l_o < set.show + start)
|
||||
{
|
||||
out += '<div class="tipue_search_content_title"><a href="' + found[i].url + '"' + tipue_search_w + '>' + found[i].title + '</a></div>';
|
||||
|
||||
if (set.debug)
|
||||
{
|
||||
out += '<div class="tipue_search_content_debug">Score: ' + found[i].score + '</div>';
|
||||
}
|
||||
|
||||
if (set.showURL)
|
||||
{
|
||||
var s_u = found[i].url.toLowerCase();
|
||||
if(s_u.indexOf('http://') == 0)
|
||||
{
|
||||
s_u = s_u.slice(7);
|
||||
}
|
||||
out += '<div class="tipue_search_content_url"><a href="' + found[i].url + '"' + tipue_search_w + '>' + s_u + '</a></div>';
|
||||
}
|
||||
|
||||
if (found[i].desc)
|
||||
{
|
||||
var t = found[i].desc;
|
||||
var t_d = '';
|
||||
var t_w = t.split(' ');
|
||||
if (t_w.length < set.descriptiveWords)
|
||||
{
|
||||
t_d = t;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var f = 0; f < set.descriptiveWords; f++)
|
||||
{
|
||||
t_d += t_w[f] + ' ';
|
||||
}
|
||||
}
|
||||
t_d = $.trim(t_d);
|
||||
if (t_d.charAt(t_d.length - 1) != '.')
|
||||
{
|
||||
t_d += ' ...';
|
||||
}
|
||||
out += '<div class="tipue_search_content_text">' + t_d + '</div>';
|
||||
}
|
||||
}
|
||||
l_o++;
|
||||
}
|
||||
|
||||
if (c > set.show)
|
||||
{
|
||||
var pages = Math.ceil(c / set.show);
|
||||
var page = (start / set.show);
|
||||
out += '<div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';
|
||||
|
||||
if (start > 0)
|
||||
{
|
||||
out += '<li><a class="tipue_search_foot_box" id="' + (start - set.show) + '_' + replace + '">' + tipuesearch_string_6 + '</a></li>';
|
||||
}
|
||||
|
||||
if (page <= 2)
|
||||
{
|
||||
var p_b = pages;
|
||||
if (pages > 3)
|
||||
{
|
||||
p_b = 3;
|
||||
}
|
||||
for (var f = 0; f < p_b; f++)
|
||||
{
|
||||
if (f == page)
|
||||
{
|
||||
out += '<li class="current">' + (f + 1) + '</li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
out += '<li><a class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var p_b = page + 2;
|
||||
if (p_b > pages)
|
||||
{
|
||||
p_b = pages;
|
||||
}
|
||||
for (var f = page - 1; f < p_b; f++)
|
||||
{
|
||||
if (f == page)
|
||||
{
|
||||
out += '<li class="current">' + (f + 1) + '</li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
out += '<li><a class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (page + 1 != pages)
|
||||
{
|
||||
out += '<li><a class="tipue_search_foot_box" id="' + (start + set.show) + '_' + replace + '">' + tipuesearch_string_7 + '</a></li>';
|
||||
}
|
||||
|
||||
out += '</ul></div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_8 + '</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (show_stop)
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_8 + '. ' + tipuesearch_string_9 + '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_10 + '</div>';
|
||||
if (set.minimumLength == 1)
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_11 + '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
out += '<div id="tipue_search_warning">' + tipuesearch_string_12 + ' ' + set.minimumLength + ' ' + tipuesearch_string_13 + '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#tipue_search_content').hide();
|
||||
$('#tipue_search_content').html(out);
|
||||
$('#tipue_search_content').slideDown(200);
|
||||
|
||||
$('#tipue_search_replaced').click(function()
|
||||
{
|
||||
getTipueSearch(0, false);
|
||||
});
|
||||
|
||||
$('.tipue_search_foot_box').click(function()
|
||||
{
|
||||
var id_v = $(this).attr('id');
|
||||
var id_a = id_v.split('_');
|
||||
|
||||
getTipueSearch(parseInt(id_a[0]), id_a[1]);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,155 @@
|
|||
(function($){$.fn.tipuesearch=function(options){var set=$.extend({'show':7,'newWindow':false,'showURL':true,'showTitleCount':true,'minimumLength':3,'descriptiveWords':25,'highlightTerms':true,'highlightEveryTerm':false,'mode':'static','liveDescription':'*','liveContent':'*','contentLocation':'tipuesearch/tipuesearch_content.json','debug':false},options);return this.each(function(){var tipuesearch_in={pages:[]};$.ajaxSetup({async:false});var tipuesearch_t_c=0;if(set.mode=='live')
|
||||
{for(var i=0;i<tipuesearch_pages.length;i++)
|
||||
{$.get(tipuesearch_pages[i]).done(function(html)
|
||||
{var cont=$(set.liveContent,html).text();cont=cont.replace(/\s+/g,' ');var desc=$(set.liveDescription,html).text();desc=desc.replace(/\s+/g,' ');var t_1=html.toLowerCase().indexOf('<title>');var t_2=html.toLowerCase().indexOf('</title>',t_1+7);if(t_1!=-1&&t_2!=-1)
|
||||
{var tit=html.slice(t_1+7,t_2);}
|
||||
else
|
||||
{var tit=tipuesearch_string_1;}
|
||||
tipuesearch_in.pages.push({"title":tit,"text":desc,"tags":cont,"url":tipuesearch_pages[i]});});}}
|
||||
if(set.mode=='json')
|
||||
{$.getJSON(set.contentLocation).done(function(json)
|
||||
{tipuesearch_in=$.extend({},json);});}
|
||||
if(set.mode=='static')
|
||||
{tipuesearch_in=$.extend({},tipuesearch);}
|
||||
var tipue_search_w='';if(set.newWindow)
|
||||
{tipue_search_w=' target="_blank"';}
|
||||
function getURLP(name)
|
||||
{return decodeURIComponent((new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g,'%20'))||null;}
|
||||
if(getURLP('q'))
|
||||
{$('#tipue_search_input').val(getURLP('q'));getTipueSearch(0,true);}
|
||||
$(this).keyup(function(event)
|
||||
{if(event.keyCode=='13')
|
||||
{getTipueSearch(0,true);}});function getTipueSearch(start,replace)
|
||||
{$('#tipue_search_content').hide();$('#tipue_search_content').html('<div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div>');$('#tipue_search_content').show();var out='';var results='';var show_replace=false;var show_stop=false;var standard=true;var c=0;found=[];var d=$('#tipue_search_input').val().toLowerCase();d=$.trim(d);if((d.match("^\"")&&d.match("\"$"))||(d.match("^'")&&d.match("'$")))
|
||||
{standard=false;}
|
||||
if(standard)
|
||||
{var d_w=d.split(' ');d='';for(var i=0;i<d_w.length;i++)
|
||||
{var a_w=true;for(var f=0;f<tipuesearch_stop_words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_stop_words[f])
|
||||
{a_w=false;show_stop=true;}}
|
||||
if(a_w)
|
||||
{d=d+' '+d_w[i];}}
|
||||
d=$.trim(d);d_w=d.split(' ');}
|
||||
else
|
||||
{d=d.substring(1,d.length-1);}
|
||||
if(d.length>=set.minimumLength)
|
||||
{if(standard)
|
||||
{if(replace)
|
||||
{var d_r=d;for(var i=0;i<d_w.length;i++)
|
||||
{for(var f=0;f<tipuesearch_replace.words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_replace.words[f].word)
|
||||
{d=d.replace(d_w[i],tipuesearch_replace.words[f].replace_with);show_replace=true;}}}
|
||||
d_w=d.split(' ');}
|
||||
var d_t=d;for(var i=0;i<d_w.length;i++)
|
||||
{for(var f=0;f<tipuesearch_stem.words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_stem.words[f].word)
|
||||
{d_t=d_t+' '+tipuesearch_stem.words[f].stem;}}}
|
||||
d_w=d_t.split(' ');for(var i=0;i<tipuesearch_in.pages.length;i++)
|
||||
{var score=0;var s_t=tipuesearch_in.pages[i].text;for(var f=0;f<d_w.length;f++)
|
||||
{var pat=new RegExp(d_w[f],'gi');if(tipuesearch_in.pages[i].title.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].title.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].text.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].text.match(pat).length;score+=(20*m_c);}
|
||||
if(set.highlightTerms)
|
||||
{if(set.highlightEveryTerm)
|
||||
{var patr=new RegExp('('+d_w[f]+')','gi');}
|
||||
else
|
||||
{var patr=new RegExp('('+d_w[f]+')','i');}
|
||||
s_t=s_t.replace(patr,"<span class=\"h01\">$1</span>");}
|
||||
if(tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);}
|
||||
if(tipuesearch_in.pages[i].url.search(pat)!=-1)
|
||||
{score+=20;}
|
||||
if(score!=0)
|
||||
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
|
||||
{if(tipuesearch_in.pages[i].url==tipuesearch_weight.weight[e].url)
|
||||
{score+=tipuesearch_weight.weight[e].score;}}}
|
||||
if(d_w[f].match('^-'))
|
||||
{pat=new RegExp(d_w[f].substring(1),'i');if(tipuesearch_in.pages[i].title.search(pat)!=-1||tipuesearch_in.pages[i].text.search(pat)!=-1||tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{score=0;}}}
|
||||
if(score!=0)
|
||||
{found.push({"score":score,"title":tipuesearch_in.pages[i].title,"desc":s_t,"url":tipuesearch_in.pages[i].url});c++;}}}
|
||||
else
|
||||
{for(var i=0;i<tipuesearch_in.pages.length;i++)
|
||||
{var score=0;var s_t=tipuesearch_in.pages[i].text;var pat=new RegExp(d,'gi');if(tipuesearch_in.pages[i].title.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].title.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].text.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].text.match(pat).length;score+=(20*m_c);}
|
||||
if(set.highlightTerms)
|
||||
{if(set.highlightEveryTerm)
|
||||
{var patr=new RegExp('('+d+')','gi');}
|
||||
else
|
||||
{var patr=new RegExp('('+d+')','i');}
|
||||
s_t=s_t.replace(patr,"<span class=\"h01\">$1</span>");}
|
||||
if(tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);}
|
||||
if(tipuesearch_in.pages[i].url.search(pat)!=-1)
|
||||
{score+=20;}
|
||||
if(score!=0)
|
||||
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
|
||||
{if(tipuesearch_in.pages[i].url==tipuesearch_weight.weight[e].url)
|
||||
{score+=tipuesearch_weight.weight[e].score;}}}
|
||||
if(score!=0)
|
||||
{found.push({"score":score,"title":tipuesearch_in.pages[i].title,"desc":s_t,"url":tipuesearch_in.pages[i].url});c++;}}}
|
||||
if(c!=0)
|
||||
{if(set.showTitleCount&&tipuesearch_t_c==0)
|
||||
{var title=document.title;document.title='('+c+') '+title;tipuesearch_t_c++;}
|
||||
if(show_replace==1)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_2+' '+d+'. '+tipuesearch_string_3+' <a id="tipue_search_replaced">'+d_r+'</a></div>';}
|
||||
if(c==1)
|
||||
{out+='<div id="tipue_search_results_count">'+tipuesearch_string_4+'</div>';}
|
||||
else
|
||||
{c_c=c.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");out+='<div id="tipue_search_results_count">'+c_c+' '+tipuesearch_string_5+'</div>';}
|
||||
found.sort(function(a,b){return b.score-a.score});var l_o=0;for(var i=0;i<found.length;i++)
|
||||
{if(l_o>=start&&l_o<set.show+start)
|
||||
{out+='<div class="tipue_search_content_title"><a href="'+found[i].url+'"'+tipue_search_w+'>'+found[i].title+'</a></div>';if(set.debug)
|
||||
{out+='<div class="tipue_search_content_debug">Score: '+found[i].score+'</div>';}
|
||||
if(set.showURL)
|
||||
{var s_u=found[i].url.toLowerCase();if(s_u.indexOf('http://')==0)
|
||||
{s_u=s_u.slice(7);}
|
||||
out+='<div class="tipue_search_content_url"><a href="'+found[i].url+'"'+tipue_search_w+'>'+s_u+'</a></div>';}
|
||||
if(found[i].desc)
|
||||
{var t=found[i].desc;var t_d='';var t_w=t.split(' ');if(t_w.length<set.descriptiveWords)
|
||||
{t_d=t;}
|
||||
else
|
||||
{for(var f=0;f<set.descriptiveWords;f++)
|
||||
{t_d+=t_w[f]+' ';}}
|
||||
t_d=$.trim(t_d);if(t_d.charAt(t_d.length-1)!='.')
|
||||
{t_d+=' ...';}
|
||||
out+='<div class="tipue_search_content_text">'+t_d+'</div>';}}
|
||||
l_o++;}
|
||||
if(c>set.show)
|
||||
{var pages=Math.ceil(c / set.show);var page=(start / set.show);out+='<div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';if(start>0)
|
||||
{out+='<li><a class="tipue_search_foot_box" id="'+(start-set.show)+'_'+replace+'">'+tipuesearch_string_6+'</a></li>';}
|
||||
if(page<=2)
|
||||
{var p_b=pages;if(pages>3)
|
||||
{p_b=3;}
|
||||
for(var f=0;f<p_b;f++)
|
||||
{if(f==page)
|
||||
{out+='<li class="current">'+(f+1)+'</li>';}
|
||||
else
|
||||
{out+='<li><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
|
||||
else
|
||||
{var p_b=page+2;if(p_b>pages)
|
||||
{p_b=pages;}
|
||||
for(var f=page-1;f<p_b;f++)
|
||||
{if(f==page)
|
||||
{out+='<li class="current">'+(f+1)+'</li>';}
|
||||
else
|
||||
{out+='<li><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
|
||||
if(page+1!=pages)
|
||||
{out+='<li><a class="tipue_search_foot_box" id="'+(start+set.show)+'_'+replace+'">'+tipuesearch_string_7+'</a></li>';}
|
||||
out+='</ul></div>';}}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_8+'</div>';}}
|
||||
else
|
||||
{if(show_stop)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_8+'. '+tipuesearch_string_9+'</div>';}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_10+'</div>';if(set.minimumLength==1)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_11+'</div>';}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_12+' '+set.minimumLength+' '+tipuesearch_string_13+'</div>';}}}
|
||||
$('#tipue_search_content').hide();$('#tipue_search_content').html(out);$('#tipue_search_content').slideDown(200);$('#tipue_search_replaced').click(function()
|
||||
{getTipueSearch(0,false);});$('.tipue_search_foot_box').click(function()
|
||||
{var id_v=$(this).attr('id');var id_a=id_v.split('_');getTipueSearch(parseInt(id_a[0]),id_a[1]);});}});};})(jQuery);
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
/*
|
||||
Tipue Search 5.0
|
||||
Copyright (c) 2015 Tipue
|
||||
Tipue Search is released under the MIT License
|
||||
http://www.tipue.com/search
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Stop words
|
||||
Stop words list from http://www.ranks.nl/stopwords
|
||||
*/
|
||||
|
||||
var tipuesearch_stop_words = ["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"];
|
||||
|
||||
|
||||
// Word replace
|
||||
|
||||
var tipuesearch_replace = {'words': [
|
||||
{'word': 'tipua', 'replace_with': 'tipue'},
|
||||
{'word': 'javscript', 'replace_with': 'javascript'},
|
||||
{'word': 'jqeury', 'replace_with': 'jquery'}
|
||||
]};
|
||||
|
||||
|
||||
// Weighting
|
||||
|
||||
var tipuesearch_weight = {'weight': [
|
||||
{'url': 'http://www.tipue.com', 'score': 200},
|
||||
{'url': 'http://www.tipue.com/search', 'score': 100},
|
||||
{'url': 'http://www.tipue.com/about', 'score': 100}
|
||||
]};
|
||||
|
||||
|
||||
// Stemming
|
||||
|
||||
var tipuesearch_stem = {'words': [
|
||||
{'word': 'e-mail', 'stem': 'email'},
|
||||
{'word': 'javascript', 'stem': 'jquery'},
|
||||
{'word': 'javascript', 'stem': 'js'}
|
||||
]};
|
||||
|
||||
|
||||
// Internal strings
|
||||
|
||||
var tipuesearch_string_1 = 'No title';
|
||||
var tipuesearch_string_2 = 'Showing results for';
|
||||
var tipuesearch_string_3 = 'Search instead for';
|
||||
var tipuesearch_string_4 = '1 result';
|
||||
var tipuesearch_string_5 = 'results';
|
||||
var tipuesearch_string_6 = 'Prev';
|
||||
var tipuesearch_string_7 = 'Next';
|
||||
var tipuesearch_string_8 = 'Nothing found';
|
||||
var tipuesearch_string_9 = 'Common words are largely ignored';
|
||||
var tipuesearch_string_10 = 'Search too short';
|
||||
var tipuesearch_string_11 = 'Should be one character or more';
|
||||
var tipuesearch_string_12 = 'Should be';
|
||||
var tipuesearch_string_13 = 'characters or more';
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>Parcourir les archives</h2>
|
||||
|
||||
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
||||
<h2 id="{{year}}">{{year}}</h2>
|
||||
<ul class="post-list">
|
||||
{% for article in date_year %}
|
||||
<li>
|
||||
<a href="/{{ article.url }}" rel="bookmark" title="{{ article.title|striptags }}">{{ article.title }}</a>
|
||||
<time datetime="{{ article.date.isoformat() }}" pubdate>{{ article.locale_date }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
|
@ -0,0 +1,35 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ article.title|striptags }}{% endblock %}
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
{% include "article_header.html" %}
|
||||
</header>
|
||||
|
||||
<div class="body">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
|
||||
{% if article.prev_article %}
|
||||
<nav class="older">
|
||||
<a href="{{ SITEURL }}/{{ article.prev_article.url}}">
|
||||
<span class="lpin"></span>
|
||||
{{ article.prev_article.title }}
|
||||
</a>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% if article.next_article %}
|
||||
<nav class="newer">
|
||||
<a href="{{ SITEURL }}/{{ article.next_article.url}}">
|
||||
{{ article.next_article.title }}
|
||||
<span class="rpin"></span>
|
||||
</a>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
{% if DISQUS_SITENAME %}
|
||||
{% include "disqus.html" %}
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endblock %}
|
|
@ -0,0 +1,33 @@
|
|||
<h1><a href="/{{ article.url }}" rel="bookmark">
|
||||
{{ article.title|striptags }}
|
||||
</a></h1>
|
||||
{% if article.stats %}
|
||||
<span title="~{{ article.stats['wc'] }} words" id='stats'>~{{ article.stats['read_mins'] }} min de lecture</span> •
|
||||
{% endif %}
|
||||
<time datetime="{{ article.date }}" pubdate>Publié le
|
||||
<em>{{ article.locale_date }}</em>
|
||||
</time>
|
||||
{% if categories|length > 1 %}
|
||||
<span class="category">dans <a href="/{{ article.category.url }}">
|
||||
{{ article.category }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if article.translations %}
|
||||
| Traductions:
|
||||
{% for translation in article.translations %}
|
||||
<a href="/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if article.updated %}
|
||||
<time datetime="{{ article.updated }}" pubdate>Mis à jour le
|
||||
<em>{{ article.updated }}</em>
|
||||
</time>
|
||||
{% endif %}
|
||||
{% if article.tags %}
|
||||
<ul class="tags">
|
||||
Tags:
|
||||
{% for tag in article.tags %}
|
||||
<li><a href="/{{ tag.url }}">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
|
@ -0,0 +1,2 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} - Publications par «{{ author }}»{% endblock %}
|
|
@ -0,0 +1,65 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="-1" />
|
||||
<link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/theme/css/friendly.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/theme/css/print.css" type="text/css" media="print" />
|
||||
<link rel="stylesheet" href="/theme/tipuesearch/tipuesearch.css" type="text/css" media="screen">
|
||||
<link rel="stylesheet" href="/theme/css/fork-awesome.min.css" type="text/css"/>
|
||||
{% if SITE_ICON %}
|
||||
<link rel="shortcut icon" href="{{ SITE_ICON }}">
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1><a href="/" title="{{ SITESUBTITLE }}">{{ SITENAME }}</a></h1>
|
||||
<nav>
|
||||
{% for title, link in MENUITEMS %}
|
||||
<a href="{{ link }}">{{ title }}</a>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU -%}
|
||||
{% for cat, null in categories %}
|
||||
<a{% if cat == category %} class="active"{% endif %} href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU -%}
|
||||
{% for pg in pages %}
|
||||
<a{% if pg == page %} class="active"{% endif %} href="{{ SITEURL }}/{{ pg.url }}">{{ pg.title }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div id="main">
|
||||
{% block content %}{% endblock %}
|
||||
{% if PDF_PROCESSOR %}
|
||||
<a href="/pdf/{{ article.slug }}.pdf">PDF</a>
|
||||
{% endif %}
|
||||
{% if PRINT %}
|
||||
<a href="javascript:window.print();" title="Print">Print</a>
|
||||
{% endif %}
|
||||
{% block footnote %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
{% include "footer.html" %}
|
||||
</footer>
|
||||
|
||||
{% if JS_HTTPS %}
|
||||
{% include "js_https.html" %}
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Categories{% endblock %}
|
||||
|
||||
{% block resume %}{% endblock resume %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Catégories dans {{ SITENAME }}</h1>
|
||||
<ul>
|
||||
{% for category, publications in categories|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>
|
||||
{% block title %}
|
||||
{{ articles|length }} «{{ category }}»
|
||||
{% endblock %}
|
||||
</h2>
|
||||
<ul class="post-list">
|
||||
{% for article in dates %}
|
||||
<li>
|
||||
<a href="/{{ article.url }}">{{ article.title }}</a>
|
||||
<time>{{ article.locale_date }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>→ <a href="/categories.html">Parcourir les {{ categories|length }} categories</a></p>
|
||||
{% endblock content %}
|
|
@ -0,0 +1,32 @@
|
|||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
||||
|
||||
{% if article %}
|
||||
{% if not DISQUS_NO_ID %}
|
||||
var disqus_identifier = '{{ article.date|strftime('%Y-%m-') ~ article.slug if DISQUS_ID_PREFIX_SLUG else article.slug }}';
|
||||
{% endif %}
|
||||
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
|
||||
{% elif page %}
|
||||
{% if not DISQUS_NO_ID %}
|
||||
var disqus_identifier = 'page-{{ page.slug }}';
|
||||
{% endif %}
|
||||
var disqus_url = '{{ SITEURL }}/{{ page.url }}';
|
||||
{% endif %}
|
||||
|
||||
var disqus_config = function () {
|
||||
this.language = "{{ DEFAULT_LANG }}";
|
||||
this.page.url = disqus_url;
|
||||
this.page.identifier = disqus_identifier;
|
||||
};
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
@ -0,0 +1,14 @@
|
|||
{% if SOCIAL %}
|
||||
{% include 'social.html' %}
|
||||
{% endif %}
|
||||
|
||||
<a id="cc-logo" rel="licence" title="Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International (CC BY-NC-SA 4.0)" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.fr" target="_blank"></a>
|
||||
|
||||
Powered by <a href="https://blog.getpelican.com"> Pelican</a> using <a href="https://gitlab.com/axil/pelican-uberspot">uberspot theme</a>
|
||||
•
|
||||
Background image from <a href="https://www.toptal.com/designers/subtlepatterns/">Subtle Patterns</a>
|
||||
|
||||
{% if SITE_SOURCE %}
|
||||
•
|
||||
<a href="{{ SITE_SOURCE }}" title="Source code">Source code</a>
|
||||
{% endif %}
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Notes récentes</h2>
|
||||
<ul class="post-list">
|
||||
|
||||
{% if articles %}
|
||||
{% for article in dates[:10] %}
|
||||
<li>
|
||||
<a href="/{{ article.url }}">{{ article.title }}</a>
|
||||
<time>{{ article.locale_date }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
<p>→ <a href="/archives.html">Parcourir les {{ articles|length }} notes</a></p>
|
||||
{% endblock content %}
|
|
@ -0,0 +1,3 @@
|
|||
{% block script %}
|
||||
<script src="http://code.jquery.com/jquery.min.js"></script>
|
||||
{% endblock script %}
|
|
@ -0,0 +1,9 @@
|
|||
{% if DOMAIN %}
|
||||
<script type="text/javascript">
|
||||
// Redirect to https with javascript
|
||||
var host = "{{ DOMAIN }}";
|
||||
if ((host == window.location.host) && (window.location.protocol != 'https:')) {
|
||||
window.location = window.location.toString().replace(/^http:/, "https:");
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title|striptags }}{% endblock %}
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href="/{{ page.url }}" rel="bookmark">{{ page.title|striptags }}</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="body">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
|
@ -0,0 +1,15 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<span class="paginator">
|
||||
{% if articles_page.has_previous() %}
|
||||
{% if articles_page.previous_page_number() == 1 %}
|
||||
<a href="/{{ page_name }}.html">«</a>
|
||||
{% else %}
|
||||
<a href="/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
|
||||
{% if articles_page.has_next() %}
|
||||
<a href="/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
|
@ -0,0 +1,17 @@
|
|||
{% if MATOMO_URL and MATOMO_SITE_ID %}
|
||||
<!-- Matomo -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//{{ MATOMO_URL }}/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(["setSiteId", "{{ MATOMO_SITE_ID }}"]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
{% endif %}
|
|
@ -0,0 +1,30 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
Search - {{ SITENAME|striptags }}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js">
|
||||
</script>
|
||||
<script type="text/javascript" src="/theme/tipuesearch/tipuesearch_set.js"></script>
|
||||
<script type="text/javascript" src="/theme/tipuesearch/tipuesearch.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tipue_search_input').tipuesearch({
|
||||
'show': 10,
|
||||
'mode': 'json',
|
||||
'contentLocation': '/tipuesearch_content.json'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<section id="content" class="body">
|
||||
|
||||
<div align="center"><input type="text" size="60" id="tipue_search_input">
|
||||
<input type="button" id="tipue_search_button" value="Search"></div>
|
||||
<div id="tipue_search_content"></div>
|
||||
|
||||
</section>
|
||||
{% endblock content %}
|
|
@ -0,0 +1,10 @@
|
|||
<center>
|
||||
<div class="social-network-icons">
|
||||
{% for title, link in SOCIAL %}
|
||||
<a href="{{ link }}" target="_blank" title="{{ title }}">
|
||||
<i class="fa fa-{{ title|lower }} fa-2x"></i>
|
||||
</a>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</center>
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>
|
||||
{% block title %}
|
||||
{{ articles|length }} publications taggées «{{ tag }}»
|
||||
{% endblock %}
|
||||
</h2>
|
||||
<ul class="post-list">
|
||||
{% for article in dates %}
|
||||
<li>
|
||||
<a href="/{{ article.url }}">{{ article.title }}</a>
|
||||
<time>{{ article.locale_date }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>→ <a href="{{ SITEURL }}/{{ TAGS_URL }}">Parcourir les {{ tags|length }} tags</a></p>
|
||||
{% endblock content %}
|
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Tags{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section>
|
||||
<h2>Liste des tags</h2>
|
||||
{<br/>
|
||||
{% for tag, publications in tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">'{{ tag }}'</a>: {{ publications|count }}{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
<br/>}
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
|
@ -0,0 +1,6 @@
|
|||
{% if article.translations %}
|
||||
Traductions:
|
||||
{% for translation in article.translations %}
|
||||
<a href="/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
After Width: | Height: | Size: 678 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 263 KiB |
After Width: | Height: | Size: 917 KiB |