-
Notifications
You must be signed in to change notification settings - Fork 29
Create vertical layout option #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mhkeller
wants to merge
3
commits into
vsergeev:master
Choose a base branch
from
mhkeller:vertical-layout
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,22 @@ | ||
| <script lang="ts"> | ||
| import type { DailyWeather } from '../providers/Provider'; | ||
|
|
||
| import Icon from '@iconify/svelte'; | ||
| import type { DailyWeather, SunTimes } from '../providers/Provider'; | ||
|
|
||
| import Conditions from './scalars/Conditions.svelte'; | ||
| import Timestamp from './scalars/Timestamp.svelte'; | ||
| import Amount from './scalars/Amount.svelte'; | ||
| import DailyPrecipitationDetails from './DailyPrecipitationDetails.svelte'; | ||
| import DailySunDetails from './DailySunDetails.svelte'; | ||
|
|
||
| export let daily: DailyWeather; | ||
| export let suntimes: SunTimes; | ||
| </script> | ||
|
|
||
| <div class="grid place-items-center mb-4"> | ||
| <div><span class="text-lg sm:text-xl"><Conditions value={daily.conditions} /></span></div> | ||
| </div> | ||
|
|
||
| <div class="grid grid-flow-col place-items-center md:auto-cols-fr gap-4 md:gap-8 mb-6"> | ||
| <div> | ||
| <Icon icon="mingcute:sunrise-line" class="inline text-2xl sm:text-3xl align-bottom" /> | ||
| <span class="text-sm md:text-base"><Timestamp format="short" value={daily.sunrise_timestamp} /></span> | ||
| <Icon icon="mingcute:sunset-fill" class="inline text-2xl sm:text-3xl align-bottom" /> | ||
| <span class="text-sm md:text-base"><Timestamp format="short" value={daily.sunset_timestamp} /></span> | ||
| </div> | ||
| {#if daily.precipitation_probability !== undefined} | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Precipitation:</span> <span class="text-sm md:text-base">{daily.precipitation_probability}%</span> | ||
| </div> | ||
| {/if} | ||
| {#if daily.precipitation_amount !== undefined} | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Precipitation:</span> | ||
| <span class="text-sm md:text-base"><Amount value={daily.precipitation_amount} /></span> | ||
| </div> | ||
| {/if} | ||
| <div class="grid grid-cols-2 md:grid-cols-none md:grid-flow-col md:place-items-center md:justify-center gap-2 md:gap-8 "> | ||
| <DailyPrecipitationDetails precipitation={{ precipitation_probability: daily.precipitation_probability, precipitation_amount: daily.precipitation_amount }}/> | ||
| </div> | ||
|
|
||
| <div class="grid grid-cols-2 md:grid-cols-none md:grid-flow-col md:place-items-center md:justify-center gap-2 md:gap-8 md:mx-0 mt-3 mb-6"> | ||
| <DailySunDetails {suntimes} /> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <script lang="ts"> | ||
| import type { DailyPrecipitation } from '../providers/Provider'; | ||
|
|
||
| import Amount from './scalars/Amount.svelte'; | ||
|
|
||
| export let precipitation: DailyPrecipitation; | ||
| </script> | ||
|
|
||
| {#if precipitation.precipitation_probability !== undefined && precipitation.precipitation_amount !== undefined} | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Precipitation:</span> <span class="text-sm md:text-base">{precipitation.precipitation_probability}%</span> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These line indents need to be normalized. You can run |
||
| </div> | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Amount:</span> <Amount value={precipitation.precipitation_amount} /> | ||
| </div> | ||
| {:else if precipitation.precipitation_probability !== undefined} | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Precipitation:</span> <span class="text-sm md:text-base">{precipitation.precipitation_probability}%</span> | ||
| </div> | ||
| {:else if precipitation.precipitation_amount !== undefined} | ||
| <div> | ||
| <span class="text-sm md:text-base font-semibold">Precipitation:</span> <span class="text-sm md:text-base"><Amount value={precipitation.precipitation_amount} /></span> | ||
| </div> | ||
| {/if} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <script lang="ts"> | ||
| import type { SunTimes } from '../providers/Provider'; | ||
|
|
||
| import Icon from '@iconify/svelte'; | ||
|
|
||
| import Timestamp from './scalars/Timestamp.svelte'; | ||
|
|
||
| export let suntimes: SunTimes; | ||
| </script> | ||
|
|
||
| <div> | ||
| <span class="inline-block" style="transform:translate(-2px,-2px)"><Icon icon="mingcute:sunrise-line" class="inline text-2xl sm:text-3xl align-bottom" /></span> | ||
| <span class="font-semibold">Sunrise: </span><Timestamp format="short" value={suntimes.sunrise_timestamp} /> | ||
| </div> | ||
| <div> | ||
| <span class="inline-block" style="transform:translate(-2px,-2px)"><Icon icon="mingcute:sunset-fill" class="inline text-2xl sm:text-3xl align-bottom" /></span> | ||
| <span class="font-semibold">Sunset: </span><Timestamp format="short" value={suntimes.sunset_timestamp} /> | ||
| </div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't belong in this commit or PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to help test and can be removed before the final merge