image

@import "https://scrapbox.io/api/code/blu3mo-public/Move_Related_Page_List_Horizontally/style.css";

20240422

  • Fixed it as it was broken.

#css

  • /villagepump/Related Page List on the Left Side

    • Temporarily placed for now
    • Adjust the CSS to your liking once you like it
  • Let’s make adjustments as it looks promising

    • The emphasis is a bit too strong
      • Became smaller and more noticeable, the bold text is too loud
    • Would like to add .description
    • Maybe it’s better not to scroll together?
      • As the most important thing to see is the 1-hop link
      • If you want to see what’s below, you can scroll down as well
      • But it seems good to have the 2-hop link randomly visible, so I want to try it
    • It’s hard to distinguish between 1-hop link and 2-hop link
      • Want them to be more distinct
    • It’s unsettling that the center is off
      • If we split the page-wrapper, having icons only on the right might look unnatural
    • Which is better, left or right for display?
      • When I shifted it to the right, it was better
        • When reading documents, the eyes go from left to right
          • So, being on the left side makes it more noticeable
          • Currently, it’s too noticeable, so moving it to the right was a good idea
        • Also, it’s hard to put into words, but the balance improved
    • The fundamental issue is that hub-like pages stop functioning
      • Like Myself, Exploration of Virtual Time
      • Can we place only 1-hop on the right and 2-hop onwards below?
      • Or display on both below and to the right
      • Update: It became somewhat better by making it into two columns if the screen width is sufficient (blu3mo)
    • Handling the text above the image
      • Realized that by adding a shadow, we can make it semi-transparent using variables
        • Layering drop-shadows with filters three times made it look nice
    • Displaying the image
      • Set the height to 150% to make it overflow
        • This seems to be just right
        • Want to display images as large as possible, so it seems correct to let them overflow to a degree where the content is still understandable
  • Let’s decode while learning about flexbox

  • There are quite a few unnecessary CSS

  • Tried to recreate Scrapbox’s design but now feel like the original is better

  • todo: Fix the issue where lines are not broken only for code blocks ✅

style.css

.col-page {
	max-width: 1200px;
}
  • Adjust the width of the related-page-list in Flexbox to one or two columns depending on the screen width style.css
@media (min-width: 768px) {
	.related-page-list {
		flex-basis: 140px !important;
	}
	.related-page-list-search input {
   		width: 120px !important;
   	}
}
@media (min-width: 1240px) {
	.related-page-list {
		flex-basis: 295px !important;
	}
	.toolbar {
		width: 288px !important;
	}
}
  • Adjust the widths of the two flexbox elements
    • Set flex-shrink of related-page-list to 0, and let all the margins go to drag-and-drop-enter- The min-width: 0; is a solution for when a flexible element breaks out of its parent in flexbox - Qiita. style.css
@media (min-width: 768px) {
  .page-wrapper {
    display: flex;
    justify-content: space-around;
  }
  .drag-and-drop-enter {
    order: 1;
    margin-right: 20px;
    flex-basis: 100% !important;
    min-width: 0;
  }
  .related-page-list {
    order: 2;
    flex-shrink: 0;
    margin-top: 0px;
    background-color: var(--related-page-list-bg);
  }
  • related-page-sort-menu
    • image
    • Occasionally used on the homepage, but never used before, so it’s hidden. style.css
.related-page-sort-menu {
	display: none;
}

style.css

.links-container {
	gap: 10px !important;
}

To remove the gap between cards in a grid: style.css

.related-page-list .grid {
	gap: 0px !important;
}

  • CSS that applies to both link cards and page cards: style.css
.related-page-list .grid li {
	margin-bottom: 5px !important;
	margin-right: 0px !important;
	width: 140px;
	height: 50px !important;
}
.related-page-list .grid .splitter {
	height: 15px !important; 
}
  • relation-label (link card) style.css

.related-page-list .relation-label .arrow {
	display: none !important;
}

.related-page-list .relation-label a {
	/* Related Link Label */
	padding: 4px !important;
	/* border-bottom: 2px solid var(--relation-label-bg); */
}
.related-page-list .relation-label .title{
	font-size: 12px;
}
.related-page-list .relation-label .icon-lg{
	display: none !important;
}
  • .page-list-item (page card) style.css
.related-page-list .content {
	/* Card size adjustment */
	height: 100% !important;
}
.related-page-list .page-list-item .header {
	border-top-width: 5px !important;
	padding-top: 3px !important;
	padding-bottom: 3px !important;
	z-index: 1;
	/* background-color: var(--translucent-card-bg)*/
}
.related-page-list .page-list-item .header .title {
	font-size: 12px !important;
	filter: drop-shadow(0px 0px 6px var(--card-bg, #fff)) drop-shadow(0px 0px 8px var(--card-bg, #fff)) drop-shadow(0px 0px 10px var(--card-bg, #fff)) drop-shadow(0px 0px 14px var(--card-bg, #fff))
}
.related-page-list .page-list-item .description {
	padding-top: 0px !important;
	padding-bottom: 0px !important;
 	line-height: 1.4 !important;
 	z-index: 1;
}
.related-page-list .page-list-item .description .line {
 	font-size: 11px !important;
}	
.related-page-list .page-list-item .description .line .inline-icon {
	font-size: 9px !important;
}
.related-page-list .page-list-item .icon {
    position: absolute;
 	width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 1;
    padding: 5px !important;
 }
 
 .related-page-list .page-list-item .icon img {
 	width: 100% !important;
 	height: 150% !important;
    width: auto !important;
    margin-right: 0 !important;
 	object-fit: contain;
 }
  • When revealing hidden content… style.css
.related-page-list .ellipsis {
	height: 30px !important;
}

.related-page-list .ellipsis a {
 	padding: 2px !important;
 }

.related-page-list .ellipsis .circle {
	width: 30px !important;
	height: 30px !important;
}
  • Adjusting the search box style.css
.related-page-list-search {
    display: flex;
    width: 100%;
    align-items: baseline;
}

style.css

}