mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
Remove jekyll files. Add rough Chinese translation.
This commit is contained in:
parent
e973882202
commit
99a8cd6555
15 changed files with 1188 additions and 632 deletions
1
CNAME
1
CNAME
|
@ -1 +0,0 @@
|
|||
www.sqlstyle.guide
|
2
Gemfile
2
Gemfile
|
@ -1,2 +0,0 @@
|
|||
source 'https://rubygems.org'
|
||||
gem 'github-pages'
|
48
README.md
48
README.md
|
@ -1,48 +0,0 @@
|
|||
# SQL style guide
|
||||
|
||||
**[Read the guide](http://www.sqlstyle.guide)**
|
||||
|
||||
---
|
||||
|
||||
## General
|
||||
|
||||
The guide is written in [Markdown][md-lang] and uses [Jekyll][jekyll] via
|
||||
[GitHub's Pages][gh-pages] facility to render itself upon pushing to the `gh-pages`
|
||||
branch.
|
||||
|
||||
## Sources
|
||||
|
||||
The markdown source for the guide can be found in [_includes/sqlstyle.guide.md][md]
|
||||
|
||||
## Installing for local development
|
||||
|
||||
There is a Gemfile supplied so you just need to follow the
|
||||
[GitHub Pages documentation][gh-pages-help] to install the dependencies.
|
||||
|
||||
To then run it locally `bundle exec jekyll serve`
|
||||
|
||||
## Projects known to be implementing the guide
|
||||
|
||||
If your project uses this styleguide and you'd like to be mentioned in this readme then
|
||||
please open a pull request adding it below in alphabetical order with a URL and short
|
||||
description.
|
||||
|
||||
* [Stock Talk](https://github.com/nigelgilbert/stock-talk) - a realtime dashboard that displays the stock data of the most Tweeted Nasdaq companies.
|
||||
|
||||
## Notable forks of the guide
|
||||
|
||||
These are based on, but deviate in some way from sqlstyle.guide.
|
||||
|
||||
If you have forked this styleguide and you'd like to be mentioned in this readme then
|
||||
please open a pull request adding it below in alphabetical order with a URL and short
|
||||
description of your deviance.
|
||||
|
||||
* [Lumos Labs](https://github.com/lumoslabs/sqlstyle.guide) - removed the river, Redshift, etc. [www](http://engineering.lumosity.com/sqlstyle.guide)
|
||||
|
||||
|
||||
[md-lang]: http://daringfireball.net/projects/markdown/
|
||||
[jekyll]: http://jekyllrb.com/
|
||||
[gh-pages]: https://pages.github.com/
|
||||
[md]: https://github.com/treffynnon/sqlstyle.guide/blob/gh-pages/_includes/sqlstyle.guide.md
|
||||
[gh-pages-help]: https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll
|
||||
|
17
_config.yml
17
_config.yml
|
@ -1,17 +0,0 @@
|
|||
name: SQL style guide by Simon Holywell
|
||||
description: A consistent code style guide for SQL to ensure legible and maintainable projects
|
||||
|
||||
ga_ua_code: UA-65071829-1
|
||||
|
||||
url: http://www.sqlstyle.guide
|
||||
domain: sqlstyle.guide
|
||||
port: 4040
|
||||
|
||||
markdown: kramdown
|
||||
permalink: pretty
|
||||
highlighter: rouge
|
||||
|
||||
kramdown:
|
||||
input: GFM
|
||||
hard_wrap: false
|
||||
toc_levels: "2,3"
|
6
_includes/anchor.min.js
vendored
6
_includes/anchor.min.js
vendored
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
* AnchorJS - v1.2.1 - 2015-07-02
|
||||
* https://github.com/bryanbraun/anchorjs
|
||||
* Copyright (c) 2015 Bryan Braun; Licensed MIT
|
||||
*/
|
||||
function AnchorJS(A){"use strict";this.options=A||{},this._applyRemainingDefaultOptions=function(A){this.options.icon=this.options.hasOwnProperty("icon")?A.icon:"",this.options.visible=this.options.hasOwnProperty("visible")?A.visible:"hover",this.options.placement=this.options.hasOwnProperty("placement")?A.placement:"right",this.options.class=this.options.hasOwnProperty("class")?A.class:""},this._applyRemainingDefaultOptions(A),this.add=function(A){var e,t,o,n,i,s,a,l,r,h,c,g;if(this._applyRemainingDefaultOptions(this.options),A){if("string"!=typeof A)throw new Error("The selector provided to AnchorJS was invalid.")}else A="h1, h2, h3, h4, h5, h6";if(e=document.querySelectorAll(A),0===e.length)return!1;for(this._addBaselineStyles(),t=document.querySelectorAll("[id]"),o=[].map.call(t,function(A){return A.id}),i=0;i<e.length;i++){if(e[i].hasAttribute("id"))n=e[i].getAttribute("id");else{s=e[i].textContent,a=s.replace(/[^\w\s-]/gi,"").replace(/\s+/g,"-").replace(/-{2,}/g,"-").substring(0,64).replace(/^-+|-+$/gm,"").toLowerCase(),h=a,r=0;do void 0!==l&&(h=a+"-"+r),l=o.indexOf(h),r+=1;while(-1!==l);l=void 0,o.push(h),e[i].setAttribute("id",h),n=h}c=n.replace(/-/g," "),g=document.createElement("a"),g.className="anchorjs-link "+this.options.class,g.href="#"+n,g.setAttribute("aria-label","Anchor link for: "+c),g.setAttribute("data-anchorjs-icon",this.options.icon),"always"===this.options.visible&&(g.style.opacity="1"),""===this.options.icon&&(g.style.fontFamily="anchorjs-icons",g.style.fontStyle="normal",g.style.fontVariant="normal",g.style.fontWeight="normal",g.style.lineHeight=1),"left"===this.options.placement?(g.style.position="absolute",g.style.marginLeft="-1em",g.style.paddingRight="0.5em",e[i].insertBefore(g,e[i].firstChild)):(g.style.paddingLeft="0.375em",e[i].appendChild(g))}return this},this.remove=function(A){for(var e,t=document.querySelectorAll(A),o=0;o<t.length;o++)e=t[o].querySelector(".anchorjs-link"),e&&t[o].removeChild(e);return this},this._addBaselineStyles=function(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style"),t=" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",o=" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",n=' @font-face { font-family: "anchorjs-icons"; font-style: normal; font-weight: normal; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQnLgEjIgYPAQYUFxYUBw4BIwciJicmND8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFA8BDgEjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAEAAAABAACiToc1Xw889QALBAAAAAAA0XnFFgAAAADRecUWAAAAAAJTAsAAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAlMAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAACAAAAAoAAMQAAAAAACgAUAB4AmgABAAAABQBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIABwCfAAEAAAAAAAMADgBLAAEAAAAAAAQADgC0AAEAAAAAAAUACwAqAAEAAAAAAAYADgB1AAEAAAAAAAoAGgDeAAMAAQQJAAEAHAAOAAMAAQQJAAIADgCmAAMAAQQJAAMAHABZAAMAAQQJAAQAHADCAAMAAQQJAAUAFgA1AAMAAQQJAAYAHACDAAMAAQQJAAoANAD4YW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQByYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("truetype"); }',i=" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }";e.className="anchorjs",e.appendChild(document.createTextNode("")),A=document.head.querySelector('[rel="stylesheet"], style'),void 0===A?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(t,e.sheet.cssRules.length),e.sheet.insertRule(o,e.sheet.cssRules.length),e.sheet.insertRule(i,e.sheet.cssRules.length),e.sheet.insertRule(n,e.sheet.cssRules.length)}}}var anchors=new AnchorJS;
|
|
@ -1,40 +0,0 @@
|
|||
<footer class="foot wrap">
|
||||
<hr/>
|
||||
<p>
|
||||
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">
|
||||
SQL style guide
|
||||
</span> by
|
||||
<a xmlns:cc="http://creativecommons.org/ns#"
|
||||
href="https://www.simonholywell.com/?utm_source=sqlstyle.guide&utm_medium=link&utm_campaign=footer-licence"
|
||||
property="cc:attributionName"
|
||||
rel="cc:attributionURL">
|
||||
Simon Holywell
|
||||
</a> is licensed under a
|
||||
<a rel="license"
|
||||
href="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
Creative CommonsAttribution-ShareAlike 4.0 International License</a>.
|
||||
<br />Based on a work at
|
||||
<a xmlns:dct="http://purl.org/dc/terms/"
|
||||
href="{{ site.url }}"
|
||||
rel="dct:source">
|
||||
{{ site.url }}</a>.
|
||||
</p>
|
||||
<div class="buttons">
|
||||
<ul class="quick-links">
|
||||
<li>
|
||||
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=treffynnon&repo={{ site.domain }}&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="112px" height="20px"></iframe>
|
||||
</li>
|
||||
<li>
|
||||
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=treffynnon&repo={{ site.domain }}&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="98px" height="20px"></iframe>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="quick-links">
|
||||
<li class="follow-btn">
|
||||
<a href="https://twitter.com/treffynnon" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @treffynnon</a>
|
||||
</li>
|
||||
<li class="tweet-btn">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}" data-text="SQL style guide by @treffynnon: {{ site.description }}" data-dnt="true">Tweet</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
|
@ -1,14 +0,0 @@
|
|||
<nav id="page-nav">
|
||||
<a href="#" id="to-top" class="toplink">↑</a>
|
||||
</nav>
|
||||
<header class="top">
|
||||
<div class="wrap">
|
||||
<h1 itemprop="name">SQL Style Guide</h1>
|
||||
<p class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">by
|
||||
<a href="https://www.simonholywell.com/?utm_source=sqlstyle.guide&utm_medium=link&utm_campaign=header" itemprop="url"><span itemprop="name">Simon Holywell</span></a> ·
|
||||
<a href="https://twitter.com/treffynnon">@Treffynnon</a>
|
||||
</p>
|
||||
<p class="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}" data-text="SQL style guide by @treffynnon: {{ site.description }}" data-size="large" data-dnt="true">Tweet</a>
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
|
||||
vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
|
||||
|
||||
*/
|
||||
|
||||
/*background color*/
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #1d1f21;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
/*selection color*/
|
||||
.hljs::selection,
|
||||
.hljs span::selection {
|
||||
background: #373b41;
|
||||
}
|
||||
|
||||
.hljs::-moz-selection,
|
||||
.hljs span::-moz-selection {
|
||||
background: #373b41;
|
||||
}
|
||||
|
||||
/*foreground color*/
|
||||
.hljs,
|
||||
.hljs-setting .hljs-value,
|
||||
.hljs-expression .hljs-variable,
|
||||
.hljs-expression .hljs-begin-block,
|
||||
.hljs-expression .hljs-end-block,
|
||||
.hljs-class .hljs-params,
|
||||
.hljs-function .hljs-params,
|
||||
.hljs-at_rule .hljs-preprocessor {
|
||||
color: #c5c8c6;
|
||||
}
|
||||
|
||||
/*color: fg_yellow*/
|
||||
.hljs-title,
|
||||
.hljs-function .hljs-title,
|
||||
.hljs-keyword .hljs-common,
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-decorator,
|
||||
.hljs-tag .hljs-title,
|
||||
.hljs-header,
|
||||
.hljs-sub,
|
||||
.hljs-function {
|
||||
color: #f0c674;
|
||||
}
|
||||
|
||||
/*color: fg_comment*/
|
||||
.hljs-comment,
|
||||
.hljs-output .hljs-value,
|
||||
.hljs-pi,
|
||||
.hljs-shebang,
|
||||
.hljs-doctype {
|
||||
color: #707880;
|
||||
}
|
||||
|
||||
/*color: fg_red*/
|
||||
.hljs-number,
|
||||
.hljs-symbol,
|
||||
.hljs-literal,
|
||||
.hljs-deletion,
|
||||
.hljs-link_url,
|
||||
.hljs-symbol .hljs-string,
|
||||
.hljs-argument,
|
||||
.hljs-hexcolor,
|
||||
.hljs-input .hljs-prompt,
|
||||
.hljs-char {
|
||||
color: #cc6666
|
||||
}
|
||||
|
||||
/*color: fg_green*/
|
||||
.hljs-string,
|
||||
.hljs-special,
|
||||
.hljs-doctag,
|
||||
.hljs-addition,
|
||||
.hljs-important,
|
||||
.hljs-tag .hljs-value,
|
||||
.hljs-at.rule .hljs-keyword,
|
||||
.hljs-regexp,
|
||||
.hljs-attr_selector {
|
||||
color: #b5bd68;
|
||||
}
|
||||
|
||||
/*color: fg_purple*/
|
||||
.hljs-variable,
|
||||
.hljs-property,
|
||||
.hljs-envar,
|
||||
.hljs-code,
|
||||
.hljs-expression,
|
||||
.hljs-localvars,
|
||||
.hljs-id,
|
||||
.hljs-variable .hljs-filter,
|
||||
.hljs-variable .hljs-filter .hljs-keyword,
|
||||
.hljs-template_tag .hljs-filter .hljs-keyword,
|
||||
.hljs-name {
|
||||
color: #b294bb;
|
||||
}
|
||||
|
||||
/*color: fg_blue*/
|
||||
.hljs-statement,
|
||||
.hljs-label,
|
||||
.hljs-keyword,
|
||||
.hljs-xmlDocTag,
|
||||
.hljs-function .hljs-keyword,
|
||||
.hljs-chunk,
|
||||
.hljs-cdata,
|
||||
.hljs-link_label,
|
||||
.hljs-bullet,
|
||||
.hljs-class .hljs-keyword,
|
||||
.hljs-smartquote,
|
||||
.hljs-method,
|
||||
.hljs-list .hljs-title,
|
||||
.hljs-tag {
|
||||
color: #81a2be;
|
||||
}
|
||||
|
||||
/*color: fg_aqua*/
|
||||
.hljs-pseudo,
|
||||
.hljs-exception,
|
||||
.hljs-annotation,
|
||||
.hljs-subst,
|
||||
.hljs-change,
|
||||
.hljs-cbracket,
|
||||
.hljs-operator,
|
||||
.hljs-horizontal_rule,
|
||||
.hljs-preprocessor .hljs-keyword,
|
||||
.hljs-typedef,
|
||||
.hljs-template_tag,
|
||||
.hljs-variable,
|
||||
.hljs-variable .hljs-filter .hljs-argument,
|
||||
.hljs-at_rule,
|
||||
.hljs-at_rule .hljs-string,
|
||||
.hljs-at_rule .hljs-keyword {
|
||||
color: #8abeb7;
|
||||
}
|
||||
|
||||
/*color: fg_orange*/
|
||||
.hljs-type,
|
||||
.hljs-typename,
|
||||
.hljs-inheritance .hljs-parent,
|
||||
.hljs-constant,
|
||||
.hljs-built_in,
|
||||
.hljs-setting,
|
||||
.hljs-structure,
|
||||
.hljs-link_reference,
|
||||
.hljs-attribute,
|
||||
.hljs-blockquote,
|
||||
.hljs-quoted,
|
||||
.hljs-class,
|
||||
.hljs-header {
|
||||
color: #de935f;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,57 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en-au">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<title property="og:title">{{ site.name }}</title>
|
||||
<link href="http://fonts.googleapis.com/css?family=PT+Sans|Roboto+Slab|Droid+Sans+Mono" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
<meta content="website" property="og:type">
|
||||
<meta content="{{ site.url }}" property="og:url">
|
||||
<meta content="{{ site.time | date_to_xmlschema }}" property="og:updated_time">
|
||||
<meta content="https://www.facebook.com/holywell" property="article:author">
|
||||
<meta content="https://www.facebook.com/holywell" property="article:publisher">
|
||||
<meta content="{{ site.time | date_to_xmlschema }}" property="article:modified_time">
|
||||
<meta content="" property="article:section">
|
||||
<meta content="{{ site.description }}" itemprop="description" name="description" property="og:description">
|
||||
<meta content="sql, style guide, code style guide, simon holywell, holywell" itemprop="keywords" name="keywords" property="article:tag">
|
||||
<meta content="summary" name="twitter:card">
|
||||
<meta content="{{ site.name }}" name="twitter:title">
|
||||
<meta content="{{ site.description }}" name="twitter:description">
|
||||
<meta content="@treffynnon" name="twitter:site">
|
||||
<meta content="@treffynnon" name="twitter:creator">
|
||||
<meta content="{{ site.domain }}" name="twitter:domain">
|
||||
|
||||
<link href="http://plus.google.com/+SimonHolywell" rel="author">
|
||||
|
||||
<link rel="canonical" href="{{ site.url }}">
|
||||
</head>
|
||||
<body itemscope itemtype="http://schema.org/TechArticle">
|
||||
<meta itemprop="wordCount" content="{{ content | number_of_words }}">
|
||||
<meta itemprop="about" content="{{ site.description }}">
|
||||
<meta itemprop="audience" content="SQL programmers">
|
||||
<meta itemprop="license" content="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<meta itemprop="version" content="1.0.0">
|
||||
<meta itemprop="proficiencyLevel" content="Beginer">
|
||||
<meta itemprop="dependencies" content="SQL knowledge">
|
||||
<meta itemprop="copyrightHolder" content="Simon Holywell">
|
||||
{% include head.html %}
|
||||
<main class="article-body wrap" id="content" itemprop="articleBody">
|
||||
{{ content }}
|
||||
</main>
|
||||
{% include foot.html %}
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="scripts.js"></script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', '{{ site.ga_ua_code }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
8
index.md
8
index.md
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
* TOC
|
||||
{:toc}
|
||||
|
||||
{% include sqlstyle.guide.md %}
|
85
scripts.js
85
scripts.js
|
@ -1,85 +0,0 @@
|
|||
---
|
||||
layout: nil
|
||||
---
|
||||
|
||||
{% include highlight.pack.js %}
|
||||
hljs.initHighlightingOnLoad();
|
||||
|
||||
{% include anchor.min.js %}
|
||||
anchors.add('h2,h3,h4,h5,h6');
|
||||
|
||||
/*
|
||||
* ScrollTo code
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
$('a[href^="#"]').on('click',function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var target = this.hash;
|
||||
var dest = 0;
|
||||
if(target) {
|
||||
var $target = $(target);
|
||||
if($target.length) {
|
||||
dest = $target.offset().top;
|
||||
}
|
||||
}
|
||||
|
||||
$('html, body').stop().animate({
|
||||
'scrollTop': dest
|
||||
}, 900, 'swing', function () {
|
||||
window.location.hash = target;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// http://exisweb.net/link-tracking-universal-analytics
|
||||
(function trackOutbounds() {
|
||||
var hitCallbackHandler = function(url,win) {
|
||||
if (win) {
|
||||
window.open(url, win);
|
||||
} else {
|
||||
window.location.href = url;
|
||||
}
|
||||
};
|
||||
|
||||
var addEvent = function(el, eventName, handler) {
|
||||
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(eventName, handler);
|
||||
} else {
|
||||
el.attachEvent('on' + eventName, function(){
|
||||
handler.call(el);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if (document.getElementsByTagName) {
|
||||
var el = document.getElementsByTagName('a');
|
||||
var getDomain = document.domain.split('.').reverse()[1] + '.' + document.domain.split('.').reverse()[0];
|
||||
|
||||
// Look thru each a element
|
||||
for (var i=0; i < el.length;i++) {
|
||||
|
||||
// Extract it's href attribute
|
||||
var href = (typeof(el[i].getAttribute('href')) == 'string' ) ? el[i].getAttribute('href') : '';
|
||||
|
||||
// Query the href for the top level domain (xxxxx.com)
|
||||
var myDomain = href.match(getDomain);
|
||||
|
||||
// If link is outbound and is not to this domain
|
||||
if ((href.match(/^(https?:|\/\/)/i) && !myDomain) || href.match(/^mailto\:/i)) {
|
||||
|
||||
// Add an event to click
|
||||
addEvent(el[i],'click', function(e) {
|
||||
var url = this.getAttribute('href'), win = (typeof(this.getAttribute('target')) == 'string') ? this.getAttribute('target') : '';
|
||||
// Log even to Analytics, once done, go to the link
|
||||
ga('send', 'event', 'outbound', 'click', url,
|
||||
{'hitCallback': hitCallbackHandler(url,win)},
|
||||
{'nonInteraction': 1}
|
||||
);
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
1188
sqlstyle.guide.zh.md
Normal file
1188
sqlstyle.guide.zh.md
Normal file
File diff suppressed because it is too large
Load diff
189
style.css
189
style.css
|
@ -1,189 +0,0 @@
|
|||
---
|
||||
layout: nil
|
||||
---
|
||||
|
||||
{% assign primary_colour = '#DE1B1B' %}
|
||||
|
||||
/*
|
||||
|
||||
Begin styles from codeguide.co by @mdo
|
||||
|
||||
*/
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
@media (min-width: 48em) {
|
||||
html {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font: 1rem/1.5 "PT Sans", sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
End styles from codeguide.co by @mdo
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Page navigation
|
||||
*/
|
||||
|
||||
#page-nav {
|
||||
bottom: 0.5em;
|
||||
right: 0.5em;
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*
|
||||
* Typography
|
||||
*/
|
||||
h1 {
|
||||
font-family: 'Roboto Slab', serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: 'Roboto Slab', serif;
|
||||
font-weight: 400;
|
||||
border-bottom: 0.25em solid #e2e2e2;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
h3:before {
|
||||
content: '➤';
|
||||
width: 1.5em;
|
||||
display: inline-block;
|
||||
margin-left: -1.5em;
|
||||
color: {{ primary_colour }};
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #333;
|
||||
border-bottom: 1px solid {{ primary_colour }};
|
||||
text-decoration: none;
|
||||
-o-transition:.2s;
|
||||
-ms-transition:.2s;
|
||||
-moz-transition:.2s;
|
||||
-webkit-transition:.2s;
|
||||
transition:.3s;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: {{ primary_colour }};
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
header.top {
|
||||
background: {{ primary_colour }};
|
||||
color: #333;
|
||||
}
|
||||
|
||||
header.top h1 {
|
||||
color: #fff;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
header.top p.author {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
header.top a {
|
||||
color: #333;
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
header.top a:hover {
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header.top p.twitter {
|
||||
float: right;
|
||||
margin-top: -3em;
|
||||
}
|
||||
|
||||
@media (max-width: 28.75em) {
|
||||
header.top p.twitter {
|
||||
float: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
padding: 2% 10%;
|
||||
max-width: 48em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#content h1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul#markdown-toc {
|
||||
-webkit-column-count: 2;
|
||||
-moz-column-count: 2;
|
||||
column-count: 2;
|
||||
-webkit-column-gap: 1em;
|
||||
-moz-column-gap: 1em;
|
||||
column-gap: 1em;
|
||||
|
||||
margin-bottom: 2.8em;
|
||||
}
|
||||
|
||||
.foot hr {
|
||||
font-family: 'Roboto Slab', serif;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-top: 0.1em solid #E2E2E2;
|
||||
color: #E2E2E2;
|
||||
text-align: center;
|
||||
}
|
||||
.foot hr:after {
|
||||
content: "§";
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -0.925em;
|
||||
font-size: 1.5em;
|
||||
padding: 0 0.25em;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.foot .buttons {
|
||||
margin-top: 3em;
|
||||
}
|
||||
.quick-links {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.quick-links li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Syntax highlighting */
|
||||
code {
|
||||
font-family: 'Droid Sans Mono', monospace;
|
||||
font-size: 0.825em;
|
||||
color: #666;
|
||||
}
|
||||
pre code {
|
||||
max-height: 450px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
{% include highlight.hybrid.css %}
|
||||
|
||||
.anchorjs-link {
|
||||
color: {{ primary_colour }};
|
||||
border: none;
|
||||
}
|
Loading…
Reference in a new issue