Commit f07cc876 authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Namespacing

parent 9ce24be3
......@@ -14,7 +14,7 @@ typedef struct
version CINERA_APP_VERSION = {
.Major = 0,
.Minor = 5,
.Patch = 6
.Patch = 7
};
#define CINERA_DB_VERSION 1
......@@ -1998,14 +1998,14 @@ HMMLToBuffers(buffers *CollationBuffers, char *Filename)
int UniqueRefs = 0;
CopyStringToBuffer(&CollationBuffers->Menus,
" <div class=\"title %s\">\n"
" <div class=\"cineraMenus %s\">\n"
" <span class=\"episode_name\">", StringsDiffer(Config.Theme, "") ? Config.Theme : HMML.metadata.project);
CopyStringToBufferHTMLSafe(&CollationBuffers->Menus, HMML.metadata.title);
CopyStringToBuffer(&CollationBuffers->Menus, "</span>\n"
" <span id=\"focus-warn\">⚠ Click here to regain focus ⚠</span>\n");
CopyStringToBuffer(&CollationBuffers->Player,
" <div class=\"player_container\">\n"
" <div class=\"cineraPlayerContainer\">\n"
" <div class=\"video_container\" data-videoId=\"%s\"></div>\n"
" <div class=\"markers_container %s\">\n", HMML.metadata.id, StringsDiffer(Config.Theme, "") ? Config.Theme : HMML.metadata.project);
......@@ -3733,9 +3733,10 @@ IndexToBuffer(buffers *CollationBuffers)
return RC_ERROR_PROJECT;
}
char queryContainer[512];
int ThemeStringLength = StringsDiffer(Config.Theme, "") ? (StringLength(Config.Theme) * 2) : (StringLength(Config.ProjectID) * 2);
char queryContainer[512 + ThemeStringLength];
CopyString(queryContainer,
"<div class=\"queryContainer %s\">\n"
"<div class=\"cineraQueryContainer %s\">\n"
" <label for=\"query\">Query:</label>\n"
" <div class=\"inputContainer\">\n"
" <input type=\"text\" id=\"query\" autofocus=\"\">\n"
......@@ -3744,8 +3745,8 @@ IndexToBuffer(buffers *CollationBuffers)
" </div>\n"
" </div>\n"
" </div>\n"
" <div id=\"resultsSummary\">Found: 0 episodes, 0 markers, 0h 0m 0s total.</div>\n"
" <div id=\"results\"></div>\n"
" <div id=\"cineraResultsSummary\">Found: 0 episodes, 0 markers, 0h 0m 0s total.</div>\n"
" <div id=\"cineraResults\"></div>\n"
"\n"
" <dl id=\"cineraIndex\" class=\"%s\">\n",
StringsDiffer(Config.Theme, "") ? Config.Theme : Config.ProjectID,
......
This diff is collapsed.
/* Search */
.dayContainer.hero,
#cineraIndex.hero dt {
background-color: #161616;
}
.dayContainer:nth-child(2n).hero,
#cineraIndex.hero dt:nth-child(2n) {
background-color: #303030;
}
.dayContainer.hero > .dayName,
#cineraIndex.hero dt a {
color: #8A877D;
}
.markerList.hero > .marker
{
border-color: rgba(255, 255, 255, 0.1);
color: #ddd;
}
.markerList.hero > .marker b {
color: black;
background-color: rgb(255, 155, 0);
}
.markerList.hero > .marker:hover {
background-color: #444;
}
/* Player */
.title.hero,
.title.hero .menu .refs,
.title.hero .menu > .refs .ref,
.markers_container.hero,
.markers_container.hero > .marker {
background-color: #161616;
border-color: #000;
}
.title.hero,
.title.hero .menu > .refs .ref,
.markers_container.hero > .marker > .content {
color: #8A877D;
}
.title.hero .menu {
transition: box-shadow 800ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
box-shadow: inset 0 0 0 #B57714;
}
.title.hero .menu:hover,
.title.hero .menu > .refs .ref:hover,
.markers_container.hero > .marker:hover > .content {
background-color: #222;
}
.title.hero .menu.current {
box-shadow: inset 0px 0px 30px #B57714;
}
.title.hero .menu > .refs .ref.current,
.markers_container.hero > .marker .progress .content {
background-color: #8B3D23;
color: #000;
}
.title.hero .menu > .refs .ref .source,
.title.hero .menu > .refs .ref .quote_byline {
color: #6B3E0B;
}
.title.hero .menu > .refs .ref.current .source,
.title.hero .menu > .refs .ref.current .quote_byline {
color: #111;
}
.title.hero .menu > .refs .ref.current:hover,
.markers_container.hero > .marker:hover .faded .content {
background-color: rgba(139, 61, 35, 0.7);
}
.title.hero .menu > .refs .ref .timecode:hover {
color: #FFF;
}
/* Regular */
.markers_container.hero > .marker.current > .content {
color: #B57714;
}
/* Blackboard */
.markers_container.hero > .marker.blackboard {
background: #000;
border-color: #161616;
}
.markers_container.hero > .marker.blackboard > .content {
color: #D7BA82;
}
.markers_container.hero > .marker:hover.blackboard > .content {
background: #111;
}
/* Run */
.markers_container.hero > .marker.run > .content,
.markers_container.hero > .marker.run > .progress .content,
.markers_container.hero > .marker:hover.run > .faded .content {
background: hsla(128, 16%, 64%, .2);
background-image: linear-gradient(to right, blue 4%, black 4%, black 96%, red 4%),
linear-gradient(to bottom, blue 4%, black 4%, black 96%, red 4%),
/*#236a58*/
}
.markers_container.hero > .marker.run > .content {
color: #D7BA82;
}
.markers_container.hero > .marker:hover.run > .content {
background: #111;
}
.markers_container.hero > .marker.run > .progress .content {
color: #D7BA82;
}
.markers_container.hero > .marker:hover.run > .faded .content {
background: #111;
}
.dayContainer.riscy,
#cineraIndex.riscy dt,
.title.riscy,
.title.riscy > .menu .refs,
.title.riscy > .menu .filter_container,
.title.riscy > .menu > .refs .ref,
.title.riscy > .menu > .filter_container .filter_mode,
.title.riscy > .menu > .credits_container,
.title.riscy > .menu > .credits_container .credit,
.markers_container.riscy,
.markers_container.riscy > .marker {
background-color: #EEE;
}
.dayContainer:nth-child(2n).riscy,
#cineraIndex.riscy dt:nth-child(2n) {
background-color: #FFF;
}
.markerList.riscy > .marker,
.title.riscy,
.title.riscy > .menu .refs,
.title.riscy > .menu .filter_container,
.title.riscy > .menu > .refs .ref,
.title.riscy > .menu > .filter_container .filter_mode,
.title.riscy > .menu > .credits_container,
.title.riscy > .menu > .credits_container .credit,
.markers_container.riscy,
.markers_container.riscy > .marker {
border-color: rgba(246, 178, 26, 0.8);
}
.dayContainer.riscy > .dayName,
.markerList.riscy > .marker,
#cineraIndex.riscy dt a,
.title.riscy,
.title.riscy > .menu > .refs .ref,
/*.title.riscy > .menu > .refs .ref .timecode:hover:before,*/
.title.riscy > .menu > .refs .ref .timecode.focused:before,
.title.riscy > .menu > .credits_container .credit .name,
.markers_container.riscy > .marker > .content {
color: #000;
}
.title.riscy > .menu {
transition: box-shadow 800ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
box-shadow: inset 0 0 0 #2A3172;
}
.title.riscy > .menu.current {
box-shadow: inset 0px 0px 30px #2A3172;
}
/*.title.riscy > .menu > .refs .ref .ref_indices .timecode:hover,*/
.title.riscy > .menu > .refs .ref .ref_indices .timecode.focused,
.markers_container.riscy > .marker.current > .content {
color: #2A3172;
}
.title.riscy > .menu > .refs .ref.current .ref_indices .timecode.focused {
color: rgb(246, 178, 26);
}
.markerList.riscy > .marker:hover,
#cineraIndex.riscy dt:hover,
/*.title.riscy > .menu:hover,*/
.title.riscy > .menu.visible,
/*.title.riscy > .menu > .refs .ref:hover,*/
.title.riscy > .menu > .quotes_container .ref.focused,
.title.riscy > .menu > .references_container .ref.focused,
.title.riscy > .menu > .filter_container .filter_mode:hover,
/*.title.riscy > .menu > .filter_container .filter_content:hover,*/
.title.riscy > .menu > .filter_container .filter_content.focused,
/*.title.riscy > .menu > .credits_container .credit *:hover,*/
.title.riscy > .menu > .credits_container .credit *.focused,
.markers_container.riscy > .marker:hover > .content {
background-color: #FFF8E7;
}
.title.riscy > .menu > .refs .ref.current .source,
.title.riscy > .menu > .refs .ref.current .quote_byline,
.title.riscy > .menu > .refs .ref.current .ref_indices .timecode.focused:before {
color: #FFF8E7;
}
.markerList.riscy > .marker b,
.title.riscy > .menu > .refs .ref.current,
/*.title.riscy > .menu > .refs .ref.current .timecode:hover:before,*/
.markers_container.riscy > .marker > .progress .content {
background-color: rgb(42, 49, 114);
color: #FFF;
}
/*.title.riscy > .menu > .refs .ref.current:hover,*/
.markers_container.riscy > .marker:hover > .faded .content {
background-color: rgba(42, 49, 114, 0.7);
}
.title.riscy > .menu > .refs .ref .source,
.title.riscy > .menu > .refs .ref .quote_byline,
.title.riscy > .menu > .filter_container .filter_content.off .text,
.title.riscy > .menu > .credits_container .credit .role {
color: #888;
}
/* Blackboard */
.title.riscy .filter_content.blackboard,
.markers_container.riscy .blackboard > .content,
.markers_container.riscy .off_blackboard > .content,
.markers_container.riscy > .marker.blackboard > .progress .content,
.markers_container.riscy > .marker:hover.blackboard > .faded .content {
background-size: 12px 12px;
background-position: center;
}
.title.riscy .filter_content.blackboard,
.markers_container.riscy .blackboard > .content {
background-image: linear-gradient(to right , rgba(51, 153, 255, .16) 1px, transparent 1px),
linear-gradient(to bottom, rgba(51, 153, 255, .16) 1px, transparent 1px);
}
.markers_container.riscy .off_blackboard > .content {
background-image: linear-gradient(to right , rgba(51, 153, 255, .08) 1px, transparent 1px),
linear-gradient(to bottom, rgba(51, 153, 255, .08) 1px, transparent 1px);
}
.markers_container.riscy > .marker.blackboard > .progress .content {
background-image: linear-gradient(to right , rgba(255, 255, 255, .16) 1px, transparent 1px),
linear-gradient(to bottom, rgba(255, 255, 255, .16) 1px, transparent 1px);
}
.markers_container.riscy > .marker:hover.blackboard > .faded .content {
background-image: linear-gradient(to right , rgba(0, 0, 0, .16) 1px, transparent 1px),
linear-gradient(to bottom, rgba(0, 0, 0, .16) 1px, transparent 1px);
}
/* TODO(matt):
*
* .markers_container.riscy > marker.run
*/
@keyframes riscy_fade_mode {
0% { color: #FFF; }
100% { color: #000; }
}
@keyframes riscy_fade_text {
0% { color: #000; }
100% { color: #888; }
}
@keyframes riscy_fade_background {
0% { background-color: rgba(246, 178, 26, 0.8);}
100% { background-color: #EEE; }
}
/* TODO(matt): Get this to work! */
.title.riscy > .menu > .filter_container .filter_mode.responsible {
animation-name: riscy_fade_mode;
}
.title.riscy .filter_content.responsible .text {
animation-name: riscy_fade_text;
}
.title.riscy > .menu.filter.responsible,
.title.riscy .filter_content.responsible,
.title.riscy > .menu > .filter_container .filter_mode.responsible {
animation-name: riscy_fade_background;
}
var menuState = [];
var titleBar = document.querySelector(".title");
var titleBar = document.querySelector(".cineraMenus");
var quotesMenu = titleBar.querySelector(".quotes_container");
if(quotesMenu)
{
......@@ -143,7 +143,7 @@ helpButton.addEventListener("click", function(ev) {
var focusedElement = null;
var focusedIdentifier = null;
var playerContainer = document.querySelector(".player_container")
var playerContainer = document.querySelector(".cineraPlayerContainer")
var player = new Player(playerContainer, onRefChanged);
window.addEventListener("resize", function() { player.updateSize(); });
document.addEventListener("keydown", function(ev) {
......
......@@ -12,7 +12,7 @@ var lastQuery = null;
var resultsToRender = [];
var resultsIndex = 0;
var resultsMarkerIndex = 0;
var resultsContainer = document.getElementById("results");
var resultsContainer = document.getElementById("cineraResults");
var rendering = false;
var dayContainerPrototype = document.createElement("DIV");
......@@ -118,7 +118,7 @@ function runSearch() {
var totalTime = Math.floor(totalSeconds/60/60) + "h " + Math.floor(totalSeconds/60)%60 + "m " + totalSeconds%60 + "s ";
document.getElementById("resultsSummary").textContent = "Found: " + numEpisodes + " episodes, " + numMarkers + " markers, " + totalTime + "total.";
document.getElementById("cineraResultsSummary").textContent = "Found: " + numEpisodes + " episodes, " + numMarkers + " markers, " + totalTime + "total.";
}
function renderMatches(renderStart) {
......@@ -133,7 +133,7 @@ function renderMatches(renderStart) {
dayName.textContent = episode.day + ": " + episode.title;
resultsContainer.appendChild(dayContainer);
} else {
markerList = document.querySelector("#results > .dayContainer:nth-child(" + (resultsIndex+1) + ") .markerList");
markerList = document.querySelector("#cineraResults > .dayContainer:nth-child(" + (resultsIndex+1) + ") .markerList");
}
do {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment