Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Sep 27, 2022
1 parent ec98990 commit 12abbc5
Show file tree
Hide file tree
Showing 14 changed files with 1,396 additions and 588 deletions.
972 changes: 405 additions & 567 deletions package-lock.json

Large diffs are not rendered by default.

85 changes: 81 additions & 4 deletions public/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ html(lang=lang)
d='M11.2 0a.8.8 0 0 0-.8.8v11.4L7.26 9.44a.803.803 0 0 0-1.13.074l-1.05 1.2a.8.8 0 0 0 .073 1.13l6.33 5.54a.795.795 0 0 0 1.05 0l6.32-5.54a.8.8 0 0 0 .074-1.13l-1.05-1.2a.804.804 0 0 0-1.13-.074l-3.14 2.76V.8a.8.8 0 0 0-.8-.8zm-8 20.8a.8.8 0 0 0-.8.8v1.6a.8.8 0 0 0 .8.8h17.6a.8.8 0 0 0 .8-.8v-1.6a.8.8 0 0 0-.8-.8z'
)

body.no-js.order-alpha.download-svg(tabindex='-1')
body.no-js.order-alpha.layout-comfortable.download-svg(tabindex='-1')
.popup_modal.popup__top.hidden
.popup-body
table.extensions__table
Expand All @@ -63,7 +63,26 @@ html(lang=lang)
href=ext.author.url,
rel='noopener',
target='_blank'
) #{ ext.author.name }
) #{ ext.nameAuthor }
.detail_modal.detail__top.hidden
.detail-body
.icon-left
#icon_container.icon-preview
.icon-right
h2#icon-title.grid-item__title
div
button#icon-hex.grid-item__color.copy-color
div
a#icon-source
div
a#icon-guidelines
div
a#icon-license
.detail-footer
a#icon-download-svg.detail-button(role='button', download) SVG
a#icon-download-color-svg.detail-button(role='button', download) Color SVG
a#icon-download-pdf.detail-button(role='button', download) PDF
a#icon-report.report__icon.detail-button(role='button') Report
header.header
ul.header__list
li.header__list-item
Expand Down Expand Up @@ -331,6 +350,35 @@ html(lang=lang)
path(
d='M17.612 7.239H24l-.006.882-.01.885-2.006.012h-2.01v2.151h3.753v1.751h-3.752v3.841h-2.357V12Zm-7.653.02c.56-.024 1.078-.02 1.545.013.92.062 1.597.221 2.217.522.843.406 1.473 1.03 1.845 1.825.614 1.315.567 3.328-.109 4.661-.793 1.567-2.167 2.308-4.564 2.458-.713.046-2.226-.015-2.79-.11L8 16.61V7.435l.164-.022a22.974 22.974 0 0 1 1.795-.151zm-7.917 0c.687-.019 1.344 0 1.71.053.623.1 1.063.255 1.47.523.834.55 1.271 1.57 1.166 2.703-.078.802-.33 1.392-.8 1.872-.462.47-1.042.759-1.842.918-.301.059-.45.071-1.04.071h-.69l-.007 1.675L2 16.748l-1.002.013H0l.006-4.66.01-4.662.14-.024c.483-.084 1.2-.137 1.886-.157Zm.78 1.62c-.283 0-.57 0-.645.019a.968.968 0 0 0-.162.045c-.018.013-.03.526-.03 1.398v1.38l.117.025c.214.043.937.024 1.148-.03.778-.206 1.19-.774 1.144-1.573-.034-.6-.32-.987-.875-1.186-.158-.059-.263-.071-.697-.078Zm8.244 0a5.62 5.62 0 0 0-.725.015 1.973 1.973 0 0 0-.254.043c-.031.013-.04.651-.04 3.057 0 2.87.002 3.045.055 3.066.096.041 1.188.026 1.417-.021 1.24-.243 2-1.036 2.233-2.329a5.674 5.674 0 0 0 .05-1.389c-.056-.46-.137-.743-.317-1.11-.142-.279-.198-.359-.443-.598-.372-.366-.72-.55-1.29-.68a4.624 4.624 0 0 0-.686-.055z'
)
.control-field
label.control-field__title Layout
.control-field__row
button#layout-comfortable.control__button.first__button(
title='Comfortable layout',
disabled
)
svg(
role='img',
viewBox='0 0 24 24',
xmlns='http://www.w3.org/2000/svg',
aria-labelledby='layout-comfortable'
)
path(
d='M19 2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h14zm0 4V4H5v2h14zm0 10a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h14zm0 4v-2H5v2h14zm0-11a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h14zm0 4v-2H5v2h14z'
)
button#layout-compact.control__button(
title='Compact layout',
disabled
)
svg(
role='img',
viewBox='0 0 24 24',
xmlns='http://www.w3.org/2000/svg',
aria-labelledby='layout-compact'
)
path(
d='M2 5.5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-13zm9 0H4v3h7v-3zm2 0v3h7v-3h-7zm7 5h-7v3h7v-3zm0 5h-7v3h7v-3zm-9 3v-3H4v3h7zm-7-5h7v-3H4v3z'
)
ul.grid
li.grid-item--if-empty.hidden(
aria-hidden='true',
Expand Down Expand Up @@ -391,13 +439,42 @@ html(lang=lang)
title=`${ t_('$iconTitle color').replace('$iconTitle', icon.localizedTitle || icon.title) }`,
disabled
) ##{ icon.hex }
button.grid-item__button.view-button(
title=`${icon.title} view`,
index=`${icon.indexByAlpha}`
)
svg(
role='img',
xmlns='http://www.w3.org/2000/svg',
viewBox='0 0 24 24'
)
path(
d='m23.136 20.694-4.41-4.413a1.93 1.93 0 0 0-1.186-.551 9.632 9.632 0 0 0 2.13-6.044C19.67 4.344 15.325 0 9.983 0 4.642 0 .297 4.344.297 9.686c0 5.34 4.344 9.685 9.685 9.685 2.016 0 3.89-.62 5.44-1.677.01.48.195.957.563 1.325l4.413 4.413c.377.38.874.568 1.369.568s.992-.189 1.369-.568a1.935 1.935 0 0 0 0-2.738zm-13.154-4.55a6.465 6.465 0 0 1-6.458-6.458 6.465 6.465 0 0 1 6.458-6.458 6.465 6.465 0 0 1 6.458 6.458 6.465 6.465 0 0 1-6.458 6.458z'
)
a.grid-item__button(
href=`/icons/${icon.slug}.svg`,
role='button',
download
)
svg(role='img', viewBox='0 0 24 24')
use(href='#cp')
svg(
role='img',
xmlns='http://www.w3.org/2000/svg',
viewBox='0 0 24 24'
)
path(
d='M11.2 0a.8.8 0 0 0-.8.8v11.4L7.26 9.44a.803.803 0 0 0-1.13.074l-1.05 1.2a.8.8 0 0 0 .073 1.13l6.33 5.54a.795.795 0 0 0 1.05 0l6.32-5.54a.8.8 0 0 0 .074-1.13l-1.05-1.2a.804.804 0 0 0-1.13-.074l-3.14 2.76V.8a.8.8 0 0 0-.8-.8zm-8 20.8a.8.8 0 0 0-.8.8v1.6a.8.8 0 0 0 .8.8h17.6a.8.8 0 0 0 .8-.8v-1.6a.8.8 0 0 0-.8-.8z'
)
a.report__icon.grid-item__button(
href=`https://github.com/simple-icons/simple-icons/issues/new?labels=icon+outdated&template=icon_update.md&title=Update%20${icon.title}%20icon`,
role='button',
title=`Report ${icon.title} as outdated`
)
svg(
role='img',
xmlns='http://www.w3.org/2000/svg',
viewBox='0 0 24 24'
)
path(d='M7 2h2v20H7V2m12 7-8 5.6V3.4L19 9Z')
footer.footer
.footer-description
//- prettier-ignore
Expand Down
67 changes: 67 additions & 0 deletions public/removed.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
doctype html
html(lang='en-US')
head
meta(charset='UTF-8')
meta(
content='initial-scale=1, shrink-to-fit=no, width=device-width',
name='viewport'
)
link(rel='preconnect', href='https://fonts.gstatic.com')
title #{ pageTitle }
meta(name='description', content=pageDescription)
meta(property='og:type', content='website')
meta(property='og:title', content=pageTitle)
meta(property='og:description', content=pageDescription)
meta(property='og:url', content=pageUrl)
meta(property='og:site_name', content=pageTitle)
meta(property='og:image', content=`${pageUrl}/images/og.png`)
link(rel='icon', type='image/x-icon', href=`${pageUrl}/images/favicon.ico`)
link(rel='icon', type='image/png', href=`${pageUrl}/images/favicon.png`)
link(rel='apple-touch-icon', href=`${pageUrl}/images/apple-touch-icon.png`)
link(rel='mask-icon', href=`${pageUrl}/images/logo.svg`, color='#111111')
link(
rel='stylesheet',
href='https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&family=Roboto+Mono:wght@400;600&display=swap'
)
link(rel='license', href='license.txt')
link(rel='canonical', href=pageUrl)

body.no-js.removed
.header
p.control-field__title Removed icons
main.main.no-header
ul.grid.grid-top-padding
each icon in removedIcons
li.grid-item
.grid-item__row.mv-2.fg-2
button(
class=`grid-item__color copy-button copy-color ${icon.light ? "contrast-light" : "contrast-dark"} ${icon.superLight ? "border-light" : ""} ${icon.superDark ? "border-dark" : ""}`,
style=`background-color: #${icon.hex}`,
title=`${icon.title} color`,
disabled
) #{ icon.hex }
button.grid-item__preview.copy-button.copy-svg(
title=`${icon.title} SVG`,
disabled
)
if (icon.path)
svg.icon-preview(
role='img',
viewBox='0 0 24 24',
xmlns='http://www.w3.org/2000/svg',
alt=`${icon.title} icon`
)
path(fill=`#${icon.hex}`, d=`${icon.path}`)
else
svg.icon-preview(
role='img',
viewBox='0 0 24 24',
xmlns='http://www.w3.org/2000/svg',
alt=`${icon.title} icon`
)
path(
fill='#DDDDDD',
d='M 11.455899,0.00555608 C 10.337678,0.07713592 9.6134609,0.19580776 8.6978704,0.4557556 5.4501509,1.3768751 2.7108843,3.673081 1.2117925,6.72841 0.56637626,8.0432186 0.18362942,9.4258398 0.03540883,10.96669 c -0.05816251,0.623498 -0.04315283,1.748055 0.03377178,2.401692 0.26642182,2.273602 1.14261189,4.375789 2.56477909,6.150215 0.3808706,0.476571 1.0412965,1.162231 1.4859583,1.546501 1.8368096,1.582292 4.0000797,2.550503 6.369733,2.850008 0.568492,0.07158 0.829285,0.08665 1.529111,0.08477 0.733598,0 1.060059,-0.0226 1.688589,-0.113021 2.078841,-0.295738 4.037604,-1.132092 5.69805,-2.431831 0.788008,-0.615963 1.58915,-1.43348 2.197042,-2.243463 1.283327,-1.706614 2.076964,-3.699547 2.328376,-5.843175 0.07692,-0.653637 0.09193,-1.778194 0.03377,-2.401692 -0.0394,-0.403108 -0.10882,-0.902283 -0.174487,-1.2432288 C 23.09403,6.1030282 20.754396,2.9949562 17.45039,1.3034116 16.084509,0.60456632 14.637951,0.18827304 13.060059,0.041346 12.763617,0.0130908 11.696054,-0.01139704 11.455899,0.00555608 Z m 0.981258,3.84082352 c 1.371509,0.050859 2.874354,0.5726387 4.056366,1.407109 0.300194,0.2109721 0.617273,0.4690363 0.598511,0.4841057 -0.01689,0.01507 -5.382847,3.9387749 -10.274126,7.5139997 -1.2364224,0.904166 -2.2552044,1.642569 -2.2627093,1.642569 -0.033772,0 -0.2495359,-0.717682 -0.339594,-1.130208 C 3.7840764,11.795509 4.1067845,9.648114 5.1011758,7.90571 5.6640388,6.916778 6.4445422,6.0314484 7.3376181,5.3721604 8.4464583,4.5546433 9.7072714,4.049817 11.071276,3.8840532 c 0.260793,-0.032023 0.833037,-0.062161 1.003772,-0.054627 0.05629,0.00377 0.219517,0.011302 0.362109,0.016953 z m 7.082693,5.4476026 c 0.529091,1.5088278 0.594758,3.2116748 0.181992,4.8184538 -0.230774,0.896631 -0.619149,1.76124 -1.138859,2.533549 -0.470929,0.698845 -1.076945,1.348715 -1.750504,1.874262 -1.804914,1.41276 -4.174568,1.966562 -6.407257,1.495642 C 9.4164588,19.808684 8.5083732,19.424413 7.6565738,18.857426 7.3676375,18.66529 6.9811382,18.369552 6.9811382,18.341297 c 0,-0.01507 12.4617868,-9.1509172 12.4880538,-9.1528009 0.0075,-0.00188 0.02814,0.047092 0.05066,0.1054861 z'
)
.grid-item__row
h2.grid-item__title(title=`${icon.title}`) #{ icon.title }
2 changes: 2 additions & 0 deletions public/scripts/dom-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export const removeClass = ($el, clazz) => {
}
};

export const removeClasses = removeClass;

export const toggleClass = ($el, clazz) => {
if ($el) {
$el.classList.toggle(clazz);
Expand Down
4 changes: 3 additions & 1 deletion public/scripts/download-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default (document, storage) => {
const $body = document.querySelector('body');
const $downloadPdf = document.getElementById('download-pdf');
const $downloadSvg = document.getElementById('download-svg');
const $downloadFiles = document.getElementsByClassName('grid-item__button');
const $downloadFiles = document.getElementsByClassName(
'grid-item__button[data-icon]',
);

$downloadPdf.disabled = false;
$downloadSvg.disabled = false;
Expand Down
6 changes: 6 additions & 0 deletions public/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ const detachedInitModal = async () => {
initModal(document, domUtils);
};

const detachedInitLayout = async () => {
const { default: initLayout } = await import('./layout.js');
initLayout(document, storage);
};

detachedInitColorScheme();
detachedInitCopyButtons();
detachedInitSearch();
detachedInitDownloadType();
detachedInitModal();
detachedInitLayout();
52 changes: 52 additions & 0 deletions public/scripts/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { STORAGE_KEY_LAYOUT } from './storage.js';

const LAYOUT_COMPACT = 'layout-compact';
const LAYOUT_COMFORTABLE = 'layout-comfortable';

const DEFAULT_LAYOUT = LAYOUT_COMFORTABLE;

const initLayout = (document, storage) => {
let activelayout = DEFAULT_LAYOUT;

const $body = document.querySelector('body');
const $layoutComfortable = document.getElementById('layout-comfortable');
const $layoutCompact = document.getElementById('layout-compact');

function selectlayout(selected) {
if (selected === activelayout) {
return;
}

if (selected === LAYOUT_COMFORTABLE) {
$body.classList.add(LAYOUT_COMFORTABLE);
$body.classList.remove(LAYOUT_COMPACT);
} else if (selected === LAYOUT_COMPACT) {
$body.classList.add(LAYOUT_COMPACT);
$body.classList.remove(LAYOUT_COMFORTABLE);
} else {
selected = DEFAULT_LAYOUT;
$body.classList.remove(LAYOUT_COMFORTABLE, LAYOUT_COMPACT);
$body.classList.add(DEFAULT_LAYOUT);
}

storage.setItem(STORAGE_KEY_LAYOUT, selected);
activelayout = selected;
}

const storedlayout = storage.getItem(STORAGE_KEY_LAYOUT);
selectlayout(storedlayout);

$layoutComfortable.addEventListener('click', (event) => {
event.preventDefault();
selectlayout(LAYOUT_COMFORTABLE);
});
$layoutCompact.addEventListener('click', (event) => {
event.preventDefault();
selectlayout(LAYOUT_COMPACT);
});

$layoutComfortable.disabled = false;
$layoutCompact.disabled = false;
};

export default initLayout;
Loading

0 comments on commit 12abbc5

Please sign in to comment.