Permalink
Please sign in to comment.
Showing
with
257 additions
and 110 deletions.
- 0 clearPages.sh
- +1 −1 config.toml
- +5 −4 convert_files.js
- +2 −2 create_structure.js
- +85 −0 css/gatsby.css
- +4 −5 deploy.sh
- +9 −9 html.jsx
- 0 install.sh
- +40 −0 local.sh
- +2 −0 print.sh
- +109 −89 templates/_template.jsx
- BIN templates/freecodecamp_logo_green.png
0
clearPages.sh
100644 → 100755
File mode changed.
2
config.toml
@@ -1,3 +1,3 @@ | ||
siteTitle="FreeCodeCamp Wiki" | ||
-headerColor = "#884499" | ||
+headerColor = "#006400" | ||
linkPrefix = "/wiki" |
9
convert_files.js
4
create_structure.js
85
css/gatsby.css
@@ -0,0 +1,85 @@ | ||
+.container { | ||
+ max-width:960px; | ||
+ padding:90px 30px 0; | ||
+ margin:0 auto; | ||
+ position:relative; | ||
+} | ||
+a{ | ||
+ text-decoration: none; | ||
+} | ||
+a:hover { | ||
+ text-decoration: underline; | ||
+} | ||
+.wiki-header { | ||
+ z-index:999; | ||
+ position:fixed; | ||
+ top:0; | ||
+ width:100%; | ||
+ height:80px; | ||
+ background:#fff; | ||
+ margin-left:-30px; | ||
+} | ||
+.wiki-header a { | ||
+ color:#fff; | ||
+} | ||
+.wiki-header a:hover { | ||
+ color:#006400; | ||
+} | ||
+.wiki-header img { | ||
+ margin-top:30px; | ||
+ width:270px; | ||
+} | ||
+.wiki-header span { | ||
+ position:absolute; | ||
+} | ||
+.articleContent { | ||
+ width:95%; | ||
+ margin:40px auto 0; | ||
+} | ||
+.wikiSelector { | ||
+ position:fixed; | ||
+ top:90px; | ||
+} | ||
+.wikiSelector select { | ||
+ width:95%; | ||
+} | ||
+.wikiAside { | ||
+ width: 220px; | ||
+ border-left: 1px solid lightgrey; | ||
+ float:right; | ||
+ padding-left:20px; | ||
+} | ||
+.searchBar { | ||
+ margin-top:10px; | ||
+ margin-bottom:25px; | ||
+} | ||
+.articlesList ul { | ||
+ list-style: none; | ||
+ margin-left: 0; | ||
+ height:82vh; | ||
+ overflow-y: scroll; | ||
+} | ||
+ | ||
+@media (max-width:700px) { | ||
+ .wiki-header, .wiki-selector { | ||
+ text-align:center; | ||
+ } | ||
+ .wiki-header span { | ||
+ left:50%; | ||
+ top:60px; | ||
+ transform: translateX(-50%); | ||
+ } | ||
+} | ||
+@media (min-width:701px) { | ||
+ .wiki-header span { | ||
+ margin-left:10px; | ||
+ top:40px; | ||
+ } | ||
+ .articleContent { | ||
+ width:auto; | ||
+ padding-right:30px; | ||
+ height:88vh; | ||
+ overflow-y: scroll; | ||
+ margin-top:0; | ||
+ } | ||
+} |
9
deploy.sh
100644 → 100755
18
html.jsx
0
install.sh
100644 → 100755
File mode changed.
40
local.sh
@@ -0,0 +1,40 @@ | ||
+#!/bin/bash | ||
+ | ||
+# Automate Deployment -- bash script | ||
+# - run clearPages.sh | ||
+# - run | ||
+# - git checkout master | ||
+# - Pull down the Wiki | ||
+# - Run Conversion (See above) | ||
+# - Run Cleanup (See above) | ||
+# - Run Gatsby Build Operation | ||
+# - git checkout gh-pages | ||
+# - Copy files to `gh-pages` | ||
+# - Commit files to that branch | ||
+# - Git push | ||
+ | ||
+# Refresh pages directory | ||
+./clearPages.sh | ||
+ | ||
+# Update wiki repo copy | ||
+cd wiki-master | ||
+git pull origin master | ||
+cd .. | ||
+ | ||
+# Copy and Transform .md files from wiki repo | ||
+node create_structure.js | ||
+node convert_files.js | ||
+ | ||
+# Build Output | ||
+gatsby build --prefix-links | ||
+ | ||
+# Copy generated output to gh-pages on live wiki | ||
+cp -r wiki-master/images/* wiki-gh-pages/images/ | ||
+cp -r public/* wiki-gh-pages/ | ||
+cp css/* wiki-gh-pages/css/ | ||
+cp public/bundle.js wiki-gh-pages/ | ||
+cp public/index.html wiki-gh-pages/ | ||
+cp public/bundle.js.map wiki-gh-pages/ | ||
+ | ||
+# Get to work, baby! | ||
+gatsby develop |
2
print.sh
@@ -0,0 +1,2 @@ | ||
+#!/bin/bash | ||
+cp ./pages/_template.jsx ./templates/. |
198
templates/_template.jsx
0 comments on commit
e24eb8b