Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions packages/package.njk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,36 @@ eleventyComputed:
{{ pack.stars(pkg.stars) }}
{{ pack.labels(pkg.platforms, pkg.labels) }}

<h2>Links</h2>

<ul class="button-group links">
{% if not "packagecontrol.io" in pkg.homepage | lower and pkg.details != pkg.homepage %}
<li>
<a class="button" href="{{ pkg.homepage }}">{{ pack.logo('home') }} <span>Website</span></a>
</li>
{% endif %}
{% if pkg.details %}
<li>
<a class="button" href="{{ pkg.details }}">{{ pack.logo('repo') }} <span>Repository</span></a>
</li>
{% endif %}
{% if pkg.readme %}
<li>
<a class="button" href="{{ pkg.readme_url | default(pkg.readme) }}">{{ pack.logo('file') }} <span>README</span></a>
</li>
{% endif %}
{% if pkg.issues %}
<li>
<a class="button" href="{{ pkg.issues }}">{{ pack.logo('bug') }} <span>Issues</span></a>
</li>
{% endif %}
{% if pkg.donate %}
<li>
<a class="button" href="{{ pkg.donate }}">{{ pack.logo('gift') }} <span>Donate</span></a>
</li>
{% endif %}
</ul>

{% if pkg.releases | length > 1 %}
<h2>Versions</h2>
{% else %}
Expand Down Expand Up @@ -72,36 +102,6 @@ eleventyComputed:
</details>
{% endif %}

<h2>Links</h2>

<ul class="button-group links">
{% if not "packagecontrol.io" in pkg.homepage | lower and pkg.details != pkg.homepage %}
<li>
<a class="button" href="{{ pkg.homepage }}">{{ pack.logo('home') }} <span>Website</span></a>
</li>
{% endif %}
{% if pkg.details %}
<li>
<a class="button" href="{{ pkg.details }}">{{ pack.logo('repo') }} <span>Repository</span></a>
</li>
{% endif %}
{% if pkg.readme %}
<li>
<a class="button" href="{{ pkg.readme_url | default(pkg.readme) }}">{{ pack.logo('file') }} <span>README</span></a>
</li>
{% endif %}
{% if pkg.issues %}
<li>
<a class="button" href="{{ pkg.issues }}">{{ pack.logo('bug') }} <span>Issues</span></a>
</li>
{% endif %}
{% if pkg.donate %}
<li>
<a class="button" href="{{ pkg.donate }}">{{ pack.logo('gift') }} <span>Donate</span></a>
</li>
{% endif %}
</ul>

{% if pkg.readme %}
<section id="md" class="readme" data-readme-url="{{ pkg.readme }}"></section>
<script src="{{ '/static/readme.js' | bust }}" type="module" async></script>
Expand Down
10 changes: 5 additions & 5 deletions static/style/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@
margin: 0;
padding: .2em .66em;
border-radius: 3px;
background: var(--background-darker);
color: var(--foreground-lighter);
background: var(--background-3);
color: var(--foreground-2);
white-space: nowrap;
line-height: 1.6;
cursor: pointer;
transition: color 0.2s ease-in-out, outline .2s ease-in-out;

&:hover {
color: var(--label-highlight);
background: var(--background-4);
text-decoration: none;
}

&:focus {
outline: 2px solid var(--primary-accent);
outline: 2px solid var(--orange-1);
}
}

span.button {
cursor: revert;
&:hover {
color: var(--foreground-lighter);
background: var(--background-3);
}
}
72 changes: 43 additions & 29 deletions static/style/colors.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
/* inspired by monokai neue */
/*
Based on color scheme in https://docs.sublimetext.io
but with slightly tweaked contrast progression,
and a more contrasty shade of orrange.
*/

:root {
--primary-accent: #fd971f; /* orange */
--secondary-accent: #66d9ef; /* blue */
--tertiary-accent: #a6e22e; /* green */

--primary-accent-darker: #4694A3;

--background: #fff;
--background-slightly-darker: #fcfcfc;
--background-darker: #f2f2f2;
--background-darkest: #cacaca;

--foreground: #586e75;
--foreground-darker: #38464b;
--foreground-lighter: #839496;
--foreground-bright: #c1cfd4;

--label-highlight: #38464b;
/* light */
--background-1: rgb(255, 255, 255); /* white */
--background-2: rgb(242, 242, 242); /* .. */
--background-3: rgb(230, 230, 230); /* .. */
--background-4: rgb(222, 222, 222); /* grey */

--highlight: rgba(222, 222, 222, 0.3); /* inline code */

--foreground-1: rgb(60, 60, 67); /* black */
--foreground-2: rgb(103, 103, 108); /* .. */
--foreground-3: #8d8d94; /* grey */

--white: #fff;

--orange-1: #fd971f;
--orange-2: #f5901d;
--blue-1: #1ebbfc;
--blue-2: #1db2f2;
--green-1: #a0da2c;
--green-2: #97cf29;
}

:root[data-theme='dark'] {
--background: #2b303b;
--background-slightly-darker: #383e4d;
--background-darker: #3f5157;
--background-darkest: #586e75;

--foreground: #839496;
--foreground-darker: #f8f8f2;
--foreground-lighter: #9ec7d3;
--foreground-bright: #ffffff;

--label-highlight: #ffffff;
/* dark */
--background-1: rgb(34, 40, 48);
--background-2: #272e37;
--background-3: #424c57;
--background-4: #4f5964;

--highlight: rgba(101, 117, 133, 0.16); /* inline code */

--foreground-1: rgb(223, 223, 214);
--foreground-2: rgb(218, 218, 210);
--foreground-3: rgb(152, 152, 159);

--orange-1: #f5901d;
--orange-2: #fd971f;
--blue-1: #1db2f2;
--blue-2: #1ebbfc;
--green-1: #97cf29;
--green-2: #a0da2c;
}
3 changes: 2 additions & 1 deletion static/style/footer.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
footer {
padding: 3.2rem 1rem;
text-align: center;
color: var(--foreground-2);

p {
color: var(--foreground-lighter);
color: var(--foreground-3);
}

nav {
Expand Down
26 changes: 18 additions & 8 deletions static/style/grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
}

.card {
background: var(--background-slightly-darker);
border: 1px solid var(--background-darker);
background: var(--background-1);
color: var(--foreground-2);
border-radius: 6px;
padding: 1rem;
position: relative;
transition: border-color .3s ease-in-out;
outline: 2px solid transparent;
transition: outline .3s ease-in-out;

.grid & {
/* stretch cards vertically across the grid cells */
Expand All @@ -39,11 +41,12 @@

&:has(h3 a:hover),
&:has(h3 a:focus) {
border-color: var(--primary-accent);
transition: border-color .1s ease-in-out;
outline: 2px solid var(--orange-1);
transition: outline .2s ease-in-out;
}

h3 {
color: var(--foreground-1);
padding-top: 0;
padding-right: 2em;
margin-top: 0;
Expand All @@ -59,10 +62,9 @@

h3 a,
a[href*="q=author"] {
color: var(--foreground);
color: var(--foreground-1);
&:hover {
text-decoration: none;
color: var(--foreground-darker);
color: var(--orange-1);
}
}

Expand All @@ -75,6 +77,7 @@
top: 26px;
right: 1rem;
font-size: calc(1rem / 1.33);
color: var(--foreground-3);
svg {
width: 12px;
height: 12px;
Expand All @@ -91,4 +94,11 @@
.list & .labels {
justify-content: flex-start;
}

.button:not(.platform) {
background: var(--background-2);
&:hover:not(:disabled) {
background: var(--background-3);
}
}
}
4 changes: 2 additions & 2 deletions static/style/header.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
header {
margin-bottom: 22px;
padding: 4px var(--side-padding);
color: var(--foreground-lighter);
color: var(--foreground-3);

.inner {
max-width: 92rem;
Expand All @@ -19,7 +19,7 @@ header {
}

h2 a {
color: var(--foreground);
color: var(--foreground-2);
}

nav {
Expand Down
13 changes: 6 additions & 7 deletions static/style/pagination.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.pagination {
text-align: center;
margin: 3.2rem 0 1.6rem 0;
color: var(--foreground-lighter);
color: var(--foreground-2);
}

.pagination-controls {
Expand All @@ -11,17 +11,16 @@
}

.pagination-controls .button {
background: var(--background-3);
&:hover:not(:disabled) {
background: var(--primary-accent);
color: var(--background);
border-color: var(--primary-accent);
background: var(--background-4);
}

/* disabled because it's the current page */
&:disabled {
background: var(--primary-accent);
color: var(--background);
border-color: var(--primary-accent);
background: var(--orange-1);
color: var(--foreground-1);
border-color: var(--orange-1);
cursor: revert;
}
}
Expand Down
25 changes: 15 additions & 10 deletions static/style/search.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
input {
background: var(--background);
color: var(--foreground);
border: 1px solid var(--background-darkest);
background: var(--background-1);
color: var(--foreground-1);
border: 1px solid var(--background-3);
border-radius: 3px;
padding: 8px;
margin-bottom: 11px;
Expand All @@ -12,9 +12,9 @@ input {
select {
appearance: none;
all: unset;
background: var(--background);
color: var(--foreground);
border: 1px solid var(--background-darkest);
background: var(--background-1);
color: var(--foreground-1);
border: 1px solid var(--background-3);
border-radius: 3px;
padding: 8px;
font-size: 1rem;
Expand All @@ -26,13 +26,18 @@ select {
display: flex;
align-items: stretch;
margin-bottom: 11px;
background: var(--background-1);
border-radius: 3px;
border: 1px solid var(--background-darkest);
border: 1px solid var(--background-3);
transition: border .2s ease-in-out, outline .2s ease-in-out;

&:has(input:focus) {
border-color: var(--primary-accent);
outline: 1px solid var(--primary-accent);
border-color: var(--orange-1);
outline: 1px solid var(--orange-1);
}

label {
color: var(--foreground-3);
}

input {
Expand All @@ -55,7 +60,7 @@ select {
margin: 6px;

&:has(select:focus) {
outline: 2px solid var(--primary-accent);
outline: 2px solid var(--orange-1);
}

@media (max-width: 600px) {
Expand Down
Loading