Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanreese committed Aug 6, 2024
1 parent 060d8f7 commit d44e78f
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 21 deletions.
1 change: 1 addition & 0 deletions assets/cc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/initials.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 64 additions & 19 deletions assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
box-sizing: border-box;

/* A nice-looking transition when switching themes. */
transition: .3s .3s color linear;
transition: .3s background-color linear;
transition: .1s color linear, .3s background-color linear, .3s border-color linear;
}


:root {
/* Colors */
--white: #fff;
--off-white: #f5faf8;
--off-white: hsl(160, 30%, 97%);
--green: hsl(160, 100%, 40%);
--mid-green: hsl(160, 100%, 10%);
--mid-green: hsl(160, 100%, 30%);
--dark-green: hsl(160, 100%, 5%);
--off-black: hsl(160, 100%, 3%);
--grey: hsl(210, 12%, 16%);
Expand All @@ -24,21 +23,23 @@
--link-color: var(--blue);
--page-bg: var(--off-white);
--main-bg: var(--white);
--button-bg: var(--grey);
--button-bg: var(--green);
--link-hover: var(--off-white);
--underline: var(--grey);

/* Dark theme */
@media (prefers-color-scheme: dark) {
--text-color: var(--off-white);
--link-color: var(--green);
--page-bg: var(--off-black);
--main-bg: var(--dark-green);
--button-bg: var(--mid-green);
--button-bg: var(--green);
--link-hover: var(--off-black);
--underline: var(--off-white);
}

/* Responsive vars */
--pad: min(2.6vw, 2em);
--pad: min(2.6vw, 2rem);
--half-pad: calc(var(--pad) * 0.5);
}

Expand All @@ -47,22 +48,25 @@ html {
font-size: 16px;
line-height: 1.5;
color: var(--text-color);
background: var(--page-bg);
background-color: var(--page-bg);
}

body {
display: grid;
margin: var(--pad);

/* On wide screens, the header is like a sidebar */
@media(min-width: 801px) {
margin: var(--pad) var(--pad) 0;

/* On wide screens, the header is like a sidebar */
grid-template-areas:
"header main"
"footer footer";
}

/* On narrow screens, everything is a column */
@media(max-width: 800px) {
margin: 0;

/* On narrow screens, everything is a column */
grid-template-areas:
"header"
"main"
Expand Down Expand Up @@ -101,7 +105,7 @@ header {
width: 12em;

@media(max-width: 800px) {
width: 9em;
width: calc(6em + 10vw);
}

&:focus {
Expand All @@ -117,8 +121,10 @@ header {
.edit {
grid-area: edit;
display: inline-block;
padding: var(--half-pad) var(--pad);
padding: var(--half-pad);
border-bottom: 5px solid var(--mid-green);
text-align: center;
font-weight: bold;
color: white;
text-decoration: none;

Expand All @@ -128,12 +134,24 @@ header {

@media(max-width: 800px) {
place-self: end;
padding: var(--half-pad) var(--pad);
border-bottom-width: 3px;
}

&:focus {
outline-color: var(--green);
}

span {
display: inline-block;
font-size: 1.4em;
line-height: 0;
margin-left: -.9em;

@media(max-width: 800px) {
display: none;
}
}
}

nav {
Expand All @@ -152,6 +170,24 @@ header {
}
}
}

section {
max-width: 11em;

@media(max-width: 800px) {
display: none;
}

h1 {
margin: var(--pad) 0 var(--half-pad);
}

ul {
margin: 0;
padding: 0;
padding-left: 1em;
}
}
}

main {
Expand All @@ -168,25 +204,30 @@ main {

footer {
grid-area: footer;
margin-top: var(--pad);
padding: var(--pad) 0 1em;
text-align: center;
text-wrap: balance;

.cc0 {
img {
height: auto;
margin-left: 3px;
vertical-align: text-bottom;
@media (prefers-color-scheme: dark) {
filter: invert(100%);
}
margin-left: .15em;
vertical-align: -.3em;
}
}

.initials {
img {
border-radius: 40px;
}
}
}

/* The tab title doubles as the page title */
title {
display: block;
padding-bottom: .2em;
border-bottom: 5px solid var(--underline);
font-size: 3em;
line-height: 1.1;
text-wrap: balance;
Expand Down Expand Up @@ -217,3 +258,7 @@ a:focus {
a:hover, a:active, a:focus {
background: var(--link-hover);
}

ul {
list-style-type: square;
}
1 change: 1 addition & 0 deletions assets/zero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions build/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,28 @@
<a class="logo" href="/">
<img alt="Future of Coding" width="280" height="75" src="/wiki.svg">
</a>
<a class="edit" href="https://github.com/futureofcoding/wiki/edit/main/{{path}}">Edit This Page</a>
<a class="edit" href="https://github.com/futureofcoding/wiki/edit/main/{{path}}"><span></span> Edit This Page</a>
<nav>
<a href="/">Home</a>
<a href="/">Categories</a>
<a href="/">List of All Pages</a>
</nav>
<section id="contributors">
<h1>Contributors</h1>
<ul>
<li>Ivan Reese</li>
<li>Reealllllly Looooong Nameeeeeeeee</li>
<li>Third Person</li>
</ul>
</section>
<section id="backlinks">
<h1>Backlinks</h1>
<ul>
<li><a href="">Some other page</a></li>
<li><a href="">Some other page with a really long title</a></li>
<li><a href="">title</a></li>
</ul>
</section>
</header>
<main>
{{page}}
Expand All @@ -25,12 +41,15 @@
This wiki is dedicated to the public domain, marked with
<a href="https://creativecommons.org/publicdomain/zero/1.0/" rel="license noopener noreferrer">
CC0 1.0
<img width="22" height="22" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img width="22" height="22" src="https://mirrors.creativecommons.org/presskit/icons/zero.svg" alt="">
<img width="22" height="22" src="/cc.svg" alt=""><img width="22" height="22" src="/zero.svg" alt="">
</a>
</p>
<p>
Built by the <a href="https://futureofcoding.org">Future of Coding</a> community.
</p>
<a class="initials" href="https://futureofcoding.org">
<img alt="" width="40" height="40" src="/initials.svg">
</a>
</footer>
</body>
</html>

0 comments on commit d44e78f

Please sign in to comment.