Skip to content

Commit

Permalink
Merge pull request #1 from reorx/master
Browse files Browse the repository at this point in the history
Sync with upstream reorx/hugo-PaperModx:master
  • Loading branch information
Triple-Z authored Oct 21, 2022
2 parents e55eac8 + 6f9714c commit f867ba3
Show file tree
Hide file tree
Showing 45 changed files with 1,390 additions and 968 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.91.2'
extended: true

- name: Build
run: cd PaperModX/exampleSite && hugo -D --gc --verbose --minify
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
run-example:
cd exampleSite && hugo server -D --gc -p 13131
run-default:
cd exampleSite && hugo server -D --gc -p 13131 --config config.default.yml

run-profile-mode:
cd exampleSite && hugo server -D --gc -p 13131 --config config.profileMode.yml

chroma-css:
hugo gen chromastyles --style=dracula > assets/css/lib/chroma-dark.css
Expand Down
2 changes: 1 addition & 1 deletion assets/css/common/archive.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

.archive-month-header {
margin: 25px 0;
margin: 22px 0;
width: 200px;
}

Expand Down
42 changes: 42 additions & 0 deletions assets/css/common/blogroll.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.links-container {
font-size: 16px;
}
.links-container blockquote {
margin: var(--gap) 0;
padding: 0 14px;
border-inline-start: 3px solid var(--primary);
}
.links .item {
padding: 12px;
background: var(--entry);
border-radius: var(--radius);
margin-bottom: var(--gap);
border: 1px solid var(--border);
}

.links .favicon {
display: inline-block;
background-size: 16px 16px;
width: 16px;
height: 16px;
image-rendering: -webkit-optimize-contrast;
}
.links .item .title .favicon {
margin-right: calc(var(--gap) / 2);
vertical-align: middle;
}

.links .item .title a:hover {
text-decoration: underline;
}

.links .item .description {
margin-left: calc(16px + var(--gap) / 2);
color: var(--secondary);
}

.links .item .description .delimiter::after {
content: "·";
margin-inline-start: .5em;
margin-inline-end: .5em;
}
10 changes: 7 additions & 3 deletions assets/css/common/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
font-weight: 700;
}

.logo a img {
.logo a img,
.logo a svg {
display: inline;
vertical-align: middle;
pointer-events: none;
Expand Down Expand Up @@ -81,9 +82,12 @@ body:not(.dark) #sun {
color: var(--primary);
}

#menu a.active:hover {
color: var(--signature);
}
#menu .active {
color: var(--primary);
box-shadow: 0 2px 0 var(--primary);
color: var(--signature);
box-shadow: 0 2px 0 var(--signature);
}

#menu .external-link {
Expand Down
135 changes: 85 additions & 50 deletions assets/css/common/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@
min-height: calc(100vh - var(--header-height) - var(--footer-height));
max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto;
padding: var(--gap);
padding-bottom: 0;
padding: var(--content-gap) var(--gap) 0;
}

@media screen and (max-width: 500px) {
.main {
padding-top: 0;
}
}

/* same as .post-header */
.page-header {
margin: var(--content-gap) 0 calc(var(--content-gap) * 1.5);
}

.mark-line {
Expand All @@ -14,7 +24,7 @@
}
mark {
margin: 0 -0.4em;
padding: 0.1em 0.4em;
padding: 0em 0.4em;
border-radius: 0.8em 0.3em;
background: transparent;
background-image: linear-gradient(
Expand All @@ -27,13 +37,85 @@ mark {
box-decoration-break: clone;
}

/* for home and section page */
.first-entry {
position: relative;
min-height: 320px;
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}

.first-entry .entry-header {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
margin: var(--gap) 0 calc(var(--gap) * 2);
}

.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3;
}

.first-entry .entry-content {
margin: 14px 0;
font-size: 17px;
color: var(--primary);
line-height: 1.6em;
display: block;
overflow: initial; /* fix <mark> edge get cut */
}

@media screen and (max-width: 500px) {
.first-entry .entry-header h1 {
font-size: 30px;
}
.first-entry .entry-content {
font-size: 16px;
}
}

.first-entry .entry-content p {
margin-bottom: .8em;
}
.first-entry .entry-content ul,
.first-entry .entry-content ol {
margin: .8em 0;
}
.first-entry .entry-content li p {
margin-bottom: .5em;
}

.first-entry .entry-footer {
font-size: 14px;
}

.inline-links a {
font-weight: 500;
color: var(--primary);
box-shadow: var(--link-underline-shadow);
transition: var(--link-transition);
}
.inline-links a:hover {
color: var(--link-hover-color);
box-shadow: var(--link-hover-underline-shadow);
}

.inline-links span:not(:last-of-type):after {
content: "·";
margin-inline-start: .5em;
margin-inline-end: .5em;
}


/* for post page */
.main.post {
max-width: calc(var(--post-width) + var(--gap) * 2);
}

.page-header h1 {
font-size: 40px;
margin-bottom: var(--content-gap);
text-transform: capitalize;
}

.pagination {
Expand Down Expand Up @@ -169,53 +251,6 @@ figure > img {
}


/* links page */

.links-container {
font-size: 16px;
}
.links-container blockquote {
margin: var(--gap) 0;
padding: 0 14px;
border-inline-start: 3px solid var(--primary);
}
.links .item {
padding: 12px;
background: var(--entry);
border-radius: var(--radius);
margin-bottom: var(--gap);
border: 1px solid var(--border);
}

.links .favicon {
display: inline-block;
background-size: 16px 16px;
width: 16px;
height: 16px;
image-rendering: -webkit-optimize-contrast;
}
.links .item .title {
}
.links .item .title .favicon {
margin-right: calc(var(--gap) / 2);
vertical-align: middle;
}

.links .item .title a:hover {
text-decoration: underline;
}

.links .item .description {
margin-left: calc(16px + var(--gap) / 2);
color: var(--secondary);
}

.links .item .description .delimiter::after {
content: "·";
margin-inline-start: .5em;
margin-inline-end: .5em;
}

/* shortcodes */

.standout {
Expand Down
43 changes: 0 additions & 43 deletions assets/css/common/post-entry.css
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
.first-entry {
position: relative;
min-height: 320px;
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}

.first-entry .entry-header {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
margin: var(--gap) 0 calc(var(--gap) * 2);
}

.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3;
}
@media screen and (max-width: 400px) {
.first-entry .entry-header h1 {
font-size: 30px;
}
}

.first-entry .entry-content {
margin: 14px 0;
font-size: 17px;
color: var(--primary);
line-height: 1.6em;
display: block;
overflow: initial; /* fix <mark> edge get cut */
}

.first-entry .entry-content p {
margin-bottom: .8em;
}
.first-entry .entry-content li p {
margin-bottom: .5em;
}

.first-entry .entry-footer {
font-size: 14px;
}

.home-info .entry-content {
-webkit-line-clamp: unset;
}
Expand Down
Loading

0 comments on commit f867ba3

Please sign in to comment.