summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2021-05-07 06:54:57 +0200
committerAhmed Abdelhalim <[email protected]>2021-05-07 06:54:57 +0200
commit08788aa48f30c6821fdd4ec15b16f05f075769d7 (patch)
tree671021b87d746cffcedbb08d3f20256a3feed6b3
parentca6bdbb39732d0b491d9f55c0fa1f1abbff9e865 (diff)
Style the education section of the page
-rw-r--r--app/assets/index.html12
-rw-r--r--app/base.styl41
-rw-r--r--app/print.styl14
3 files changed, 61 insertions, 6 deletions
diff --git a/app/assets/index.html b/app/assets/index.html
index 9f9cff5..8e9856a 100644
--- a/app/assets/index.html
+++ b/app/assets/index.html
@@ -239,13 +239,13 @@
</article>
</article>
- <article>
+ <article class="education">
<h1>Education</h1>
- <strong>B.E. in Computer Science and Engineering</strong>
- <strong>GPA 3.1/4.0 (B - Very Good)</strong>
- <a href="https://aast.edu">
- Arab Academy for Science and Technology (<abbr>AASTMT</abbr>)
- </a>
+ <article>
+ <h2>B.E. in Computer Science and Engineering</h2>
+ <p>Arab Academy for Science and Technology</p>
+ <p>GPA 3.1/4.0 (B - Very Good)</p>
+ </article>
</article>
</main>
</body>
diff --git a/app/base.styl b/app/base.styl
index a85c430..a633bbb 100644
--- a/app/base.styl
+++ b/app/base.styl
@@ -192,3 +192,44 @@ article {
}
}
}
+
+.education {
+ article {
+ display: flex
+ flex-flow: row wrap
+ justify-content: space-between;
+ // add empty space to the end of page (as big as the header)
+ margin-bottom: 160px
+
+ @media screen and (max-width: 740px) {
+ flex-flow: column wrap
+ }
+
+ // title
+ h2 {
+ margin: 0
+ min-width: 100%
+ font-size: 1.2em
+ align-self: center
+ }
+
+ // university
+ p:nth-of-type(1) {
+ min-width: 50%
+ margin: 0
+ text-align: left
+ }
+
+ // grade
+ p:nth-of-type(2) {
+ min-width: 50%
+ margin: 0
+ text-align: right
+
+ @media screen and (max-width: 740px) {
+ text-align: left
+ align-self: flex-start
+ }
+ }
+ }
+}
diff --git a/app/print.styl b/app/print.styl
index 0d5915d..9c1ff49 100644
--- a/app/print.styl
+++ b/app/print.styl
@@ -76,3 +76,17 @@ article {
}
}
}
+
+.education {
+ article {
+ // title
+ h2 {
+ margin-top: 1.2em
+ }
+
+ // university/grade
+ p {
+ margin-bottom: -0.4em
+ }
+ }
+}