Browse Source

Improve styling

+ Increase line-height to make pages look less squished.
+ Add master stylesheet.
	- Move content that are not theme-specific to master CSS.
+ Target latest featherlight.js instead of 1.7.6.
+ Add javascript for cornerifying images.
+ Add escape mention image, courtesy of @Andrewww1.
pull/988/head
Hsu Still 7 years ago
parent
commit
0759c7baed
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
8 changed files with 259 additions and 180 deletions
  1. +1
    -0
      docs/_template/light-dark-theme/partials/head.tmpl.partial
  2. +4
    -2
      docs/_template/light-dark-theme/partials/scripts.tmpl.partial
  3. +3
    -0
      docs/_template/light-dark-theme/styles/cornerify.js
  4. +161
    -131
      docs/_template/light-dark-theme/styles/dark.css
  5. +23
    -47
      docs/_template/light-dark-theme/styles/light.css
  6. +65
    -0
      docs/_template/light-dark-theme/styles/master.css
  7. +2
    -0
      docs/faq/basics/getting-started.md
  8. BIN
      docs/faq/basics/images/mention-escape.png

+ 1
- 0
docs/_template/light-dark-theme/partials/head.tmpl.partial View File

@@ -11,6 +11,7 @@
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/master.css">
<link rel="stylesheet" href="{{_rel}}styles/dark.css" title="theme_dark" >
<link rel="alternate stylesheet" href="{{_rel}}styles/light.css" title="theme_light">
<link rel="stylesheet" href="{{_rel}}styles/main.css">


+ 4
- 2
docs/_template/light-dark-theme/partials/scripts.tmpl.partial View File

@@ -4,6 +4,8 @@
<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script>
<script type="text/javascript" src="{{_rel}}styles/main.js"></script>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/master/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="{{_rel}}styles/plugin-featherlight.js"></script>
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
<script type="text/javascript" src="//malsup.github.io/jquery.corner.js"></script>
<script type="text/javascript" src="{{_rel}}styles/cornerify.js"></script>

+ 3
- 0
docs/_template/light-dark-theme/styles/cornerify.js View File

@@ -0,0 +1,3 @@
window.onload = function (e) {
$('img').corner();
}

+ 161
- 131
docs/_template/light-dark-theme/styles/dark.css View File

@@ -1,116 +1,127 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
@import url('https://fonts.googleapis.com/css?family=Titillium+Web');
@import url('vs2015.css');
html,
body {
font-family: 'Titillium Web', 'Segoe UI', Tahoma, Helvetica, sans-serif;
height: 100%;
background: #212121;
color: #C0C0C0;
font-size: 15px;
background: #212121;
color: #C0C0C0;
}

button,
a {
color: #64B5F6;
color: #64B5F6;
}

button:hover,
button:focus,
a:hover,
a:focus {
color: #2196F3;
color: #2196F3;
}

a.disable,
a.disable:hover {
color: #EEEEEE;
color: #EEEEEE;
}

.divider {
color: #37474F;
color: #37474F;
}

hr {
border-color: #37474F;
}
header .navbar {
border-width: 0 0 0px;
border-radius: 0;
border-color: #37474F;
}

.subnav {
background: #383838
background: #383838
}

.inheritance h5, .inheritedMembers h5{
border-bottom: 1px solid #37474F;
.inheritance h5,
.inheritedMembers h5 {
border-bottom: 1px solid #37474F;
}

article h4{
border-bottom: 1px solid #37474F;
article h4 {
border-bottom: 1px solid #37474F;
}

.docs-search {
background: #424242;
background: #424242;
}

.search-results-group-heading {
color: #424242;
color: #424242;
}

.search-close {
color: #424242;
color: #424242;
}

.sidetoc {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.sideaffix{
overflow: visible;
}
.sideaffix > div.contribution > ul > li > a.contribution-link:hover {
background-color: #333333;

.sideaffix {
overflow: visible;
}
body .toc{
background-color: inherit;
overflow: visible;

.sideaffix>div.contribution>ul>li>a.contribution-link:hover {
background-color: #333333;
}

.toc .nav > li > a {
color: rgb(218, 218, 218);
.toc .nav>li>a {
color: rgb(218, 218, 218);
}
.toc .nav > li > a:hover,
.toc .nav > li > a:focus {
color: #E0E0E0;

.toc .nav>li>a:hover,
.toc .nav>li>a:focus {
color: #E0E0E0;
}
.toc .nav > li.active > a {
color: #90CAF9;

.toc .nav>li.active>a {
color: #90CAF9;
}
.toc .nav > li.active > a:hover,
.toc .nav > li.active > a:focus {
background-color: #37474F;
color: #4FC3F7;

.toc .nav>li.active>a:hover,
.toc .nav>li.active>a:focus {
background-color: #37474F;
color: #4FC3F7;
}

.sidefilter {
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
background-color: #1b1b1b;
border-left: 0px solid #37474F;
border-right: 0px solid #37474F;
}
.affix ul > li > a:hover {
background: none;
color: #EEEEEE;

.affix ul>li>a:hover {
background: none;
color: #EEEEEE;
}
.affix ul > li.active > a,
.affix ul > li.active > a:before {
color: #B3E5FC;

.affix ul>li.active>a,
.affix ul>li.active>a:before {
color: #B3E5FC;
}
.affix ul > li > a {
color: #EEEEEE;

.affix ul>li>a {
color: #EEEEEE;
}
.affix > ul > li.active > a,
.affix > ul > li.active > a:before {
color: #B3E5FC;

.affix>ul>li.active>a,
.affix>ul>li.active>a:before {
color: #B3E5FC;
}

.tryspan {
border-color: #37474F;
border-color: #37474F;
}

.footer {
border-top: 1px solid #5F5F5F;
background: #616161;
border-top: 1px solid #5F5F5F;
background: #616161;
}

.alert-info {
@@ -118,110 +129,129 @@ body .toc{
background: #004458;
border-color: #005873
}

.alert-warning {
color: #fffaf2;
background: #80551a;
border-color: #99661f
color: #fffaf2;
background: #80551a;
border-color: #99661f
}

.alert-danger {
color: #fff2f2;
background: #4d0000;
border-color: #660000
color: #fff2f2;
background: #4d0000;
border-color: #660000
}

/* For tabbed content */

.tabGroup {
margin-top: 1rem; }
.tabGroup ul[role="tablist"] {
margin-top: 1rem;
}

.tabGroup ul[role="tablist"] {
margin: 0;
padding: 0;
list-style: none; }
.tabGroup ul[role="tablist"] > li {
list-style: none;
display: inline-block; }
.tabGroup a[role="tab"] {
list-style: none;
}

.tabGroup ul[role="tablist"]>li {
list-style: none;
display: inline-block;
}

.tabGroup a[role="tab"] {
color: white;
box-sizing: border-box;
display: inline-block;
padding: 5px 7.5px;
text-decoration: none;
border-bottom: 2px solid #fff; }
.tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus, .tabGroup a[role="tab"][aria-selected="true"] {
border-bottom: 2px solid #607D8B; }
.tabGroup a[role="tab"][aria-selected="true"] {
color: #81D4FA; }
.tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus {
color: #29B6F6; }
.tabGroup a[role="tab"]:focus {
outline: 1px solid #607D8B;
outline-offset: -1px; }
@media (min-width: 768px) {
border-bottom: 2px solid #fff;
}

.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus,
.tabGroup a[role="tab"][aria-selected="true"] {
border-bottom: 2px solid #607D8B;
}

.tabGroup a[role="tab"][aria-selected="true"] {
color: #81D4FA;
}

.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus {
color: #29B6F6;
}

.tabGroup a[role="tab"]:focus {
outline: 1px solid #607D8B;
outline-offset: -1px;
}

@media (min-width: 768px) {
.tabGroup a[role="tab"] {
padding: 5px 15px; } }
.tabGroup section[role="tabpanel"] {
padding: 5px 15px;
}
}

.tabGroup section[role="tabpanel"] {
border: 1px solid #607D8B;
padding: 15px;
margin: 0;
overflow: hidden; }
.tabGroup section[role="tabpanel"] > .codeHeader,
.tabGroup section[role="tabpanel"] > pre {
margin-left: -16px;
margin-right: -16px; }
.tabGroup section[role="tabpanel"] > :first-child {
margin-top: 0; }
.tabGroup section[role="tabpanel"] > pre:last-child {
display: block;
margin-bottom: -16px; }
overflow: hidden;
}

.tabGroup section[role="tabpanel"]>.codeHeader,
.tabGroup section[role="tabpanel"]>pre {
margin-left: -16px;
margin-right: -16px;
}

.tabGroup section[role="tabpanel"]> :first-child {
margin-top: 0;
}

.tabGroup section[role="tabpanel"]>pre:last-child {
display: block;
margin-bottom: -16px;
}

.mainContainer[dir='rtl'] main ul[role="tablist"] {
margin: 0; }
margin: 0;
}

/* code */

code {
color:white;
background-color:#4a4c52;
border-radius:4px;
padding: 3px 7px;
color: white;
background-color: #4a4c52;
border-radius: 4px;
padding: 3px 7px;
}

pre {
background-color: #282a36;
background-color: #282a36;
}

/* table */

.table-striped>tbody>tr:nth-of-type(odd) {
background-color:#333333;
color: #d3d3d3
background-color: #333333;
color: #d3d3d3
}

tbody>tr {
background-color:#424242;
color: #c0c0c0
background-color: #424242;
color: #c0c0c0
}

.table>tbody+tbody {
border-top:2px solid rgb(173, 173, 173)
border-top: 2px solid rgb(173, 173, 173)
}

/* select */

select {
display: inline-block;
overflow: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0 30px 0 6px;
vertical-align: middle;
height: 28px;
border: 1px solid #e3e3e3;
line-height: 16px;
outline: 0;
text-overflow: ellipsis;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
background-image: linear-gradient(45deg,transparent 50%,#707070 0),linear-gradient(135deg,#707070 50%,transparent 0);
background-position: calc(100% - 13px) 11px,calc(100% - 8px) 11px;
background-size: 5px 5px,5px 6px;
background-repeat: no-repeat;
background-color: #3b3b3b;
border-color: #2e2e2e;
}
background-color: #3b3b3b;
border-color: #2e2e2e;
}

+ 23
- 47
docs/_template/light-dark-theme/styles/light.css View File

@@ -1,67 +1,43 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
@import url('https://fonts.googleapis.com/css?family=Titillium+Web');
html,
body {
font-family: 'Titillium Web', 'Segoe UI', Tahoma, Helvetica, sans-serif;
height: 100%;
color: #000;
background: #fff;
font-size: 15px;
}
header .navbar {
border-width: 0 0 0px;
border-radius: 0;
}
.sideaffix{
overflow: visible;
background: #fff;
color: #000;
}
body .toc{
background-color: inherit;
overflow: visible;

.sideaffix {
overflow: visible;
}

/* code */

code {
color:#222f3d;
background-color: #f9f9f9;
border-radius:4px;
padding: 3px 7px;
color: #222f3d;
background-color: #f9f9f9;
border-radius: 4px;
padding: 3px 7px;
}

/* table */

.table-striped>tbody>tr:nth-of-type(odd) {
color:#333333;
background-color: #d3d3d3
color: #333333;
background-color: #d3d3d3
}

tbody>tr {
color:#424242;
background-color: #c0c0c0
color: #424242;
background-color: #c0c0c0
}

.table>tbody+tbody {
border-top:2px solid rgb(173, 173, 173)
border-top: 2px solid rgb(173, 173, 173)
}

/* select */

select {
display: inline-block;
overflow: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0 30px 0 6px;
vertical-align: middle;
height: 28px;
border: 1px solid #e3e3e3;
line-height: 16px;
outline: 0;
text-overflow: ellipsis;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
background-image: linear-gradient(45deg,transparent 50%,#707070 0),linear-gradient(135deg,#707070 50%,transparent 0);
background-position: calc(100% - 13px) 11px,calc(100% - 8px) 11px;
background-size: 5px 5px,5px 6px;
background-repeat: no-repeat;
background-color: #fcfcfc;
border-color: #aeb1b5;
}
background-color: #fcfcfc;
border-color: #aeb1b5;
}

+ 65
- 0
docs/_template/light-dark-theme/styles/master.css View File

@@ -0,0 +1,65 @@
@import url('https://fonts.googleapis.com/css?family=Titillium+Web');
html,
body {
font-family: 'Titillium Web', 'Segoe UI', Tahoma, Helvetica, sans-serif;
height: 100%;
font-size: 15px;
}

p,
li,
.toc {
line-height: 160%;
}

img {
box-shadow: 0px 0px 3px 0px rgb(66, 66, 66);
max-width: 95% !important;
margin-top: 15px;
margin-bottom: 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 130%;
}

.sideaffix {
line-height: 140%;
}

header .navbar {
border-width: 0 0 0px;
border-radius: 0;
}

body .toc {
background-color: inherit;
overflow: visible;
}

select {
display: inline-block;
overflow: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0 30px 0 6px;
vertical-align: middle;
height: 28px;
border: 1px solid #e3e3e3;
line-height: 16px;
outline: 0;
text-overflow: ellipsis;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
background-image: linear-gradient(45deg, transparent 50%, #707070 0), linear-gradient(135deg, #707070 50%, transparent 0);
background-position: calc(100% - 13px) 11px, calc(100% - 8px) 11px;
background-size: 5px 5px, 5px 6px;
background-repeat: no-repeat;
}

+ 2
- 0
docs/faq/basics/getting-started.md View File

@@ -56,6 +56,8 @@ You can escape an object by using `\` in front the object in the
Discord client. For example, when you do `\@Example#1234` in chat,
it will return the user ID of the aforementioned user.

![Escaping mentions](images/mention-escape.png)

***

## How do I get the role ID?


BIN
docs/faq/basics/images/mention-escape.png View File

Before After
Width: 1603  |  Height: 400  |  Size: 19 KiB

Loading…
Cancel
Save