Skip to content

Commit

Permalink
mobile styling
Browse files Browse the repository at this point in the history
  • Loading branch information
printerscanner committed Apr 2, 2024
1 parent 98fe070 commit 4452f58
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/FontDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function FontDemo(props) {
/>
<ColorPicker onColorChange={handleColorChange} text={"Color"} />
<br />
{props.showDownload && <a className="button corner-button" href={`/fonts/${props.link}`}>Download</a>}
{props.showDownload && <a className="button corner-button" href={`/fonts/${props.link}`}>Details</a>}
</div>
<style>
{`
Expand Down
15 changes: 14 additions & 1 deletion src/css/components/AlphabetGrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
flex: 30%;
}

@media only screen and (max-width: 1000px) {
.AlphabetGrid {
flex-direction: column;
}
.AlphabetGrid__sidebar {
flex: 100%;
}

.AlphabetGrid__main {
flex: 100%;
}
}


.AlphabetGrid__glyphs-list {
margin: 0;
Expand Down Expand Up @@ -44,5 +57,5 @@

.AlphabetGrid__glyphs-list.selected li {
font-size: 10rem;
padding: 8rem;
padding: 7rem;
}
7 changes: 7 additions & 0 deletions src/css/components/FontDemo.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
transition: background-color 0.3s; /* Add a smooth transition effect */
transition: all .2s;
text-align: center;
word-wrap: break-word;
}

@media only screen and (max-width: 1000px) {
.FontDemo__content {
font-size: 75px !important;
}
}

.FontDemo__content:focus,
.FontDemo__content:hover {
Expand Down
8 changes: 8 additions & 0 deletions src/css/elements/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
margin-left: 10px;
}

@media only screen and (max-width: 1000px) {
.button + .button {
margin-left: 0px;
margin-top: 10px;
}

}

.button:hover {
background-color: var(--button-hover);
border-bottom-left-radius: 15px;
Expand Down
20 changes: 20 additions & 0 deletions src/css/elements/grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,30 @@
border: 1px solid;
}

@media only screen and (max-width: 1000px) {
.condensed-grid .grid-item {
writing-mode: vertical-rl; /* Vertical writing mode from right to left */
white-space: nowrap; /* Prevent text from wrapping */
}
}



.grid-item + .grid-item {
margin-left: 1rem;
}

@media only screen and (max-width: 1000px) {
.grid-item + .grid-item {
margin-top: 1rem;
margin-left: 0;
}
.condensed-grid .grid-item + .grid-item {
margin-top: 0rem !important;
margin-left: 0;
}
}


.grid-item p {
padding-top: 1px;
Expand Down
12 changes: 12 additions & 0 deletions src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ p {
display: flex;
margin-bottom: 2rem;
}
@media only screen and (max-width: 1000px) {
.flex {
flex-direction: column;
}
}

.flex-child {
flex-basis: 50%;
Expand All @@ -98,6 +103,13 @@ p {
padding: 1rem;
}

@media only screen and (max-width: 1000px) {
.Detail {
flex-direction: column;
}
}



.FourOhFour__emoji {
font-size: 18rem;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Detail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function Font({ fontData }) {
<div className='flex-child'>
<div className="flex">
<a className="button" href={`https://github.com/mother-type/${name}/raw/main/fonts/${name}.zip`} download>
<u>Download Specimen</u>
<u>Download Specimen</u>
</a>
<a className={repository_url ? "button" : "hidden"} href={repository_url || "#"}>
<u>Source Files</u>
Expand Down

0 comments on commit 4452f58

Please sign in to comment.