Skip to content

Commit 7d18510

Browse files
committed
Restyling of the story page
1 parent 5f86c5e commit 7d18510

File tree

7 files changed

+207
-96
lines changed

7 files changed

+207
-96
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
This repository contains the official source code used for my personal website
44
Copyright © 2016 - 2018 Melle Dijkstra, All rights reserved
55

6+
## Installation
7+
8+
### Unix based systems
9+
10+
reference: https://help.github.com/en/enterprise/2.14/user/articles/setting-up-your-github-pages-site-locally-with-jekyll
11+
12+
Open the terminal.
13+
14+
Check whether you have Ruby 2.1.0 or higher installed:
15+
16+
```
17+
$ ruby --version
18+
> ruby 2.X.X
19+
```
20+
21+
If you don't have Ruby installed, install Ruby 2.1.0 or higher.
22+
23+
Install Bundler:
24+
25+
```
26+
# Installs the Bundler gem
27+
$ gem install bundler
28+
```
29+
30+
Install dependencies (gems):
31+
```
32+
# install all needed gems
33+
$ bundle install
34+
```
35+
636
## Impression
737

838
Stories overview page where I display my latest written stories/articles.

_includes/sidebar.html

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ <h1 class="text-center"><a class="no-link" href="/">Dijkstra<span class="brand-d
2929
href="https://stackoverflow.com/users/3298540/melle-dijkstra"><span
3030
class="mdi mdi-stackoverflow"></span><span
3131
class="hidden">My stackoverflow account</span></a>
32+
<a class="spotify" target="_blank"
33+
href="https://open.spotify.com/user/1187898094?si=54znvX5hRvaQjFeh5M3cvQ"><span
34+
class="mdi mdi-spotify"></span><span
35+
class="hidden">My spotify account</span></a>
3236
</div>
3337
<div class="text-center">
3438
<small>

_layouts/default.html

+10
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@
2121
<meta name="msapplication-TileImage" content="/favicons/ms-icon-144x144.png">
2222
<meta name="theme-color" content="#ac9c80">
2323

24+
<!-- Pinterest Tag -->
25+
<meta name="p:domain_verify" content="528f8d5e26a7c45be1eacbef1d62ca2f"/>
26+
2427
<link rel="stylesheet" href="/assets/css/bootstrap.min.css"/>
2528
<link rel="stylesheet" href="/assets/css/site.css"/>
2629
<link rel="stylesheet" href="/assets/css/main.css"/>
2730
<link rel="stylesheet" href="/assets/css/materialdesignicons.min.css"/>
31+
32+
{% if layout.head_css %}
33+
{% for css_file in layout.head_css %}
34+
<link rel="stylesheet" href="{{ css_file }}" />
35+
{% endfor %}
36+
{% endif %}
37+
2838
<!-- Global site tag (gtag.js) - Google Analytics -->
2939
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61555186-3"></script>
3040
<script>

_layouts/story.html

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
layout: default
3-
head_js:
4-
- 'https://apis.google.com/js/platform.js'
5-
meta:
6-
-
3+
head_css:
4+
- '/assets/css/story.css'
75
---
86
{% if site.url contains "localhost" %}
97
{% assign disqusId = "dev-melledijkstra" %}
@@ -39,20 +37,19 @@
3937
js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
4038
fjs.parentNode.insertBefore(js, fjs);
4139
}(document, 'script', 'facebook-jssdk'));</script>
42-
4340
<div id="story-view">
4441
<div class="jumbotron">
4542

4643
<h1 class="story-title">{{ page.title }}</h1>
44+
<hr style="width: 10%" />
4745
<div>
48-
<small class="story-date">{{ page.date | date: '%e %b %Y %R' }}</small>
46+
<small class="story-date">{{ page.date | date: '%e %B %Y' }}</small>
4947
</div>
5048

51-
<div class="margin-10 story-share-bar">
49+
<div class="share-buttons">
5250
<!-- Twitter share button -->
53-
<a class="twitter-share-button" data-size="large"
51+
<a class="twitter-share-button" data-size="small"
5452
href="https://twitter.com/intent/tweet?url={{ site.url | append: page.url | url_encode }}&text={{ page.title }}&via=dijkstrascience">Tweet</a>
55-
<div data-action="share" data-height="20" class="g-plus"></div>
5653
<!-- Facebook share button -->
5754
<div class="fb-share-button"
5855
data-href="{{ site.url | append: page.url }}"
@@ -62,10 +59,9 @@ <h1 class="story-title">{{ page.title }}</h1>
6259
<script src="https://platform.linkedin.com/in.js" type="text/javascript">lang: en_US</script>
6360
<script type="IN/Share" data-url="{{ site.url | append: page.url }}"></script>
6461
</div>
65-
66-
<div class="post-image" style="background-image: url('{{ page.image }}');"></div>
6762
</div>
68-
<div id="story-container" class="container-fluid">
63+
<div class="post-image" style="background-image: url('{{ page.image }}');"></div>
64+
<div id="story" class="container-fluid">
6965
{{ content }}
7066

7167
<div class="clearfix"></div>

assets/css/main.css

+19-84
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Google Fonts */
1010
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400');
1111
@import url('https://fonts.googleapis.com/css?family=Raleway');
12+
@import url('https://fonts.googleapis.com/css2?family=Petit+Formal+Script&display=swap');
1213
/* Material Design Icons */
1314
@import url('//cdn.materialdesignicons.com/1.8.36/css/materialdesignicons.min.css');
1415

@@ -184,6 +185,13 @@ pre code {
184185
/*background-color: #b2a38a !important;*/
185186
}
186187

188+
table.table td, table.table th {
189+
font-size: 4vw;
190+
font-size: 18px;
191+
192+
word-break: break-all;
193+
}
194+
187195
/**********************************************************************************
188196
*
189197
* Helpers
@@ -434,10 +442,10 @@ pre {
434442

435443
.slanted-down {
436444
clip-path: polygon(
437-
0 0%, /* top left */
438-
100% 6%, /* top right */
439-
100% 100%, /* bottom right */
440-
0 94% /* bottom left */
445+
0 0%, /* top left */
446+
100% 6%, /* top right */
447+
100% 100%, /* bottom right */
448+
0 94% /* bottom left */
441449
);
442450
}
443451

@@ -523,6 +531,10 @@ pre {
523531
position: relative;
524532
padding-left: 250px;
525533
}
534+
535+
.social-buttons {
536+
font-size: 2em;
537+
}
526538
}
527539

528540
@media (min-width: 950px) {
@@ -600,88 +612,10 @@ pre {
600612
color: #F48024;
601613
}
602614

603-
/**********************************************************************************
604-
*
605-
* Story Styling
606-
*
607-
**********************************************************************************/
608-
609-
/*----------------------------------------------------------------------------------*
610-
* Story View Page
611-
*----------------------------------------------------------------------------------*/
612-
#story-view {
613-
max-width: 100%;
614-
font-size: 20px;
615-
}
616-
617-
#story-view .jumbotron {
618-
background-color: #202020;
619-
color: #fff;
620-
margin: 0 auto 50px auto;
621-
padding-bottom: 0;
622-
}
623-
624-
#story-view .jumbotron .post-image {
625-
height: 100px;
626-
width: 100%;
627-
628-
background-position: center;
629-
background-repeat: no-repeat;
630-
background-size: cover;
631-
632-
border-top: 2px solid white;
633-
border-bottom: 2px solid black;
634-
635-
margin-top: 30px;
636-
}
637-
638-
#story-view .story-title {
639-
font-size: 2.5em;
615+
.social-buttons .spotify:hover {
616+
color: #1DB954;
640617
}
641618

642-
#story-view .jumbotron .story-date {
643-
font-size: 25px;
644-
}
645-
646-
/* Everything in the container is parsed from the markdown */
647-
#story-container {
648-
max-width: 1000px;
649-
word-wrap: break-word;
650-
}
651-
652-
#story-container .highlight pre {
653-
padding: 10px;
654-
}
655-
656-
#story-container img {
657-
width: 100%;
658-
height: auto;
659-
}
660-
661-
#story-container iframe {
662-
width: 100%;
663-
margin: 10px 0;
664-
}
665-
666-
.story-header {
667-
margin-bottom: 20px;
668-
}
669-
670-
#disqus_thread {
671-
margin-top: 50px;
672-
}
673-
674-
.story-share-bar {
675-
display: inline-block;
676-
}
677-
678-
/* this class can be used to use the full width of the */
679-
/*.fat {*/
680-
/* width: 100vw;*/
681-
/* position: relative;*/
682-
/* left: calc(-50vw + 50%);*/
683-
/*}*/
684-
685619
/*----------------------------------------------------------------------------------*
686620
* Guides page & Guide items
687621
*----------------------------------------------------------------------------------*/
@@ -876,6 +810,7 @@ pre {
876810
z-index: 3;
877811
border: 2px solid white;
878812
}
813+
879814
@media(max-width: 800px) {
880815
#photo-of-myself {
881816
height: 100px;

assets/css/story.css

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/**********************************************************************************
2+
*
3+
* Story Styling
4+
*
5+
**********************************************************************************/
6+
7+
/*----------------------------------------------------------------------------------*
8+
* Story View Page
9+
*----------------------------------------------------------------------------------*/
10+
#story-view {
11+
max-width: 100%;
12+
}
13+
14+
#story-view .jumbotron {
15+
padding: 40px 48px;
16+
text-align: left;
17+
}
18+
19+
#story-view .jumbotron hr {
20+
margin-left: 0;
21+
padding-left: 0;
22+
}
23+
24+
#story-view .post-image {
25+
height: 300px;
26+
width: 100%;
27+
28+
background-position: center;
29+
background-repeat: no-repeat;
30+
background-size: cover;
31+
32+
filter: drop-shadow(0 0 10px gray);
33+
-webkit-filter: drop-shadow(0 0 10px gray);
34+
35+
margin-top: 30px;
36+
margin-bottom: 30px;
37+
}
38+
39+
#story-view .story-title {
40+
font-family: 'Petit Formal Script', cursive;
41+
font-size: 70px;
42+
margin-top: 0;
43+
}
44+
45+
#story-view .jumbotron .story-date {
46+
font-size: 30px;
47+
text-transform: uppercase;
48+
}
49+
50+
/* Everything in the container is parsed from the markdown */
51+
#story {
52+
max-width: 1000px;
53+
word-wrap: break-word;
54+
}
55+
56+
#story {
57+
font-size: 21px;
58+
}
59+
60+
#story > p:nth-child(1):first-letter {
61+
font-size: 35px;
62+
}
63+
64+
#story > p {
65+
padding: 0 40px;
66+
}
67+
68+
#story > p, #story > blockquote {
69+
margin-top: 1em;
70+
margin-bottom: 1em;
71+
}
72+
73+
#story .highlight pre {
74+
padding: 10px;
75+
}
76+
77+
#story img {
78+
width: 100%;
79+
height: auto;
80+
}
81+
82+
#story iframe {
83+
width: 100%;
84+
margin: 10px 0;
85+
}
86+
87+
.story-header {
88+
margin-bottom: 20px;
89+
}
90+
91+
#disqus_thread {
92+
margin-top: 50px;
93+
}
94+
95+
.share-buttons {
96+
margin-top: 15px;
97+
}
98+
99+
.share-buttons > * {
100+
vertical-align: bottom;
101+
}
102+
103+
@media (max-width: 658px) {
104+
#story-view .story-title {
105+
font-size: 50px;
106+
}
107+
108+
#story-view .jumbotron {
109+
padding: 30px 48px;
110+
}
111+
}
112+
113+
@media (max-width: 950px) {
114+
#story-view .story-title {
115+
font-size: 40px;
116+
}
117+
118+
#story-view .jumbotron .story-date {
119+
font-size: 20px;
120+
}
121+
122+
#story-view .jumbotron {
123+
padding: 75px 20px 20px 20px;
124+
}
125+
}

0 commit comments

Comments
 (0)