mirror of
https://github.com/sourcey/spectacle.git
synced 2024-09-11 05:25:36 +03:00
Make CSS templates more modular
This commit is contained in:
parent
40d1fea292
commit
e974593503
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
~*
|
~*
|
||||||
*~
|
*~
|
||||||
bak
|
*bak
|
||||||
node_modules
|
|
||||||
*cache
|
*cache
|
||||||
npm-debug.log
|
*.log
|
||||||
|
node_modules
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
//
|
//
|
||||||
// Include Foundation components
|
//= Include Foundation components
|
||||||
|
|
||||||
@import 'foundation';
|
@import 'foundation';
|
||||||
|
|
||||||
// TODO: Conditionally include `foundation-global-styles`
|
// TODO: Conditionally include `foundation-global-styles`.
|
||||||
|
// It's better if we don't have ANY global includes.
|
||||||
@include foundation-global-styles;
|
@include foundation-global-styles;
|
||||||
|
|
||||||
#spectacle {
|
#spectacle {
|
||||||
|
16
app/stylesheets/_index.scss
Normal file
16
app/stylesheets/_index.scss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
//= Main includes
|
||||||
|
//
|
||||||
|
|
||||||
|
#spectacle {
|
||||||
|
|
||||||
|
// Include highlight.js style
|
||||||
|
@import 'monokai';
|
||||||
|
|
||||||
|
// Include Spectacle layout
|
||||||
|
@import 'variables';
|
||||||
|
@import 'utils';
|
||||||
|
@import 'schema';
|
||||||
|
@import 'layout';
|
||||||
|
|
||||||
|
}
|
@ -3,69 +3,69 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// The height of the top bar
|
// The height of the top bar
|
||||||
$topbar-height: 50px;
|
$topbar-height: 50px !default;
|
||||||
|
|
||||||
// The width of the column padding
|
// The width of the column padding
|
||||||
$column-padding: 2.25rem;
|
$column-padding: 2.25rem !default;
|
||||||
|
|
||||||
// The accent color to use for nav highlights and section headings
|
// The accent color to use for nav highlights and section headings
|
||||||
$accent-color: #f68b1f;
|
$accent-color: #f68b1f !default;
|
||||||
|
|
||||||
// The dark backgorund color behind code examples
|
// The dark backgorund color behind code examples
|
||||||
$dark-background-color: $black;
|
$dark-background-color: $black !default;
|
||||||
|
|
||||||
// Medium device width (from Foundation)
|
// Medium device width (from Foundation)
|
||||||
$medium-width: 40em;
|
$medium-width: 40em !default;
|
||||||
|
|
||||||
// Large device width (from Foundation)
|
// Large device width (from Foundation)
|
||||||
$large-width: 64em;
|
$large-width: 64em !default;
|
||||||
|
|
||||||
//
|
//
|
||||||
// JSON schema labels
|
// JSON schema labels
|
||||||
|
|
||||||
$msg-json-section-description: "Description";
|
$msg-json-section-description: "Description" !default;
|
||||||
$msg-json-section-properties: "Properties";
|
$msg-json-section-properties: "Properties" !default;
|
||||||
$msg-json-section-items: "Items";
|
$msg-json-section-items: "Items" !default;
|
||||||
$msg-json-section-inherited: "Inherited";
|
$msg-json-section-inherited: "Inherited" !default;
|
||||||
$msg-json-section-anyOf: "Any of";
|
$msg-json-section-anyOf: "Any of" !default;
|
||||||
$msg-json-discriminator: "discriminator";
|
$msg-json-discriminator: "discriminator" !default;
|
||||||
$msg-json-read-only: "read only";
|
$msg-json-read-only: "read only" !default;
|
||||||
$msg-json-required: "required";
|
$msg-json-required: "required" !default;
|
||||||
$msg-json-ref-prefix: "Details: ";
|
$msg-json-ref-prefix: "Details: " !default;
|
||||||
$msg-json-section-additionalProperties: "Additional properties";
|
$msg-json-section-additionalProperties: "Additional properties" !default;
|
||||||
$msg-json-section-example: "Example";
|
$msg-json-section-example: "Example" !default;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Swagger labels
|
// Swagger labels
|
||||||
|
|
||||||
$msg-swagger-data-type: 'Data type';
|
$msg-swagger-data-type: 'Data type' !default;
|
||||||
$msg-swagger-description: 'Description';
|
$msg-swagger-description: 'Description' !default;
|
||||||
|
|
||||||
$msg-swagger-section-operation-path: 'Path';
|
$msg-swagger-section-operation-path: 'Path' !default;
|
||||||
$msg-swagger-section-operation-description: $msg-swagger-description;
|
$msg-swagger-section-operation-description: $msg-swagger-description !default;
|
||||||
$msg-swagger-section-request-params: 'Request parameters';
|
$msg-swagger-section-request-params: 'Request parameters' !default;
|
||||||
$msg-swagger-section-request-body: 'Request body';
|
$msg-swagger-section-request-body: 'Request body' !default;
|
||||||
$msg-swagger-section-responses: 'Responses';
|
$msg-swagger-section-responses: 'Responses' !default;
|
||||||
|
|
||||||
$msg-swagger-param-key: 'Key';
|
$msg-swagger-param-key: 'Key' !default;
|
||||||
$msg-swagger-param-name: 'Name';
|
$msg-swagger-param-name: 'Name' !default;
|
||||||
$msg-swagger-param-description: $msg-swagger-description;
|
$msg-swagger-param-description: $msg-swagger-description !default;
|
||||||
$msg-swagger-param-data-type: 'Data type';
|
$msg-swagger-param-data-type: 'Data type' !default;
|
||||||
$msg-swagger-param-type: 'Type';
|
$msg-swagger-param-type: 'Type' !default;
|
||||||
|
|
||||||
$msg-swagger-response-header-name: 'Header';
|
$msg-swagger-response-header-name: 'Header' !default;
|
||||||
$msg-swagger-response-header-description: $msg-swagger-description;
|
$msg-swagger-response-header-description: $msg-swagger-description !default;
|
||||||
$msg-swagger-response-header-data-type: 'Data type';
|
$msg-swagger-response-header-data-type: 'Data type' !default;
|
||||||
|
|
||||||
$msg-swagger-section-request-security: 'Security';
|
$msg-swagger-section-request-security: 'Security' !default;
|
||||||
$msg-swagger-request-security-scopes: 'Scopes';
|
$msg-swagger-request-security-scopes: 'Scopes' !default;
|
||||||
$msg-swagger-request-security-schema: 'Schema';
|
$msg-swagger-request-security-schema: 'Schema' !default;
|
||||||
$msg-swagger-security-definition-properties: 'Properties';
|
$msg-swagger-security-definition-properties: 'Properties' !default;
|
||||||
$msg-swagger-security-definition-type-basic: '(HTTP Basic Authentication)';
|
$msg-swagger-security-definition-type-basic: '(HTTP Basic Authentication)' !default;
|
||||||
$msg-swagger-security-definition-type-oauth2: '(OAuth2 Authentication)';
|
$msg-swagger-security-definition-type-oauth2: '(OAuth2 Authentication)' !default;
|
||||||
$msg-swagger-security-definition-type-apikey: '(API Key Authentication)';
|
$msg-swagger-security-definition-type-apikey: '(API Key Authentication)' !default;
|
||||||
$msg-swagger-badge-global: 'global';
|
$msg-swagger-badge-global: 'global' !default;
|
||||||
|
|
||||||
$msg-swagger-response-code: 'Code';
|
$msg-swagger-response-code: 'Code' !default;
|
||||||
$msg-swagger-response-description: 'Description';
|
$msg-swagger-response-description: 'Description' !default;
|
||||||
$msg-swagger-response-schema: 'Schema';
|
$msg-swagger-response-schema: 'Schema' !default;
|
||||||
|
6
app/stylesheets/spectacle-core.scss
Normal file
6
app/stylesheets/spectacle-core.scss
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
//
|
||||||
|
//= Spectacle core
|
||||||
|
//
|
||||||
|
|
||||||
|
// Include just the Spectacle core without Foundation
|
||||||
|
@import 'index';
|
@ -7,15 +7,5 @@
|
|||||||
@import 'foundation-settings';
|
@import 'foundation-settings';
|
||||||
@import 'foundation-includes';
|
@import 'foundation-includes';
|
||||||
|
|
||||||
#spectacle {
|
// Include Spectacle
|
||||||
|
@import 'index';
|
||||||
// Include highlight.js style
|
|
||||||
@import 'monokai';
|
|
||||||
|
|
||||||
// Include Spectacle layout
|
|
||||||
@import 'variables';
|
|
||||||
@import 'utils';
|
|
||||||
@import 'schema';
|
|
||||||
@import 'layout';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -17,8 +17,8 @@ process.chdir(__dirname + '/..');
|
|||||||
program.version(package.version)
|
program.version(package.version)
|
||||||
.usage('spactacle [options] <specfile>')
|
.usage('spactacle [options] <specfile>')
|
||||||
.description(package.description)
|
.description(package.description)
|
||||||
.option('-S, --no-css', 'omit CSS generation (default: false)')
|
.option('-C, --disable-css', 'omit CSS generation (default: false)')
|
||||||
.option('-J, --no-js', 'omit JavaScript generation (default: false)')
|
.option('-J, --disable-js', 'omit JavaScript generation (default: false)')
|
||||||
.option('-e, --embeddable', 'omit the HTML <body/> and generate the documentation content only (default: false)')
|
.option('-e, --embeddable', 'omit the HTML <body/> and generate the documentation content only (default: false)')
|
||||||
.option('-d, --development-mode', 'start HTTP server with the file watcher and live reload (default: false)')
|
.option('-d, --development-mode', 'start HTTP server with the file watcher and live reload (default: false)')
|
||||||
.option('-s, --start-server', 'start the HTTP server without any development features')
|
.option('-s, --start-server', 'start the HTTP server without any development features')
|
||||||
@ -92,10 +92,10 @@ if (program.startServer) {
|
|||||||
grunt.task.run('server');
|
grunt.task.run('server');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!program.noCss) {
|
if (!program.disableCss) {
|
||||||
grunt.task.run('stylesheets');
|
grunt.task.run('stylesheets');
|
||||||
}
|
}
|
||||||
if (!program.noJs) {
|
if (!program.disableJs) {
|
||||||
grunt.task.run('javascripts');
|
grunt.task.run('javascripts');
|
||||||
}
|
}
|
||||||
grunt.task.run('templates');
|
grunt.task.run('templates');
|
||||||
|
46169
public/index.html
46169
public/index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user