Skip to content

Commit 59ce35f

Browse files
committed
style: improved mobile view
bonus: added link to online linux vm
1 parent 55e61af commit 59ce35f

File tree

6 files changed

+69
-9
lines changed

6 files changed

+69
-9
lines changed

src/layouts/BaseLayout.astro

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
4646
<div class="header__logo">
4747
<a href={base}>
4848
<div class="logo">
49-
COS 3100: Intro to GIT
49+
<span class="big-only">COS 3100: </span>Intro to GIT
5050
</div>
5151
</a>
5252
</div>
@@ -56,6 +56,15 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
5656
<ul class="menu__dropdown">
5757
<li><a href={`${base}lessons/`}>lessons</a></li>
5858
<li><a href={`${base}tags/`}>tags</a></li>
59+
<li>
60+
<a
61+
href="https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg&mem=192"
62+
class="external"
63+
target="_blank"
64+
>online terminal</a>
65+
</li>
66+
67+
{altViewUrl && <li><a class="bordered-top" href={altViewUrl}>view {altViewType}</a></li>}
5968
</ul>
6069
</li>
6170
</ul>
@@ -65,8 +74,15 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
6574
<ul class="navigation-menu__inner menu--desktop">
6675
<li><a href={`${base}lessons/`} class="button inline">lessons</a></li>
6776
<li><a href={`${base}tags/`} class="button inline">tags</a></li>
77+
<li>
78+
<a
79+
href="https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg&mem=192"
80+
class="button inline external"
81+
target="_blank"
82+
>online terminal</a>
83+
</li>
6884
</ul>
69-
{altViewUrl && <a class="button inline paddingx" href={altViewUrl}>view {altViewType}</a>}
85+
{altViewUrl && <a class="big-only button inline paddingx" href={altViewUrl}>view {altViewType}</a>}
7086
</nav>
7187
</header>
7288

@@ -99,4 +115,8 @@ const base = import.meta.env.BASE_URL.endsWith('/') ? import.meta.env.BASE_URL :
99115
padding-left: 10px;
100116
padding-right: 10px;
101117
}
118+
119+
.bordered-top {
120+
border-top: 1px solid var(--secondary);
121+
}
102122
</style>

src/pages/tags/[tag].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const { lessons } = Astro.props;
3737

3838
<style>
3939
.posts-title {
40-
font-size: 2.2rem !important;
40+
font-size: 2rem !important;
4141
color: var(--foreground);
4242
margin-top: 0 !important;
4343
margin-bottom: 30px !important;

src/styles/buttons.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,27 @@
8585
content:']';
8686
}
8787

88+
.button.inline.external:before{
89+
content:'[[';
90+
}
91+
92+
.button.inline.external:after{
93+
content:']]';
94+
}
95+
96+
97+
.button.inline.external:hover:after{
98+
content:'[[';
99+
}
100+
101+
.button.inline.external:hover:before{
102+
content:']]';
103+
}
104+
88105
.button.inline:hover {
89106
text-decoration: none;
90107
background: transparent;
91-
transform: scale(1.1);
108+
transform: scale(1.05);
92109
}
93110

94111
.button.inline:hover:before{

src/styles/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ figure figcaption p {
8282

8383
.page h1,
8484
article h1 {
85-
font-size: 2.2rem;
85+
font-size: 2rem;
8686
text-align: left;
8787
position: relative;
8888
color: var(--accent);

src/styles/menu.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,8 @@
142142
left: auto;
143143
right: 0;
144144
}
145-
}
145+
146+
.big-only {
147+
display: none !important;
148+
}
149+
}

src/styles/terminal.css

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,28 @@ body {
4141
-webkit-text-size-adjust: 100%;
4242
margin: 0;
4343
padding: 0;
44-
transform: scale(2);
45-
transform-origin: 0 0;
46-
width: 50%;
44+
}
45+
46+
@media (min-width: 1400px) {
47+
body {
48+
transform: scale(1.75);
49+
transform-origin: 0 0;
50+
width: 50%;
51+
}
52+
}
53+
54+
@media (max-width: 1399px) {
55+
.post-title {
56+
font-size: 1.5rem !important;
57+
}
58+
}
59+
60+
@media print {
61+
62+
pop-quiz button {
63+
background-color: none;
64+
border: none;
65+
}
4766
}
4867

4968
h1 {

0 commit comments

Comments
 (0)