Skip to content

Commit

Permalink
Switch to seven-column layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hkamran80 committed Oct 29, 2021
1 parent f7bd10a commit 2677692
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
80 changes: 79 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function loadTopSites(): void {
: "";
const imgClassNames =
topSitesContainer.id === "topSitesCenter" ? "w-8" : "w-6";
const maxTopSites = topSitesContainer.id === "topSitesCenter" ? 20 : 5;
const maxTopSites = topSitesContainer.id === "topSitesCenter" ? 21 : 5;

// Firefox-based Browsers
if (getBrowser() === Browsers.Gecko) {
Expand All @@ -376,6 +376,7 @@ function loadTopSites(): void {
a.title = site.title || "";
a.target = "_blank";
a.className = linkClassNames;
2;

if (site.favicon) {
const img = document.createElement("img");
Expand Down Expand Up @@ -424,6 +425,83 @@ function loadTopSites(): void {
});
});
}

// const topSites = [
// {
// url: "https://www.music-map.com/",
// title: "Music-Map - The Tourist Map of Music",
// },
// {
// url: "https://traintimes.org.uk/map/tube/schematic/",
// title: "Live map of London Underground trains",
// },
// { url: "https://www.zoomquilt.org/", title: "Zoomquilt" },
// {
// url: "http://hyperphysics.phy-astr.gsu.edu/hbase/index.html",
// title: "HyperPhysics Concepts",
// },
// {
// url: "https://www.mapcrunch.com/",
// title: "MapCrunch - Random Street View",
// },
// { url: "https://pointerpointer.com/", title: "Pointer Pointer" },
// {
// url: "https://ihavenotv.com/",
// title: "Documentaries - watch free online documentaries - ihavenotv.com",
// },
// {
// url: "https://10minutemail.com/",
// title: "10 Minute Mail - Free Anonymous Temporary email - 10 Minute Mail - Free Anonymous Temporary email",
// },
// { url: "http://radiooooo.com/", title: "Radiooooo" },
// {
// url: "https://www.windy.com/?18.730,52.031,3",
// title: "Windy: Wind map & weather forecast",
// },
// {
// url: "http://www.higherlowergame.com/",
// title: "The Higher Lower Game",
// },
// {
// url: "http://endless.horse/",
// title: "hooooooooooooooooooooooooooooooooooooooooooooooooooooooooorse",
// },
// { url: "https://quickdraw.withgoogle.com/", title: "Quick, Draw!" },
// {
// url: "https://archive.org/",
// title: "Internet Archive: Digital Library of Free & Borrowable Books, Movies, Music & Wayback Machine",
// },
// { url: "https://cat-bounce.com/", title: "CAT BOUNCE!" },
// ];

// if (topSitesContainer && topSitesContainer.id === "topSitesCenter") {
// topSitesContainer.classList.add(
// topSites.length >= 1 && topSites.length < 7
// ? `grid-cols-${topSites.length}`
// : "grid-cols-7"
// );
// }

// topSites.slice(0, maxTopSites).forEach((site) => {
// const a = document.createElement("a");
// a.href = site.url;
// a.title = site.title || "";
// a.target = "_blank";
// a.className = linkClassNames;

// const img = document.createElement("img");
// img.className = imgClassNames;
// getFavicon(
// new URL(site.url).host,
// (dataUrl: string) => (img.src = dataUrl)
// );

// a.appendChild(img);

// if (topSitesContainer) {
// topSitesContainer.appendChild(a);
// }
// });
}
}

Expand Down
9 changes: 8 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ module.exports = {
mode: "jit",
purge: {
content: ["./src/*.{html,css,ts}"],
safeList: ["grid-cols-1", "grid-cols-2", "grid-cols-3", "grid-cols-4"],
safeList: [
"grid-cols-1",
"grid-cols-2",
"grid-cols-3",
"grid-cols-4",
"grid-cols-5",
"grid-cols-6",
],
},
theme: {
fontFamily: {
Expand Down

0 comments on commit 2677692

Please sign in to comment.