Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add SCSS via Asset Pipeline (#65)
* Remove old files * Add SCSS pipeline * Add generated files * Fix navigation HTML * Fix media queries * Remove RTL * Fix styling for big screens * Remove separator configs * Fix menu dropdown * Add working mobile menu * Fix menu item heights * Update README
- Loading branch information
Showing
with
778 additions
and 572 deletions.
- +1 −1 .editorconfig
- +2 −28 Makefile
- +5 −9 README.md
- +176 −0 assets/scss/_base.scss
- +121 −0 assets/scss/_content.scss
- +6 −0 assets/scss/_footer.scss
- +88 −0 assets/scss/_navigation.scss
- +20 −0 assets/scss/_pagination.scss
- +12 −0 assets/scss/coder.scss
- +0 −9 exampleSite/config.toml
- +9 −4 layouts/_default/baseof.html
- +24 −33 layouts/partials/header.html
- +1 −0 resources/_gen/assets/scss/scss/coder.scss_7a0b76148b8858d7eb44ba5d951667c9.content
- +1 −0 resources/_gen/assets/scss/scss/coder.scss_7a0b76148b8858d7eb44ba5d951667c9.json
- +310 −0 resources/_gen/assets/scss/scss/coder.scss_8ccb485adf1280d07dc638b08b5fd1c2.content
- +1 −0 resources/_gen/assets/scss/scss/coder.scss_8ccb485adf1280d07dc638b08b5fd1c2.json
- +0 −1 static/css/style-rtl.min.css
- +0 −1 static/css/style.min.css
- +0 −5 static/less/colors.less
- +0 −41 static/less/style-rtl.less
- +0 −439 static/less/style.less
- +1 −1 theme.toml
@@ -1,36 +1,10 @@ | ||
# LESS params | ||
LESS_DIR = ./static/less | ||
LESS_FILE = style.less | ||
LESS_RTL_FILE = style-rtl.less | ||
.PHONY: demo clear | ||
|
||
# CSS params | ||
CSS_DIR = ./static/css | ||
CSS_FILE = style.min.css | ||
CSS_RTL_FILE = style-rtl.min.css | ||
CSS_TMP_FILE = tmp.css | ||
|
||
define build_less | ||
lessc $(LESS_DIR)/$(1) > $(CSS_DIR)/$(CSS_TMP_FILE) | ||
uglifycss $(CSS_DIR)/$(CSS_TMP_FILE) > $(CSS_DIR)/$(2) | ||
rm -f $(CSS_DIR)/$(CSS_TMP_FILE) | ||
endef | ||
|
||
.PHONY: clean demo build build-ltr build-rtl | ||
|
||
build: clean build-ltr build-rtl | ||
|
||
build-ltr: | ||
$(call build_less,$(LESS_FILE),$(CSS_FILE)) | ||
|
||
build-rtl: | ||
$(call build_less,$(LESS_RTL_FILE),$(CSS_RTL_FILE)) | ||
|
||
demo: build | ||
demo: | ||
mkdir -p demo/themes/coder | ||
rsync -av exampleSite/* demo | ||
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/coder | ||
cd demo && hugo serve -D | ||
|
||
clean: | ||
rm -f $(CSS_DIR)/*.css | ||
rm -rf demo |
@@ -0,0 +1,176 @@ | ||
*, | ||
*:after, | ||
*:before { | ||
box-sizing: inherit; | ||
} | ||
|
||
html { | ||
box-sizing: border-box; | ||
font-size: 62.5%; | ||
} | ||
|
||
body { | ||
display:flex; | ||
color: $fg-color; | ||
background-color: $bg-color; | ||
font-family: 'Fira Mono', monospace; | ||
font-size: 1.6em; | ||
font-weight: 400; | ||
letter-spacing: 0.0625em; | ||
line-height: 1.8em; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 1.4em; | ||
line-height: 1.6em; | ||
} | ||
} | ||
|
||
a { | ||
font-weight: 700; | ||
color: $alt-fg-color; | ||
text-decoration: none; | ||
&:focus, | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
p { | ||
margin: 1.6rem 0 1.6rem 0; | ||
a { | ||
font-weight: 400; | ||
color: $alt-fg-color; | ||
text-decoration: underline; | ||
text-underline-position: under; | ||
&:focus, | ||
&:hover { | ||
color: $link-color; | ||
} | ||
} | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
color: $alt-fg-color; | ||
text-transform: uppercase; | ||
letter-spacing: 0.0625em; | ||
margin: 3.2rem 0 1.6rem 0; | ||
} | ||
|
||
h1 { | ||
font-size: 3.2rem; | ||
line-height: 3.2rem; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 2.8rem; | ||
line-height: 2.8rem; | ||
} | ||
} | ||
h2 { | ||
font-size: 2.8rem; | ||
line-height: 2.8rem; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 2.4rem; | ||
line-height: 2.4rem; | ||
} | ||
} | ||
h3 { | ||
font-size: 2.4rem; | ||
line-height: 2.4rem; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 2.0rem; | ||
line-height: 2.0rem; | ||
} | ||
} | ||
h4 { | ||
font-size: 2.2rem; | ||
line-height: 2.2rem; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 1.8rem; | ||
line-height: 1.8rem; | ||
} | ||
} | ||
h5 { | ||
font-size: 2.0rem; | ||
line-height: 2.0rem; | ||
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | ||
font-size: 1.6rem; | ||
line-height: 1.6rem; | ||
} | ||
} | ||
h6 { | ||
font-size: 1.4rem; | ||
line-height: 1.4rem; | ||
} | ||
|
||
pre { | ||
margin: 1.6rem 0 1.0rem 0; | ||
padding: 1.6rem; | ||
overflow-x: auto; | ||
} | ||
|
||
code { | ||
display: inline-block; | ||
background-color: $alt-fg-color; | ||
color: $bg-color; | ||
padding: 0.4rem 0.8rem 0.4rem 0.8rem; | ||
} | ||
|
||
blockquote { | ||
border-left: 2px solid $alt-bg-color; | ||
padding-left: 1.6rem; | ||
font-style: italic; | ||
} | ||
|
||
th, td { | ||
padding: 1.6rem; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
} | ||
table td, table th { | ||
border: 2px solid $alt-fg-color; | ||
} | ||
table tr:first-child th { | ||
border-top: 0; | ||
} | ||
table tr:last-child td { | ||
border-bottom: 0; | ||
} | ||
table tr td:first-child, | ||
table tr th:first-child { | ||
border-left: 0; | ||
} | ||
table tr td:last-child, | ||
table tr th:last-child { | ||
border-right: 0; | ||
} | ||
|
||
img { | ||
max-width: 100%; | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
width: 100%; | ||
} | ||
|
||
.container { | ||
margin: 0 auto; | ||
max-width: 120.0rem; | ||
width: 100%; | ||
padding-left: 2.0rem; | ||
padding-right: 2.0rem; | ||
} | ||
|
||
.float-right { | ||
float: right; | ||
} | ||
|
||
.float-left { | ||
float: left; | ||
} |
@@ -0,0 +1,121 @@ | ||
.content { | ||
flex: 1; | ||
margin-top: 1.6rem; | ||
margin-bottom: 3.2rem; | ||
article { | ||
header { | ||
margin-top: 3.2rem; | ||
margin-bottom: 3.2rem; | ||
h1, h2 { | ||
margin: 0; | ||
} | ||
h2 { | ||
margin-top: 1.0rem; | ||
font-size: 1.8rem; | ||
color: $fg-color; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 1.6rem; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.avatar img{ | ||
width: 20rem; | ||
height: auto; | ||
border-radius: 50%; | ||
@media only screen and (max-device-width : 768px) { | ||
width: 10rem; | ||
} | ||
} | ||
|
||
.list { | ||
ul { | ||
margin: 3.2rem 0 3.2rem 0; | ||
list-style: none; | ||
padding: 0; | ||
li { | ||
font-size: 1.6rem; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 1.4rem; | ||
margin: 1.6rem 0 1.6rem 0; | ||
} | ||
span { | ||
display: inline-block; | ||
width: 20.0rem; | ||
text-align: right; | ||
margin-right: 3.0rem; | ||
text-align: right; | ||
margin-right: 3.0rem; | ||
@media only screen and (max-device-width : 768px) { | ||
display: block; | ||
text-align: left; | ||
} | ||
} | ||
a { | ||
text-transform: uppercase; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.centered { | ||
display: flex; | ||
height: 100%; | ||
align-items: center; | ||
justify-content: center; | ||
.about { | ||
text-align: center; | ||
h1 { | ||
margin-top: 2.0rem; | ||
margin-bottom: 0.5rem; | ||
} | ||
h2 { | ||
margin-top: 1.0rem; | ||
margin-bottom: 0.5rem; | ||
font-size: 2.4rem; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 2.0rem; | ||
} | ||
} | ||
ul { | ||
list-style: none; | ||
margin: 3.0rem 0 1.0rem 0; | ||
padding: 0; | ||
li { | ||
display: inline-block; | ||
position: relative; | ||
a { | ||
text-transform: uppercase; | ||
margin-left: 1.0rem; | ||
margin-right: 1.0rem; | ||
font-size: 1.6rem; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 1.4rem; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.error { | ||
text-align: center; | ||
h1 { | ||
margin-top: 2.0rem; | ||
margin-bottom: 0.5rem; | ||
font-size: 4.6rem; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 3.2rem; | ||
} | ||
} | ||
h2 { | ||
margin-top: 2.0rem; | ||
margin-bottom: 3.2rem; | ||
font-size: 3.2rem; | ||
@media only screen and (max-device-width : 768px) { | ||
font-size: 2.8rem; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.