Skip to content

Commit 4512dc3

Browse files
committed
first draft
0 parents  commit 4512dc3

225 files changed

Lines changed: 53091 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

12 KB
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.DS_Store

Gruntfile.js

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
/* global module:false */
2+
module.exports = function(grunt) {
3+
var port = grunt.option('port') || 8000;
4+
var root = grunt.option('root') || '.';
5+
6+
if (!Array.isArray(root)) root = [root];
7+
8+
// Project configuration
9+
grunt.initConfig({
10+
pkg: grunt.file.readJSON('package.json'),
11+
meta: {
12+
banner:
13+
'/*!\n' +
14+
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
15+
' * http://lab.hakim.se/reveal-js\n' +
16+
' * MIT licensed\n' +
17+
' *\n' +
18+
' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' +
19+
' */'
20+
},
21+
22+
qunit: {
23+
files: [ 'test/*.html' ]
24+
},
25+
26+
uglify: {
27+
options: {
28+
banner: '<%= meta.banner %>\n'
29+
},
30+
build: {
31+
src: 'js/reveal.js',
32+
dest: 'js/reveal.min.js'
33+
}
34+
},
35+
36+
sass: {
37+
core: {
38+
files: {
39+
'css/reveal.css': 'css/reveal.scss',
40+
}
41+
},
42+
themes: {
43+
files: [
44+
{
45+
expand: true,
46+
cwd: 'css/theme/source',
47+
src: ['*.sass', '*.scss'],
48+
dest: 'css/theme',
49+
ext: '.css'
50+
}
51+
]
52+
}
53+
},
54+
55+
autoprefixer: {
56+
dist: {
57+
src: 'css/reveal.css'
58+
}
59+
},
60+
61+
cssmin: {
62+
compress: {
63+
files: {
64+
'css/reveal.min.css': [ 'css/reveal.css' ]
65+
}
66+
}
67+
},
68+
69+
jshint: {
70+
options: {
71+
curly: false,
72+
eqeqeq: true,
73+
immed: true,
74+
esnext: true,
75+
latedef: true,
76+
newcap: true,
77+
noarg: true,
78+
sub: true,
79+
undef: true,
80+
eqnull: true,
81+
browser: true,
82+
expr: true,
83+
globals: {
84+
head: false,
85+
module: false,
86+
console: false,
87+
unescape: false,
88+
define: false,
89+
exports: false
90+
}
91+
},
92+
files: [ 'Gruntfile.js', 'js/reveal.js' ]
93+
},
94+
95+
connect: {
96+
server: {
97+
options: {
98+
port: port,
99+
base: root,
100+
livereload: true,
101+
open: true
102+
}
103+
},
104+
105+
},
106+
107+
zip: {
108+
'reveal-js-presentation.zip': [
109+
'index.html',
110+
'css/**',
111+
'js/**',
112+
'lib/**',
113+
'images/**',
114+
'plugin/**',
115+
'**.md'
116+
]
117+
},
118+
119+
watch: {
120+
js: {
121+
files: [ 'Gruntfile.js', 'js/reveal.js' ],
122+
tasks: 'js'
123+
},
124+
theme: {
125+
files: [
126+
'css/theme/source/*.sass',
127+
'css/theme/source/*.scss',
128+
'css/theme/template/*.sass',
129+
'css/theme/template/*.scss'
130+
],
131+
tasks: 'css-themes'
132+
},
133+
css: {
134+
files: [ 'css/reveal.scss' ],
135+
tasks: 'css-core'
136+
},
137+
html: {
138+
files: root.map(path => path + '/*.html')
139+
},
140+
markdown: {
141+
files: root.map(path => path + '/*.md')
142+
},
143+
options: {
144+
livereload: true
145+
}
146+
},
147+
148+
retire: {
149+
js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'],
150+
node: ['.'],
151+
options: {}
152+
}
153+
154+
});
155+
156+
// Dependencies
157+
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
158+
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
159+
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
160+
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
161+
grunt.loadNpmTasks( 'grunt-contrib-watch' );
162+
grunt.loadNpmTasks( 'grunt-sass' );
163+
grunt.loadNpmTasks( 'grunt-contrib-connect' );
164+
grunt.loadNpmTasks( 'grunt-autoprefixer' );
165+
grunt.loadNpmTasks( 'grunt-zip' );
166+
grunt.loadNpmTasks( 'grunt-retire' );
167+
168+
// Default task
169+
grunt.registerTask( 'default', [ 'css', 'js' ] );
170+
171+
// JS task
172+
grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] );
173+
174+
// Theme CSS
175+
grunt.registerTask( 'css-themes', [ 'sass:themes' ] );
176+
177+
// Core framework CSS
178+
grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] );
179+
180+
// All CSS
181+
grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] );
182+
183+
// Package presentation to archive
184+
grunt.registerTask( 'package', [ 'default', 'zip' ] );
185+
186+
// Serve presentation locally
187+
grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
188+
189+
// Run tests
190+
grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );
191+
192+
};

bower.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "reveal.js",
3+
"version": "3.5.0",
4+
"main": [
5+
"js/reveal.js",
6+
"css/reveal.css"
7+
],
8+
"homepage": "http://lab.hakim.se/reveal-js/",
9+
"license": "MIT",
10+
"description": "The HTML Presentation Framework",
11+
"authors": [
12+
"Hakim El Hattab <hakim.elhattab@gmail.com>"
13+
],
14+
"dependencies": {
15+
"headjs": "~1.0.3"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git://github.com/hakimel/reveal.js.git"
20+
},
21+
"ignore": [
22+
"**/.*",
23+
"node_modules",
24+
"bower_components",
25+
"test"
26+
]
27+
}

css/.DS_Store

8 KB
Binary file not shown.

css/custom.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.reveal h1,
2+
.reveal h2,
3+
.reveal h3,
4+
.reveal h4,
5+
.reveal h5,
6+
.reveal h6 {
7+
text-transform: none !important;
8+
text-align: left;
9+
margin: 0.5em 0 0.1em 0.5em;
10+
/* 上右下左间距 */
11+
padding-left: 0;
12+
width: 90%;
13+
}
14+
15+
/* set h4 font size */
16+
.reveal h4 {
17+
font-size: 1.5em;
18+
}
19+
20+
/* 通用设置 */
21+
strong {
22+
color: #d2a1ff;
23+
font-weight: inherit;
24+
}

css/layout.scss

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/**
2+
* Layout helpers.
3+
*/
4+
5+
// Stretch an element vertically based on available space
6+
.reveal .stretch,
7+
.reveal .r-stretch {
8+
max-width: none;
9+
max-height: none;
10+
}
11+
12+
.reveal pre.stretch code,
13+
.reveal pre.r-stretch code {
14+
height: 100%;
15+
max-height: 100%;
16+
box-sizing: border-box;
17+
}
18+
19+
// Text that auto-fits its container
20+
.reveal .r-fit-text {
21+
display: inline-block; // https://github.com/rikschennink/fitty#performance
22+
white-space: nowrap;
23+
}
24+
25+
// Stack multiple elements on top of each other
26+
.reveal .r-stack {
27+
display: grid;
28+
grid-template-rows: 100%;
29+
}
30+
31+
.reveal .r-stack > * {
32+
grid-area: 1/1;
33+
margin: auto;
34+
}
35+
36+
// Horizontal and vertical stacks
37+
.reveal .r-vstack,
38+
.reveal .r-hstack {
39+
display: flex;
40+
41+
img, video {
42+
min-width: 0;
43+
min-height: 0;
44+
object-fit: contain;
45+
}
46+
}
47+
48+
.reveal .r-vstack {
49+
flex-direction: column;
50+
align-items: center;
51+
justify-content: center;
52+
}
53+
54+
.reveal .r-hstack {
55+
flex-direction: row;
56+
align-items: center;
57+
justify-content: center;
58+
}
59+
60+
// Naming based on tailwindcss
61+
.reveal .items-stretch { align-items: stretch; }
62+
.reveal .items-start { align-items: flex-start; }
63+
.reveal .items-center { align-items: center; }
64+
.reveal .items-end { align-items: flex-end; }
65+
66+
.reveal .justify-between { justify-content: space-between; }
67+
.reveal .justify-around { justify-content: space-around; }
68+
.reveal .justify-start { justify-content: flex-start; }
69+
.reveal .justify-center { justify-content: center; }
70+
.reveal .justify-end { justify-content: flex-end; }

0 commit comments

Comments
 (0)