diff --git a/public/assets/css/BEM.css b/public/assets/css/BEM.css index 15c3cc99..92b4beaf 100644 --- a/public/assets/css/BEM.css +++ b/public/assets/css/BEM.css @@ -9,6 +9,11 @@ p { padding-left: 0.3em; } +.url-text { + margin:0px; + padding:0px; +} + /* CONTAINERS */ .wrapper { diff --git a/views/login.handlebars b/views/login.handlebars index f0e4ec41..7309d518 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -1,14 +1,15 @@
{{> topBar}} +

Log In

-

Log In

+

Log in to an existing channel:

{{>channelLoginForm}}
+

Create New

-

Create New

Create a brand new channel:

{{>channelCreationForm}} diff --git a/views/partials/publishForm-Channel.handlebars b/views/partials/publishForm-Channel.handlebars index 1488d01e..09f6df63 100644 --- a/views/partials/publishForm-Channel.handlebars +++ b/views/partials/publishForm-Channel.handlebars @@ -2,9 +2,9 @@
-
+
- {{#if user}} @@ -34,16 +34,31 @@ const createChannelTool = document.getElementById('channel-create-details'); const loginToChannelTool = document.getElementById('channel-login-details'); const selectedOption = event.target.selectedOptions[0].value; + const urlChannel = document.getElementById('url-channel'); if (selectedOption === 'new') { + // show/hide the login and new channel forms createChannelTool.hidden = false; loginToChannelTool.hidden = true; + // update URL + urlChannel.innerText = ''; } else if (selectedOption === 'login') { + // show/hide the login and new channel forms loginToChannelTool.hidden = false; createChannelTool.hidden = true; + // update URL + urlChannel.innerText = ''; } else { + // hide the login and new channel forms loginToChannelTool.hidden = true; createChannelTool.hidden = true; hideError(document.getElementById('input-error-channel-select')); + // update URL + if (selectedOption === 'none'){ + urlChannel.innerText = ''; + } else { + urlChannel.innerText = `${selectedOption}/`; + } + } } \ No newline at end of file diff --git a/views/partials/publishForm-Url.handlebars b/views/partials/publishForm-Url.handlebars index eba519f1..82b3e753 100644 --- a/views/partials/publishForm-Url.handlebars +++ b/views/partials/publishForm-Url.handlebars @@ -5,8 +5,7 @@
- Spee.ch/{{user.channelName}}/ - + Spee.ch/{{#if user.channelName}}{{user.channelName}}/{{/if}}