From 8d6cbcca21234c8f77ac7ef89c2058645de185ff Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Tue, 30 Jun 2020 21:57:20 +0600 Subject: [PATCH] Use "*-section class" instead of adding new div --- exampleSite/config.yaml | 1 - layouts/_default/single.html | 2 +- layouts/partials/about.html | 78 +++++++++++++++--------------- layouts/partials/achievements.html | 22 ++++----- layouts/partials/experiences.html | 40 ++++++++------- layouts/partials/projects.html | 32 ++++++------ layouts/partials/recent-posts.html | 16 +++--- layouts/partials/skills.html | 16 +++--- static/assets/css/achievements.css | 2 +- static/assets/css/projects.css | 10 ++-- static/assets/css/recent-posts.css | 8 +-- static/assets/css/skills.css | 8 +-- static/assets/css/style.css | 8 +-- 13 files changed, 115 insertions(+), 128 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 8132b96..a843b20 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -16,7 +16,6 @@ googleAnalytics: UA-xxxxxxxx disqusShortname: does-not-exist # Enable global emoji support -enableEmoji: true # Custom parameters params: diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 42b71f7..8c2de23 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,7 @@ {{ define "content" }}
-
+
diff --git a/layouts/partials/about.html b/layouts/partials/about.html index c59fba9..ccb3ab0 100644 --- a/layouts/partials/about.html +++ b/layouts/partials/about.html @@ -1,46 +1,44 @@ -
-
-
- -
-

{{ site.Params.author.name }}

- {{ if .designation }} -
- {{ .designation }} - {{ if .company }} - at {{ .company.name }} - {{ end }} -
+
+
+ +
+

{{ site.Params.author.name }}

+ {{ if .designation }} +
+ {{ .designation }} + {{ if .company }} + at {{ .company.name }} {{ end }} -

- {{ .summary | markdownify }} -

-
-
+ {{ end }} +

+ {{ .summary | markdownify }} +

+
+ -
- {{ if .resume }} - - {{ end }} -
- -
-
- {{ range .softSkills }} - {{ partial "progress/soft-skills" . }} + {{ end }} -
+ +
+ {{ if .resume }} + + {{ end }} +
+ +
+
+ {{ range .softSkills }} + {{ partial "progress/soft-skills" . }} + {{ end }}
diff --git a/layouts/partials/achievements.html b/layouts/partials/achievements.html index dd26c52..1805631 100644 --- a/layouts/partials/achievements.html +++ b/layouts/partials/achievements.html @@ -1,15 +1,13 @@ -
-
-

{{ .section.name }}

-
- -
- -
- {{ range .achievements }} - {{ partial "misc/achievement.html" . }} - {{ end }} +
+

{{ .section.name }}

+
+
+ +
+ {{ range .achievements }} + {{ partial "misc/achievement.html" . }} + {{ end }} +
diff --git a/layouts/partials/experiences.html b/layouts/partials/experiences.html index 53e0b29..5c63d14 100644 --- a/layouts/partials/experiences.html +++ b/layouts/partials/experiences.html @@ -1,25 +1,23 @@ -
-
-

{{ .section.name }}

+
+

{{ .section.name }}

-
- {{ $totalExperiences:= len .experiences }} - {{ range $index,$experience:= .experiences }} - {{ if eq (mod $index 2) 0 }} -
- {{ partial "experiences/vertical-line.html" $index }} - {{ partial "experiences/experience-info.html" $experience }} -
- {{else}} -
- {{ partial "experiences/experience-info.html" $experience }} - {{ partial "experiences/vertical-line.html" $index }} -
- {{ end }} - {{ if lt $index (sub $totalExperiences 1) }} - {{ partial "experiences/horizontal-line.html" $index }} - {{ end }} +
+ {{ $totalExperiences:= len .experiences }} + {{ range $index,$experience:= .experiences }} + {{ if eq (mod $index 2) 0 }} +
+ {{ partial "experiences/vertical-line.html" $index }} + {{ partial "experiences/experience-info.html" $experience }} +
+ {{else}} +
+ {{ partial "experiences/experience-info.html" $experience }} + {{ partial "experiences/vertical-line.html" $index }} +
{{ end }} -
+ {{ if lt $index (sub $totalExperiences 1) }} + {{ partial "experiences/horizontal-line.html" $index }} + {{ end }} + {{ end }}
diff --git a/layouts/partials/projects.html b/layouts/partials/projects.html index 9ef2c71..e8a9f35 100644 --- a/layouts/partials/projects.html +++ b/layouts/partials/projects.html @@ -1,21 +1,19 @@ -
-
-

{{ .section.name }}

-
-
- {{ range .buttons }} - - {{ end }} -
+
+

{{ .section.name }}

+
+
+ {{ range .buttons }} + + {{ end }}
-
-
- {{ range .projects }} - {{ partial "cards/project" . }} - {{ end }} -
+
+
+
+ {{ range .projects }} + {{ partial "cards/project" . }} + {{ end }}
diff --git a/layouts/partials/recent-posts.html b/layouts/partials/recent-posts.html index d22d15d..03142fc 100644 --- a/layouts/partials/recent-posts.html +++ b/layouts/partials/recent-posts.html @@ -1,12 +1,10 @@ -
-
-

{{ .section.name }}

-
-
- {{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}} - {{ partial "cards/recent-post.html" . }} - {{ end }} -
+
+

{{ .section.name }}

+
+
+ {{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}} + {{ partial "cards/recent-post.html" . }} + {{ end }}
diff --git a/layouts/partials/skills.html b/layouts/partials/skills.html index 337b445..5fab89a 100644 --- a/layouts/partials/skills.html +++ b/layouts/partials/skills.html @@ -1,12 +1,10 @@ -
-
-

{{ .section.name }}

-
-
- {{ range .skills }} - {{ partial "cards/skill.html" . }} - {{ end }} -
+
+

{{ .section.name }}

+
+
+ {{ range .skills }} + {{ partial "cards/skill.html" . }} + {{ end }}
diff --git a/static/assets/css/achievements.css b/static/assets/css/achievements.css index 42f4f33..083ea74 100644 --- a/static/assets/css/achievements.css +++ b/static/assets/css/achievements.css @@ -1,4 +1,4 @@ -#achievements-section .container { +.achievements-section .container { padding-top: 0.5rem; } diff --git a/static/assets/css/projects.css b/static/assets/css/projects.css index 378dbdf..b9ae172 100644 --- a/static/assets/css/projects.css +++ b/static/assets/css/projects.css @@ -1,10 +1,10 @@ -#projects-section .card .card-header { +.projects-section .card .card-header { background-color: #f9fafc; padding: 0.7rem; padding-bottom: 0rem; } -#projects-section .card .card-img-xs { +.projects-section .card .card-img-xs { margin-right: 0.5rem; } @@ -15,11 +15,11 @@ float: right; } -#projects-section .card .card-body { +.projects-section .card .card-body { padding: 0.7rem; } -#projects-section .card .card-header .sub-title { +.projects-section .card .card-header .sub-title { color: #8392a5; margin-top: 0.4rem; } @@ -55,7 +55,7 @@ /* Small devices (landscape phones, 576px and up) */ @media only screen and (max-width: 576px) { - #projects-section .btn { + .projects-section .btn { margin-top: 0.3125rem; } } diff --git a/static/assets/css/recent-posts.css b/static/assets/css/recent-posts.css index ef233c4..ee969d0 100644 --- a/static/assets/css/recent-posts.css +++ b/static/assets/css/recent-posts.css @@ -1,19 +1,19 @@ -#recent-posts-section .container{ +.recent-posts-section .container{ padding-top: 1rem; } -#recent-posts-section .card .card-footer span { +.recent-posts-section .card .card-footer span { font-size: 10pt; color: #6c757d !important; padding-top: 5px; } -#recent-posts-section .card .card-footer { +.recent-posts-section .card .card-footer { background: #fff; margin-top: auto; } -#recent-posts-section .post-card-link{ +.recent-posts-section .post-card-link{ text-decoration: none; } diff --git a/static/assets/css/skills.css b/static/assets/css/skills.css index 59d0794..532d8ea 100644 --- a/static/assets/css/skills.css +++ b/static/assets/css/skills.css @@ -1,4 +1,4 @@ -#skills-section .card .card-head { +.skills-section .card .card-head { background-color: #f9fafc; height: fit-content; padding: 0.7rem; @@ -6,16 +6,16 @@ border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.125); } -#skills-section .card .card-img-xs { +.skills-section .card .card-img-xs { margin-right: 0.5rem; } -#skills-section .card { +.skills-section .card { margin-top: 0.5rem; margin-bottom: 0.5rem; } -#skills-section .card .card-body { +.skills-section .card .card-body { padding-top: 0.2rem; padding-left: 0.7rem; } diff --git a/static/assets/css/style.css b/static/assets/css/style.css index 523ac99..e3fcd43 100644 --- a/static/assets/css/style.css +++ b/static/assets/css/style.css @@ -250,10 +250,10 @@ img.right{ padding-right: 5px; } - #skills-section, - #projects-section, - #recent-posts-section, - #achievements-section{ + .skills-section, + .projects-section, + .recent-posts-section, + .achievements-section{ padding-left: 0; padding-right: 0; }